/* ==========================================================================
   Aula Today — Admin Console
   Shared styles: layout, sidebar, header, cards, buttons, tables
   ========================================================================== */

:root {
  --color-primary: #1e5fbf;
  --color-primary-dark: #164a96;
  --color-primary-light: #eaf1fc;
  --color-ink: #1c2430;
  --color-body: #4b5563;
  --color-muted: #8892a0;
  --color-border: #4b556375;
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;

  --color-success: #1f9d55;
  --color-success-bg: #e7f8ee;
  --color-danger: #dc3545;
  --color-danger-bg: #fdecee;
  --color-warning-bg: #fdeeda;
  --color-warning-ink: #b06a00;

  --sidebar-w: 248px;
  --header-h: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(20, 30, 50, 0.06), 0 1px 1px rgba(20, 30, 50, 0.04);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; }

/* ---------- App shell ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-brand svg { flex-shrink: 0; }

.sidebar-brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--color-body);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav-link:hover {
  background: #eef1f5;
  color: var(--color-ink);
  text-decoration: none;
}

.sidebar-nav-link.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(30, 95, 191, 0.35);
}
.sidebar-nav-link.active:hover { background: var(--color-primary); color: #fff; }

.sidebar-nav-link.secondary {
  background: #eef0f3;
  color: var(--color-body);
}

.sidebar-nav-link svg { flex-shrink: 0; opacity: 0.9; }

.sidebar-footer {
  border-top: 1px solid var(--color-border);
  padding: 16px 14px;
}

.btn-new-module {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  margin-bottom: 16px;
}
.btn-new-module:hover { background: var(--color-primary-dark); }
.btn-new-module:active { transform: translateY(1px); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}
.sidebar-user-sub {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 6px 0;
  color: var(--color-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}
.sidebar-logout:hover { color: var(--color-danger); text-decoration: none; }

/* ---------- Main column ---------- */
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.topbar {
  height: var(--header-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* gap: 20px; */
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-icon-btn {
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar-icon-btn:hover { background: var(--color-bg); color: var(--color-ink); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.topbar-user-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-primary);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #f2c9b0, #e8a87c);
  border: 1px solid var(--color-border);
}

/* ---------- Content area ---------- */
.content {
  padding: 28px 32px 56px;
  max-width: 1280px;
  width: 100%;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.breadcrumb {
  font-size: 0.86rem;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb .current { color: var(--color-ink); font-weight: 600; }

.page-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: var(--color-body);
  font-size: 0.96rem;
  margin: 0 0 24px;
}

.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- Search input ---------- */
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  min-width: 300px;
  color: var(--color-muted);
}
.search-input svg { flex-shrink: 0; }
.search-input input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
  color: var(--color-ink);
  background: transparent;
}
.search-input input::placeholder { color: var(--color-muted); }

/* ---------- Stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 30px;
  margin-top: 10px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.stat-card-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-ink);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-card-note {
  font-size: 0.84rem;
  color: var(--color-muted);
}
.stat-card-note.positive { color: var(--color-success); font-weight: 600; }

/* ---------- Section heading ---------- */
.section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 16px;
}

/* ---------- Quick access grid ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}

.quick-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.quick-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 700;
}
.badge-neutral { background: #eef0f3; color: var(--color-body); }
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning-ink); }
.badge-primary { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-dark { background: #16324f; color: #fff; }

.quick-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0;
}

.quick-card-desc {
  font-size: 0.85rem;
  color: var(--color-body);
  margin: 0;
  flex: 1;
  line-height: 1.45;
}

.quick-card-link {
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0055d2;
}

/* ---------- Table card ---------- */
.table-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 0px 8px;  
}

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

.data-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-ink);
}

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

.data-table .cell-muted { color: var(--color-muted); font-size: 0.70rem; }

