:root {
  --sidebar-width: 200px;
  --topbar-height: 48px;
  --blue: #06345f;
  --blue-dark: #072f55;
  --blue-deep: #052844;
  --blue-hover: #0b416f;
  --orange: #f68a00;
  --page: #ecf0f5;
  --line: #d5e2ed;
  --head: #edf5fb;
  --text: #142333;
  --muted: #6c7a89;
  --white: #ffffff;
  --green: #00a66a;
  --shadow: 0 1px 4px rgba(0, 0, 0, .16);
}

* { box-sizing: border-box; }
html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}
body {
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
}
a { color: #0084c8; text-decoration: none; }
a:hover { color: #005f91; }
button,
input,
select,
textarea { font: inherit; }

.app-shell { min-height: calc(100vh - var(--topbar-height)); }

/* Atemp style fixed header */
.exam-main-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1030;
  height: var(--topbar-height);
}
.exam-logo {
  position: absolute;
  inset: 0 auto auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--sidebar-width);
  height: var(--topbar-height);
  padding: 0 14px;
  border-right: 1px solid rgba(6, 52, 95, .15);
  background: #fff;
}
.exam-logo img {
  width: 168px;
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
}
.exam-navbar {
  height: var(--topbar-height);
  margin-left: var(--sidebar-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-bottom: 2px solid var(--orange);
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}
.exam-sidebar-toggle {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
.exam-school-name {
  margin-right: auto;
  color: var(--orange);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.exam-navbar-menu {
  display: flex;
  align-items: center;
  gap: 13px;
}
.exam-top-search {
  display: flex;
  align-items: center;
  height: 28px;
  margin: 0;
}
.exam-top-search input {
  width: 165px;
  height: 27px;
  padding: 4px 11px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: #fff;
  color: #555;
  font-size: 12px;
  outline: 0;
}
.exam-top-search button {
  width: 28px;
  height: 27px;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
}
.exam-top-icon,
.exam-user-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #fff;
  font-size: 14px;
}
.exam-user-chip {
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* Atemp style sidebar */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  z-index: 1045;
  width: var(--sidebar-width);
  padding: 0 0 10px !important;
  overflow: hidden auto;
  scrollbar-width: none;
  background: var(--blue-dark);
  color: #d9e8f6;
  border-radius: 0 !important;
  box-shadow: none;
  transition: transform .22s ease;
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; }
.content-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  background: var(--page);
}
.sidebar-session {
  height: 60px;
  padding: 8px 14px;
  background: #073b66;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}
.sidebar-session strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}
.quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-user {
  margin: 10px 12px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px;
  background: rgba(0, 0, 0, .12);
}
.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #edf5fb;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}
.sidebar-section-label {
  margin: 10px 14px 5px;
  color: #bdd3e8;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sidebar .nav {
  gap: 0 !important;
}
.sidebar .nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 4px 10px 14px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0;
  background: var(--blue-dark);
  color: #d9e8f6;
  font-size: 13px;
  font-weight: 600;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  border-left-color: var(--orange);
  background: var(--blue-hover);
  color: #fff;
  box-shadow: none;
}
.sidebar .nav-link .nav-ico {
  width: 16px;
  height: auto;
  flex: 0 0 16px;
  display: inline-flex;
  justify-content: center;
  background: transparent;
  color: inherit;
  font-size: 13px;
}
.sidebar hr {
  margin: 9px 14px;
  border-color: rgba(255, 255, 255, .18) !important;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: none;
  background: rgba(0, 0, 0, .45);
}
.sidebar-overlay.show { display: block; }

/* Shared Atemp controls */
.card-soft,
.topbar,
.panel,
.dash-kpi,
.live-card {
  border-radius: 3px !important;
}
.btn {
  border-radius: 4px;
}
.btn-grad,
.btn-primary {
  border-color: var(--blue) !important;
  background: var(--blue) !important;
  color: #fff !important;
}
.btn-grad:hover,
.btn-primary:hover {
  background: #052f50 !important;
}
.btn-outline-primary {
  color: var(--blue) !important;
  border-color: var(--blue) !important;
}
.btn-outline-primary:hover {
  background: var(--blue) !important;
  color: #fff !important;
}
.muted { color: var(--muted); }
.badge { font-weight: 700; }
.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
  background: #fff;
}
.table > thead > tr > th,
.table > tbody > tr > td {
  padding: 8px;
  border-top: 1px solid #f0f0f0;
  line-height: 1.42857143;
  vertical-align: middle;
  font-size: 14px;
}
.table > thead > tr > th {
  border-bottom: 1px solid #ddd;
  background: #edf5fb;
  color: #003763;
  font-weight: 700;
}

