/* =====================================================================
   Lord Shiva Model School — Entrance Registration 2026
   Premium blue & white theme
   ===================================================================== */

:root {
  --navy: #0a2463;
  --navy-2: #123a8f;
  --sky: #3e8fd9;
  --sky-light: #eaf3fc;
  --gold: #f2b233;
  --ink: #1e2a3a;
  --muted: #64748b;
  --card-radius: 18px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(62, 143, 217, 0.25), transparent 60%),
    radial-gradient(900px 450px at -10% 0%, rgba(18, 58, 143, 0.18), transparent 55%),
    linear-gradient(180deg, #f2f7fd 0%, #e6effa 100%);
}

h1, h2, h3, .school-name { font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif; }

/* ---------------- Header / branding ---------------- */

.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, #1f5bb5 100%);
  color: #fff;
  padding: 2rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto -10% -70px -10%;
  height: 140px;
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(-2deg);
  pointer-events: none;
}

.brand-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: left;
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 86px;
  height: 100px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  flex: 0 0 auto;
}

.school-name {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.exam-line { margin: 0.5rem 0 0.35rem; }

.exam-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #ffd166);
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  letter-spacing: 1px;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.exam-date {
  margin: 0;
  color: #cfe2fb;
  font-size: clamp(0.85rem, 2.2vw, 1rem);
}
.exam-date strong { color: #fff; }

/* ---------------- Page body / form card ---------------- */

.page-body { flex: 1; padding-bottom: 3rem; }

.form-wrap { margin-top: -2.25rem; position: relative; z-index: 2; }

.form-card, .success-card {
  max-width: 920px;
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 18px 45px rgba(10, 36, 99, 0.16);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: #fff;
}

.card-head {
  text-align: center;
  border-bottom: 1px solid #e8eef7;
  padding-bottom: 1.1rem;
  margin-bottom: 1.5rem;
}

.card-head h2 {
  color: var(--navy);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  margin-bottom: 0.35rem;
}

.card-head h2 .bi { color: var(--sky); }

.card-head p { color: var(--muted); margin: 0; font-size: 0.92rem; }

.req { color: #dc3545; }

.form-label { font-weight: 600; color: var(--navy); font-size: 0.9rem; }

.form-control, .form-select, .input-group-text {
  border: 1.5px solid #d6e2f2;
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-group .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-text {
  background: var(--sky-light);
  color: var(--navy-2);
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group .form-control { border-left: none; }

.form-control:focus, .form-select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 0.22rem rgba(62, 143, 217, 0.18);
}

.input-group:focus-within .input-group-text { border-color: var(--sky); }

.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }

.invalid-feedback { display: none; font-size: 0.82rem; }
.is-invalid ~ .invalid-feedback,
.is-invalid + .invalid-feedback,
.input-group .form-control.is-invalid ~ .invalid-feedback { display: block; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.btn-submit {
  background: linear-gradient(135deg, var(--navy-2), var(--sky));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.6px;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 20px rgba(18, 58, 143, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-submit:hover, .btn-submit:focus {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(18, 58, 143, 0.45);
}

.btn-submit:disabled { opacity: 0.75; transform: none; }

.form-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 1rem 0 0;
}
.form-note .bi { color: var(--sky); }

/* ---------------- Success screen ---------------- */

.success-card { max-width: 720px; text-align: center; }

.success-icon {
  width: 84px; height: 84px;
  margin: -70px auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #28b463, #1e9e52);
  color: #fff;
  font-size: 2.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(30, 158, 82, 0.4);
  border: 5px solid #fff;
}

.success-title { color: #1e9e52; font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 700; }
.success-sub { color: var(--navy); font-size: clamp(1.05rem, 2.5vw, 1.3rem); font-weight: 600; margin-bottom: 0.75rem; }
.success-text { color: var(--muted); max-width: 34rem; margin: 0 auto 1.25rem; line-height: 1.6; }

.success-meta {
  background: var(--sky-light);
  border: 1px solid #d6e6f7;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0 auto 1rem;
  max-width: 30rem;
}
.success-meta p { margin: 0.3rem 0; color: var(--navy); }
.success-meta .bi { color: var(--sky); }

.reg-no {
  display: inline-block;
  background: var(--navy);
  color: #ffd166;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.15rem 0.7rem;
  border-radius: 8px;
  font-size: 1.05rem;
}

.keep-note { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

.btn-more {
  background: linear-gradient(135deg, var(--navy-2), var(--sky));
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 8px 20px rgba(18, 58, 143, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-more:hover, .btn-more:focus { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }

/* ---------------- Footer ---------------- */

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem 0;
}
.site-footer a { color: var(--navy-2); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .bi { color: var(--sky); }

/* ---------------- Responsive ---------------- */

@media (max-width: 575.98px) {
  .brand-block { flex-direction: column; text-align: center; gap: 0.6rem; }
  .brand-logo { width: 68px; height: 79px; }
  .site-header { padding: 1.5rem 0 3rem; }
  .form-wrap { margin-top: -1.75rem; }
  .success-icon { margin-top: -58px; width: 72px; height: 72px; font-size: 2.1rem; }
}

/* =====================================================================
   Admin panel
   ===================================================================== */

.admin-body {
  background: #eef3fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: 0.7rem 0;
  box-shadow: 0 4px 18px rgba(10, 36, 99, 0.25);
}

.admin-topbar .navbar-brand { color: #fff; font-family: 'Poppins', sans-serif; font-weight: 600; }
.admin-topbar .navbar-brand img { width: 34px; height: 40px; margin-right: 0.5rem; }
.admin-topbar .nav-link { color: #cfe2fb; }
.admin-topbar .nav-link:hover, .admin-topbar .nav-link.active { color: #fff; }
.admin-topbar .dropdown-menu a { color: var(--ink); }

.admin-wrap { flex: 1; padding: 1.75rem 0 3rem; }

.page-title { color: var(--navy); font-weight: 700; font-size: 1.3rem; margin: 0; }
.page-sub { color: var(--muted); font-size: 0.88rem; }

.stat-card {
  border: none;
  border-radius: 14px;
  color: #fff;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 8px 22px rgba(10, 36, 99, 0.15);
  height: 100%;
}
.stat-card .stat-num { font-size: 1.8rem; font-weight: 700; font-family: 'Poppins', sans-serif; line-height: 1.1; }
.stat-card .stat-label { font-size: 0.82rem; opacity: 0.92; }
.stat-card .stat-ico { font-size: 1.9rem; opacity: 0.85; }
.stat-1 { background: linear-gradient(135deg, #123a8f, #3e8fd9); }
.stat-2 { background: linear-gradient(135deg, #0e7a4d, #28b463); }
.stat-3 { background: linear-gradient(135deg, #7a4a0e, #d98d3e); }
.stat-4 { background: linear-gradient(135deg, #5b2a86, #9267c7); }

.panel-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(10, 36, 99, 0.1);
  background: #fff;
}

.panel-card .card-header {
  background: #fff;
  border-bottom: 1px solid #e8eef7;
  font-weight: 600;
  color: var(--navy);
  border-radius: 14px 14px 0 0 !important;
}

.filters-bar .form-control, .filters-bar .form-select { padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.filters-bar .form-label { font-size: 0.78rem; margin-bottom: 0.15rem; color: var(--muted); font-weight: 600; }

.table-regs { font-size: 0.87rem; margin-bottom: 0; }
.table-regs thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  border: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.table-regs tbody td { vertical-align: middle; }
.table-regs tbody tr:hover { background: var(--sky-light); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.reg-badge { font-weight: 600; color: var(--navy-2); white-space: nowrap; }
.cell-addr { max-width: 200px; }
.class-badge {
  background: var(--sky-light);
  color: var(--navy-2);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-export {
  background: linear-gradient(135deg, #0e7a4d, #28b463);
  color: #fff; border: none; font-weight: 600; border-radius: 10px;
}
.btn-export:hover, .btn-export:focus { color: #fff; filter: brightness(1.07); }

.btn-navy {
  background: linear-gradient(135deg, var(--navy-2), var(--sky));
  color: #fff; border: none; font-weight: 600; border-radius: 10px;
}
.btn-navy:hover, .btn-navy:focus { color: #fff; filter: brightness(1.08); }

/* Admin login */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  max-width: 420px;
  width: 100%;
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 18px 45px rgba(10, 36, 99, 0.18);
  padding: 2rem;
  background: #fff;
  text-align: center;
}
.login-card .brand-logo { width: 64px; height: 75px; }
.login-card h2 { color: var(--navy); font-size: 1.25rem; font-weight: 700; margin-top: 0.75rem; }
.login-card p { color: var(--muted); font-size: 0.85rem; }

.install-card { max-width: 520px; text-align: left; }

.detail-table th { color: var(--muted); font-weight: 600; width: 220px; white-space: nowrap; }
.detail-table td { color: var(--ink); font-weight: 500; }

@media print {
  .admin-topbar, .site-footer, .no-print { display: none !important; }
  .admin-body { background: #fff; }
  .panel-card { box-shadow: none; }
}