/* ---------- Buttons (shared) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

.btn-outline { background: #fff; border-color: var(--color-border); color: var(--color-body); }
.btn-outline:hover { background: #e9f7fe  ; border-color: #c7cdd6; color: var(--color-ink); }

.btn-danger-outline { background: #fff; border-color: #f3c6cb; color: var(--color-danger); }
.btn-danger-outline:hover { background: var(--color-danger-bg); border-color: var(--color-danger); }

.btn-ghost { background: transparent; border-color: var(--color-border); color: var(--color-muted); }
.btn-ghost:hover { background: var(--color-bg); color: var(--color-ink); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:disabled:hover { background: inherit; }

.btn-sm { padding: 8px 13px; font-size: 0.82rem; }

/* ---------- Form fields ---------- */
.field-group { margin-bottom: 26px; }
.field-label {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 10px;
}
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.field-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: #fff;
  color: var(--color-muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.field-input-wrap input,
.field-input-wrap select {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.92rem;
  color: var(--color-ink);
  background: transparent;
  font-family: inherit;
}
.field-hint {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 8px;
}
.field-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-top: 18px;
}

/* ---------- Two column layout with side panel ---------- */
.flow-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.panel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
  margin-top: 10px;
}

/* ---------- Stepper (progress) panel ---------- */
.stepper-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.stepper-card-head {
    background: #dceafc;
    color: var(--color-primary-dark);
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 20px;
    margin-top: 10px;
    border-radius: 10px;
    margin: 10px;
}
.stepper-list {
  padding: 22px 20px 26px;
  list-style: none;
  margin: 0;
  position: relative;
}
.stepper-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 30px;
}
.stepper-item:last-child { padding-bottom: 0; }
.stepper-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -2px;
  width: 2px;
  background: var(--color-border);
}
.stepper-item:last-child::before { display: none; }

.stepper-dot {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: #eef0f3;
  color: var(--color-muted);
  z-index: 1;
}
.stepper-item.done .stepper-dot { background: var(--color-success); color: #fff; }
.stepper-item.current .stepper-dot { background: var(--color-primary); color: #fff; box-shadow: 0 0 0 4px var(--color-primary-light); }

.stepper-eyebrow {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.stepper-item.current .stepper-eyebrow { color: var(--color-primary); }
.stepper-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-ink);
}

/* ---------- Top step progress (P2-P4 header style) ---------- */
.step-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-progress-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: #eef0f3;
  color: var(--color-muted);
}
.step-progress-dot.done { background: var(--color-success); color: #fff; }
.step-progress-dot.current { background: var(--color-primary); color: #fff; }
.step-progress-line { width: 36px; height: 2px; background: var(--color-border); }
.step-progress-line.done { background: var(--color-success); }

/* ---------- Module list cards ---------- */
.module-grid {
  /* display: grid;
  grid-template-columns: repeat(3, 1fr); */
 margin-top: 10px;
}
.module-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.module-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.module-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0;
}
.module-card-meta {
  font-size: 0.82rem;
  color: var(--color-muted);
  display: flex;
  gap: 14px;
  margin: 2px 0 6px;
}
.module-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ---------- Case list rows (P2) ---------- */
.case-row-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: #fff;
}
.case-row-mini-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-ink);
}
.case-row-mini-actions { display: flex; gap: 8px; }

.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover { border-color: var(--color-primary); background: var(--color-primary-light); }

.add-dashed-btn {
  width: 100%;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
  color: #0055d2;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.add-dashed-btn:hover { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); }

/* ---------- Collapsible section (P3) ---------- */
.collapse-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  overflow: hidden;
}
.collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  cursor: pointer;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}
.collapse-head-title {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--color-ink);
}
.collapse-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
}
.collapse-chevron { transition: transform 0.2s ease; color: var(--color-muted); }
.collapse-card.collapsed .collapse-chevron { transform: rotate(-90deg); }
.collapse-body { padding: 22px; }
.collapse-card.collapsed .collapse-body { display: none; }

