/* ===== DESIGN TOKENS ===== */
:root {
  --bg: #ffffff;
  --surface: #e5e9e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #f78320;
  --primary-hover: #e0721a;
  --primary-50: #fff4e8;
  --primary-100: #ffe0b8;
  --blue: #1c8af9;
  --dark-blue: #004aad;
  --green: #799d3d;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.05);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Raleway', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, a { font: inherit; }

/* ===== LAYOUT ===== */
.container {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

/* ===== NAVBAR ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav > a:not(.button):not(.button-alt) {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}

.site-nav > a:not(.button):not(.button-alt):hover {
  color: var(--text);
  background: var(--surface);
}

/* ===== BUTTONS ===== */
.button, .button-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(247, 131, 32, 0.22);
}

.button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(247, 131, 32, 0.32);
}

.button-alt {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.button-alt:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.button-lg {
  padding: 0.8rem 1.75rem;
  font-size: 0.95rem;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--primary-50);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--primary-100);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(155deg, #ffffff 0%, #fffbf5 45%, #fff4e8 100%);
  padding: 5rem 0 4.5rem;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(247,131,32,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--primary-100);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.7;
  margin: 0;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-trust {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.trust-avatars { display: flex; }

.trust-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-100);
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--primary);
  margin-left: -7px;
}

.trust-avatar:first-child { margin-left: 0; }

.trust-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.trust-text strong { color: var(--text); }

/* ===== HERO VISUAL ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 48px rgba(0,0,0,0.14);
  outline: 4px solid rgba(247,131,32,0.12);
  outline-offset: 3px;
  display: block;
}

.dash-preview {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dash-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-dots { display: flex; gap: 5px; }

.dash-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dash-dots span:nth-child(1) { background: #ff5f57; }
.dash-dots span:nth-child(2) { background: #febc2e; }
.dash-dots span:nth-child(3) { background: #28c840; }

.dash-topbar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-body { padding: 1.25rem; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.dash-stat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 0.65rem;
  text-align: center;
  border: 1px solid var(--border);
}

.dash-stat-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.3rem;
  letter-spacing: -0.03em;
}

.dash-stat-label {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 500;
}

.dash-list-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.dash-list { display: grid; gap: 0.5rem; }

.dash-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 500;
}

.dash-row--pending {
  border-color: #fed7aa;
  background: #fff7ed;
}

.dash-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 0.58rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.dash-badge--warn {
  background: #fed7aa;
  color: #c2410c;
}

/* ===== MAIN ===== */
/*.page-container { padding: 3.5rem 0 5rem; }*/

/* ===== MESSAGES ===== */
.messages ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.6rem;
}

.message {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  background: #fffbeb;
  color: #78350f;
  border: 1px solid #fde68a;
  font-size: 0.9rem;
}

.message.error { background: var(--primary-50); color: #7f1d1d; border-color: var(--primary-100); }
.message.success { background: #f0fdf4; color: #14532d; border-color: #bbf7d0; }

/* ===== SECTION HELPERS ===== */
.section-intro { text-align: center; margin-bottom: 2.5rem; }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.section-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== INFO CARDS ===== */
.info-section { margin-bottom: 4rem; }

.info-grid { display: grid; gap: 1.25rem; }

.info-card {
  padding: 1.75rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--primary-50);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  border: 1px solid var(--primary-100);
}

.card-icon svg {
  width: 21px;
  height: 21px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ===== FEATURE SECTION ===== */
.feature-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  border: 1px solid var(--border);
}

.feature-header { text-align: center; margin-bottom: 2.5rem; }

.feature-list { display: grid; gap: 1rem; }

.feature-card {
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--primary-100);
}

.feature-card-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #111111;
  border-top: none;
}

.footer-inner {
  padding: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

/* ===== AUTH FORMS ===== */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}

.auth-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.auth-logo {
  height: 52px;
  width: auto;
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.form-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-row input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(247, 131, 32, 0.1);
  background: #fff;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 500;
}

.input-error {
  border-color: var(--primary) !important;
  background: var(--primary-50) !important;
}

.field-error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 500;
  margin: 0.3rem 0 0;
}

