@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Sora:wght@400;500;600;700&display=swap");

:root {
  --ink: #0b2b33;
  --ink-soft: #1a4450;
  --teal: #0f6b6b;
  --teal-deep: #0a4f4f;
  --mint: #d8f3ef;
  --mint-strong: #1f9e8a;
  --amber: #e8a317;
  --amber-soft: #fff4d6;
  --paper: #f3f6f4;
  --surface: #ffffff;
  --line: #d5e0dc;
  --muted: #5d7370;
  --danger: #c23b3b;
  --danger-soft: #fdecec;
  --ok: #0a7a5c;
  --ok-soft: #e6f7f1;
  --shadow: 0 10px 30px rgba(11, 43, 51, 0.08);
  --shadow-sm: 0 2px 10px rgba(11, 43, 51, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
  --font: "Sora", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(15, 107, 107, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(232, 163, 23, 0.1), transparent 50%),
    linear-gradient(180deg, #eef5f2 0%, var(--paper) 40%, #e8f0ec 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 107, 107, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 107, 107, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ——— Sidebar ——— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #e8f4f2;
  background:
    linear-gradient(165deg, #0b3d45 0%, #0f5555 48%, #0a3a42 100%);
  box-shadow: 8px 0 32px rgba(11, 43, 51, 0.18);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 163, 23, 0.18), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(31, 158, 138, 0.2), transparent 45%);
  opacity: 0.9;
}

.brand,
.sidebar-clock,
.sidebar nav,
.sidebar-foot {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--amber) 0%, #f0c14b 100%);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(232, 163, 23, 0.35);
  animation: mark-pop 0.6s ease both;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

.sidebar-clock {
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: fit-content;
  opacity: 0.9;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.nav-item .nav-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  flex-shrink: 0;
}

.nav-item .nav-label {
  flex: 1;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.nav-item.active .nav-ico {
  background: var(--amber);
  color: var(--ink);
}

.nav-item.disabled {
  opacity: 0.38;
  pointer-events: none;
}

.badge {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

.nav-item.active .badge {
  background: var(--amber);
  color: var(--ink);
}

.sidebar-foot {
  font-size: 11px;
  opacity: 0.55;
  padding: 8px;
  line-height: 1.4;
}

/* ——— Main ——— */
.main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 28px 32px 48px;
  min-width: 0;
  animation: fade-up 0.45s ease both;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}

.page-header h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.page-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  max-width: 520px;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-green,
.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 107, 107, 0.25);
}

.btn-green:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #128080 0%, var(--teal) 100%);
}

.btn-blue,
.btn-accent {
  background: linear-gradient(135deg, var(--amber) 0%, #d4890f 100%);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(232, 163, 23, 0.28);
}

.btn-blue:hover,
.btn-accent:hover {
  filter: brightness(1.05);
}

.btn-outline {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}

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

.btn-block {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
}

.link {
  color: var(--teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.link:hover {
  text-decoration: underline;
}

.link-danger {
  color: var(--danger);
}

/* ——— Dashboard hero ——— */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 28px 28px 26px;
  margin-bottom: 22px;
  color: #fff;
  background:
    linear-gradient(120deg, #0b3d45 0%, #12706a 55%, #1a8f7a 100%);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -40px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 163, 23, 0.35), transparent 65%);
  animation: drift 8s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 12px,
      rgba(255, 255, 255, 0.03) 12px,
      rgba(255, 255, 255, 0.03) 13px
    );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: center;
}

.hero h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hero p {
  opacity: 0.88;
  font-size: 14px;
  max-width: 420px;
  line-height: 1.55;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.hero-panel h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  opacity: 0.9;
}

.hero-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.hero-steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hero-steps b {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--amber);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal), var(--amber));
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b9d4cd;
}

.stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: 16px;
}

.stat-num {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hint-box {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--amber-soft);
  border: 1px solid #f0d48a;
  color: #6a5210;
  font-size: 13px;
}

/* ——— Panels / forms ——— */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: flex-start;
}

.password-gen-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-gen-row input {
  flex: 1;
  min-width: 0;
}

