/* ==========================================================================
   GSP Admin Guide Stylesheet (English)
   ========================================================================== */

/* ==========================================================================
   1. Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

html.guide-root,
html.guide-root body {
  overflow: hidden;
  height: 100vh;
}

body:has(> #content-area) {
  overflow-y: auto;
  overflow-x: hidden;
  height: auto;
  min-height: 100vh;
}

/* ==========================================================================
   2. Layout Structure
   ========================================================================== */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: #222d51;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

#main-header .logo {
  font-size: 24px;
  font-weight: bold;
  margin-right: 15px;
}

#main-header .doc-badge {
  background: #4a90e2;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 70px;
  bottom: 60px;
  width: 280px;
  background: white;
  border-right: 1px solid #e0e0e0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  z-index: 900;
}

.sidebar-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-inner::-webkit-scrollbar {
  display: none;
}

.sidebar-header {
  background: #4a90e2;
  color: white;
  padding: 15px 20px;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 3px solid #3578c7;
}

.main-content {
  position: fixed;
  left: 280px;
  right: 0;
  top: 70px;
  bottom: 60px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f8f9fa;
}

#content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  background: white;
  min-height: calc(100vh - 130px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #f0f0f0;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  z-index: 1000;
  font-size: 14px;
  color: #666;
}

#footer .footer-logo {
  font-weight: bold;
  margin-right: 15px;
  color: #222d51;
}

/* ==========================================================================
   3. Sidebar Navigation
   ========================================================================== */
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu > li { border-bottom: 1px solid #f0f0f0; }
.sidebar-menu a {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
  cursor: pointer;
}
.sidebar-menu a:hover {
  background: #f0f7ff;
  color: #4a90e2;
  border-left-color: #4a90e2;
}
.sidebar-menu a.active {
  background: linear-gradient(to right, #e8f4ff, #f0f7ff);
  color: #4a90e2;
  border-left-color: #4a90e2;
  font-weight: 600;
}

.menu-collapsible-title {
  display: block;
  padding: 15px 20px;
  background: #f8f9fa;
  color: #333;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border-left: 4px solid #4a90e2;
  transition: background 0.2s ease;
  position: relative;
}
.menu-collapsible-title:hover { background: #e9ecef; }
.menu-collapsible-title::after {
  content: '\2228';
  position: absolute;
  right: 20px;
}
.menu-collapsible.collapsed .menu-collapsible-title::after {
  content: '>';
  transform: none;
}
.menu-collapsible-content {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fafbfc;
}
.menu-collapsible.collapsed .menu-collapsible-content { display: none; }
.menu-collapsible-content a {
  padding-left: 35px;
  font-size: 14px;
}

/* ==========================================================================
   4–11. Content (Typography, Lists, Tables, Blockquotes, Code, Images, Responsive, Utilities)
   ========================================================================== */
#content-area h1 { font-size: 32px; color: #222d51; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 4px solid #4a90e2; }
#content-area h2 { font-size: 28px; color: #222d51; margin: 40px 0 20px 0; padding-bottom: 12px; border-bottom: 3px solid #4a90e2; }
#content-area h3 { font-size: 22px; color: #333; margin: 30px 0 15px 0; padding-left: 15px; border-left: 4px solid #4a90e2; }
#content-area h4 { font-size: 18px; color: #444; margin: 25px 0 12px 0; padding-left: 12px; border-left: 3px solid #4a90e2; }
#content-area p { margin-bottom: 15px; line-height: 1.8; }
#content-area strong { color: #222d51; font-weight: 600; }
#content-area hr { border: none; border-top: 2px solid #e0e0e0; margin: 30px 0; }

#content-area ul {
  list-style: none;
  margin: 15px 0;
  padding: 15px 20px;
  background: #F3F6FA;
  border-radius: 8px;
}
#content-area ul li { position: relative; padding-left: 25px; margin-bottom: 10px; line-height: 1.7; }
#content-area ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: #4a90e2;
  border-radius: 50%;
}
#content-area ul ul { margin-top: 8px; margin-bottom: 8px; background: transparent; padding: 5px 0 5px 15px; }
#content-area blockquote ul { background: transparent; padding-left: 20px; }

#content-area ol {
  list-style: none;
  counter-reset: step;
  margin: 15px 0;
  padding: 15px 20px;
}
#content-area ol > li {
  position: relative;
  padding-left: 45px;
  margin-bottom: 15px;
  line-height: 1.7;
  counter-increment: step;
}
#content-area ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: #4a90e2;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}
#content-area ol ul { counter-reset: none; }
#content-area ol ul li { counter-increment: none; padding-left: 25px; }
#content-area ol ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #4a90e2;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 10px;
}

#content-area table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
#content-area table thead { background: #f0f4fa; }
#content-area table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #222d51;
  border-bottom: 2px solid #4a90e2;
}
#content-area table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}
#content-area table tbody tr:nth-child(even) { background: #f8f9fa; }
#content-area table tbody tr:hover { background: #e8f4ff; transition: background 0.2s ease; }
#content-area table tbody tr:last-child td { border-bottom: none; }

#content-area blockquote {
  margin: 20px 0;
  padding: 20px 25px;
  background: #f8f9fa;
  border-left: 4px solid #4a90e2;
  border-radius: 4px;
}
#content-area blockquote h4 {
  margin-top: 0;
  margin-bottom: 15px;
  border-left: none;
  padding-left: 0;
  color: #222d51;
}
#content-area blockquote.warning {
  background: #fff9e6;
  border: 2px solid #ffe082;
  padding-left: 60px;
}
#content-area blockquote.warning::before {
  content: '!';
  position: absolute;
  left: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  background: #ffc107;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
}
#content-area blockquote.tip {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
}

#content-area code {
  background: #f0f4fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  color: #c7254e;
}
#content-area pre {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #4a90e2;
  border-radius: 4px;
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  line-height: 1.5;
}
#content-area pre code { background: none; padding: 0; color: #333; }

#content-area img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  display: block;
}
#content-area figure.guide-screenshot { margin: 24px 0; padding: 0; }
#content-area figure.guide-screenshot img { margin-bottom: 8px; }
#content-area figure.guide-screenshot figcaption {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-top: 0;
}

@media (max-width: 768px) {
  .sidebar { width: 220px; }
  .main-content { left: 220px; }
  #content-area { padding: 20px; }
  #footer { font-size: 12px; padding: 0 15px; }
  #main-header { padding: 0 15px; }
  #main-header .logo { font-size: 20px; }
  #main-header .doc-badge { font-size: 12px; padding: 4px 12px; }
}
@media (max-width: 480px) {
  .sidebar { width: 180px; }
  .main-content { left: 180px; }
  #content-area { padding: 15px; }
  #content-area h1 { font-size: 24px; }
  #content-area h2 { font-size: 20px; }
  #content-area h3 { font-size: 18px; }
}

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
