:root {
  --sidebar-width: 310px;
}

.sidebar-nav .nav-link {
  white-space: normal !important;
  line-height: 1.3 !important;
  min-height: 40px !important;
  padding: 0.5rem 0.75rem !important;
  gap: 0.65rem !important;
}

.sidebar-nav .nav-link .nav-text {
  white-space: normal !important;
  flex: 1 !important;
  font-size: 0.88rem !important;
  word-break: break-word !important;
}

.nav-group-label {
  margin: 0.85rem 0.85rem 0.35rem;
  padding: 0.2rem 0.55rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav .nav-link.is-child {
  padding-left: 1.4rem !important;
}

.sidebar-nav .nav-link .nav-no {
  min-width: 2.3rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #bfdbfe;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.sidebar-nav .nav-link.active .nav-no {
  background: #2563eb;
  color: #ffffff;
}

.brand-subtitle {
  max-width: 160px;
}

.portal-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1080;
  display: none;
  min-width: 260px;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  box-shadow: var(--admin-shadow);
}

.portal-toast.show {
  display: block;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-chip.down {
  background: #fef2f2;
  color: #b91c1c;
}

.stat-chip.flat {
  background: #f1f5f9;
  color: #475569;
}

.year-table th,
.year-table td {
  white-space: nowrap;
}

.year-table thead th {
  background: #e8f1fb;
  font-size: 0.78rem;
}

.note-box {
  padding: 0.9rem 1rem;
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface-soft);
}

.lock-hint {
  font-size: 0.82rem;
  color: var(--admin-muted);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.month-cell {
  padding: 0.75rem;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: #fff;
}

.month-cell label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.month-cell.locked {
  background: #f8fafc;
}

/* PDF WORKSPACE & PRESENTATION PAGES */
.pdf-workspace {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: -1;
  width: 1122px;
  opacity: 0;
  pointer-events: none;
}

.pdf-page {
  width: 1122px;
  min-height: 793px;
  padding: 24px 32px;
  background: #ffffff;
  color: #1e293b;
  font-family: "Segoe UI", Arial, sans-serif;
  box-sizing: border-box;
}

.single-doc {
  width: 100%;
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.single-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0b1e36 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: 6px;
}

.doc-header-brand .brand-badge {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

.doc-header-brand .brand-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: #bfdbfe;
  margin-top: 1px;
}

.doc-header-main {
  text-align: right;
}

.doc-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 2px 0;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.doc-meta {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  font-size: 0.75rem;
  color: #e2e8f0;
}

.table-wrapper {
  overflow-x: auto;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
  line-height: 1.2;
  color: #000000;
  background: #ffffff;
}

.pdf-table th,
.pdf-table td {
  border: 1px solid #444444;
  padding: 3px 2.5px;
  text-align: center;
  vertical-align: middle;
}

.pdf-table thead th {
  background: #e9f0e8;
  color: #000000;
  font-weight: 700;
  font-size: 8px;
  text-transform: uppercase;
  padding: 3.5px 2.5px;
}

.pdf-table th.name,
.pdf-table td.name {
  text-align: left;
  padding-left: 4px;
  font-weight: 700;
  white-space: normal;
  max-width: 130px;
}

.pdf-table td.no-cell {
  font-weight: 700;
  text-align: center;
  width: 24px;
}

.pdf-table th.note-head,
.pdf-table td.note {
  text-align: left;
  padding: 3px 5px;
  font-size: 7.5px;
  line-height: 1.2;
  color: #000000;
  vertical-align: middle;
}

.pdf-table tr.total-row td {
  background: #e9f0e8;
  color: #000000;
  font-weight: 800;
}

.pdf-table td.banner-cell {
  background: #e9f0e8;
  color: #000000;
  font-weight: 700;
  font-size: 8px;
  text-align: center;
  vertical-align: middle;
  padding: 4px;
  line-height: 1.25;
}

.pdf-table td.pct-cell {
  color: #000000;
  font-size: 8px;
}

/* MEDIA PRINT STYLES FOR SINGLE PAGE LANDSCAPE PRINT */
@media print {
  @page {
    size: A4 landscape;
    margin: 4mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .admin-sidebar,
  .admin-navbar,
  .admin-footer,
  .heading-actions,
  .sidebar-backdrop,
  .page-heading,
  .portal-toast {
    display: none !important;
  }

  .admin-main,
  .dashboard-content,
  .container-fluid {
    margin: 0 !important;
    padding: 0 !important;
  }

  .single-doc {
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
  }

  .pdf-table {
    font-size: 7.5px !important;
  }
}