.password-gen-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.mail-log-box {
  margin: 0;
  padding: 12px 14px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.form-row-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.form-row-dates .form-group {
  min-width: 0;
  flex: none;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 200px;
}

.input-datetime {
  width: 100%;
  min-height: 42px;
  height: 42px;
  line-height: 1.2;
  padding: 8px 12px;
  appearance: none;
  -webkit-appearance: none;
}

.input-datetime::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  align-items: center;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.check-pill:hover {
  border-color: var(--teal);
}

.check-pill input {
  accent-color: var(--teal);
  width: auto;
}

.form-group.full {
  flex-basis: 100%;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.form-group label .req {
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  background: #fbfdfc;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 107, 107, 0.15);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #f7fbfa, #eef5f2);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

.toolbar button {
  border: 1px solid transparent;
  background: #fff;
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 8px;
  cursor: default;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.editor-wrap textarea {
  border-radius: 0 0 12px 12px;
  min-height: 120px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-row {
  display: grid;
  grid-template-columns: 28px 28px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: #f7fbfa;
  border: 1px solid var(--line);
}

.choice-letter {
  font-weight: 700;
  padding-top: 12px;
  color: var(--teal);
}

.choice-row input[type="radio"],
.choice-row input[type="checkbox"] {
  margin-top: 14px;
  accent-color: var(--teal);
}

.choice-row .editor-wrap textarea {
  min-height: 56px;
}

.section-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 10px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.02em;
}

.advance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 8px;
}

.radio-inline {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  margin-top: 4px;
}

.radio-inline label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ——— Tables ——— */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  max-width: 260px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  background: #f4f9f7;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f7fcfa;
}

.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-active {
  background: var(--mint);
  color: var(--teal-deep);
}

.status-inactive {
  background: #eceff0;
  color: #667;
}

.type-pill {
  background: var(--mint);
  color: var(--teal-deep);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

/* ——— Modal ——— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 43, 51, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
  animation: fade-in 0.2s ease;
}

.modal {
  background: var(--surface);
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(11, 43, 51, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: scale-in 0.25s ease;
}

.modal-header {
  position: relative;
  text-align: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fbfa, #fff);
}

.modal-header h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 22px;
  padding: 22px;
}

.profile-fields {
  display: flex;
  flex-direction: column;
}

.profile-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed #d5e0dc;
  font-size: 13px;
}

.profile-row .label {
  font-weight: 700;
  color: var(--ink-soft);
}

.profile-row .value {
  color: #334;
  word-break: break-word;
}

.profile-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.photo-box {
  aspect-ratio: 1;
  border: 1px dashed #b9d0c9;
  border-radius: 16px;
  background: linear-gradient(160deg, #f4faf8, #e7f2ee);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  gap: 6px;
}

.photo-box svg {
  width: 40px;
  height: 40px;
  fill: #9bb8b0;
}

.reg-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
  background: #f7fbfa;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(8px);
  z-index: 200;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-error {
  background: var(--danger);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mark-pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-24px, 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ——— Exam extras ——— */
.status-ended {
  background: var(--danger-soft);
  color: var(--danger);
}

.muted-mini {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.code-pill {
  background: var(--mint);
  color: var(--teal-deep);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.actions-cell {
  width: 48px;
  text-align: right;
}

.action-menu {
  position: relative;
  display: inline-block;
}

.action-trigger {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.action-trigger:hover {
  border-color: var(--teal);
}

.action-dropdown {
  display: none;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(11, 43, 51, 0.22);
  z-index: 9999;
  padding: 6px;
  overflow: auto;
}

.action-dropdown.open {
  display: block;
  animation: scale-in 0.15s ease;
}

/* Tablo overflow kesmesin diye body üzerinde sabit konum */
.action-dropdown.is-floating {
  position: fixed;
  right: auto;
}

.action-dropdown a,
.action-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.action-dropdown a:hover,
.action-dropdown button:hover:not(:disabled) {
  background: #eef7f4;
  color: var(--teal-deep);
}

.action-dropdown button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.action-dropdown .danger {
  color: var(--danger);
}

.action-dropdown .danger:hover {
  background: var(--danger-soft);
}

.badge-inline {
  margin-left: auto;
  background: #e8eef0;
  color: #456;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
}

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 4px;
}

.pick-item {
  display: grid;
  grid-template-columns: 22px auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  cursor: pointer;
}

.pick-item.is-selected {
  border-color: var(--teal);
  background: var(--mint);
}

.pick-text {
  font-size: 13px;
  grid-column: 3;
}

.pick-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.pick-item .type-pill {
  grid-column: 2;
}

.share-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink-soft);
}

.share-code {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #0b3d45, #12706a);
  color: #fff;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bar-track {
  height: 12px;
  background: #e8efec;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--mint-strong));
  border-radius: 999px;
}

.mini-bar {
  display: inline-block;
  width: 70px;
  height: 6px;
  background: #e8efec;
  border-radius: 999px;
  overflow: hidden;
  margin-right: 6px;
  vertical-align: middle;
}

.mini-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.preview-q-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.preview-q-text {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.choice-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.choice-preview .is-correct {
  background: var(--mint);
  border: 1px solid #9fd6cb;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--teal-deep);
}

/* Candidate exam UI */
.take-body {
  display: block;
  min-height: 100vh;
}

.take-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 16px;
  position: relative;
  z-index: 1;
}

.take-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--ink);
}

.take-brand strong {
  font-family: var(--display);
  font-size: 1.3rem;
  display: block;
}

.take-brand span {
  font-size: 12px;
  color: var(--muted);
}

.take-login h1 {
  font-family: var(--display);
  font-size: 1.6rem;
}

.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  font-weight: 600;
}

