/*
 * ============================================================
 * ZIPADOO — THEME & DESIGN SYSTEM
 * ============================================================
 */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  --color-white:          #ffffff;
  --color-bg:             #f7f7f5;
  --color-bg-alt:         #f0f0ec;
  --color-border:         #e2e2dc;
  --color-border-strong:  #c8c8c0;
  --color-text:           #1a1a18;
  --color-text-mid:       #4a4a44;
  --color-text-light:     #8a8a82;
  --color-accent:         #2a5caa;
  --color-accent-hover:   #1e4a8a;
  --color-accent-bg:      #eef3fc;
  --color-green:          #2a7a4a;
  --color-green-bg:       #eef7f2;
  --color-amber:          #a05a10;
  --color-amber-bg:       #fdf3e8;
  --color-red:            #aa2a2a;
  --color-red-bg:         #fceaea;

  --surface:              var(--color-white);
  --surface-raised:       var(--color-white);
  --surface-sunken:       var(--color-bg);
  --border:               var(--color-border);
  --border-strong:        var(--color-border-strong);
  --text:                 var(--color-text);
  --text-mid:             var(--color-text-mid);
  --text-light:           var(--color-text-light);
  --accent:               var(--color-accent);
  --accent-hover:         var(--color-accent-hover);
  --accent-bg:            var(--color-accent-bg);
  --green:                var(--color-green);
  --green-bg:             var(--color-green-bg);
  --amber:                var(--color-amber);
  --amber-bg:             var(--color-amber-bg);
  --red:                  var(--color-red);
  --red-bg:               var(--color-red-bg);

  --font-body:            'Inter', system-ui, sans-serif;
  --font-display:         'Instrument Serif', Georgia, serif;
  --font-mono:            'DM Mono', 'Courier New', monospace;
  --font-size-base:       15px;
  --line-height-base:     1.5;
  --line-height-loose:    1.75;

  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.05);
  --shadow:      0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:   0 2px 12px rgba(0,0,0,0.08);

  --nav-height:  56px;

  --transition-fast:   0.12s ease;
  --transition:        0.15s ease;
  --transition-slow:   0.25s ease;
}

/* ============================================================
   2. CSS RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--text);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

/* ============================================================
   3. BASE TYPOGRAPHY
   ============================================================ */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 em { font-style: italic; color: var(--text-mid); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}
h2 em { font-style: italic; }

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

h4 { font-size: 0.92rem; font-weight: 600; color: var(--text); line-height: 1.4; }

p { font-size: 0.92rem; line-height: var(--line-height-loose); color: var(--text-mid); }

.text-sm    { font-size: 0.82rem; }
.text-xs    { font-size: 0.72rem; }
.text-muted { color: var(--text-light); }
.text-mid   { color: var(--text-mid); }
.text-accent{ color: var(--accent); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-amber { color: var(--amber); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--space-6);
}
.eyebrow-dot {
  width: 5px; height: 5px;
  border-radius: var(--radius-full);
  background: var(--green);
  display: inline-block; flex-shrink: 0;
}

a.link { color: var(--accent); text-decoration: none; font-weight: 500; }
a.link:hover { text-decoration: underline; }

.small-link { font-size: 0.78rem; color: var(--text-light); text-align: center; margin-top: var(--space-4); }
.small-link a { color: var(--accent); text-decoration: none; font-weight: 500; }
.small-link a:hover { text-decoration: underline; }

/* ============================================================
   4. NAVIGATION
   ============================================================ */
.z-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-10);
  flex-shrink: 0;
}

.nav-brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }

