/* Desain UI Elegan, Akademik, Mobile-First sesuai PRD Website Sekolah */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&family=Fraunces:ital,opsz,wght@0,9..144,600..800;1,9..144,600..700&display=swap');

:root {
  --ink: oklch(23% 0.030 255);
  --muted: oklch(48% 0.025 255);
  --paper: oklch(98.5% 0.008 255);
  --surface: #ffffff;
  --line: oklch(90% 0.015 255);
  --forest: oklch(42% 0.140 255); /* Primary Royal Blue */
  --forest-dark: oklch(28% 0.110 255); /* Deep Navy */
  --forest-light: oklch(93% 0.035 255); /* Soft Ice Blue */
  --coral: oklch(72% 0.150 55); /* Warm Gold / Amber Accent */
  --cream: oklch(95% 0.015 255); /* Soft Tinted Paper */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 14px oklch(25% 0.03 255 / 0.05);
  --shadow-md: 0 14px 34px oklch(25% 0.03 255 / 0.08);
  --shadow-lg: 0 24px 60px oklch(25% 0.03 255 / 0.12);
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
}

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

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-top: 0;
  text-wrap: balance;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  text-wrap: pretty;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* TOP NOTIFICATION BAR */
.topbar {
  background: var(--forest-dark);
  color: oklch(94% 0.02 105);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 8px 0;
}
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar-badge {
  background: var(--coral);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
}

/* HEADER & NAVBAR */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(98% 0.01 105 / 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-crest {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px oklch(38% 0.095 148 / 0.25);
}
.brand-text small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand-text strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--forest);
}

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

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px; /* Minimum 44px tap target mobile */
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: var(--forest);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--forest-dark);
}
.btn-accent {
  background: var(--coral);
  color: var(--ink);
}
.btn-accent:hover {
  background: oklch(62% 0.140 48);
}
.btn-outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--forest);
}
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.8125rem;
}

/* MOBILE TOGGLE */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  color: var(--ink);
  padding: 8px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

/* HERO SECTION */
.hero-section {
  padding: 70px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  color: var(--coral);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
  display: block;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.hero-title em {
  font-style: normal;
  color: var(--forest);
}
.hero-lead {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 50ch;
  margin-bottom: 32px;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-visual {
  position: relative;
}
.hero-card {
  position: relative;
  min-height: 470px;
  border-radius: 40px 40px 18px 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, oklch(55% 0.08 145), var(--forest-dark));
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.85;
}
.hero-floating-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: oklch(99% 0.005 105 / 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid oklch(90% 0.015 105 / 0.6);
}
.hero-floating-badge strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--forest);
}
.hero-floating-badge span {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* STATS */
.stats-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-box {
  padding: 32px 24px;
  border-right: 1px solid var(--line);
}
.stat-box:last-child {
  border-right: none;
}
.stat-number {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
  display: block;
}

/* SECTIONS */
.section {
  padding: 88px 0;
}
.section-cream {
  background: var(--cream);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 44px;
}
.section-head-center {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 48px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 48ch;
  margin: 0;
}

/* CARDS & GRIDS */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-img-wrap {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: var(--line);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-img-wrap img {
  transform: scale(1.05);
}
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.badge-tag {
  background: var(--forest-light);
  color: var(--forest-dark);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-title {
  font-size: 1.375rem;
  margin-bottom: 10px;
  line-height: 1.25;
}
.card-desc {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 20px;
  flex-grow: 1;
}
.card-link {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* AGENDA CARDS */
.agenda-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: start;
}
.date-badge {
  background: var(--forest-light);
  color: var(--forest-dark);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.date-badge .day {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}
.date-badge .mon {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.agenda-info h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 8px;
}

/* QUOTE CALLOUT */
.quote-banner {
  background: var(--forest-dark);
  color: var(--cream);
  padding: 90px 0;
  text-align: center;
}
.quote-banner blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  max-width: 860px;
  margin: 0 auto 24px;
  letter-spacing: -0.03em;
}
.quote-banner cite {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.9375rem;
  color: oklch(80% 0.05 80);
  display: block;
}

/* PPDB SECTION */
.ppdb-strip {
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.ppdb-strip h2 {
  color: var(--cream);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
}
.ppdb-strip p {
  color: oklch(90% 0.02 105);
  font-size: 1.0625rem;
  max-width: 48ch;
  margin-bottom: 28px;
}

/* FORMS */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.16s ease, outline 0.16s ease;
}
.form-control:focus {
  outline: 3px solid oklch(68% 0.140 48 / 0.35);
  border-color: var(--coral);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* FOOTER */
.site-footer {
  background: var(--ink);
  color: oklch(90% 0.015 105);
  padding: 72px 0 32px;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 44px;
  margin-bottom: 56px;
}
.footer-col h4 {
  color: var(--cream);
  font-size: 1.125rem;
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 12px;
}
.footer-col a {
  color: oklch(75% 0.02 105);
}
.footer-col a:hover {
  color: var(--cream);
}
.footer-bottom {
  border-top: 1px solid oklch(35% 0.025 148);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: oklch(65% 0.02 105);
}

/* AUTH & ADMIN PAGES */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
  background: var(--paper);
}
.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.auth-header {
  margin-bottom: 28px;
}
.auth-header h1 {
  font-size: 2.25rem;
  margin: 16px 0 8px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--forest-dark);
  color: var(--cream);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}
.admin-brand {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid oklch(40% 0.08 148);
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}
.admin-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: oklch(85% 0.03 105);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.admin-nav a:hover, .admin-nav a.active {
  background: oklch(38% 0.095 148);
  color: var(--cream);
}
.admin-content {
  padding: 36px 40px;
  background: var(--paper);
  overflow-y: auto;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}
.admin-table th, .admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.admin-table th {
  background: oklch(96% 0.015 105);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.admin-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-admin { background: var(--forest-light); color: var(--forest-dark); }
.badge-editor { background: oklch(92% 0.05 230); color: oklch(35% 0.1 230); }
.badge-active { background: oklch(93% 0.07 145); color: oklch(30% 0.12 145); }
.badge-inactive { background: oklch(94% 0.04 25); color: oklch(38% 0.12 25); }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.9375rem;
}
.alert-success { background: oklch(93% 0.07 145); color: oklch(30% 0.12 145); }
.alert-error { background: oklch(94% 0.05 25); color: oklch(35% 0.12 25); }

/* RESPONSIVE DESIGN (MOBILE FIRST OVERRIDES) */
@media (max-width: 900px) {
  .hero-grid, .grid-3, .grid-2, .grid-4, .footer-grid, .ppdb-strip {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none; /* Mobile admin drawer or simple header */
  }
  .nav-links, .nav-actions {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-box:nth-child(2) {
    border-right: none;
  }
  .stat-box:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}