/* Stylesheet for /jadwal-pengawas — Kelas X-1 SMAN 11 Medan */

:root {
  --bg: #FAF9F5;
  --bg-alt: #F2F0E8;
  --surface: #FFFFFF;
  --surface-muted: #F6F5F0;
  --navy: #0B1F3A;
  --navy-hover: #14325B;
  --cobalt: #1D4ED8;
  --cobalt-soft: rgba(29, 78, 216, 0.1);
  --gold: #B45309;
  --gold-soft: rgba(180, 83, 9, 0.11);
  --emerald: #047857;
  --emerald-soft: rgba(4, 120, 87, 0.12);
  --holiday: #B91C1C;
  --holiday-soft: rgba(185, 28, 28, 0.09);

  --text: #111D2E;
  --text-muted: #425166;
  --text-subtle: #526277;
  --border: rgba(11, 31, 58, 0.11);
  --border-strong: rgba(11, 31, 58, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.04);
  --shadow-md: 0 12px 30px rgba(11, 31, 58, 0.09);

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --transition: 180ms ease;
}

[data-theme="dark"] {
  --bg: #081220;
  --bg-alt: #0D1A2E;
  --surface: #11223A;
  --surface-muted: #162B47;
  --navy: #F59E0B;
  --navy-hover: #FBBF24;
  --cobalt: #60A5FA;
  --cobalt-soft: rgba(96, 165, 250, 0.16);
  --gold: #FBBF24;
  --gold-soft: rgba(251, 191, 36, 0.15);
  --emerald: #34D399;
  --emerald-soft: rgba(52, 211, 153, 0.15);
  --holiday: #FCA5A5;
  --holiday-soft: rgba(248, 113, 113, 0.16);

  --text: #F1F5F9;
  --text-muted: #B6C4D6;
  --text-subtle: #95A9C4;
  --border: rgba(241, 245, 249, 0.11);
  --border-strong: rgba(241, 245, 249, 0.22);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.38);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #0B1F3A;
  color: #F59E0B;
  font-weight: 800;
  font-size: 0.92rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

[data-theme="dark"] .brand-mark {
  background: #F59E0B;
  color: #081220;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong { font-size: 0.95rem; }
.brand-text small { font-size: 0.76rem; color: var(--text-subtle); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background-color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn-sm { min-height: 38px; padding: 7px 13px; font-size: 0.84rem; }

.btn-primary {
  background: #0B1F3A;
  color: #FFFFFF;
}

.btn-primary:hover { background: #14325B; }

[data-theme="dark"] .btn-primary {
  background: #F59E0B;
  color: #081220;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover { background: var(--surface-muted); }

.btn-locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.locked-card {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  display: flex;
  align-items: center;
  gap: 16px;
}

.locked-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.locked-icon svg {
  width: 20px;
  height: 20px;
}

.locked-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
}

.locked-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hero */
.hero {
  padding: 52px 0 60px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero h1 .serif-italic {
  color: var(--cobalt);
  font-size: 1.12em;
}

[data-theme="dark"] .hero h1 .serif-italic { color: var(--gold); }

.lead {
  margin: 0 0 26px;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
}

.rules-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rule-pill {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.rule-pill strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text);
}

.rule-pill span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* Today Spotlight Card */
.today-card {
  background: #0B1F3A;
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

[data-theme="dark"] .today-card {
  background: #132A4A;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.today-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.today-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #FCD34D;
}

.today-date {
  font-size: 0.84rem;
  color: #CBD5E1;
  font-weight: 600;
}

.today-body h2 {
  margin: 0 0 4px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.today-body p {
  margin: 0;
  font-size: 0.92rem;
  color: #CBD5E1;
}

.today-status-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #FCD34D;
}

.today-next {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.86rem;
}

.today-next span { color: #94A3B8; }
.today-next strong { color: #FFFFFF; }

/* Sections */
.section { padding: 56px 0; }

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.section-kicker {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.section-bar h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 800;
}

.section-bar h2 .serif-italic { color: var(--cobalt); }
[data-theme="dark"] .section-bar h2 .serif-italic { color: var(--gold); }

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.select-input {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

.alert-error {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--holiday-soft);
  border: 1px solid var(--holiday);
  color: var(--holiday);
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.empty-card {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.empty-card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.empty-card p { margin: 0 0 18px; color: var(--text-muted); }

/* Weekly Blocks */
.weeks-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.week-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.week-block.is-current {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 1px var(--cobalt), var(--shadow-sm);
}

[data-theme="dark"] .week-block.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow-sm);
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.week-header h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.week-meta {
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
}

.tag-current { background: var(--cobalt-soft); color: var(--cobalt); }
.tag-today { background: var(--emerald-soft); color: var(--emerald); }
.tag-holiday { background: var(--holiday-soft); color: var(--holiday); }
.tag-shifted { background: var(--gold-soft); color: var(--gold); }

.days-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.day-tile {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 142px;
}

.day-tile.is-today {
  background: var(--surface);
  border: 2px solid var(--emerald);
}

.day-tile.is-holiday {
  background: var(--holiday-soft);
  border-color: rgba(185, 28, 28, 0.25);
}

.day-tile.is-past {
  opacity: 0.78;
}

.day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.day-name {
  font-size: 0.9rem;
  font-weight: 800;
}

.day-date {
  font-size: 0.76rem;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.supervisor-name {
  margin: 4px 0 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.supervisor-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.holiday-title {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--holiday);
}

.holiday-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: auto;
}

.shift-note {
  margin-top: auto;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold);
}

/* Bottom Dual Section */
.dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h3 { margin: 0 0 4px; font-size: 1.08rem; }
.panel-head p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

.count-chip {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.members-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-chip {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-chip strong { display: block; font-size: 0.9rem; }
.member-chip small { display: block; font-size: 0.76rem; color: var(--text-subtle); }

.duty-badge {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.holidays-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.holiday-row {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.holiday-row strong { font-size: 0.9rem; }
.holiday-row span { font-size: 0.8rem; color: var(--holiday); font-weight: 700; font-variant-numeric: tabular-nums; }

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

/* Footer */
.site-footer {
  background: #081528;
  color: #CBD5E1;
  padding: 28px 0;
  font-size: 0.86rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-row p { margin: 0; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: #FCD34D; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .dual-grid { grid-template-columns: 1fr; }

  .days-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .rules-strip { grid-template-columns: 1fr; }
  .days-grid { grid-template-columns: 1fr; }
  .members-list { grid-template-columns: 1fr; }
  .day-tile { min-height: auto; }
}