.nav-logo-mark {
  width: 28px; height: 28px;
  background: var(--text);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.nav-brand:hover .nav-logo-mark { background: var(--accent); }
.nav-logo-mark svg { width: 16px; height: 16px; fill: none; }

.nav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav-brand-name { font-size: 0.92rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.nav-brand-sub  { font-size: 0.62rem; color: var(--text-light); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 400; margin-top: 1px; }

.nav-links { display: flex; align-items: center; gap: var(--space-1); }

.nav-link {
  font-size: 0.82rem; color: var(--text-mid); text-decoration: none;
  padding: 6px var(--space-3); border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  font-weight: 400; white-space: nowrap;
}
.nav-link:hover  { background: var(--surface-sunken); color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 500; }

.nav-divider { width: 1px; height: 18px; background: var(--border); margin: 0 var(--space-2); }

.nav-cta {
  font-size: 0.82rem; font-weight: 500;
  background: var(--text); color: white;
  text-decoration: none;
  padding: 7px var(--space-4); border-radius: var(--radius-sm);
  transition: background var(--transition);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: var(--space-1);
}
.nav-cta:hover { background: #333330; }

/* Hamburger — hidden by default, shown on mobile via media query */
.nav-hamburger { display: none; }

.nav-notif-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem;
  border-radius: var(--radius-full);
  color: var(--text-light); text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-notif-btn:hover,
.nav-notif-btn.active { background: var(--surface-sunken); color: var(--text); }

.nav-notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 1.05rem; height: 1.05rem; padding: 0 3px;
  border-radius: var(--radius-full);
  background: var(--red); color: #fff;
  font-size: 0.6rem; font-weight: 700; line-height: 1.05rem;
  align-items: center; justify-content: center;
  pointer-events: none;
}

/* ============================================================
   5. FOOTER
   ============================================================ */
.z-footer {
  margin-top: auto;
  padding: 24px var(--space-10);
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.footer-brand { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.footer-logo-mark {
  width: 22px; height: 22px; background: var(--text); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.footer-brand:hover .footer-logo-mark { background: var(--accent); }
.footer-logo-mark svg { width: 12px; height: 12px; fill: white; }
.footer-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.footer-links { display: flex; gap: var(--space-5); flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.75rem; color: var(--text-light); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.72rem; color: var(--text-light); }

/* ============================================================
   6. LAYOUT SHELLS
   ============================================================ */
.page-main { flex: 1; display: flex; flex-direction: column; }

.layout-split {
  display: grid; grid-template-columns: 1fr 1fr;
  flex: 1; min-height: calc(100vh - var(--nav-height));
}
.split-left {
  padding: 72px var(--space-16) 72px 72px;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--border); background: var(--surface);
}
.split-right {
  background: var(--surface-sunken);
  padding: var(--space-12) var(--space-16) var(--space-12) var(--space-12);
  display: flex; flex-direction: column; justify-content: center; overflow-y: auto;
}
.split-right-inner { width: 100%; max-width: 480px; margin: 0 auto; }

.layout-centered {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: var(--space-12) var(--space-6); background: var(--surface-sunken);
}

/* ── Dashboard layout ── */
.layout-dashboard {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

/* ── Sidebar — BASE (desktop) ── */
.dashboard-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: var(--space-6) 0;
  /* Desktop: sticky */
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.dashboard-content {
  padding: var(--space-8) var(--space-10);
  background: var(--surface-sunken);
  overflow-y: auto;
}

.layout-wide { flex: 1; width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-10); }

/* Sidebar overlay — hidden by default */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; top: var(--nav-height);
  background: rgba(0,0,0,0.35); z-index: 199;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-narrow { width: 100%; max-width: 460px; }
.card-mid    { width: 100%; max-width: 600px; }
.card-header {
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
  display: flex; justify-content: space-between; align-items: center;
}
.card-title { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.card-body  { padding: var(--space-5); }

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  line-height: 1; padding: 10px var(--space-5);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition);
  white-space: nowrap; -webkit-user-select: none; user-select: none;
}
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-sm   { padding: 7px var(--space-3); font-size: 0.78rem; }
.btn-lg   { padding: 12px var(--space-6); font-size: 0.92rem; }
.btn-xl   { padding: 14px var(--space-8); font-size: 0.95rem; }
.btn-full { width: 100%; }
.btn-primary   { background: var(--text); color: white; border-color: var(--text); }
.btn-primary:hover:not(:disabled)   { background: #333330; border-color: #333330; }
.btn-accent    { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent:hover:not(:disabled)    { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text-mid); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--text); color: var(--text); }
.btn-ghost     { background: transparent; color: var(--accent); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost:hover:not(:disabled)     { color: var(--accent-hover); }
.btn-danger    { background: var(--red); color: white; border-color: var(--red); }
.btn-danger:hover:not(:disabled)    { background: #8a2020; }
.btn-loading::after {
  content: ''; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: white;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ============================================================
   8. FORM ELEMENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); }
.form-group-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-bottom: var(--space-4); }
.form-label { font-size: 0.72rem; font-weight: 500; color: var(--text-mid); letter-spacing: 0.02em; }
.form-label .req { color: var(--red); margin-left: 2px; }

.form-input,
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="tel"], input[type="url"],
input[type="number"], input[type="search"],
select, textarea {
  font-family: var(--font-body); font-size: 0.85rem;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px var(--space-3);
  color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42,92,170,0.1);
}
input.is-error, select.is-error, textarea.is-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(170,42,42,0.08);
}
textarea { resize: vertical; min-height: 90px; line-height: var(--line-height-loose); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a82' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px; cursor: pointer;
}
.form-hint  { font-size: 0.7rem; color: var(--text-light); line-height: 1.5; }
.form-error { font-size: 0.7rem; color: var(--red); display: flex; align-items: center; gap: var(--space-1); }
.form-error::before { content: '⚠'; font-size: 0.65rem; }