.take-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.take-timer {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-deep);
  min-width: 90px;
  text-align: center;
}

.take-timer.danger {
  color: var(--danger);
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

.take-layout {
  display: grid;
  gap: 16px;
  padding: 16px 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.take-layout-split {
  grid-template-columns: 92px 1fr;
  align-items: stretch;
  max-width: none;
  padding: 12px 14px 24px;
  height: calc(100vh - 64px);
  box-sizing: border-box;
}

.take-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.take-question-view {
  flex: 1;
  min-height: 0;
}

.take-sidebar {
  position: sticky;
  top: 76px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 8px;
  max-height: calc(100vh - 100px);
  height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.take-sidebar-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.take-sidebar-head h3 {
  font-family: var(--display);
  font-size: 0.95rem;
}

.take-q-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  flex: 1;
  align-items: stretch;
}

.take-q-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  border: 1px solid var(--line);
  background: #fbfdfc;
  border-radius: 12px;
  padding: 8px 4px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.take-q-chip:hover {
  border-color: var(--teal);
}

.take-q-chip.is-active {
  border-color: var(--teal);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.take-q-chip-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.take-q-chip.is-active .take-q-chip-num {
  color: var(--teal-deep);
}

.take-q-chip-marks {
  font-size: 11px;
  font-weight: 700;
  color: #9a6b00;
  background: var(--amber-soft);
  padding: 2px 6px;
  border-radius: 999px;
}

.take-q-chip-ok {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 10px;
  color: var(--mint-strong);
  font-weight: 700;
}

.take-split-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.take-split-card > .panel {
  margin: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.take-split-right-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

.take-split-right .take-answers,
.take-split-right .essay-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.take-split-right .essay-editor {
  height: 100%;
}

.take-split-right .essay-surface {
  flex: 1;
  min-height: 240px;
}

.take-progress {
  flex: 1;
  max-width: 220px;
  min-width: 140px;
}

.take-progress-bar {
  margin-top: 4px;
  height: 6px;
}

.take-marks-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #9a6b00;
  background: var(--amber-soft);
  border: 1px solid #f0d48a;
  padding: 4px 10px;
  border-radius: 999px;
}

.take-nav-btns {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-shrink: 0;
}

.essay-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.essay-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #f7fbfa, #eef5f2);
  border-bottom: 1px solid var(--line);
}

.essay-toolbar button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-soft);
}

