:root {
  --bg-1: #08111f;
  --bg-2: #12263f;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(148, 163, 184, 0.22);
  --text: #132238;
  --muted: #5c6b82;
  --brand: #0f766e;
  --brand-dark: #0b5f59;
  --accent: #d97706;
  --danger: #c2410c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(27, 155, 139, 0.18), transparent 34%),
    radial-gradient(circle at right, rgba(245, 158, 11, 0.16), transparent 22%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.app-body { min-height: 100vh; }
.shell, .page { min-height: 100vh; }
.hidden { display: none !important; }
.active-page { display: block; }

.hero-grid {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 48px min(6vw, 72px);
}

.hero-copy h1,
.dashboard-header h3,
.card-head h4,
.brand-block h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d9fff8;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.98;
  color: white;
}

.hero-text {
  max-width: 640px;
  color: rgba(228, 238, 255, 0.82);
  font-size: 18px;
  line-height: 1.75;
}

.hero-points {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.hero-points div {
  display: inline-flex;
  width: fit-content;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-panel,
.card,
.footer-card,
.sidebar,
.modal-panel {
  border: 1px solid var(--line);
  box-shadow: 0 26px 70px rgba(6, 17, 32, 0.22);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 18px;
}

.tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #edf3f7;
  padding: 8px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.tab-btn,
.nav-chip,
.primary-btn,
.secondary-btn,
.danger-btn,
.mini-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.tab-btn {
  padding: 14px 18px;
  border-radius: 14px;
  background: transparent;
  font-weight: 800;
  color: var(--muted);
}

.active-tab {
  background: white;
  color: var(--brand);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.1);
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #4c6178;
}

.field-input {
  width: 100%;
  border: 1px solid #d4dee7;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  background: white;
}

.field-input:focus {
  border-color: #2aa198;
  box-shadow: 0 0 0 4px rgba(42, 161, 152, 0.12);
}

.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), #0f5f97);
  color: white;
}

.primary-btn:hover { transform: translateY(-1px); }

.secondary-btn {
  background: #eef4f8;
  color: #26415d;
}

.danger-btn {
  background: #fff1eb;
  color: var(--danger);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.form-error {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1f2;
  color: #be123c;
  font-weight: 700;
}

.login-footer { padding: 0 24px 36px; }

.footer-card {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  border-radius: 22px;
  padding: 18px 22px;
  color: white;
}

.footer-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-line a { color: white; text-decoration: none; }

.dashboard-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
  background: #eef3f6;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(180deg, #0f172a, #16243c);
  color: white;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.brand-block h2 { margin: 0; font-size: 26px; }
.brand-block p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.68); }

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, #14b8a6, #3b82f6);
}

.alt-mark { background: linear-gradient(135deg, #d97706, #ef4444); }

.nav-chip {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 800;
}

.current { background: white; color: #132238; }
.menu-stack { margin-top: 6px; }
.menu-title {
  font-size: 13px;
  font-weight: 800;
  color: #c1d4ea;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 10px 0 8px;
}

.submenu-list { display: grid; gap: 8px; }

.submenu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-note {
  margin: 0;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.62);
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-header {
  padding: 28px 32px 18px;
}

.dashboard-header h3 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.header-pill,
.sync-pill,
.alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #d9f7f4;
  color: var(--brand);
  font-weight: 800;
}

.alert-pill {
  background: #fff1eb;
  color: var(--danger);
}

.content-grid {
  display: grid;
  gap: 24px;
  padding: 0 32px 32px;
}

.card {
  background: #fbfdff;
  border-radius: 28px;
  padding: 24px;
}

.wide-card { min-width: 0; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.card-head h4 { margin: 10px 0 0; font-size: 24px; }

.card-head h5 {
  margin: 0;
  font-size: 20px;
  font-family: "Plus Jakarta Sans", sans-serif;
}

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

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

.upload-box {
  margin: 22px 0;
  padding: 20px;
  border-radius: 22px;
  background: #eff7fb;
  border: 1px dashed #b7c7d9;
}

.download-panel {
  display: grid;
  gap: 20px;
}

.download-panel-top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(194, 65, 12, 0.12), transparent 32%),
    linear-gradient(135deg, #fff7f2, #fff);
  border: 1px solid #ffd9c7;
}

.download-copy p,
.helper-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.download-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.zip-results {
  display: grid;
  gap: 14px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 180px;
  border-radius: 24px;
  border: 1px dashed #d6dee8;
  background: #f7fafc;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.empty-state i {
  font-size: 28px;
  color: #94a3b8;
}

.class-export-card {
  border: 1px solid #dbe4ec;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

.class-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #f8fbfd;
  border-bottom: 1px solid #e7eef5;
}

.class-export-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.class-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: #d9f7f4;
  color: var(--brand);
  font-weight: 800;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: #eff4f8;
  color: #35506d;
  font-weight: 700;
}

.toggle-class-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: #eef4f8;
  color: #24415d;
  font-weight: 800;
  cursor: pointer;
}

.class-export-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.class-export-actions,
.record-check {
  display: flex;
  align-items: center;
  gap: 12px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff6f2;
  color: #7c2d12;
  font-weight: 700;
}

.check-chip input,
.record-check input {
  width: 18px;
  height: 18px;
  accent-color: #c2410c;
}

.record-grid {
  display: grid;
  gap: 10px;
}

.record-check {
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #e4ebf2;
  background: #fff;
  flex-wrap: wrap;
}

.record-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.record-copy strong,
.record-copy span {
  display: block;
}

.record-copy span {
  color: var(--muted);
  font-size: 14px;
}

.record-photo-mini {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  background: #eef4f8;
}

.record-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #4c6178;
  font-size: 14px;
}

.download-actions {
  display: flex;
  justify-content: flex-end;
}

.upload-title { margin: 0 0 4px; font-weight: 800; }
.upload-sub { margin: 0; color: var(--muted); }
.upload-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.preview-wrap img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
}

.mini-btn {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: #41576f;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.table-wrap,
.modal-table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e5edf4;
}

.data-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #5b6b80;
}

.photo-thumb {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
}

.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.edit-btn { background: #e0f2fe; color: #0369a1; }
.delete-btn { background: #ffedd5; color: #c2410c; }

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 17, 31, 0.58);
  padding: 20px;
  z-index: 40;
}

.modal-panel {
  width: min(1200px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 28px;
  background: white;
  padding: 22px;
}

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

.modal-subtitle { margin: 6px 0 0; color: var(--muted); }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef4f8;
  color: #344c66;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.editable-cell-input {
  width: 100%;
  min-width: 120px;
  border: 1px solid #d2dce6;
  border-radius: 10px;
  padding: 10px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .download-panel-top,
  .three-col,
  .grid-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .hero-grid,
  .dashboard-header,
  .content-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .download-form,
  .three-col,
  .grid-form,
  .form-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .footer-card,
  .upload-actions,
  .preview-wrap,
  .class-export-head,
  .download-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