/* Admin compact premium theme */
.content-area > .app-shell,
.content-area > .container-fluid.app-shell {
  padding: 10px 14px !important;
}
.topbar,
.card-soft,
.hero-card,
.hero-band,
.questions-hero,
.copy-hero,
.copy-card,
.sm-hero,
.sm-card,
.tl-card,
.tl-kpi,
.metric-card,
.kpi-card,
.course-card {
  border: 1px solid var(--line) !important;
  border-top: 3px solid var(--orange) !important;
  border-radius: 3px !important;
  background: #fff !important;
  box-shadow: var(--shadow) !important;
}
.topbar,
.hero-card,
.hero-band,
.questions-hero,
.copy-hero,
.sm-hero,
.tl-card {
  margin-bottom: 10px !important;
}
.topbar h1,
.topbar h2,
.topbar h3,
.hero-card h1,
.questions-hero h1,
.copy-hero h1,
.sm-hero h1,
.tl-title {
  margin: 0;
  color: #222;
  font-size: 21px !important;
  font-weight: 500 !important;
  line-height: 1.18;
}
.hero-card p,
.hero-band p,
.questions-hero p,
.copy-hero p,
.sm-hero p,
.tl-sub,
.kpi-sub,
.metric-sub,
.course-sub,
.small.text-secondary,
.text-secondary.small {
  color: #49627f !important;
  font-size: 12px !important;
  line-height: 1.32;
}
.metric-card,
.kpi-card,
.tl-kpi {
  min-height: 82px !important;
  padding: 11px 12px !important;
}
.metric-label,
.kpi-label,
.tl-kpi small,
.metric-card .small,
.card-soft .small.text-secondary {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.metric-value,
.kpi-value,
.tl-kpi strong,
.card-soft .fs-3 {
  color: #061a33 !important;
  font-size: 25px !important;
  line-height: 1.1;
  font-weight: 700 !important;
}
.card,
.card-soft {
  overflow: hidden;
}
.form-control,
.form-select {
  min-height: 34px;
  border-radius: 2px;
  font-size: 13px;
  padding: 6px 9px;
}
textarea.form-control {
  min-height: 86px;
}
.form-label {
  margin-bottom: 4px;
  color: #333;
  font-size: 12px;
  font-weight: 700;
}
.btn {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
}
.btn-sm {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
}
.table-responsive {
  border: 0;
}
.table > thead > tr > th,
.table > tbody > tr > td {
  padding: 7px 9px;
  font-size: 13px;
}
.table > thead > tr > th {
  border-top: 0;
  background: #eaf2fb;
  color: #003763;
  font-size: 12px;
  white-space: nowrap;
}
.table > tbody > tr:hover {
  background: #f8fbff;
}
.badge {
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 11px;
}
.course-card {
  padding: 13px !important;
}
.course-card .course-name {
  color: #0b2440;
  font-size: 14px !important;
  line-height: 1.25;
}
.course-card p,
.course-card .small,
.course-card .text-secondary {
  font-size: 12px !important;
  line-height: 1.3;
}
.questions-admin-page .questions-table-wrap .table > :not(caption) > * > *,
.questions-table-wrap .table > :not(caption) > * > * {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}
.admin-dash .hero-card {
  background: linear-gradient(135deg, #ffffff, #eef6ff) !important;
}
.admin-dash .metric-card.tone-a,
.admin-dash .metric-card.tone-b,
.admin-dash .metric-card.tone-c,
.admin-dash .metric-card.tone-d,
.admin-dash .metric-card.tone-e,
.questions-admin-page .kpi-card.tone-a,
.questions-admin-page .kpi-card.tone-b,
.questions-admin-page .kpi-card.tone-c,
.questions-admin-page .kpi-card.tone-d {
  background: #fff !important;
}

@media (max-width: 991px) {
  .exam-logo { width: 160px; }
  .exam-navbar { margin-left: 160px; }
  .exam-school-name { font-size: 18px; }
  .exam-top-search { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .content-area { margin-left: 0; }
}

@media (max-width: 575px) {
  .exam-logo { width: 132px; padding: 0 8px; }
  .exam-logo img { width: 118px; }
  .exam-navbar { margin-left: 132px; padding-right: 8px; }
  .exam-navbar-menu { gap: 8px; }
  .exam-school-name { font-size: 15px; }
  .content-area > .app-shell,
  .content-area > .container-fluid.app-shell {
    padding: 6px !important;
  }
  .topbar,
  .hero-card,
  .hero-band,
  .questions-hero,
  .copy-hero,
  .sm-hero,
  .tl-card {
    padding: 10px !important;
    margin-bottom: 8px !important;
  }
  .topbar h1,
  .topbar h2,
  .topbar h3,
  .hero-card h1,
  .questions-hero h1,
  .copy-hero h1,
  .sm-hero h1,
  .tl-title {
    font-size: 17px !important;
  }
  .metric-card,
  .kpi-card,
  .tl-kpi,
  .card-soft {
    padding: 9px !important;
    min-height: 64px !important;
  }
  .metric-value,
  .kpi-value,
  .tl-kpi strong,
  .card-soft .fs-3 {
    font-size: 19px !important;
  }
  .metric-label,
  .kpi-label,
  .tl-kpi small {
    font-size: 9px !important;
  }
  .form-control,
  .form-select {
    min-height: 30px;
    font-size: 12px;
    padding: 4px 7px;
  }
  .btn {
    min-height: 30px;
    font-size: 12px;
    padding: 4px 8px;
  }
  .table > thead > tr > th,
  .table > tbody > tr > td {
    padding: 6px 7px;
    font-size: 12px;
  }
}
