/* ==========================================================
   EDUTRACK-PH UNIFIED DOCUMENTATION & PDF PRINT STYLESHEET
   ========================================================== */

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --bg-dark: #0b1329;
  --bg-light: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 290px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* ==========================================================
   SIDEBAR NAVIGATION
   ========================================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-dark);
  color: #fff;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 a {
  font-size: 1.1rem;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
}

.nav-group {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 6px 20px;
}

.nav-links {
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.86rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-links a.active {
  background-color: rgba(2, 132, 199, 0.18);
  color: #38bdf8;
  border-left-color: #38bdf8;
  font-weight: 600;
}

.nav-links a.active-parent {
  color: #38bdf8;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

/* Sub-menu styling */
.sub-menu {
  list-style: none;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 0;
}

.sub-menu a {
  padding: 6px 20px 6px 36px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.sub-menu a.active {
  background-color: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border-left-color: #38bdf8;
  font-weight: 600;
}

/* ==========================================================
   MAIN CONTENT WRAPPER
   ========================================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 40px 60px;
  max-width: 1200px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb span {
  color: var(--primary);
  font-weight: 600;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ==========================================================
   SCREENSHOT CARD CONTAINERS
   ========================================================== */
.screenshot-card {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 32px;
}

.screenshot-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background-color: #050b18;
  display: flex;
  justify-content: center;
}

.screenshot-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Dual screenshot grids */
.dual-screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

/* Mobile App Mockup Frame */
.mobile-mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 36px;
  max-width: 850px;
}

.mobile-card {
  background: var(--surface);
  border-radius: 20px;
  border: 2px solid #cbd5e1;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.mobile-screen-wrapper {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background-color: #fafafa;
}

.mobile-screen-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.mobile-caption {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================
   FEATURE & INSTRUCTION CARDS
   ========================================================== */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.feature-card h3, .feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.feature-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* Step-by-Step Item Guides */
.steps-list {
  list-style: none;
  margin-bottom: 24px;
}

.step-item {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  background: var(--surface);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.step-badge {
  width: 30px;
  height: 30px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.9rem;
}

.step-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Callout Banners */
.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: #1e3a8a;
  line-height: 1.6;
}

.warning-box {
  background: #fffbeb;
  border-left: 4px solid var(--warning);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: #b45309;
  line-height: 1.6;
}

.danger-box {
  background: #fee2e2;
  border-left: 4px solid var(--danger);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: #991b1b;
  line-height: 1.6;
}

.security-box {
  background: #f0fdf4;
  border-left: 4px solid var(--success);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: #14532d;
  line-height: 1.6;
}

/* Data Tables */
.format-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}

.format-table th, .format-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.format-table th {
  background-color: #f8fafc;
  color: #0f172a;
  font-weight: 600;
}

.format-table code {
  background: #f1f5f9;
  color: #0284c7;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
}

/* ==========================================================
   PAGINATION FOOTER
   ========================================================== */
.manual-pagination {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 40px;
}

.pag-btn {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.pag-btn.prev {
  background-color: #f1f5f9;
  color: #475569;
}

.pag-btn.prev:hover {
  background-color: #e2e8f0;
}

.pag-btn.next {
  background-color: var(--primary);
  color: white;
  margin-left: auto;
}

.pag-btn.next:hover {
  background-color: var(--primary-dark);
}

/* ==========================================================
   PRINT & PDF EXPORT STYLES (@media print)
   ========================================================== */
@media print {
  body {
    background-color: #fff !important;
    color: #000 !important;
  }

  .sidebar, .manual-pagination, .breadcrumb {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .screenshot-card, .feature-card, .step-item, .info-box, .warning-box, .danger-box {
    box-shadow: none !important;
    border: 1px solid #94a3b8 !important;
    page-break-inside: avoid;
  }

  .page-title {
    font-size: 1.8rem !important;
    color: #000 !important;
  }

  .section-title {
    page-break-after: avoid;
  }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-wrapper { margin-left: 0; padding: 24px; }
  .dual-screenshot-grid, .mobile-mockup-grid { grid-template-columns: 1fr; }
}