.field-error svg {
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.non-field-errors {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #991b1b;
  margin-bottom: 1.25rem;
}

.non-field-errors ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-success-box,
.auth-error-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.auth-success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.auth-success-box svg { stroke: #16a34a; flex-shrink: 0; margin-top: 1px; }

.auth-error-box {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  color: #991b1b;
}

.auth-error-box svg { stroke: var(--primary); flex-shrink: 0; margin-top: 1px; }

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 10px rgba(247, 131, 32, 0.22);
  letter-spacing: -0.01em;
}

.form-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(247, 131, 32, 0.32);
}

.form-note {
  margin-top: 1.25rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.875rem;
}

.form-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.form-note a:hover { text-decoration: underline; }

/* ===== GOOGLE BUTTON ===== */
.google-btn-form { margin-bottom: 0; }

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}

.google-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.78rem;
  color: var(--text-light);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.magic-link-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 0.25rem;
}

.magic-link-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.magic-link-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 55fr 45fr; gap: 2.5rem; }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-list { grid-template-columns: repeat(3, 1fr); }
  .feature-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-visual { display: flex; margin-top: 0.5rem; }
  .hero-img { max-width: 100%; border-radius: var(--radius-lg); }
  .auth-card { padding: 1.75rem; }
  .feature-section { padding: 2rem 1.25rem; }
}

@media (min-width: 1024px) {
  .header-inner { padding: 0.5rem 0; }
  .hero { padding: 5.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 55fr 45fr; gap: 3.5rem; }
}

/* ===================================================================
   APP SHELL — dashboard, wizard, detail, report
   =================================================================== */

/* ----- Page header ----- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.back-link:hover { color: var(--primary); }

/* ----- Step indicator ----- */
.step-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ----- Metric cards grid ----- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dashboard-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  padding: 1.25rem 1.5rem;
}

.metric-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ----- Filter bar ----- */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-field {
  display: grid;
  gap: 0.3rem;
  flex: 1 1 160px;
  min-width: 0;
}

.filter-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select,
.filter-input {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  transition: border-color var(--transition);
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(247, 131, 32, 0.1);
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ----- Observation list ----- */
.obs-list {
  display: grid;
  gap: 0.6rem;
}

.obs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  flex-wrap: wrap;
}

.obs-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-100);
}

.obs-row-main { flex: 1; min-width: 0; }

.obs-row-teacher {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obs-row-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.obs-row-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.stage-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Obs DataTable — same look as .manage-table without class conflict */
#obs-table thead th {
  background: #eff4ff;
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dark-blue);
  border-bottom: 1px solid #c7d9f8;
  white-space: nowrap;
}

#obs-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer !important;
}

#obs-table tbody tr:last-child { border-bottom: none; }

#obs-table tbody td {
  padding: 0.7rem 1rem;
  color: var(--text);
  vertical-align: middle;
  font-size: 0.88rem;
}

/* Clickable obs table rows */
.obs-dt-row {
  cursor: pointer !important;
  transition: background var(--transition);
}
.obs-dt-row:hover { background: var(--surface) !important; }

