/* ─────────────────────────────────────────────────────────────────────────
   InfoAssure Brand — Staff L&D Tracker
   60% Primary  : Deep Core Blue #000B3A + Signal Sky Blue #0674F9
   30% Secondary: Cloud Drift White #F0F4F7
   10% Accents  : Images only — Blaze Orange #FF4800, Luminous Gold #FFE100,
                  Cyber Orchid #CA23EC (never used as layout/background colours)
   Font: Poppins — weights 300/400/500/600/700 only
   Text: Deep Core Blue #000B3A replaces black in ALL content
───────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* ── Brand primaries (60%) ── */
  --deep-core-blue:    #000B3A;
  --signal-sky-blue:   #0674F9;

  /* ── Brand secondary (30%) ── */
  --cloud-drift-white: #F0F4F7;

  /* ── Derived tints & functional colours ── */
  --sky-hover:         #0560d4;
  --sky-light:         #deeafe;
  --sky-xlight:        #eef4fd;
  --deep-tint-1:       #0d1a52;   /* slightly lighter than deep-core-blue */
  --deep-tint-2:       #1a2a6b;   /* section headers, nav hover */
  --surface:           #ffffff;   /* card/form surface (contrast lift over page bg) */
  --border:            #ccd6e4;
  --muted:             #4a5e7a;   /* a deep-blue-tinted grey, not black */

  /* ── Status colours (functional — not brand) ── */
  --success:           #1a7a42;
  --success-bg:        #e5f5ed;
  --success-border:    #a3d6b8;
  --warning:           #a85200;
  --warning-bg:        #fdf0e0;
  --warning-border:    #f5c880;
  --danger:            #b52020;
  --danger-bg:         #fde8e8;
  --danger-border:     #f2aaaa;

  /* ── Utility ── */
  --radius:            8px;
  --radius-lg:         12px;
  --shadow-sm:         0 1px 4px rgba(0,11,58,.07);
  --shadow:            0 2px 10px rgba(0,11,58,.09);
  --shadow-md:         0 4px 20px rgba(0,11,58,.13);
}

/* ════════════════════════════════════════════════════════
   BASE
════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--deep-core-blue);
  background-color: var(--cloud-drift-white);   /* 30% brand secondary */
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════════════════════════════
   TYPOGRAPHY  — Poppins only, Deep Core Blue text, 1.0–1.5 leading
════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;              /* Bold 700 for titles */
  color: var(--deep-core-blue);
  line-height: 1.2;
}
h1 { font-size: 2rem; }         /* ~32pt equivalent */
h2 { font-size: 1.5rem; }       /* ~24pt */
h3 { font-size: 1.25rem; }      /* ~20pt  — section headers use SemiBold 600 */
h4 { font-size: 1.0625rem; }

h3.section-header { font-weight: 600; }   /* SemiBold for within-section labels */

p { line-height: 1.5; color: var(--deep-core-blue); }