.subblock-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 8px;
  display: block;
}
.textarea-field {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--color-ink);
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea-field:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-body);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--color-bg); border-color: #c7cdd6; }
.icon-btn.success { background: #00a651;  border-color: #bfe8cf; }
.icon-btn.success:hover { background: var(--color-success-bg); }
.icon-btn.warn { background: #fff200; border-color: #f4dcb0; }
.icon-btn.warn:hover { background: var(--color-warning-bg); }
.icon-btn.danger {background: #ed1c24; border-color: #f3c6cb; }
.icon-btn.danger:hover { background: var(--color-danger-bg); }
.icon-btn.primary {border-color: #bcd6f6;  background: #4278bc;; }
.icon-btn.primary:hover { background: var(--color-primary-light); }

.profile-mini-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.profile-mini-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}

.dialogue-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dialogue-line-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef0f3;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Summary blocks (P4) ---------- */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 30px; margin-bottom: 14px; }
.summary-label { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-muted); margin-bottom: 4px; }
.summary-value { font-size: 1rem; font-weight: 700; color: var(--color-ink); }
.summary-text { font-size: 0.9rem; color: var(--color-body); line-height: 1.55; }

.case-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
}
.case-summary-row:last-child { border-bottom: none; }
.case-summary-left { display: flex; align-items: center; gap: 12px; }
.case-summary-num {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--color-bg); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem; color: var(--color-body);
  flex-shrink: 0;
}

.visibility-panel { display: flex; flex-direction: column; gap: 18px; }
.status-ready {
  background: var(--color-success-bg);
  border: 1px solid #bfe8cf;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.status-ready-title { font-weight: 800; font-size: 0.9rem; color: var(--color-success); }
.status-ready-desc { font-size: 0.82rem; color: #2f6b45; margin-top: 2px; }

/* ---------- Payments table extras (P6) ---------- */
.avatar-chip {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem; color: #fff; flex-shrink: 0;
}
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-name { font-weight: 700; font-size: 0.9rem; }
.person-sub { font-size: 0.8rem; color: var(--color-muted); }

.tabs-row { display: flex; gap: 6px; border-bottom: 1px solid var(--color-border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 4px; margin-right: 22px; background: none; border: none;
  font-size: 0.92rem; font-weight: 700; color: var(--color-muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.pagination { display: flex; align-items: center; gap: 6px; }
.page-num {
  width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  font-weight: 700; color: var(--color-body); background: #fff; cursor: pointer;
}
.page-num.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.page-num:hover:not(.active) { background: var(--color-bg); }

/* ---------- Timeline (P7) ---------- */
.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline-item:last-child::before { display: none; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  width: 27px; height: 27px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1;
}
.timeline-title { font-weight: 700; font-size: 0.9rem; }
.timeline-sub { font-size: 0.82rem; color: var(--color-muted); }
.timeline-time { font-size: 0.78rem; color: var(--color-muted); margin-left: auto; white-space: nowrap; }
.timeline-row { display: flex; align-items: flex-start; justify-content: space-between; width: 100%; gap: 10px; }

/* ---------- Progress bar (P8) ---------- */
.progress-track { height: 7px; border-radius: 100px; background: #eef0f3; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 100px; background: var(--color-primary); }
.progress-fill.done { background: var(--color-success); }
.progress-fill.pending { background: var(--color-border); }

.enrolled-module-card {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.enrolled-module-card.done { border-left-color: var(--color-success); }
.enrolled-module-card.progress { border-left-color: var(--color-primary); }

.btn-success { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.btn-success:hover { background: #187c42; border-color: #187c42; }

/* ---------- Case list / accordion rows ---------- */
.case-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--color-ink);
  margin-bottom: 14px;
}
.case-row-header .case-row-label { display: flex; align-items: center; gap: 10px; color: var(--color-muted); font-weight: 700; }
.case-row-header .case-row-label b { color: var(--color-ink); }

.case-collapsed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 15px 20px;
  margin-bottom: 14px;
  color: var(--color-muted);
  font-weight: 700;
}
.case-collapsed-row .case-row-label { display: flex; align-items: center; gap: 10px; }

.case-media-preview {
  width: 210px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
}
.case-media-preview img { width: 100%; display: block; }

.upload-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  color: var(--color-muted);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.upload-dropzone:hover { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); }

.add-case-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--color-muted);
  font-weight: 700;
  cursor: pointer;
  background: var(--color-surface);
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.add-case-dropzone:hover { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); }

/* ---------- Collapsible accordion sections (case detail editor) ---------- */
.accordion-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  overflow: hidden;
}
.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #f3f6fb;
  cursor: pointer;
  font-weight: 800;
  color: var(--color-primary-dark);
  font-size: 0.98rem;
}
.accordion-head .num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  margin-right: 10px;
}
.accordion-body { padding: 22px; }