/* ----- Genre chips ----- */
.genre-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.genre-chip.genre-opinion     { background: #eff4ff; color: var(--dark-blue); }
.genre-chip.genre-informative { background: #e4f0ff; color: #0a67d4; }
.genre-chip.genre-narrative   { background: #f0f6e4; color: #4a6125; }

/* ----- Score badges ----- */
.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.score-badge--high     { background: #f0f6e4; color: #4a6125; }
.score-badge--mid      { background: #fff4e8; color: #c45e00; }
.score-badge--low      { background: #fee2e2; color: #991b1b; }
.score-badge--none     { background: #f1f5f9; color: #64748b; }

.score-badge--lg {
  font-size: 1rem;
  padding: 0.4rem 1.1rem;
}

/* ----- Empty state ----- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

/* ===================================================================
   WIZARD FORMS
   =================================================================== */

.wizard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.wizard-card .form-row {
  margin-bottom: 0;
}

.wizard-card .form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  display: block;
}

.wizard-card .form-row input,
.wizard-card .form-row select,
.wizard-card .form-row textarea {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.wizard-card .form-row input:focus,
.wizard-card .form-row select:focus,
.wizard-card .form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(247, 131, 32, 0.1);
  background: #fff;
}

.wizard-card .form-row select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.req { color: var(--primary); }

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ===================================================================
   QUESTIONS PAGE
   =================================================================== */

.progress-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.live-score {
  font-weight: 700;
  color: var(--text);
}

.questions-list {
  display: grid;
  gap: 0.75rem;
}

.question-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  transition: border-color var(--transition);
}

.question-card:has(input:checked) {
  border-color: var(--primary-100);
}

.question-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.question-body { flex: 1; }

.question-text {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.response-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.response-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.response-group label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  color: var(--text-muted);
}

.response-group label:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.response-group input[type="radio"]:checked + label.resp-yes {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.response-group input[type="radio"]:checked + label.resp-no {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.response-group input[type="radio"]:checked + label.resp-na {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* ===================================================================
   REVIEW / DETAIL
   =================================================================== */

.score-summary-card { padding: 1.75rem; }

.score-summary-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.score-big-wrap { text-align: center; }

.score-big {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.score-big--high  { color: #4a6125; }
.score-big--mid   { color: #c45e00; }
.score-big--low   { color: #991b1b; }
.score-big--none  { color: var(--text-muted); }

.score-big-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.score-breakdown {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.score-count { text-align: center; }

.score-count-val {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-count-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.score-count--yes .score-count-val { color: #166534; }
.score-count--no .score-count-val  { color: #991b1b; }
.score-count--na .score-count-val  { color: #475569; }
.score-count--unanswered .score-count-val { color: var(--text-muted); }

.card-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.detail-item { display: grid; gap: 0.2rem; }

.detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.review-answers { display: grid; gap: 0.6rem; }

.review-answer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.review-answer:last-child { border-bottom: none; }

.review-answer-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.review-answer-q {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.response-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.response-badge--yes  { background: #dcfce7; color: #166534; }
.response-badge--no   { background: #fee2e2; color: #991b1b; }
.response-badge--na   { background: #f1f5f9; color: #475569; }
.response-badge--none { background: #f8fafc; color: #94a3b8; }

/* ----- Observation detail header ----- */
.detail-header {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.detail-teacher {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.3rem;
}

.detail-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.detail-score-wrap { text-align: right; flex-shrink: 0; }

.score-detail-counts {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===================================================================
   REPORT TABLE
   =================================================================== */

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

.report-table thead th {
  text-align: left;
  padding: 0.6rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dark-blue);
  border-bottom: 2px solid #c7d9f8;
  background: #eff4ff;
}

.report-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.report-table tbody tr:last-child { border-bottom: none; }

.report-table tbody tr:hover { background: var(--surface); }

.report-table tbody td {
  padding: 0.75rem 0.85rem;
  color: var(--text);
  vertical-align: middle;
}

/* ===================================================================
   RESPONSIVE ADJUSTMENTS
   =================================================================== */

/* ---------- Tablet / phablet (≤ 767px) ---------- */
@media (max-width: 767px) {
  /* Forms */
  .form-grid-2,
  .form-grid-3 { grid-template-columns: 1fr; }
  .wizard-card { padding: 1.25rem; }

  /* Score summary */
  .score-summary-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* Observation list */
  .obs-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .obs-row-right { width: 100%; flex-wrap: wrap; }
  .obs-row-teacher { white-space: normal; word-break: break-word; }

  /* Detail */
  .detail-header { flex-direction: column; }
  .detail-score-wrap { text-align: left; }
  .score-detail-counts { justify-content: flex-start; }

  /* Metrics */
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }

  /* Filter bar */
  .filter-bar { padding: 1rem; }
  .filter-field { flex: 1 1 calc(50% - 0.375rem); }

  /* Manage tables */
  .manage-table { font-size: 0.82rem; }
  .manage-table thead th { padding: 0.6rem 0.75rem; }
  .manage-table tbody td { padding: 0.6rem 0.75rem; }
  .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

  /* Manage form */
  .manage-form-card { max-width: 100%; padding: 1.25rem; }
  .delete-confirm-card { max-width: 100%; padding: 1.5rem 1.25rem; }

  /* Page header */
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .page-actions { width: 100%; }
  .page-actions .button,
  .page-actions .button-alt { flex: 1; justify-content: center; text-align: center; }
}

/* ---------- Small mobile (≤ 479px) ---------- */
@media (max-width: 479px) {
  /* Container tighter padding */
  .container { width: calc(100% - 1.5rem); }

  /* Filter fields go full-width */
  .filter-field { flex: 1 1 100%; }
  .filter-actions { flex-direction: column; }
  .filter-actions .button,
  .filter-actions .button-alt { width: 100%; justify-content: center; text-align: center; }

  /* Wizard step actions stack */
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .button,
  .wizard-actions .button-alt { width: 100%; justify-content: center; text-align: center; }

  /* Manage form actions stack */
  .manage-form-actions { flex-direction: column; }
  .manage-form-actions .button,
  .manage-form-actions .button-alt { width: 100%; justify-content: center; text-align: center; }

  /* Delete confirm actions stack */
  .delete-confirm-actions { flex-direction: column; width: 100%; }
  .delete-confirm-actions .button,
  .delete-confirm-actions .button-alt { width: 100%; justify-content: center; }

  /* Metrics single column on tiny screens */
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .metric-value { font-size: 1.6rem; }

  /* Score badges wrap */
  .score-detail-counts { flex-wrap: wrap; gap: 0.4rem; }

  /* Review answers: badge on new line */
  .review-answer { flex-wrap: wrap; }
  .review-answer .response-badge { margin-left: auto; }

  /* Question card on very small */
  .question-number { width: 26px; height: 26px; font-size: 0.72rem; }

  /* Observation detail card padding */
  .dashboard-card { padding: 1rem; }

  /* Page title smaller */
  .page-title { font-size: 1.3rem; }

  /* Section padding reduction */
  section.container { padding-top: 1.25rem !important; padding-bottom: 2.5rem !important; }
}

/* ---------- Desktop baseline ---------- */
@media (min-width: 768px) {
  .filter-field { flex: 1 1 160px; }
}

.filter-row-break { flex: 0 0 100%; height: 0; overflow: hidden; }
@media (min-width: 768px) {
  .filter-field--date { flex: 1 1 160px; max-width: 200px; }
}

/* ===================================================================
   APP SIDEBAR LAYOUT
   =================================================================== */

.app-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 64px);
}

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 64px);
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
}

.app-main {
  flex: 1;
  min-width: 0;
}

/* Sidebar nav */
.sidebar-section {
  padding: 0 0.75rem 1rem;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 0 0.75rem;
  margin: 0 0 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  line-height: 1.3;
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.sidebar-link:hover svg { opacity: 1; }

.sidebar-link.active {
  background: var(--primary-100);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-link.active svg { opacity: 1; }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.75rem 1rem;
}

/* ===================================================================
   MANAGE PAGE STYLES
   =================================================================== */

.manage-table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.manage-table thead th {
  background: #eff4ff;
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dark-blue);
  border-bottom: 1px solid #c7d9f8;
  white-space: nowrap;
}

.manage-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.manage-table tbody tr:last-child { border-bottom: none; }
.manage-table tbody tr:hover { background: var(--surface); }

.manage-table tbody td {
  padding: 0.7rem 1rem;
  color: var(--text);
  vertical-align: middle;
}

.manage-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}

.btn-sm-edit {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.btn-sm-edit:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.btn-sm-delete {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
}

.btn-sm-delete:hover {
  background: var(--primary-100);
}

.btn-sm-view {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}

.btn-sm-view:hover {
  background: #dcfce7;
}

/* ----- DataTables overrides (matches manage-table design) ----- */

/* Remove default sort background images */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
  background-image: none !important;
  padding-right: 1.75rem !important;
  position: relative;
  cursor: pointer;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
  content: '⇅';
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  opacity: 0.3;
}

table.dataTable thead .sorting_asc::after  { content: '↑'; opacity: 0.75; color: var(--primary); }
table.dataTable thead .sorting_desc::after { content: '↓'; opacity: 0.75; color: var(--primary); }

/* Top controls (length + search) */
.manage-table-wrap .dt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #c7d9f8;
  background: #eff4ff;
  flex-wrap: wrap;
}

.manage-table-wrap .dt-top label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.manage-table-wrap .dt-top select,
.manage-table-wrap .dt-top input[type="search"] {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  transition: border-color var(--transition);
}

.manage-table-wrap .dt-top input[type="search"]:focus,
.manage-table-wrap .dt-top select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(247, 131, 32, 0.1);
}

/* Bottom controls (info + pagination) */
.manage-table-wrap .dt-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #c7d9f8;
  background: #eff4ff;
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: wrap;
}

.manage-table-wrap .dataTables_info {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  white-space: nowrap;
  line-height: 1.4;
}

/* Pagination buttons */
.manage-table-wrap .dataTables_paginate {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.manage-table-wrap .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--primary) !important;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  line-height: 1;
}

.manage-table-wrap .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary) !important;
}

.manage-table-wrap .dataTables_paginate .paginate_button.current,
.manage-table-wrap .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
  font-weight: 700;
}

/* Previous / Next arrows */
.manage-table-wrap .dataTables_paginate .paginate_button.previous,
.manage-table-wrap .dataTables_paginate .paginate_button.next {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0 0.6rem;
  border-color: var(--primary-100);
  color: var(--primary) !important;
}

.manage-table-wrap .dataTables_paginate .paginate_button.disabled,
.manage-table-wrap .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.3;
  cursor: not-allowed;
  background: #fff;
  border-color: var(--border);
  color: var(--text-muted) !important;
}

/* DataTables empty-table message */
.manage-table-wrap .dataTables_empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem !important;
  font-size: 0.88rem;
}

/* Manage form card */
.manage-form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 640px;
}

.manage-form-card .form-row {
  margin-bottom: 1.25rem;
}

.manage-form-card .form-row:last-child {
  margin-bottom: 0;
}

.manage-form-card label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.manage-form-card input[type="text"],
.manage-form-card input[type="number"],
.manage-form-card select,
.manage-form-card textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.manage-form-card input:focus,
.manage-form-card select:focus,
.manage-form-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(247, 131, 32, 0.12);
}

.manage-form-card textarea { resize: vertical; }

.manage-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Delete confirm */
.delete-confirm-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 480px;
  text-align: center;
}

.delete-confirm-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.delete-confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.delete-confirm-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.delete-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Sidebar responsive */
@media (max-width: 900px) {
  .app-sidebar {
    width: 200px;
  }
}

@media (max-width: 640px) {
  .app-layout {
    flex-direction: column;
  }
  .app-sidebar {
   display: none;

  }
  .sidebar-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
  }
  .sidebar-section-title { display: none; }
  .sidebar-link { font-size: 0.8rem; padding: 0.35rem 0.6rem; }
  .sidebar-divider { display: none; }
}

/* ===== FILE UPLOAD ===== */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .upload-grid { grid-template-columns: 1fr; } }

.upload-item { display: flex; flex-direction: column; gap: 0.4rem; }

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.upload-input {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  width: 100%;
  transition: border-color var(--transition);
}
.upload-input:hover { border-color: var(--primary); }

.upload-preview { margin-top: 0.25rem; }

/* ===================================================================
   HAMBURGER + MOBILE NAV DRAWER
   =================================================================== */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Overlay backdrop */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.open {
  display: block;
  opacity: 1;
}

/* Slide-in drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -290px;
  width: 270px;
  height: 100vh;
  background: #fff;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-nav.open { right: 0; }

body.nav-open { overflow: hidden; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-nav-close {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.mobile-nav-close:hover { background: var(--surface); }

.mobile-nav-close svg {
  width: 18px;
  height: 18px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem;
  gap: 0.15rem;
  flex: 1;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
}

.mobile-nav-links a svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.mobile-nav-links a:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.mobile-nav-links a:hover svg { opacity: 1; }

.mobile-nav-user {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-100);
  margin: 0.25rem 0;
}

.mobile-nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 0.6rem 1rem 0.25rem;
  margin-top: 0.25rem;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.25rem;
}

/* Show hamburger, hide desktop nav on mobile */
@media (max-width: 767px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
}