a { color: var(--signal-sky-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Supporting info — Light 300, small size */
small, .text-small { font-size: 0.8125rem; font-weight: 300; color: var(--muted); }
.text-muted { color: var(--muted); font-weight: 300; }

/* ════════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════════ */
.app-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.main-content {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* ════════════════════════════════════════════════════════
   NAVIGATION  — Deep Core Blue (primary 60%) dominant
════════════════════════════════════════════════════════ */
.navbar {
  background: var(--deep-core-blue);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,11,58,.35);
  /* Signal Sky Blue accent stripe — contributes to 60% primary split */
  border-bottom: 3px solid var(--signal-sky-blue);
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand:hover { text-decoration: none; opacity: .85; }

/* Navbar logo — brightness invert so the dark logo reads on Deep Core Blue bg */
.navbar-logo {
  height: 28px;
  width: auto;
  display: block;
  /* Converts the original Deep Core Blue + Signal Sky Blue logo to
     an all-white mark for contrast on the Deep Core Blue navbar */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(240,244,247,.75);          /* Cloud Drift White at 75% opacity */
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-links a:hover {
  background: rgba(6,116,249,.25);       /* Signal Sky Blue tint on hover */
  color: var(--cloud-drift-white);
  text-decoration: none;
}
.nav-links a.active {
  background: var(--signal-sky-blue);    /* Full Signal Sky Blue for active state */
  color: var(--cloud-drift-white);
  text-decoration: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user-info {
  text-align: right;
  font-size: 0.8125rem;
  color: rgba(240,244,247,.65);
  font-weight: 300;
}
.nav-user-info strong {
  display: block;
  color: var(--cloud-drift-white);    /* Cloud Drift White — not pure white */
  font-weight: 600;
}

.btn-logout {
  background: rgba(6,116,249,.2);       /* Signal Sky Blue tint */
  color: var(--cloud-drift-white);
  border: 1px solid rgba(6,116,249,.45);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(6,116,249,.38); }

/* ════════════════════════════════════════════════════════
   ALERTS / FLASH
════════════════════════════════════════════════════════ */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

/* ════════════════════════════════════════════════════════
   CARDS  — Surface white with Signal Sky Blue accent top
════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  /* Top border contributes to Signal Sky Blue 60% primary presence */
  border-top: 3px solid var(--signal-sky-blue);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.card-header h2, .card-header h3 { margin: 0; }

/* ════════════════════════════════════════════════════════
   STAT CARDS
════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 3px solid var(--signal-sky-blue);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.completed { background: var(--success-bg); }
.stat-icon.ongoing   { background: var(--warning-bg); }
.stat-icon.not-done  { background: var(--cloud-drift-white); }
.stat-icon.total     { background: var(--sky-xlight); }

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--deep-core-blue);
  line-height: 1;
}
.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ════════════════════════════════════════════════════════
   YEAR SELECTOR
════════════════════════════════════════════════════════ */
.year-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.year-selector label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--deep-core-blue);
}
.year-selector select {
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--signal-sky-blue);
  border-radius: var(--radius);
  color: var(--deep-core-blue);
  background: var(--surface);
  cursor: pointer;
}
.year-selector select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6,116,249,.18);
}

/* ════════════════════════════════════════════════════════
   BUTTONS  — Signal Sky Blue primary (contributes to 60%)
════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--signal-sky-blue);
  color: var(--cloud-drift-white);      /* Cloud Drift White — not pure #fff */
  box-shadow: 0 2px 8px rgba(6,116,249,.32);
}
.btn-primary:hover {
  background: var(--sky-hover);
  color: var(--cloud-drift-white);
  box-shadow: 0 4px 14px rgba(6,116,249,.42);
}

.btn-outline {
  background: transparent;
  color: var(--signal-sky-blue);
  border: 2px solid var(--signal-sky-blue);
}
.btn-outline:hover { background: var(--sky-xlight); color: var(--signal-sky-blue); }

/* Deep Core Blue secondary action */
.btn-secondary {
  background: var(--deep-core-blue);
  color: var(--cloud-drift-white);
  box-shadow: 0 2px 8px rgba(0,11,58,.22);
}
.btn-secondary:hover {
  background: var(--deep-tint-1);
  color: var(--cloud-drift-white);
}

.btn-danger {
  background: var(--danger);
  color: var(--cloud-drift-white);
}
.btn-danger:hover { background: #922020; color: var(--cloud-drift-white); }

.btn-sm { font-size: 0.8125rem; padding: 0.3rem 0.75rem; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 500;
}
.btn-ghost:hover {
  background: var(--cloud-drift-white);
  color: var(--deep-core-blue);
  border-color: var(--deep-core-blue);
}

/* ════════════════════════════════════════════════════════
   TABLES  — Deep Core Blue headers (60% primary)
════════════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead tr {
  background: var(--deep-core-blue);
}
thead th {
  color: var(--cloud-drift-white);      /* Cloud Drift White — not pure #fff */
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 1rem;
  text-align: left;
  white-space: nowrap;
}
thead th:first-child {
  border-left: 3px solid var(--signal-sky-blue);  /* Signal Sky Blue accent on first column */
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--sky-xlight); }