.essay-toolbar button:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.essay-sep {
  width: 1px;
  background: var(--line);
  margin: 0 4px;
  align-self: stretch;
}

.essay-surface {
  min-height: 220px;
  padding: 14px 16px;
  outline: none;
  font-size: 15px;
  line-height: 1.6;
}

.essay-surface:empty:before {
  content: attr(data-placeholder);
  color: #9aa;
  pointer-events: none;
}

.essay-foot {
  padding: 8px 12px 10px;
  border-top: 1px solid #eef2f0;
  background: #fafcfb;
}

.essay-count-warn {
  color: var(--danger);
  font-weight: 600;
}

.finish-dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(11, 43, 51, 0.28);
  padding: 28px 28px 24px;
  text-align: center;
  animation: scale-in 0.22s ease;
}

.finish-dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f3f4f4;
  color: #555;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.finish-dialog-x:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.finish-dialog-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #9a6b00;
  background: var(--amber-soft);
  border: 1px solid #f0d48a;
}

.finish-dialog-title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.finish-dialog-warn {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 8px;
  padding: 0 4px;
}

.finish-dialog-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 22px;
  padding: 0 4px;
}

.finish-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.finish-dialog-actions .btn {
  min-width: 120px;
}

.result-thanks {
  text-align: center;
  padding: 36px 28px 28px;
}

.result-thanks-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--mint-strong));
  box-shadow: 0 10px 24px rgba(15, 107, 107, 0.28);
}

.result-thanks-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.result-thanks-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  color: var(--ink);
}

.result-thanks-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.result-thanks-exam {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

.result-thanks-msg {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 320px;
  margin: 0 auto 8px;
  padding: 14px 16px;
  background: var(--mint);
  border: 1px solid #9fd6cb;
  border-radius: 14px;
}

/* Exam assignee picker */
.assign-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
  padding: 12px;
  margin-bottom: 20px;
}

.assign-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  margin-bottom: 10px;
}

.assign-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 2px;
}

.assign-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  max-width: 100%;
}

.assign-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.assign-chip-mail {
  font-size: 11px;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-chip-x {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #eef2f0;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.assign-chip-x:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.assign-search-wrap {
  position: relative;
}

.assign-search-wrap input {
  width: 100%;
}

.assign-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 40;
  max-height: 260px;
  overflow: auto;
  padding: 4px;
}

.assign-drop-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
}

.assign-drop-item strong {
  font-size: 13px;
  color: var(--ink);
}

.assign-drop-item span {
  grid-column: 1;
  font-size: 12px;
  color: var(--muted);
}

.assign-drop-item em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-deep);
  background: var(--mint);
  padding: 2px 8px;
  border-radius: 999px;
}

.assign-drop-item:hover {
  background: var(--mint);
}

.assign-drop-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.assign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.invite-link-input {
  width: 100%;
  font-size: 12px;
  font-family: ui-monospace, Consolas, monospace;
}

.invite-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--mint);
  border: 1px solid #9fd6cb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invite-banner strong {
  font-size: 14px;
  color: var(--teal-deep);
}

.invite-banner span {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.input-locked {
  background: #eef2f0 !important;
  color: #445;
}

.mail-dialog {
  text-align: left;
  width: min(520px, calc(100vw - 32px));
}

.mail-dialog .finish-dialog-title {
  text-align: center;
  padding-right: 24px;
}

.mail-preview input,
.mail-preview textarea {
  width: 100%;
  margin-top: 4px;
}

.mail-preview textarea {
  min-height: 200px;
  font-size: 13px;
  line-height: 1.45;
}

.bulk-list {
  list-style: none;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  margin: 0;
}

.bulk-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.bulk-list li:nth-child(odd) {
  background: #f7fbfa;
}

.bulk-list li.is-bad {
  color: var(--danger);
}

.bulk-list strong {
  font-weight: 600;
}

.monitor-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-deep);
  background: var(--mint);
  border: 1px solid #9fd6cb;
  padding: 8px 12px;
  border-radius: 999px;
}

.monitor-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9e8a;
  display: inline-block;
  animation: pulse 1.2s ease infinite;
}