.divider {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-5) 0; font-size: 0.7rem; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.radio-group, .checkbox-group { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.radio-option, .checkbox-option {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.82rem; color: var(--text-mid); cursor: pointer;
  padding: 8px var(--space-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition); flex: 1;
}
.radio-option:hover, .checkbox-option:hover { border-color: var(--text); }
.radio-option input, .checkbox-option input { width: auto; flex-shrink: 0; accent-color: var(--accent); }

/* ============================================================
   9. CARDS & PANELS
   ============================================================ */
.info-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--green-bg); color: var(--green);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px var(--space-3); border-radius: var(--radius-full); margin-bottom: var(--space-5);
}
.info-points { margin-top: var(--space-8); display: flex; flex-direction: column; }
.info-point { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.info-point:last-child { border-bottom: none; }
.info-point-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.info-point-title { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.info-point-desc  { font-size: 0.75rem; color: var(--text-mid); line-height: 1.55; }

.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-6); }
.type-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: var(--space-5) var(--space-4); cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  text-align: left; background: var(--surface); text-decoration: none; display: flex; flex-direction: column;
}
.type-card:hover     { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42,92,170,0.08); }
.type-card.is-selected { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 3px rgba(42,92,170,0.12); }
.type-icon  { font-size: 1.4rem; margin-bottom: var(--space-3); }
.type-title { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.type-desc  { font-size: 0.75rem; color: var(--text-mid); line-height: 1.5; }
.type-cta   { margin-top: auto; padding-top: var(--space-3); font-size: 0.72rem; color: var(--accent); font-weight: 500; }

.pending-card  { text-align: center; padding: var(--space-12) var(--space-8); }
.pending-icon  { font-size: 2.5rem; margin-bottom: var(--space-4); }
.pending-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); margin-bottom: var(--space-2); }
.pending-desc  { font-size: 0.85rem; color: var(--text-mid); line-height: 1.7; max-width: 360px; margin: 0 auto var(--space-6); }

/* ============================================================
   10. BADGES & CHIPS
   ============================================================ */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.65rem; font-weight: 500; padding: 3px var(--space-2); border-radius: var(--radius-full); white-space: nowrap; }