td {
  padding: 0.75rem 1rem;
  color: var(--deep-core-blue);
  vertical-align: middle;
  line-height: 1.4;
}
td:first-child { border-left: 3px solid transparent; }
tbody tr:hover td:first-child { border-left-color: var(--signal-sky-blue); }

/* ════════════════════════════════════════════════════════
   STATUS BADGES
════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-completed { background: var(--success-bg);  color: var(--success); }
.badge-ongoing   { background: var(--warning-bg);  color: var(--warning); }
.badge-not-done  { background: var(--cloud-drift-white); color: var(--muted); border: 1px solid var(--border); }
.badge-admin     { background: var(--sky-xlight);  color: var(--signal-sky-blue); }
.badge-staff     { background: var(--cloud-drift-white); color: var(--deep-core-blue); border: 1px solid var(--border); }
.badge-mandatory { background: var(--danger-bg);   color: var(--danger); }
.badge-optional  { background: var(--cloud-drift-white); color: var(--muted); border: 1px solid var(--border); }

/* ════════════════════════════════════════════════════════
   PROGRESS BARS  — Signal Sky Blue primary track
════════════════════════════════════════════════════════ */
.progress-bar-wrap {
  background: var(--cloud-drift-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  min-width: 80px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--signal-sky-blue);
  transition: width .4s ease;
}
.progress-bar-fill.high { background: var(--success); }
.progress-bar-fill.mid  { background: var(--signal-sky-blue); }
.progress-bar-fill.low  { background: var(--warning); }

.progress-pct {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--deep-core-blue);
  min-width: 40px;
  text-align: right;
}

/* ════════════════════════════════════════════════════════
   FORMS  — Deep Core Blue labels, Signal Sky Blue focus
════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;                 /* SemiBold for form labels */
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--deep-core-blue);
}

.form-group label .required { color: var(--danger); margin-left: 0.2rem; }

.form-control {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--deep-core-blue);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.4;
}
.form-control:focus {
  outline: none;
  border-color: var(--signal-sky-blue);
  box-shadow: 0 0 0 3px rgba(6,116,249,.15);
}
.form-control::placeholder { color: #8a9bb4; font-weight: 300; }

textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--signal-sky-blue);
  cursor: pointer;
}
.form-check label { font-weight: 400; cursor: pointer; margin: 0; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════
   LOGIN PAGE  — Full Deep Core Blue (60%) immersive
════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Deep Core Blue dominant, Signal Sky Blue band at top for 60% split */
  background: linear-gradient(180deg, var(--signal-sky-blue) 0%, var(--signal-sky-blue) 6px, var(--deep-core-blue) 6px, var(--deep-core-blue) 100%);
  padding: 2rem 1rem;
}

.login-card {
  background: var(--cloud-drift-white);   /* Brand white — NOT pure #ffffff */
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 40px rgba(0,11,58,.4);
  border-top: 4px solid var(--signal-sky-blue);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
/* Login logo — displayed at natural colours on Cloud Drift White card */
.login-logo-img {
  height: 40px;
  width: auto;
  display: block;
  margin: 0 auto 1rem;
}
.login-logo p {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.25rem;
}

/* ════════════════════════════════════════════════════════
   PAGE HEADER
════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  /* Signal Sky Blue left accent for visual hierarchy */
  padding-left: 0.75rem;
  border-left: 4px solid var(--signal-sky-blue);
  line-height: 1.3;
}
.page-title-sub {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 300;
  margin-top: 0.25rem;
  padding-left: 0.75rem;    /* align with the bordered title */
}

/* ════════════════════════════════════════════════════════
   BREADCRUMB
════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--signal-sky-blue);
  font-weight: 500;
}
.breadcrumb span { color: var(--muted); }

/* ════════════════════════════════════════════════════════
   DASHBOARD STAFF TABLE
════════════════════════════════════════════════════════ */
.staff-row-bars { display: flex; align-items: center; gap: 0.5rem; min-width: 200px; }