.take-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  background: #fbfdfc;
}

.take-opt:hover {
  border-color: var(--teal);
}

.take-fill,
.take-essay-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.take-essay-input {
  min-height: 120px;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

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

  .take-layout-split {
    grid-template-columns: 1fr;
    height: auto;
  }

  .take-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    height: auto;
    order: -1;
  }

  .take-q-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .take-q-chip {
    width: 58px;
  }

  .take-split-card {
    grid-template-columns: 1fr;
    height: auto;
  }

  .take-split-card > .panel {
    height: auto;
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  body:not(.take-body) {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-radius: 0 0 20px 20px;
    padding: 12px 10px 14px;
  }

  .sidebar-clock {
    display: none;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav-item {
    flex: 1 1 110px;
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
  }

  .nav-label {
    white-space: nowrap;
  }

  .main {
    padding: 20px 16px 40px;
  }

  .pick-item {
    grid-template-columns: 22px 1fr;
  }

  .pick-text,
  .pick-meta,
  .pick-item .type-pill {
    grid-column: auto;
  }

  .form-row-dates {
    grid-template-columns: 1fr;
  }

  .sidebar-user {
    display: none;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ——— Login (legacy shell helpers) ——— */
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-shell {
  width: min(420px, calc(100vw - 32px));
}

.login-card {
  padding: 28px;
}

.login-error {
  color: var(--danger);
  margin-bottom: 8px;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* ——— Sidebar user ——— */
.sidebar-user {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  margin-top: auto;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 13px;
}

.sidebar-user-role {
  font-size: 11px;
  opacity: 0.75;
  margin: 2px 0 8px;
}

.sidebar-logout {
  width: 100%;
  justify-content: center;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* ——— Proctor ——— */
.proctor-warn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  background: var(--danger);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s ease;
  pointer-events: none;
}

.proctor-warn.show {
  opacity: 1;
  transform: translateY(0);
}

.proctor-list {
  margin-top: 8px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ——— Answer review ——— */
.review-block {
  margin-bottom: 16px;
}

.review-opt {
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #f8faf9;
}

.review-opt.is-correct {
  background: #e8f8f0;
  border: 1px solid #9fd4b8;
}

.review-opt.is-wrong {
  background: var(--danger-soft);
  border: 1px solid #f0b4b4;
}

.review-fill.ok {
  color: var(--mint-strong);
  font-weight: 600;
}

.review-fill.bad {
  color: var(--danger);
}

.review-essay-answer {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  min-height: 60px;
}

.essay-grade-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-width: 320px;
}

.review-status-ok {
  color: var(--mint-strong);
  font-size: 12px;
  font-weight: 600;
}

.review-status-bad {
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

.review-status-pending {
  color: #9a6b00;
  background: var(--amber-soft);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.review-key {
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

.import-preview {
  margin-top: 10px;
}

/* ——— Certificate ——— */
.cert-page {
  display: block;
  background: #f5f0e6;
  min-height: 100vh;
}

.cert-toolbar {
  padding: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.cert-sheet {
  max-width: 820px;
  margin: 0 auto 40px;
  padding: 0 16px;
}

.cert-inner {
  background: #fff;
  border: 3px double var(--teal);
  border-radius: 8px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.cert-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--amber), #f0c14b);
  color: var(--ink);
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.cert-brand {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.cert-title {
  font-family: var(--display);
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--ink);
}

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

.cert-name {
  font-family: var(--display);
  font-size: 1.8rem;
  margin: 12px 0 20px;
  color: var(--teal-deep);
}

.cert-body {
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.cert-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.cert-stats span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.cert-stats strong {
  font-size: 1.1rem;
}

.cert-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ——— Print ——— */
@media print {
  .no-print,
  .sidebar,
  .cert-toolbar,
  .page-header,
  #save-bar {
    display: none !important;
  }

  body.print-friendly .main {
    padding: 0;
    max-width: none;
  }

  .cert-page {
    background: #fff;
  }

  .cert-inner {
    box-shadow: none;
    border-width: 2px;
  }
}
