/* spmb.css - Premium Modern Design System for SPMB */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-rgb: 79, 70, 229;
  
  --secondary: #0ea5e9;
  --secondary-light: #f0f9ff;
  
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --surface-alt: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #a5b4fc;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  
  --success: #10b981;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #166534;

  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --info: #3b82f6;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1e40af;
  
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

/* Layout Structure */
.site-shell { display: flex; flex-direction: column; min-height: 100vh; }
.site-shell.dashboard-shell { display: flex; flex-direction: row; min-height: 100vh; background: #f8fafc; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.dashboard-shell .container { width: 100%; max-width: 1400px; padding: 0 1.75rem; box-sizing: border-box; }

/* Navbar */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}
img.brand-mark {
  object-fit: contain;
  background: white;
  border: 1px solid var(--border);
  padding: 2px;
}
.brand strong { display: block; font-size: 1.05rem; font-weight: 700; }
.brand small { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a:not(.btn) { color: var(--text-main); font-weight: 500; font-size: 0.95rem; }
.nav-links a:not(.btn):hover { color: var(--primary); }
.nav-links .btn-primary,
.nav-links a.btn-primary { color: #ffffff !important; }
.nav-links .btn-primary:hover,
.nav-links a.btn-primary:hover { color: #ffffff !important; }
.nav-links .btn-danger,
.nav-links a.btn-danger { color: #ffffff !important; }
.nav-links .btn-danger:hover,
.nav-links a.btn-danger:hover { color: #ffffff !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active { display: flex; }
}

/* Typography elements */
.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -1px rgba(79, 70, 229, 0.35);
}
.btn-outline {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
  color: var(--text-main);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
  color: white;
}
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  background: #059669;
  color: white;
}
.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

/* Hero Section */
.hero {
  padding: 4.5rem 0 5.5rem;
  background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.06) 0%, rgba(248, 250, 252, 0) 60%),
              radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.05) 0%, rgba(248, 250, 252, 0) 50%);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-copy h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.hero-copy p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-points { display: flex; gap: 1.5rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.hero-points span { display: flex; align-items: center; gap: 0.35rem; }

.hero-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
}
.hero-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 1rem;
}
.status-dot {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.hero-card h2 { font-size: 1.35rem; margin-bottom: 1.25rem; }
.date-box {
  background: var(--surface-alt);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}
.date-box small { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.date-box strong { font-size: 1.05rem; color: var(--text-main); }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.progress {
  width: 100%;
  height: 0.6rem;
  background: #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
  border-radius: 1rem;
  transition: width 0.5s ease;
}
.quota-summary {
  background: var(--surface-alt);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.quota-summary small {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.quota-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.quota-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.quota-item span {
  color: var(--text-main);
  font-weight: 500;
}
.quota-item strong {
  color: var(--primary);
  font-weight: 700;
  font-family: monospace;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--primary);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy h1 { font-size: 2.2rem; }
}

/* Sections */
.section { padding: 5rem 0; }
.section-soft { background: #f8fafc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section-heading h2 { font-size: 2.1rem; margin-bottom: 0.75rem; }
.section-heading p { color: var(--text-muted); font-size: 1.05rem; }

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}
.step-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.step-card span {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #e0e7ff;
  line-height: 1;
  display: block;
  margin-bottom: 1rem;
}
.step-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

/* Checklist */
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.checklist-card {
  background: white;
  padding: 2.25rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #334155;
}
.checklist-item svg, .checklist-item span {
  color: var(--success);
  font-weight: 700;
}
@media (max-width: 768px) {
  .two-column { grid-template-columns: 1fr; }
}

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
details {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}
details[open] { border-color: var(--primary); }
summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.25rem; font-weight: 400; color: var(--text-muted); }
details[open] summary::after { content: '−'; }
details p { margin-top: 1rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
@media (max-width: 768px) { .faq-layout { grid-template-columns: 1fr; } }

/* Timeline PPDB */
.hero-active-timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.hero-active-timeline-pill .pill-text {
  color: var(--text-main);
}
.hero-active-timeline-pill .pill-text strong {
  color: var(--primary);
}
.hero-active-timeline-pill .pill-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  font-size: 0.8rem;
}
.hero-timeline-alert {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(14, 165, 233, 0.08) 100%);
  border: 1.5px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}
.hero-timeline-alert.upcoming {
  background: rgba(241, 245, 249, 0.8);
  border-color: #cbd5e1;
}
.hero-timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.hero-timeline-badge.upcoming {
  color: var(--text-muted);
}
.hero-timeline-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.15rem 0;
}
.hero-timeline-dates {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
}
.hero-timeline-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.timeline-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.timeline-card.is-active {
  border: 2px solid var(--primary);
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.2), 0 8px 10px -6px rgba(79, 70, 229, 0.15);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.025) 0%, #ffffff 100%);
}
.timeline-card.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary, #0ea5e9));
}
.timeline-card.is-past {
  opacity: 0.82;
  background: #f8fafc;
}
.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}
.timeline-date {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}
.timeline-card.is-active .timeline-date {
  background: linear-gradient(135deg, var(--primary), var(--secondary, #0ea5e9));
  color: #ffffff;
}
.timeline-date span {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}
.timeline-date small {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
}
.timeline-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.timeline-status-badge.badge-active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.timeline-status-badge.badge-upcoming {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.timeline-status-badge.badge-past {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
}
.live-dot.pulse {
  animation: pulse-live 1.6s infinite ease-in-out;
}
@keyframes pulse-live {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
.timeline-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.timeline-card.is-active h3 {
  color: var(--primary);
}
.timeline-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1rem;
}
.timeline-range {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.timeline-card.is-active .timeline-range {
  color: var(--primary);
  font-weight: 700;
  border-top-color: rgba(79, 70, 229, 0.3);
}

/* Track List & Cards */
.track-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.track-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.track-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.track-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.track-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
}

/* Payment Card */
.payment-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  max-width: 680px;
  margin: 2rem auto 0;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.payment-amount {
  border-right: 1px solid var(--border);
  padding-right: 2.5rem;
  text-align: center;
  min-width: 200px;
}
.payment-amount small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.payment-amount strong {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.payment-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}
.payment-info div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--surface-alt);
}
.payment-info div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.payment-info strong {
  color: var(--text-muted);
  font-weight: 500;
}
.payment-info span {
  color: var(--text-main);
  font-weight: 700;
  font-family: inherit;
}
@media (max-width: 640px) {
  .payment-card {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .payment-amount {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 1.25rem;
    width: 100%;
  }
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.contact-card strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.contact-card p {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* Footer */
.site-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-grid h3 { font-size: 1rem; margin-bottom: 1.25rem; }
.footer-grid a { display: block; color: var(--text-muted); margin-bottom: 0.6rem; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-grid p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* Auth Pages */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 3rem 1.5rem;
  background: radial-gradient(circle at 50% 10%, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
}
.auth-card {
  background: var(--card-bg);
  padding: 2.75rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 460px;
}
.auth-card-wide { max-width: 650px; }
.auth-heading { text-align: center; margin-bottom: 2.25rem; }
.auth-heading h1 { font-size: 1.75rem; margin-bottom: 0.5rem; color: #1e293b; }
.auth-heading p { color: var(--text-muted); font-size: 0.95rem; }
.form-grid { display: grid; gap: 1.25rem; }
.two-fields { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .two-fields { grid-template-columns: 1fr; } .span-2 { grid-column: span 1; } }

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], input[type="number"], select, textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #f8fafc;
  width: 100%;
}
/* Style input[type="number"] identical to text inputs (remove browser spinners) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background-color: #fff;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}
.checkbox input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-group input {
  padding-right: 2.75rem;
}
.password-toggle-btn {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background-color 0.2s;
}
.password-toggle-btn:hover {
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.08);
}
.turnstile-wrapper {
  margin: 0.75rem 0 0.5rem 0;
  display: flex;
  justify-content: center;
  min-height: 65px;
}
.auth-switch { text-align: center; margin-top: 2rem; font-size: 0.9rem; color: var(--text-muted); }

/* Dashboard & Panels */
.dashboard-page { padding: 2.5rem 0 4rem; }
.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.dashboard-welcome h1 { font-size: 1.85rem; margin-top: 0.25rem; }
.dashboard-welcome p { color: var(--text-muted); font-size: 0.95rem; }

.status-panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.status-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 0.05em; }

.panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
}
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat-card span { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 0.5rem; }
.stat-card strong { font-size: 2.25rem; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; line-height: 1; }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-draft { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-submitted { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.status-verified { background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-border); }
.status-accepted { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.status-rejected { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.status-pending { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.status-approved { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }

/* Task List / Checklist */
.task-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.task-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.task-list li::before {
  content: '○';
  font-size: 1.25rem;
  color: #94a3b8;
}
.task-list li.done { color: var(--text-main); font-weight: 500; }
.task-list li.done::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* Forms */
.form-page { padding: 2.5rem 0 4rem; }
.form-container { max-width: 800px; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { font-size: 2rem; margin-top: 0.25rem; }
.page-heading p { color: var(--text-muted); }

.form-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.form-section-title span {
  width: 2rem;
  height: 2rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.form-section-title h2 { font-size: 1.2rem; }
.form-section-title p { font-size: 0.85rem; color: var(--text-muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field-full { grid-column: span 2; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } .field-full { grid-column: span 1; } }

.form-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }

/* Document Upload Items */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.upload-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.upload-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.upload-header h3 { font-size: 1.1rem; }
.upload-header p { font-size: 0.85rem; color: var(--text-muted); }
.upload-status { margin: 1rem 0; font-size: 0.85rem; }

/* Tables */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  padding: 0.875rem 1rem;
  background: var(--surface-alt);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
tbody tr:hover { background-color: #f8fafc; }

/* Filter Tabs */
.tabs-wrap {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.tab-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: white;
  border: 1px solid var(--border);
  text-decoration: none;
  white-space: nowrap;
}
.tab-link.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Flash Alerts */
.flash-wrap {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  width: auto;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  pointer-events: none;
}
.flash-wrap .alert {
  pointer-events: auto;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: white;
  border: 1px solid var(--border);
  position: relative;
}
.alert-icon-box {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}
.alert-body {
  flex: 1;
  min-width: 0;
}
.alert-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.alert-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}
.alert-success {
  background: #f0fdf4;
  border-left: 5px solid #16a34a;
  color: #14532d;
}
.alert-success .alert-icon-box {
  background: #dcfce7;
  color: #15803d;
}
.alert-danger {
  background: #fef2f2;
  border-left: 5px solid #dc2626;
  color: #7f1d1d;
}
.alert-danger .alert-icon-box {
  background: #fee2e2;
  color: #b91c1c;
}
.alert-warning {
  background: #fffbeb;
  border-left: 5px solid #d97706;
  color: #78350f;
}
.alert-warning .alert-icon-box {
  background: #fef3c7;
  color: #b45309;
}
.alert-info {
  background: #eff6ff;
  border-left: 5px solid #2563eb;
  color: #1e3a8a;
}
.alert-info .alert-icon-box {
  background: #dbeafe;
  color: #1d4ed8;
}
.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  line-height: 1;
  padding: 0.1rem;
  margin-left: 0.25rem;
  transition: opacity 0.2s;
}
.alert-close:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Form Errors Box */
.form-errors {
  background: var(--danger-bg);
  color: var(--danger-text);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--danger-border);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.form-errors ul { margin-left: 1.25rem; margin-top: 0.35rem; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: zoomIn 0.2s ease-out;
}
@keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ----------------------------------------------------
   Attractive SPMB Confirm Alert Modal (Add, Edit, Delete)
------------------------------------------------------- */
.spmb-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.spmb-confirm-overlay.active {
  display: flex;
  opacity: 1;
}
.spmb-confirm-card {
  background: #ffffff;
  border-radius: 1.25rem;
  max-width: 440px;
  width: 100%;
  padding: 2.25rem 1.75rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  position: relative;
  text-align: center;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.spmb-confirm-overlay.active .spmb-confirm-card {
  transform: scale(1) translateY(0);
}
.spmb-confirm-icon-wrap {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  transition: all 0.3s ease;
}
.spmb-confirm-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  opacity: 0.4;
  animation: pulseHalo 2s infinite;
}
@keyframes pulseHalo {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 0.15; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

/* Variant 1: Delete (Hapus) */
.spmb-confirm-card.type-delete .spmb-confirm-icon-wrap {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fee2e2;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}
.spmb-confirm-card.type-delete .spmb-confirm-icon-wrap::after {
  background: #fee2e2;
}
.spmb-confirm-btn-action.type-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}
.spmb-confirm-btn-action.type-delete:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
}

/* Variant 2: Add (Tambah Data) */
.spmb-confirm-card.type-add .spmb-confirm-icon-wrap {
  background: #ecfdf5;
  color: #059669;
  border: 2px solid #d1fae5;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}
.spmb-confirm-card.type-add .spmb-confirm-icon-wrap::after {
  background: #d1fae5;
}
.spmb-confirm-btn-action.type-add {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.spmb-confirm-btn-action.type-add:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

/* Variant 3: Edit / Save (Edit Data) */
.spmb-confirm-card.type-edit .spmb-confirm-icon-wrap {
  background: #eff6ff;
  color: #4f46e5;
  border: 2px solid #e0e7ff;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.2);
}
.spmb-confirm-card.type-edit .spmb-confirm-icon-wrap::after {
  background: #e0e7ff;
}
.spmb-confirm-btn-action.type-edit {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.spmb-confirm-btn-action.type-edit:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  transform: translateY(-1px);
}

/* Variant 4: Warning / Alert (Peringatan) */
.spmb-confirm-card.type-warning .spmb-confirm-icon-wrap {
  background: #fffbeb;
  color: #d97706;
  border: 2px solid #fef3c7;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.2);
}
.spmb-confirm-card.type-warning .spmb-confirm-icon-wrap::after {
  background: #fef3c7;
}
.spmb-confirm-btn-action.type-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.spmb-confirm-btn-action.type-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
}

.spmb-confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.spmb-confirm-text {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}
.spmb-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.spmb-confirm-btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spmb-confirm-btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.spmb-confirm-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ----------------------------------------------------
   Document Upload Live & Stored Preview Styling
------------------------------------------------------- */
.file-dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  overflow: hidden;
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.05);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
  font-size: 0;
}

.file-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
}

.file-dropzone-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.file-dropzone-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-main);
}

.file-dropzone-title .btn-browse {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease;
}

.file-dropzone:hover .btn-browse {
  background: var(--primary-hover);
}

.dropzone-text-drag {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.file-dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Compact dropzone variant for cards and tables */
.file-dropzone.dropzone-sm {
  padding: 0.75rem 1rem;
}
.file-dropzone.dropzone-sm .file-dropzone-icon {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
}
.file-dropzone.dropzone-sm .file-dropzone-title {
  font-size: 0.825rem;
}
.file-dropzone.dropzone-sm .file-dropzone-hint {
  font-size: 0.725rem;
}

/* Modern styling for any fallback native file inputs */
input[type="file"]:not(.file-input-hidden) {
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
}
input[type="file"]:not(.file-input-hidden)::file-selector-button {
  padding: 0.35rem 0.85rem;
  margin-right: 0.75rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
input[type="file"]:not(.file-input-hidden)::file-selector-button:hover {
  background: var(--primary-hover);
}

.live-file-preview {
  margin: 0.75rem 0 1rem;
  animation: fadeInDown 0.25s ease-out;
  max-width: 100%;
  overflow: hidden;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.preview-mini-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  position: relative;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.preview-mini-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.preview-thumb-wrap {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-pdf-wrap {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}
.preview-pdf-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #dc2626;
  text-transform: uppercase;
  margin-top: 2px;
}
.preview-info-wrap {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
}
.preview-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
  display: block;
  margin-bottom: 0.2rem;
  word-break: break-all;
}
.preview-size {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.preview-tag-ready {
  display: inline-block;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
.preview-clear-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.preview-clear-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Stored document thumbnail display */
.existing-doc-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface-alt);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.existing-doc-preview .existing-thumb {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.existing-doc-preview .existing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
  display: block;
}
.existing-doc-preview .existing-thumb:hover img {
  transform: scale(1.08);
}
.existing-doc-preview .existing-pdf-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  text-decoration: none;
}

/* Printable Registration Proof (@media print) */
@media print {
  body { background: white !important; color: black !important; font-size: 11pt !important; }
  .site-header, .site-footer, .btn, .nav-wrap, .flash-wrap, .no-print { display: none !important; }
  .print-page { padding: 0 !important; margin: 0 !important; }
  .print-card {
    box-shadow: none !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    padding: 1.5cm !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Digital Signature Canvas & Approval Pad */
.sig-tabs-wrap {
  display: flex;
  gap: 0.5rem;
  background: var(--surface-alt);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.sig-tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.sig-tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}
.sig-tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.sig-pane {
  display: none;
}
.sig-pane.active {
  display: block;
}
.sig-canvas-box {
  position: relative;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}
.sig-canvas-box.has-drawing {
  border-style: solid;
  border-color: #6366f1;
}
.sig-canvas {
  display: block;
  width: 100%;
  height: 160px;
  cursor: crosshair;
  touch-action: none;
}
.sig-baseline {
  position: absolute;
  bottom: 25px;
  left: 30px;
  right: 30px;
  border-bottom: 1px dashed #e2e8f0;
  pointer-events: none;
}
.sig-baseline::after {
  content: 'Garis Tanda Tangan';
  position: absolute;
  right: 0;
  top: 4px;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}
.sig-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sig-clear-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
}
.sig-clear-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Verified Signature Display Card on Admin Detail */
.verified-sig-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.verified-sig-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.verified-sig-meta p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}
.verified-sig-preview {
  height: 60px;
  max-width: 160px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.verified-sig-preview img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* ----------------------------------------------------
   DASHBOARD SIDEBAR & TOPBAR MODERN LAYOUT
------------------------------------------------------- */
body.has-dashboard-sidebar {
  overflow-x: hidden;
  background: #f8fafc;
}

.dashboard-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  height: 68px;
  box-sizing: border-box;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  min-width: 0;
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.sidebar-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.sidebar-brand-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.sidebar-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.sidebar-user-card {
  padding: 0.85rem 1rem;
  margin: 0.75rem 0.85rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sidebar-user-badge {
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: #e0e7ff;
  color: #4338ca;
  width: fit-content;
}

.sidebar-user-badge.role-panitia {
  background: #e0f2fe;
  color: #0369a1;
}

.sidebar-user-badge.role-applicant {
  background: #ecfdf5;
  color: #059669;
}

.sidebar-nav {
  padding: 0.25rem 0.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.5rem 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: #475569;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.sidebar-link.active {
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-link .sidebar-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.sidebar-external-link {
  color: var(--text-muted);
  font-size: 0.825rem;
}

.sidebar-footer {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: #ef4444;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.sidebar-logout-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f8fafc;
}

.dashboard-topbar {
  height: 68px;
  box-sizing: border-box;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.dashboard-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dashboard-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  color: var(--text-main);
  transition: background 0.15s ease;
}

.dashboard-sidebar-toggle:hover {
  background: #f1f5f9;
}

.dashboard-topbar-context {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.topbar-context-title {
  font-weight: 700;
  color: var(--text-main);
}

.topbar-context-sep {
  color: var(--text-muted);
}

.topbar-context-school {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.dashboard-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.topbar-action-link:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.topbar-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  background: #f1f5f9;
  border-radius: 9999px;
  font-size: 0.8rem;
}

.topbar-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.topbar-user-name {
  font-weight: 600;
  color: var(--text-main);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-content-wrapper {
  flex: 1;
  padding: 0;
}

.dashboard-footer {
  padding: 1rem 1.75rem;
  background: #ffffff;
  border-top: 1px solid var(--border);
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ----------------------------------------------------
   RESPONSIVE DRAWER FOR SIDEBAR (< 1024px)
------------------------------------------------------- */
@media (max-width: 1023px) {
  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    transform: translateX(-100%);
    z-index: 1050;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .dashboard-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: block;
  }

  .dashboard-sidebar-toggle {
    display: flex;
  }

  .sidebar-header {
    height: 64px;
    padding: 0 1rem;
  }

  .dashboard-topbar {
    height: 64px;
    padding: 0 1rem;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar-context-school {
    display: none;
  }

  .topbar-context-sep {
    display: none;
  }
}

@media (max-width: 640px) {
  .dashboard-topbar {
    padding: 0 1rem;
  }

  .topbar-action-text {
    display: none;
  }

  .topbar-user-name {
    display: none;
  }

  .topbar-user-pill {
    padding: 0.25rem;
  }
}

/* ----------------------------------------------------
   Rich Text & Announcement Modal Styling
------------------------------------------------------- */
.modal-box-lg {
  max-width: 740px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 2rem;
}
.modal-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.modal-box-header h2 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  color: var(--text-main);
}
.modal-close-icon {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.modal-close-icon:hover {
  color: var(--danger);
  background: #fee2e2;
}
.modal-box-body {
  overflow-y: auto;
  padding-right: 0.35rem;
}

/* TipTap Editor */
.tiptap-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.tiptap-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.tiptap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.tt-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}
.tt-btn.is-active {
  background: #0284c7;
  color: #ffffff;
}
.tt-separator {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}
.tiptap-editor-area {
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  cursor: text;
}
.tiptap-editor-area .ProseMirror {
  outline: none;
  min-height: 160px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
}
.tiptap-editor-area .ProseMirror p {
  margin: 0 0 0.75rem 0;
}
.tiptap-editor-area .ProseMirror p:last-child {
  margin-bottom: 0;
}
.tiptap-editor-area .ProseMirror h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem 0;
  color: var(--text-main);
}
.tiptap-editor-area .ProseMirror h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.75rem 0 0.4rem 0;
  color: var(--text-main);
}
.tiptap-editor-area .ProseMirror ul,
.tiptap-editor-area .ProseMirror ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0 0.75rem 0;
}
.tiptap-editor-area .ProseMirror blockquote {
  border-left: 3px solid #0284c7;
  padding-left: 0.85rem;
  margin: 0.75rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.tiptap-editor-area .ProseMirror hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.tiptap-editor-area .ProseMirror a {
  color: #0284c7;
  text-decoration: underline;
}
.tiptap-editor-area .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #94a3b8;
  pointer-events: none;
  height: 0;
}

/* Rich Text Presentation for Announcements */
.announcement-body p,
.announcement-content-preview p {
  margin: 0 0 0.75rem 0;
}
.announcement-body p:last-child,
.announcement-content-preview p:last-child {
  margin-bottom: 0;
}
.announcement-body h2,
.announcement-content-preview h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem 0;
  color: var(--text-main);
}
.announcement-body h3,
.announcement-content-preview h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.75rem 0 0.4rem 0;
  color: var(--text-main);
}
.announcement-body ul,
.announcement-body ol,
.announcement-content-preview ul,
.announcement-content-preview ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0 0.75rem 0;
}
.announcement-body blockquote,
.announcement-content-preview blockquote {
  border-left: 3px solid #0284c7;
  padding-left: 0.85rem;
  margin: 0.75rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.announcement-body hr,
.announcement-content-preview hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.announcement-body a,
.announcement-content-preview a {
  color: #0284c7;
  text-decoration: underline;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