.badge-approved { background: var(--green-bg);  color: var(--green);  }
.badge-pending  { background: var(--amber-bg);  color: var(--amber);  }
.badge-review   { background: var(--amber-bg);  color: var(--amber);  }
.badge-returned { background: var(--red-bg);    color: var(--red);    }
.badge-draft    { background: var(--surface-sunken); color: var(--text-light); border: 1px solid var(--border); }
.badge-active   { background: var(--green-bg);  color: var(--green);  }
.badge-inactive { background: var(--surface-sunken); color: var(--text-light); }

.v-badge { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 0.7rem; font-weight: 500; padding: 4px var(--space-3); border-radius: var(--radius-full); border: 1px solid; white-space: nowrap; }
.v-school    { background: var(--accent-bg); color: var(--accent); border-color: rgba(42,92,170,0.25); }
.v-org       { background: var(--green-bg);  color: var(--green);  border-color: rgba(42,122,74,0.25); }
.v-organizer { background: var(--amber-bg);  color: var(--amber);  border-color: rgba(160,90,16,0.25); }
.v-zipadoo   { background: #f0eef7; color: #5a3a9a; border-color: rgba(90,58,154,0.25); }
.v-self      { background: var(--surface-sunken); color: var(--text-light); border-color: var(--border); }

/* ============================================================
   11. ALERTS & NOTICES
   ============================================================ */
.alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-size: 0.8rem; line-height: 1.6; display: flex; align-items: flex-start; gap: var(--space-3); border: 1px solid; }
.alert-icon    { font-size: 0.9rem; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--accent-bg); color: var(--accent); border-color: rgba(42,92,170,0.2); }
.alert-success { background: var(--green-bg);  color: var(--green);  border-color: rgba(42,122,74,0.2); }
.alert-warning { background: var(--amber-bg);  color: var(--amber);  border-color: rgba(160,90,16,0.2); }
.alert-error   { background: var(--red-bg);    color: var(--red);    border-color: rgba(170,42,42,0.2); }

.flash-messages { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-10); background: var(--surface); border-bottom: 1px solid var(--border); }

/* ============================================================
   12. PROGRESS STEPS
   ============================================================ */
.progress-steps { display: flex; align-items: center; margin-bottom: var(--space-8); }
.progress-step { display: flex; align-items: center; gap: var(--space-2); font-size: 0.75rem; font-weight: 500; color: var(--text-light); white-space: nowrap; }
.progress-step.is-active { color: var(--text); }
.progress-step.is-done   { color: var(--green); }
.step-num { width: 24px; height: 24px; border-radius: var(--radius-full); border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 600; flex-shrink: 0; color: var(--text-light); }
.progress-step.is-active .step-num { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.progress-step.is-done   .step-num { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.step-connector { flex: 1; height: 1px; background: var(--border); margin: 0 var(--space-2); min-width: 16px; }

/* ============================================================
   13. DATA TABLES
   ============================================================ */
.data-table { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.data-table-head { display: grid; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); background: var(--surface-sunken); }
.data-th { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-light); }
.data-row { display: grid; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); align-items: center; transition: background var(--transition-fast); }
.data-row:last-child { border-bottom: none; }
.data-row:hover      { background: var(--surface-sunken); }
.data-td      { font-size: 0.78rem; color: var(--text); }
.data-td-muted{ font-size: 0.72rem; color: var(--text-light); }
.data-table-footer { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); background: var(--surface-sunken); display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   14. SIDEBAR NAV (dashboard)
   ============================================================ */
.sidebar-section { padding: 0 var(--space-3) var(--space-4); }
.sidebar-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-1); }
.sidebar-link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-size: 0.82rem; color: var(--text-mid); text-decoration: none; transition: background var(--transition), color var(--transition); font-weight: 400; }
.sidebar-link:hover  { background: var(--surface-sunken); color: var(--text); }
.sidebar-link.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.sidebar-icon  { width: 18px; text-align: center; font-size: 0.9rem; flex-shrink: 0; }
.sidebar-badge { margin-left: auto; font-size: 0.62rem; font-weight: 600; background: var(--accent); color: white; padding: 1px 6px; border-radius: var(--radius-full); min-width: 18px; text-align: center; }