/* ════════════════════════════════════════════════════════
   PROGRESS MATRIX TABLE
════════════════════════════════════════════════════════ */
.matrix-table { font-size: 0.8rem; }
.matrix-table th { font-size: 0.7rem; padding: 0.5rem 0.6rem; }
.matrix-table td { padding: 0.45rem 0.6rem; }
.matrix-table .staff-cell { font-weight: 600; white-space: nowrap; }

/* Matrix cell status colouring — uses brand-approved functional tints */
.matrix-cell-completed { background: var(--success-bg); }
.matrix-cell-ongoing   { background: var(--warning-bg); }
.matrix-cell-not_done  { background: transparent; }

.status-dot {
  display: inline-block;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid transparent;
}
.status-dot.completed { background: var(--success);  border-color: var(--success); }
.status-dot.ongoing   { background: var(--warning);  border-color: var(--warning); }
.status-dot.not_done  { background: var(--border);   border-color: var(--muted); }

/* ════════════════════════════════════════════════════════
   MY PROGRESS CARDS
════════════════════════════════════════════════════════ */
.progress-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.progress-item-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-top: 3px solid var(--signal-sky-blue);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}
.progress-item-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--signal-sky-blue);
}

.progress-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep-core-blue);
  margin-bottom: 0.3rem;
}
.progress-item-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 0.75rem;
}
.progress-item-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.45;
}

/* Status selector pills */
.status-selector {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.status-radio { position: relative; display: inline-flex; }
.status-radio input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.status-radio label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  background: var(--cloud-drift-white);
  color: var(--muted);
  margin: 0;
}
.status-radio.s-completed label { background: var(--success-bg); color: var(--success); }
.status-radio.s-ongoing   label { background: var(--warning-bg); color: var(--warning); }
.status-radio.s-not-done  label { background: var(--cloud-drift-white); color: var(--muted); border-color: var(--border); }
.status-radio input:checked + label { border-color: currentColor; font-weight: 700; }

/* ════════════════════════════════════════════════════════
   FOOTER  — Deep Core Blue (60% primary)
════════════════════════════════════════════════════════ */
footer {
  background: var(--deep-core-blue);
  color: rgba(240,244,247,.55);     /* Cloud Drift White tint — not pure white */
  text-align: center;
  font-size: 0.8rem;
  font-weight: 300;
  padding: 1rem;
  margin-top: auto;
  /* Signal Sky Blue top accent */
  border-top: 3px solid var(--signal-sky-blue);
}

/* ════════════════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════════════════ */
.d-flex           { display: flex; }
.align-items-center { align-items: center; }
.gap-2            { gap: 0.5rem; }
.gap-3            { gap: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center      { text-align: center; }
.fw-500           { font-weight: 500; }
.fw-600           { font-weight: 600; }
.fw-700           { font-weight: 700; }

/* ════════════════════════════════════════════════════════
   SETTINGS — NAV ICON (horizontal layout)
════════════════════════════════════════════════════════ */
.nav-settings-icon {
  color: rgba(240,244,247,.65);
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  line-height: 1;
}
.nav-settings-icon:hover {
  color: var(--cloud-drift-white);
  background: rgba(6,116,249,.25);
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════
   VERTICAL LAYOUT — Sidebar
════════════════════════════════════════════════════════ */
body.layout-vertical {
  flex-direction: row;
  align-items: stretch;
}

/* Sidebar shell */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--deep-core-blue);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  /* Signal Sky Blue accent on right edge — contributes to 60% primary */
  border-right: 3px solid var(--signal-sky-blue);
  z-index: 100;
}