/* ---------- Avatars in tables ---------- */
.avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.table-person { display: flex; align-items: center; gap: 12px; }
.table-person-name { font-weight: 700; font-size: 0.9rem; }
.table-person-sub { font-size: 0.8rem; color: var(--color-muted); }

.dot-status { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }

.icon-action-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-action-btn:hover { background: var(--color-bg); }
.icon-action-btn.approve { color: var(--color-success); border-color: #bfe6cf; }
.icon-action-btn.approve:hover { background: var(--color-success-bg); }
.icon-action-btn.reject { color: var(--color-danger); border-color: #f3c6cb; }
.icon-action-btn.reject:hover { background: var(--color-danger-bg); }
.icon-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pill-select {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-ink);
  background: #fff;
}

.pagination { display: flex; align-items: center; gap: 6px; }
.pagination button {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.pagination button:hover { background: var(--color-bg); }
.pagination button.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.table-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* ---------- Admission / student review card ---------- */
.review-side-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  align-items: start;
}
.student-review-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.review-avatar-photo {
  width: 62px; height: 62px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #cfe0f7, #9dbfe8);
  display: flex; align-items: center; justify-content: center;
  color: #1e5fbf;
}
.review-name { font-size: 1.15rem; font-weight: 800; margin: 0 0 3px; }
.review-email { color: var(--color-muted); font-size: 0.88rem; }
.review-id { color: var(--color-muted); font-size: 0.82rem; margin-top: 2px; }

.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 12px; top: 26px; bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 25px; height: 25px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  z-index: 1;
}
.timeline-item.success .timeline-dot { background: var(--color-success-bg); color: var(--color-success); }
.timeline-title { font-weight: 700; font-size: 0.9rem; }
.timeline-time { font-size: 0.78rem; color: var(--color-muted); }
.timeline-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; width: 100%; }

/* ---------- Student profile ---------- */
.profile-header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.profile-header-info { flex: 1; min-width: 220px; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--color-muted); font-size: 0.86rem; margin-top: 6px;
}
.profile-meta-row span { display: flex; align-items: center; gap: 5px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.module-progress-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.module-progress-card.complete { border-left: 4px solid var(--color-success); }
.module-progress-card.active { border-left: 4px solid var(--color-primary); }
.module-progress-card.pending { border-left: 4px solid var(--color-border); }
.module-progress-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.module-progress-title { font-weight: 700; font-size: 0.9rem; }
.progress-bar-track { width: 100%; height: 7px; border-radius: 100px; background: #eef0f3; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 100px; background: var(--color-primary); }
.progress-bar-fill.complete { background: var(--color-success); }
.progress-pct { font-size: 0.78rem; color: var(--color-muted); margin-top: 6px; }

.security-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  flex-wrap: wrap;
}

/* ---------- Empty / helper states ---------- */
.helper-note {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stat-grid, .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-layout { grid-template-columns: 1fr; }
}

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-w));
    top: 0;
    z-index: 95;
    transition: left 0.25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.12);
    height: 100vh;
  }
  .sidebar.open { left: 0; }

  .stat-grid, .quick-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 40px; }
  .search-input { min-width: 0; width: 100%; }
  .menu-toggle { display: flex; margin-right: auto; }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,20,30,0.4);
    z-index: 90;
  }
  .sidebar-backdrop.open { display: block; }
}