/* ============================================================
   15. ANIMATIONS
   ============================================================ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes slideDown{ from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.anim-fade-up   { animation: fadeUp    0.4s ease both; }
.anim-fade-in   { animation: fadeIn    0.3s ease both; }
.anim-slide-down{ animation: slideDown 0.25s ease both; }

.anim-stagger > *:nth-child(1) { animation: fadeUp 0.4s 0.05s ease both; }
.anim-stagger > *:nth-child(2) { animation: fadeUp 0.4s 0.10s ease both; }
.anim-stagger > *:nth-child(3) { animation: fadeUp 0.4s 0.15s ease both; }
.anim-stagger > *:nth-child(4) { animation: fadeUp 0.4s 0.20s ease both; }
.anim-stagger > *:nth-child(5) { animation: fadeUp 0.4s 0.25s ease both; }
.anim-stagger > *:nth-child(6) { animation: fadeUp 0.4s 0.30s ease both; }

/* ============================================================
   16. UTILITIES
   ============================================================ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: var(--space-1); } .gap-2  { gap: var(--space-2); } .gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); } .gap-6  { gap: var(--space-6); } .gap-8  { gap: var(--space-8); }
.flex-1 { flex: 1; } .flex-shrink-0 { flex-shrink: 0; } .min-w-0 { min-width: 0; } .w-full { width: 100%; }
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); } .mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); } .mb-8 { margin-bottom: var(--space-8); }
.text-center { text-align: center; } .text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.rounded      { border-radius: var(--radius); }
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-full { border-radius: var(--radius-full); }
.border     { border: 1px solid var(--border); }
.bg-surface { background: var(--surface); }
.bg-sunken  { background: var(--surface-sunken); }

/* ============================================================
   17. RESPONSIVE
   ============================================================ */

/* ── Desktop ── */
/* ── Desktop ── */
@media (min-width: 769px) {
  .layout-dashboard {
    grid-template-columns: 240px 1fr;
  }
  .dashboard-sidebar {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
  .nav-hamburger    { display: none; }
  .sidebar-overlay  { display: none; }
  .dropdown-mobile-nav { display: none !important; }
  .nav-cta--mobile  { display: none; }
  .nav-cta--desktop { display: inline-flex; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .layout-dashboard {
    grid-template-columns: 200px 1fr;
  }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .z-nav {
    padding: 0 var(--space-5);
  }

  /* Hide sidebar completely */
  .dashboard-sidebar {
    display: none;
  }

  /* Single column layout */
  .layout-dashboard {
    grid-template-columns: 1fr;
  }

  /* Show nav links dropdown items */
  .dropdown-mobile-nav {
    display: block !important;
  }

/* Hide top nav text links — user accesses via avatar dropdown */
  .z-nav .nav-links .nav-link:not(.nav-cta):not(.nav-notif-btn) {
    display: none;
  }
  .nav-hamburger    { display: none; }
  .sidebar-overlay  { display: none; }
  .nav-cta--desktop { display: none; }
  .nav-cta--mobile  { display: inline-flex; }

  .dashboard-content {
    padding: var(--space-5) var(--space-4);
  }

  .layout-split {
    grid-template-columns: 1fr;
  }
  .split-left {
    display: none;
  }
  .split-right {
    padding: var(--space-12) var(--space-6);
    justify-content: flex-start;
  }

  .z-footer {
    padding: var(--space-5);
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .form-group-row {
    grid-template-columns: 1fr;
  }

  .flash-messages {
    padding: var(--space-4) var(--space-5);
  }
}

@media (max-width: 600px) {
  .type-grid {
    grid-template-columns: 1fr;
  }

  .layout-centered {
    padding: var(--space-6) var(--space-4);
    align-items: flex-start;
  }

  .card-body {
    padding: var(--space-4);
  }
}