/* Sidebar brand / logo */
.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(6,116,249,.22);
  text-decoration: none;
  flex-shrink: 0;
}
.sidebar-logo {
  height: 26px;
  width: auto;
  /* Invert to white on Deep Core Blue sidebar */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* Sidebar navigation */
.sidebar-nav { flex: 1; padding: 0.5rem 0; overflow-y: auto; }
.sidebar-nav ul { list-style: none; }

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(240,244,247,.38);
  padding: 1rem 1.25rem 0.3rem;
  pointer-events: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  color: rgba(240,244,247,.72);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  border-left: 3px solid transparent;
}
.sidebar-nav li a:hover {
  background: rgba(6,116,249,.22);
  color: var(--cloud-drift-white);
  border-left-color: rgba(6,116,249,.6);
  text-decoration: none;
}
.sidebar-nav li a.active {
  background: var(--signal-sky-blue);
  color: var(--cloud-drift-white);
  border-left-color: var(--cloud-drift-white);
  font-weight: 600;
}

/* Sidebar bottom: settings + user */
.sidebar-bottom {
  flex-shrink: 0;
  padding: 0.875rem 1.25rem 1.1rem;
  border-top: 1px solid rgba(6,116,249,.22);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-settings-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(240,244,247,.6);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color .15s;
}
.sidebar-settings-link:hover { color: var(--cloud-drift-white); text-decoration: none; }
.sidebar-settings-icon { font-size: 0.95rem; }

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.sidebar-user-info {
  font-size: 0.8rem;
  color: rgba(240,244,247,.6);
  font-weight: 300;
  overflow: hidden;
  flex: 1;
}
.sidebar-user-info strong {
  display: block;
  color: var(--cloud-drift-white);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Page body (vertical layout content area) */
.page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--cloud-drift-white);
}
/* Footer inside vertical layout lives inside .page-body */
.layout-vertical footer { margin-top: auto; }

/* ════════════════════════════════════════════════════════
   SETTINGS PAGE — Layout option cards
════════════════════════════════════════════════════════ */
.layout-options {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.layout-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 1rem;
  background: var(--cloud-drift-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  width: 190px;
  font-family: 'Poppins', sans-serif;
  transition: border-color .18s, box-shadow .18s, background .18s;
  text-align: center;
}
.layout-option-card:hover {
  border-color: var(--signal-sky-blue);
  box-shadow: var(--shadow-md);
  background: var(--sky-xlight);
}
.layout-option-card.active {
  border-color: var(--signal-sky-blue);
  border-width: 2px;
  background: var(--sky-xlight);
}

/* Tick badge on active card */
.layout-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 22px; height: 22px;
  background: var(--signal-sky-blue);
  color: var(--cloud-drift-white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

/* Label below preview */
.layout-option-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.layout-option-label strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--deep-core-blue);
}
.layout-option-label span {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
}

/* ── Miniature layout previews ────────────────────────── */
.layout-preview {
  width: 130px; height: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Horizontal preview */
.layout-preview-h { display: flex; flex-direction: column; }
.layout-preview-h .lp-topbar {
  height: 16px;
  flex-shrink: 0;
  background: var(--deep-core-blue);
  border-bottom: 2px solid var(--signal-sky-blue);
}
.layout-preview-h .lp-body {
  flex: 1;
  padding: 8px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Vertical preview */
.layout-preview-v { display: flex; flex-direction: row; }
.layout-preview-v .lp-sidebar {
  width: 30px;
  flex-shrink: 0;
  background: var(--deep-core-blue);
  border-right: 2px solid var(--signal-sky-blue);
}
.layout-preview-v .lp-body {
  flex: 1;
  padding: 8px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Shared content lines inside previews */
.lp-line {
  height: 8px;
  background: var(--border);
  border-radius: 3px;
}
.lp-line.short { width: 60%; }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .main-content { padding: 1.25rem 1rem; }
  .navbar { height: auto; padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .nav-links { gap: 0; flex-wrap: wrap; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .progress-items-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }

  /* On small screens, vertical sidebar collapses to a top bar */
  body.layout-vertical { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 3px solid var(--signal-sky-blue);
  }
  .sidebar-nav { display: none; } /* hide nav items on mobile — use hamburger in future */
  .sidebar-bottom { flex-direction: row; align-items: center; width: 100%; border-top: none; }
  .page-body { min-height: auto; }
}
