:root {
  --primary: #0f62d6;
  --accent: #ffc233;
  --bg: #031633;
  --bg-2: #07254a;
  --surface: #08244a;
  --surface-soft: #0b2f5f;
  --text: #e7eefc;
  --muted: #afc2e4;
  --border: rgba(145, 178, 224, 0.35);
  --success: #4ad29b;
  --warning: #ffcb58;
  --danger: #ff8ca2;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

html[data-theme="light"] {
  --bg: #eef5ff;
  --bg-2: #dae9ff;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: #f9fcff;
  --text: #0b2a56;
  --muted: #466a99;
  --border: rgba(114, 148, 196, 0.35);
  --shadow: 0 18px 44px rgba(17, 49, 92, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", "Noto Sans", sans-serif;
  background:
    radial-gradient(850px 420px at 0% -10%, rgba(15, 98, 214, 0.34), transparent 65%),
    radial-gradient(900px 520px at 100% -12%, rgba(255, 194, 51, 0.12), transparent 68%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid var(--border);
  background: rgba(4, 20, 43, 0.9);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .site-header {
  background: rgba(247, 251, 255, 0.94);
}

.site-header-inner {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #4ea4ff);
  box-shadow: 0 8px 20px rgba(24, 120, 245, 0.28);
  flex-shrink: 0;
}

.brand-mark-img {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.brand-mark-img img {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  object-fit: cover;
}

.brand-title {
  font-size: clamp(22px, 2vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

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

.site-nav a {
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  border: 1px solid transparent;
}

.site-nav a:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .site-nav a:hover {
  background: rgba(15, 98, 214, 0.08);
}

.site-nav a.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4a9fff, var(--primary));
}

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

.menu-btn,
.theme-btn,
.btn {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}

html[data-theme="light"] .menu-btn,
html[data-theme="light"] .theme-btn,
html[data-theme="light"] .btn {
  background: #ffffff;
}

.menu-btn,
.theme-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  font-size: 20px;
}

.menu-btn {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.menu-btn:hover,
.theme-btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #56aaff, var(--primary));
}

.btn-accent {
  color: #18233d;
  border-color: transparent;
  background: var(--accent);
}

.login-btn {
  min-width: 108px;
}

.site-main {
  width: min(1320px, calc(100% - 28px));
  margin: 22px auto 28px;
  display: grid;
  gap: 14px;
}

.flash {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  background: var(--surface-soft);
}

.flash-success {
  color: var(--success);
  border-color: rgba(74, 210, 155, 0.45);
}

.flash-warning {
  color: var(--warning);
  border-color: rgba(255, 203, 88, 0.45);
}

.flash-error {
  color: var(--danger);
  border-color: rgba(255, 140, 162, 0.45);
}

.panel,
.hero,
.card {
  background: rgba(5, 24, 53, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .panel,
html[data-theme="light"] .hero,
html[data-theme="light"] .card {
  background: var(--surface);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  padding: 30px;
}

.eyebrow {
  margin: 0;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255, 194, 51, 0.45);
  border-radius: 999px;
  padding: 8px 14px;
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 4vw, 64px);
  line-height: 1.08;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.9vw, 36px);
  line-height: 1.45;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  display: grid;
  align-content: center;
  gap: 12px;
}

.hero-placeholder {
  min-height: 290px;
  border-radius: 16px;
  border: 1px solid rgba(255, 194, 51, 0.45);
  background: linear-gradient(130deg, rgba(21, 51, 95, 0.95), rgba(18, 66, 131, 0.85));
  padding: 22px;
  display: grid;
  align-content: end;
}

.hero-placeholder h3 {
  margin: 0 0 6px;
  font-size: 28px;
}

.hero-placeholder p {
  margin: 0;
  color: var(--muted);
}

.panel {
  padding: 20px;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 2.2vw, 42px);
}

.muted {
  color: var(--muted);
}

.cards {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

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

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

.card {
  padding: 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 34px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

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

.gallery-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 194, 51, 0.55);
}

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

.status-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 98, 214, 0.35);
  border-color: var(--primary);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 12px;
}

th {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.status-pending,
.status-review {
  color: var(--warning);
  border-color: rgba(255, 203, 88, 0.5);
}

.status-approved,
.status-enrolled {
  color: var(--success);
  border-color: rgba(74, 210, 155, 0.5);
}

.status-rejected {
  color: var(--danger);
  border-color: rgba(255, 140, 162, 0.5);
}

.login-panel {
  max-width: 920px;
}

.login-card {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 10px;
}

html[data-theme="light"] .login-card {
  background: #f6fbff;
}

.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  padding: 14px;
}

@media (max-width: 1180px) {
  .site-nav {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .site-nav.open {
    display: grid;
    position: fixed;
    top: 88px;
    left: 12px;
    right: 12px;
    z-index: 100;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 12px;
    gap: 8px;
  }

  .site-nav.open a {
    display: block;
    text-align: left;
    border-radius: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .brand-title {
    font-size: 22px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .site-main {
    width: calc(100% - 16px);
    margin-top: 14px;
  }

  .site-header-inner {
    min-height: 78px;
    width: calc(100% - 16px);
    justify-content: space-between;
  }

  .header-right {
    width: auto;
    justify-content: space-between;
  }

  .header-actions {
    gap: 8px;
  }

  .login-btn {
    min-width: 92px;
    padding: 10px 12px;
  }

  .theme-btn {
    width: 38px;
    height: 38px;
  }

  .cards-2,
  .cards-3,
  .split-grid,
  .admission-form,
  .status-form {
    grid-template-columns: 1fr;
  }

  .status-form {
    align-items: stretch;
  }

  .hero,
  .panel,
  .card {
    border-radius: 14px;
  }

  .hero {
    padding: 18px;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 44px);
  }

  .lead {
    font-size: 20px;
  }

  .panel h2 {
    font-size: clamp(26px, 8vw, 38px);
  }
}

@media (max-width: 560px) {
  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-sub {
    display: none;
  }

  .site-header-inner {
    gap: 8px;
    justify-content: space-between;
  }

  .header-right {
    gap: 8px;
  }

  .menu-btn,
  .theme-btn {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .login-btn {
    min-width: 76px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .site-nav.open {
    top: 74px;
    left: 8px;
    right: 8px;
  }
}
