/* =========================================================
   EduPro UI — main.css (Dense Dashboard • Sharp UI)
   Compact typography • Minimal radius • Smaller buttons
   Bootstrap 5 polish • Accessible • Dark-mode via .theme-dark
   Fonts: Inter (UI), Poppins (headings)
   ========================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700&display=swap');

/* ---- Tokens ---- */
:root{
  /* Brand */
  --primary-color:   #8B2E3A;
  --secondary-color: #6E1F2A;
  --accent-color:    #D98C9A;

  /* Aliases */
  --primary: var(--primary-color);
  --secondary: var(--secondary-color);

  /* Neutrals */
  --bg-body:     #faf8fc;
  --surface:     #ffffff;
  --surface-2:   #fcfbfd;
  --surface-3:   #f7f4f8;
  --surface-subtle: #f7f3f6;
  --surface-selected:#efe7ea;
  --ink:         #1c1324;
  --text-color:  #352f3b;
  --text:        var(--text-color);
  --muted-color: #7a6e85;
  --text-muted:  var(--muted-color);

  /* Lines */
  --line-strong: #e4dfee;
  --line-medium: #d8d1e2;
  --line-soft:   #f3edf9;

  /* States */
  --info-color:    #6366f1;
  --success-color: #16a34a;
  --warning-color: #f59e0b;
  --danger-color:  #dc2626;
  --success:       var(--success-color);
  --danger:        var(--danger-color);

  /* Effects */
  --shadow-1: 0 1px 2px rgba(30,12,48,.05);
  --shadow-2: 0 6px 18px rgba(30,12,48,.08);
  --shadow-3: 0 12px 34px rgba(30,12,48,.12);
  --radius-0: 0px;
  --radius-1: 3px;
  --radius-2: 4px;
  --radius-3: 6px;
  --transition: all .16s ease;
  --ring: 0 0 0 .16rem rgba(139,46,58,.18);

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif;
  --font-head: 'Poppins', var(--font-sans);
  --fs-12: .84rem;     /* ~13.4px */
  --fs-13: .88rem;     /* ~14.2px */
  --fs-14: .90rem;     /* ~15.4px */
  --fs-15: .96rem;    /* ~16.3px */
  --fs-16: 1rem;    /* ~17.3px */

  /* Table density */
  --row-pad-y: 7px;
  --row-pad-x: 10px;

  /* Pagination tones */
  --page-bg: #fff;
  --page-hover: #f5f0fa;
  --page-disabled: #f8f3fc;

  /* Badge pastel tints */
  --t-success: rgba(22,163,74,.12);
  --t-danger:  rgba(220,38,38,.12);
  --t-info:    rgba(99,102,241,.12);
  --t-warn:    rgba(245,158,11,.14);
  --t-primary: rgba(139,46,58,.12);

  --primary-light: rgba(139,46,58,.14);
  --danger-light: rgba(220,38,38,.14);
}

/* =========================================================
   Base & Utilities
   ========================================================= */
html, body{
  background: var(--bg-body);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection{ background: rgba(139,46,58,.14); }

a{
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}
a:hover{ color: var(--accent-color); }

h1,h2,h3,h4,h5{
  color: var(--ink);
  font-family: var(--font-head);
  letter-spacing: .15px;
  margin-bottom: .4rem;
}
h1{ font-size: 1.3rem; }
h2{ font-size: 1.08rem; }
h3{ font-size: .95rem; }

.container, .container-fluid{
  padding-left: 10px;
  padding-right: 10px;
}

.text-muted{ color: var(--muted-color)!important; }
.divider{ height:1px; background: var(--line-soft); width:100%; }
.rounded-1{ border-radius: var(--radius-2)!important; }
.shadow-1{ box-shadow: var(--shadow-1)!important; }

:focus-visible{
  outline: none;
  box-shadow: var(--ring);
}

/* Spacing helpers */
.gap-2{ gap:.4rem; }
.gap-3{ gap:.65rem; }

/* Density toggles for tables */
.is-compact{ --row-pad-y: 6px; --row-pad-x: 8px; }
.is-comfy{ --row-pad-y: 8px; --row-pad-x: 11px; }

/* =========================================================
   Surfaces / Panels / Cards
   ========================================================= */
.card,
.modal-content,
.dropdown-menu,
.offcanvas,
.toast,
.panel,
.list-group,
.accordion-item,
.popover{
  background: var(--surface);
  color: var(--text-color);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
}

.card{ overflow: visible; }

.card-header,
.modal-header,
.popover-header{
  background: #f7f9fc;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-color);
  font-weight: 600;
  padding: 10px 12px;
}

.card-footer,
.modal-footer{
  background: #f9fbfd;
  border-top: 1px solid var(--line-strong);
  padding: 10px 12px;
}

.panel{ padding: 10px; }

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

.panel-title{
  font-family: var(--font-head);
  font-weight:600;
  color: var(--ink);
  margin:0;
  font-size: var(--fs-14);
}

.panel-sub{
  color: var(--muted-color);
  font-size: var(--fs-12);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  --bs-btn-font-weight: 600;
  font-family: var(--font-head);
  font-size: var(--fs-12);
  line-height: 1.15;
  padding: 4px 6px;
  border-radius: 2px;
  transition: var(--transition);
  box-shadow: none;
}

.btn:focus{ box-shadow: var(--ring); }

.btn-primary{
  background: var(--primary-color);
  border-color: var(--primary-color);
  color:#fff;
  box-shadow: 0 10px 22px rgba(53,92,125,.14);
}
.btn-primary:hover{
  background: color-mix(in srgb, var(--primary-color) 92%, #000 8%);
  border-color: color-mix(in srgb, var(--primary-color) 92%, #000 8%);
  color:#fff;
  box-shadow: 0 14px 26px rgba(53,92,125,.18);
}

.btn-primary:focus,
.btn-primary:active{
  color:#fff !important;
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.btn-secondary{
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color:#fff;
}
.btn-secondary:hover{ filter: brightness(.96); }

.btn-success{
  background:#15803d;
  border-color:#15803d;
  color:#fff;
}
.btn-success:hover{
  background:#166534;
  border-color:#166534;
  color:#fff;
}

.btn-danger{
  background:#dc2626;
  border-color:#dc2626;
  color:#fff;
}
.btn-danger:hover{
  background:#b91c1c;
  border-color:#b91c1c;
  color:#fff;
}

.btn-warning{
  background:#d97706;
  border-color:#d97706;
  color:#fff;
}
.btn-warning:hover{
  background:#b45309;
  border-color:#b45309;
  color:#fff;
}

.btn-info{
  background:#0f766e;
  border-color:#0f766e;
  color:#fff;
}
.btn-info:hover{
  background:#115e59;
  border-color:#115e59;
  color:#fff;
}

.btn-dark{
  background:#1e293b;
  border-color:#1e293b;
  color:#fff;
}
.btn-dark:hover{
  background:#0f172a;
  border-color:#0f172a;
  color:#fff;
}

.btn-light{
  background:#f5f7fb;
  border-color: var(--line-strong);
  color: var(--secondary-color);
}

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

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

.btn-outline-success{
  color:#15803d;
  border-color:#15803d;
}
.btn-outline-success:hover{
  background:#15803d;
  color:#fff;
  border-color:#15803d;
}

.btn-outline-danger{
  color:#b91c1c;
  border-color:#ef4444;
}
.btn-outline-danger:hover{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}

.btn-outline-warning{
  color:#b45309;
  border-color:#f59e0b;
}
.btn-outline-warning:hover{
  background:#f59e0b;
  color:#fff;
  border-color:#f59e0b;
}

.btn-outline-dark{
  color:#1e293b;
  border-color:#1e293b;
}
.btn-outline-dark:hover{
  background:#1e293b;
  color:#fff;
  border-color:#1e293b;
}

.btn-sm{
  padding: 3px 6px;
  font-size: var(--fs-12);
  border-radius: 2px;
  background: var(--surface);
}

.btn-md{
  padding: 5px 8px;
  font-size: var(--fs-12);
  border-radius: 2px;
}

.btn-lg{
  padding: 6px 10px;
  font-size: var(--fs-13);
  border-radius: 3px;
}

.btn-icon{
  width:32px;
  height:32px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.btn-icon.btn-sm{
  width:28px;
  height:28px;
}

.btn-icon.btn-lg{
  width:38px;
  height:38px;
}

.btn i,
.btn .fa{
  margin-right: 5px;
  font-size: .9em;
}

.btn-icon i,
.btn-icon .fa{
  margin-right:0;
}

/* Icon-only */
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border:1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--secondary-color);
  transition: var(--transition);
}
.icon-btn:hover{
  background:#f6f8fc;
  transform:translateY(-1px);
}

/* =========================================================
   Forms (checkbox/radio/switch — fixed)
   ========================================================= */
.form-control,
.form-select,
.input-group-text,
.form-control-plaintext{
  background:#fff;
  color: var(--text-color);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: none;
  transition: var(--transition);
  font-size: var(--fs-13);
  padding: 6px 8px;
  min-height: 32px;
}

.form-control:focus,
.form-select:focus{
  border-color: var(--accent-color);
  box-shadow: var(--ring);
}

.form-control::placeholder{ color: #9aa3b2; }

/* Base controls */
.form-check-input{
  width:1rem;
  height:1rem;
  border:1px solid var(--line-strong);
  background-color:#fff;
  accent-color: var(--accent-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  border-radius: 2px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
  background-clip: padding-box;
}

.form-check-input:focus{
  box-shadow: var(--ring);
  border-color: var(--accent-color);
}
.form-check-input:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* Checkbox */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]{
  background-image: none !important;
}
.form-check:not(.form-switch) .form-check-input[type="checkbox"]::after{
  content:"";
  position:absolute;
  inset:0;
  background-color:#fff;
  opacity:0;
  transition: opacity .12s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 6.5L5.5 10.5L14.5 1.5' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px 11px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 6.5L5.5 10.5L14.5 1.5' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px 11px no-repeat;
}
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked{
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked::after{ opacity:1; }

/* Radio */
.form-check-input[type="radio"]{
  border-radius: 50%;
  background-image: none;
}
.form-check-input[type="radio"]::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:.46rem;
  height:.46rem;
  border-radius:50%;
  transform: translate(-50%, -50%);
  background: var(--accent-color);
  opacity:0;
  transition: opacity .15s ease;
}
.form-check-input[type="radio"]:checked{
  border-color: var(--accent-color);
  background-color: #fff;
}
.form-check-input[type="radio"]:checked::after{ opacity:1; }

/* Switch */
.form-switch .form-check-input{
  width: 2rem;
  height: 1.1rem;
  border-radius: 1rem;
  background-color: #e8edf4;
  border-color: var(--line-strong);
  background-image: none !important;
  position: relative;
}
.form-switch .form-check-input::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: .84rem;
  height: .84rem;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: left .2s ease;
}
.form-switch .form-check-input:checked{
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}
.form-switch .form-check-input:checked::before{
  left: calc(100% - .84rem - 2px);
}

/* =========================================================
   Tables — Dense dashboard style
   ========================================================= */
.table,
.table-striped,
.table-hover,
.table-bordered{
  width: 100%;
  background: var(--surface);
  color: var(--text-color);
  border: none;
  border-radius: var(--radius-0);
  box-shadow: none;
  font-size: var(--fs-12);
  border-collapse: separate;
  border-spacing: 0;
}

.table caption{
  caption-side: top;
  color: var(--muted-color);
  padding: 6px 0;
  font-size: var(--fs-12);
}

.table > :not(caption) > * > *{
  background: transparent;
  border: none;
  padding: var(--row-pad-y) var(--row-pad-x);
  box-shadow: inset 0 -1px 0 var(--line-strong);
  vertical-align: middle;
}

.table thead th{
  background: #f5f7fb;
  color: var(--ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .035em;
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line-strong);
  font-size: 11px;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.table tbody th{
  color: var(--text-color);
  font-weight: 600;
}

.table tbody td a{ color: var(--secondary-color); }
.table tbody td a:hover{ color: var(--accent-color); }

/* Hover/active rows */
.table-hover tbody tr:hover > *{
  background: rgba(139,46,58,.035);
  box-shadow: inset 0 -1px 0 var(--line-strong), inset 0 1px 0 var(--line-strong);
}

.table tbody tr.is-selected > *{
  background: rgba(139,46,58,.07);
  box-shadow: inset 0 -1px 0 var(--line-strong), inset 0 1px 0 var(--line-strong);
}

/* Logo Avatar */
.table img.logo-avatar{
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  display: block;
}

.table.table-sm > :not(caption) > * > *{
  padding: 6px 8px;
}

/* =========================================================
   Pagination
   ========================================================= */
.pagination{
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.page-link{
  padding: 4px 9px;
  font-size: var(--fs-12);
  line-height: 1.15;
  border: 1px solid var(--line-strong);
  background: var(--page-bg);
  color: var(--text-color);
  border-radius: 2px;
  transition: var(--transition);
}

.page-link:hover{
  background: var(--page-hover);
  color: var(--secondary-color);
  transform: translateY(-1px);
}

.page-link:focus{
  box-shadow: var(--ring);
  border-color: var(--accent-color);
}

.page-item.active .page-link{
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.page-item.disabled .page-link{
  color: #9aa3b2;
  background: var(--page-disabled);
}

/* =========================================================
   Nav / Tabs / Pills
   ========================================================= */
.nav-tabs{
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
}

.nav-tabs .nav-link{
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-color);
  background: transparent !important;
  padding: 8px 6px;
  transition: var(--transition);
  border-radius: 0;
  font-size: var(--fs-12);
}

.nav-tabs .nav-link:hover{
  color: var(--secondary-color);
  background: #f7f9fc !important;
}

.nav-tabs .nav-link.active{
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  background: transparent !important;
  font-weight: 600;
}

.nav-pills .nav-link{
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--text-color);
  border-radius: 3px;
  margin-right: 5px;
  padding: 5px 8px;
  font-size: var(--fs-12);
}

.nav-pills .nav-link.active{
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* =========================================================
   Dropdowns / Popovers / Tooltips
   ========================================================= */
.dropdown-menu{
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
  border-radius: 4px;
  padding: 4px;
  background: var(--surface);
}

.dropdown-item{
  border-radius: 2px;
  color: var(--text-color);
  font-size: var(--fs-12);
  padding: 6px 8px;
}
.dropdown-item:hover{
  background: #f3f6fb;
  color: var(--secondary-color);
}

.popover{
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
}
.popover-header{
  font-weight: 600;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line-strong);
}
.popover-body{
  color: var(--text-color);
  font-size: var(--fs-12);
}

.tooltip .tooltip-inner{
  background: #111827;
  color: #fff;
  border-radius: 3px;
  padding: 5px 7px;
  font-size: 11px;
}
.tooltip .tooltip-arrow::before{
  border-top-color: #111827 !important;
}

/* =========================================================
   List group / Accordion / Breadcrumb / Progress
   ========================================================= */
.list-group{
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}

.list-group-item{
  background: transparent;
  color: var(--text-color);
  border-color: var(--line-strong);
  font-size: var(--fs-12);
  padding: 8px 10px;
}
.list-group-item:hover{ background: #f7f9fc; }
.list-group-item.active{
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* Accordion */
.accordion-item{
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.accordion-button{
  background: var(--surface);
  color: var(--text-color);
  transition: background .15s ease, color .15s ease;
  font-size: var(--fs-13);
  padding: 10px 12px;
}
.accordion-button:hover{ background: #f7f9fc; }
.accordion-button:not(.collapsed){
  background: rgba(139,46,58,.06);
  color: var(--accent-color);
  box-shadow: inset 0 -1px 0 var(--line-strong);
}
.accordion-button::after{
  flex-shrink: 0;
  width: .9rem;
  height: .9rem;
  margin-left: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.75 7.5L10 11.75L14.25 7.5' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.75 7.5L10 11.75L14.25 7.5' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  background-image: none !important;
}
.accordion-button:not(.collapsed)::after{ transform: rotate(180deg); }

/* Breadcrumb */
.breadcrumb{
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: var(--shadow-1);
  margin-bottom: 10px;
}
.breadcrumb .breadcrumb-item{
  color: var(--text-color);
  font-size: var(--fs-12);
}
.breadcrumb .breadcrumb-item > a{ color: var(--secondary-color); }
.breadcrumb .breadcrumb-item > a:hover{ color: var(--accent-color); }
.breadcrumb .breadcrumb-item.active{ color: var(--text-color); }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before{ color: #94a3b8; }

.progress{
  background: #eef2f7;
  border-radius: 2px;
  height: 6px;
}
.progress-bar{ background: var(--accent-color); }

/* =========================================================
   Badges
   ========================================================= */
.badge{
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 999px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(2,6,23,.04);
}
.badge i,
.badge .fa{
  font-size: 10px;
}

.badge-success { background-color: var(--success-color) !important; color:#fff !important; }
.badge-danger  { background-color: var(--danger-color)  !important; color:#fff !important; }
.badge-info    { background-color: var(--info-color)    !important; color:#fff !important; }
.badge-warning { background-color: var(--warning-color) !important; color:#0b1324 !important; }
.badge-primary { background-color: var(--accent-color)  !important; color:#0b1324 !important; }

.badge-soft-success{ background: var(--t-success); color: #15803d; border-color: rgba(22,163,74,.22); }
.badge-soft-danger { background: var(--t-danger);  color: #b91c1c; border-color: rgba(220,38,38,.22); }
.badge-soft-info   { background: var(--t-info);    color: #1d4ed8; border-color: rgba(59,130,246,.22); }
.badge-soft-warning{ background: var(--t-warn);    color: #92400e; border-color: rgba(245,158,11,.26); }
.badge-soft-primary{ background: var(--t-primary); color: var(--primary-color); border-color: rgba(139,46,58,.2); }

.badge-outline-success{ background: transparent; color:#16a34a; border-color:#16a34a; }
.badge-outline-danger { background: transparent; color:#dc2626; border-color:#dc2626; }
.badge-outline-info   { background: transparent; color:#3b82f6; border-color:#3b82f6; }
.badge-outline-warning{ background: transparent; color:#f59e0b; border-color:#f59e0b; }
.badge-outline-primary{ background: transparent; color:var(--primary-color); border-color:var(--primary-color); }

.badge.bg-warning,
.badge.text-bg-warning{
  color:#0b1324!important;
}

/* =========================================================
   Navbar
   ========================================================= */
.navbar{
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface) !important;
  min-height: 48px;
}
.navbar .navbar-brand,
.navbar .nav-link{
  color: var(--text-color) !important;
  font-size: var(--fs-13);
}
.navbar .nav-link:hover{ color: var(--accent-color) !important; }

/* =========================================================
   Empty state
   ========================================================= */
.empty{
  border:1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 18px;
  text-align:center;
  color: var(--muted-color);
  background: var(--surface);
  font-size: var(--fs-12);
}

/* =========================================================
   Dark Theme
   ========================================================= */
.theme-dark{
  --bg-body:#0b1220;
  --surface:#0f172a;
  --surface-2:#111b31;
  --surface-3:#14203a;
  --surface-subtle:#10192c;
  --surface-selected:#172238;
  --ink:#e8edf7;
  --text-color:#d9e0ea;
  --muted-color:#a5b0c2;

  --line-strong:#223148;
  --line-medium:#2b3d59;
  --line-soft:#1b2941;

  --page-bg:#0e1930;
  --page-hover:#13213a;
  --page-disabled:#0f172a;

  --primary-light: rgba(139,46,58,.18);
  --danger-light: rgba(220,38,38,.18);
}

/* Surfaces */
.theme-dark .card,
.theme-dark .panel,
.theme-dark .breadcrumb,
.theme-dark .dropdown-menu,
.theme-dark .modal-content,
.theme-dark .offcanvas,
.theme-dark .toast,
.theme-dark .list-group,
.theme-dark .accordion-item,
.theme-dark .popover{
  background: var(--surface) !important;
  color: var(--text-color) !important;
  border-color: var(--line-strong) !important;
  box-shadow: var(--shadow-1);
}
.theme-dark .card-header,
.theme-dark .modal-header,
.theme-dark .popover-header{
  background: #0b1a2e;
  border-bottom-color: var(--line-strong);
}
.theme-dark .card-footer,
.theme-dark .modal-footer{
  background: #0e1930;
  border-top-color: var(--line-strong);
}

/* Forms — dark */
.theme-dark .form-control,
.theme-dark .form-select,
.theme-dark .input-group-text{
  background:#0e1930;
  color: var(--text-color);
  border: 1px solid var(--line-strong);
}
.theme-dark .form-control::placeholder{ color: #8b93a7; }
.theme-dark .form-control:focus,
.theme-dark .form-select:focus{
  border-color: var(--accent-color);
  box-shadow: var(--ring);
}

/* Check/radio/switch */
.theme-dark .form-check-input{
  background:#0f172a;
  border-color: var(--line-strong);
}
.theme-dark .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked{
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}
.theme-dark .form-check-input[type="radio"]::after{ background: var(--accent-color); }
.theme-dark .form-switch .form-check-input{ background:#13213a; }
.theme-dark .form-switch .form-check-input:checked{
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Tables (dark) */
.theme-dark .table,
.theme-dark .table-striped,
.theme-dark .table-hover,
.theme-dark .table-bordered{
  background: var(--surface);
  color: var(--text-color);
  border: none;
}
.theme-dark .table > :not(caption) > * > *{
  background: transparent !important;
  border: none !important;
  padding: var(--row-pad-y) var(--row-pad-x);
  box-shadow: inset 0 -1px 0 var(--line-strong) !important;
}
.theme-dark .table thead th{
  background:#0b1a2e !important;
  color: var(--text-color) !important;
  box-shadow: inset 0 -1px 0 var(--line-strong) !important;
}
.theme-dark .table tbody td,
.theme-dark .table tbody th{
  color: var(--text-color) !important;
}
.theme-dark .table-hover tbody tr:hover > *{
  background: rgba(139,46,58,.12) !important;
  box-shadow: inset 0 -1px 0 var(--line-strong), inset 0 1px 0 var(--line-strong) !important;
}

/* Pagination (dark) */
.theme-dark .page-link{
  background: var(--page-bg);
  color: var(--text-color);
  border-color: var(--line-strong);
}
.theme-dark .page-link:hover{
  background: var(--page-hover);
  color: var(--accent-color);
}
.theme-dark .page-item.active .page-link{
  background: var(--accent-color);
  border-color: var(--accent-color);
  color:#fff;
}
.theme-dark .page-item.disabled .page-link{
  color: #8b93a7;
  background: var(--page-disabled);
}

/* Tabs & Pills (dark) */
.theme-dark .nav-tabs{
  border-bottom-color: var(--line-strong);
  background: transparent;
}
.theme-dark .nav-tabs .nav-link{
  color: var(--text-color);
  background: transparent !important;
  border-bottom-color: transparent;
}
.theme-dark .nav-tabs .nav-link:hover{
  background:#0e1930 !important;
  color: var(--accent-color);
}
.theme-dark .nav-tabs .nav-link.active{
  color: var(--accent-color);
  background: transparent !important;
  border-bottom-color: var(--accent-color) !important;
}
.theme-dark .nav-pills .nav-link{
  background:#0f172a;
  border-color: var(--line-strong);
  color: var(--text-color);
}
.theme-dark .nav-pills .nav-link.active{
  background: var(--accent-color);
  border-color: var(--accent-color);
  color:#fff;
}

/* Dropdowns / Popovers / Tooltips (dark) */
.theme-dark .dropdown-menu{ background:#0f172a; }
.theme-dark .dropdown-item{ color: var(--text-color); }
.theme-dark .dropdown-item:hover{
  background:#13203a;
  color: var(--accent-color);
}
.theme-dark .popover{ background:#0f172a; }
.theme-dark .popover-body{ color: var(--text-color); }
.theme-dark .tooltip .tooltip-inner{ background:#0b1220; }
.theme-dark .tooltip .tooltip-arrow::before{ border-top-color:#0b1220 !important; }

/* List group / Accordion (dark) */
.theme-dark .list-group{ border-color: var(--line-strong); }
.theme-dark .list-group-item{
  background: transparent;
  color: var(--text-color);
  border-color: var(--line-strong);
}
.theme-dark .list-group-item:hover{ background:#13203a; }
.theme-dark .list-group-item.active{
  background: var(--accent-color);
  border-color: var(--accent-color);
  color:#fff;
}
.theme-dark .accordion-item{ background: var(--surface); }
.theme-dark .accordion-button{
  background:#0f172a;
  color: var(--text-color);
}
.theme-dark .accordion-button:hover{ background:#13213a; }
.theme-dark .accordion-button:not(.collapsed){
  background: rgba(139,46,58,.14);
  color: var(--accent-color);
  box-shadow: inset 0 -1px 0 var(--line-strong);
}

/* Navbar (dark) */
.theme-dark .navbar{
  background: var(--surface) !important;
  border-bottom: 1px solid var(--line-strong);
}
.theme-dark .navbar .navbar-brand,
.theme-dark .navbar .nav-link{
  color: var(--text-color) !important;
}
.theme-dark .navbar .nav-link:hover{ color: var(--accent-color) !important; }

/* Breadcrumb (dark) */
.theme-dark .breadcrumb{
  background: var(--surface);
  border-color: var(--line-strong);
}
.theme-dark .breadcrumb .breadcrumb-item{ color: var(--text-color); }
.theme-dark .breadcrumb .breadcrumb-item > a{ color: var(--text-color); }
.theme-dark .breadcrumb .breadcrumb-item > a:hover{ color: var(--accent-color); }
.theme-dark .breadcrumb .breadcrumb-item.active{ color: var(--text-color); }
.theme-dark .breadcrumb .breadcrumb-item + .breadcrumb-item::before{ color: #8fa3c2; }

/* Alerts (dark) */
.theme-dark .alert{
  background: var(--surface);
  color: var(--text-color);
  border-color: var(--line-strong);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: var(--fs-12);
}
.theme-dark .alert-info{ color:#93c5fd; background:#0c203f; }
.theme-dark .alert-success{ color:#34d399; background:#0b2b22; }
.theme-dark .alert-warning{ color:#fbbf24; background:#2a1f07; }
.theme-dark .alert-danger{ color:#fca5a5; background:#2a0d0f; }

/* Empty state (dark) */
.theme-dark .empty{
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--muted-color);
}

/* =========================================================
   Responsive polish
   ========================================================= */
@media (max-width: 992px){
  .card:hover{ transform: none; }
}
@media (prefers-reduced-motion: reduce){
  * { transition: none !important; }
}

/* =========================================================
   Table dropdown helpers
   ========================================================= */
.table-wrap .dropdown{ position:relative; }
.dropdown [data-bs-toggle="dropdown"]{ border-radius: 2px; }
.dropdown-menu{
  border-radius: 4px;
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow-2);
  min-width:200px;
  z-index:1085;
}
.dropdown-item{
  display:flex;
  align-items:center;
  gap:.5rem;
}
.dropdown-item i{
  width:14px;
  text-align:center;
}
.dropdown-item.text-danger{ color:var(--danger-color) !important; }

/* Empty & loader */
#empty{
  color:var(--muted-color);
  font-size: var(--fs-12);
}
.placeholder{
  background:linear-gradient(90deg, #00000010, #00000005, #00000010);
  border-radius:4px;
}

/* Modals */
.modal-content{
  border-radius:6px;
  border:1px solid var(--line-strong);
  background:var(--surface);
}
.modal-header{ border-bottom:1px solid var(--line-strong); }
.modal-footer{ border-top:1px solid var(--line-strong); }
.form-control,
.form-select{
  border-radius:3px;
  border:1px solid var(--line-strong);
  background:#fff;
}
html.theme-dark .form-control,
html.theme-dark .form-select{
  background:#0f172a;
  color:#e5e7eb;
  border-color:var(--line-strong);
}
.modal-title i{ opacity:.9; }

/* =========================================================
   Featured Media modal
   ========================================================= */
.media-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.media-head .meta .title{
  font-weight:700;
  color:var(--ink);
  font-family:var(--font-head);
  line-height:1.2;
  font-size: var(--fs-14);
}
.media-head .meta .sub{
  color:var(--muted-color);
  font-size:12px;
}

/* Section labels inside modal */
.modal .section-label{
  font-weight:600;
  color:var(--ink);
  margin-top:4px;
  font-size: var(--fs-13);
}

/* Dropzone */
.dropzone{
  border:1px dashed var(--line-strong);
  border-radius:6px;
  padding:14px;
  text-align:center;
  background:var(--surface-2, #fff);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dropzone.drag{
  background:color-mix(in oklab, var(--accent-color) 10%, transparent);
  border-color:var(--accent-color);
  box-shadow:0 0 0 2px color-mix(in oklab, var(--accent-color) 18%, transparent);
}
.dropzone .hint{
  color:var(--muted-color);
  font-size:12px;
}

/* Media list */
.media-list{ margin-top:8px; }

.media-item{
  display:grid;
  grid-template-columns:24px 1fr auto;
  align-items:center;
  gap:8px;
  border:1px solid var(--line-strong);
  border-radius:4px;
  background:var(--surface-2, #fff);
  padding:8px 10px;
  margin-bottom:6px;
}
.media-item .handle{
  cursor:grab;
  opacity:.7;
}
.media-item.dragging{ opacity:.5; }
.media-item .url{
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:52vw;
}
.media-item .kind{
  font-size:11px;
  color:var(--muted-color);
}
.media-item .btn-icon{
  border:none;
  background:transparent;
  padding:.2rem .3rem;
  color:#6b7280;
}
.media-item .btn-icon:hover{ color:var(--ink); }
.media-item .icon{
  width:24px;
  height:24px;
  border-radius:3px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line-strong);
  background:#fff;
}

/* Dark tweaks */
html.theme-dark .panel,
html.theme-dark .table-wrap.card,
html.theme-dark .modal-content{
  background:#0f172a;
  border-color:var(--line-strong);
}
html.theme-dark .table thead th{
  background:#0f172a;
  border-color:var(--line-strong);
  color:#94a3b8;
}
html.theme-dark .table tbody tr{ border-color:var(--line-soft); }
html.theme-dark .dropdown-menu{
  background:#0f172a;
  border-color:var(--line-strong);
}
html.theme-dark .dropzone{
  background:#0b1020;
  border-color:var(--line-strong);
}
html.theme-dark .media-item{
  background:#0b1020;
  border-color:var(--line-strong);
}

/* Dropdown visibility safety nets */
.table-wrap .dropdown { position: relative; }
.table-wrap .dropdown-menu { z-index: 2050; }

/* File button look */
.btn-light{
  background:var(--surface);
  border:1px solid var(--line-strong);
}

/* =========================================================
   Study material / panel layouts
   ========================================================= */
.sm-wrap{
  max-width:1100px;
  margin:12px auto 28px;
}
.sm.card{
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--surface);
  box-shadow:var(--shadow-2);
  overflow:hidden;
}
.sm .card-header{
  background:var(--surface);
  border-bottom:1px solid var(--line-strong);
  padding:12px 14px;
}
.sm-head{
  display:flex;
  align-items:center;
  gap:8px;
}
.sm-head i{ color:var(--accent-color); }
.sm-head strong{
  color:var(--ink);
  font-family:var(--font-head);
  font-weight:700;
  font-size: var(--fs-14);
}
.sm-head .hint{
  color:var(--muted-color);
  font-size:var(--fs-12);
}
.section-title{
  font-weight:600;
  color:var(--ink);
  font-family:var(--font-head);
  margin:10px 2px 10px;
  font-size: var(--fs-13);
}
.divider-soft{
  height:1px;
  background:var(--line-soft);
  margin:8px 0 12px;
}

.dim{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.06);
  z-index:2;
}
.dim.show{ display:flex; }

.spin{
  width:16px;
  height:16px;
  border:2px solid #0001;
  border-top-color:var(--accent-color);
  border-radius:50%;
  animation:rot 1s linear infinite;
}
@keyframes rot{
  to{ transform:rotate(360deg); }
}

.err{
  font-size:11px;
  color:var(--danger-color);
  display:none;
  margin-top:4px;
}
.err:not(:empty){ display:block; }

.dropzone{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  border:1px dashed var(--line-strong);
  border-radius:6px;
  background:var(--surface-2,#fff);
  padding:16px;
  transition:border-color .18s ease, background .18s ease;
}
.dropzone:hover{
  border-color:var(--primary-color);
  background:color-mix(in oklab, var(--primary-color) 5%, transparent);
}
.dropzone.drag{
  border-color:var(--primary-color);
  box-shadow:0 0 0 2px color-mix(in oklab, var(--primary-color) 12%, transparent);
}
.drop-icon{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px dashed var(--line-strong);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:8px;
  opacity:.9;
}
.file-list{ margin-top:8px; }
.file-row{
  display:grid;
  grid-template-columns:1fr auto auto auto;
  align-items:center;
  gap:10px;
  border:1px solid var(--line-strong);
  border-radius:4px;
  background:var(--surface-2,#fff);
  padding:8px 10px;
  margin-bottom:8px;
  transition:all 0.2s ease;
}
.file-row:hover{
  background:var(--surface-3);
  border-color:var(--line-medium);
}
.file-row .name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-weight:500;
  color:var(--ink);
  font-size: var(--fs-12);
}
.file-row .size{
  color:var(--muted-color);
  font-size:11px;
  min-width:60px;
  text-align:right;
}

/* Improved button styles */
.btn-action{
  border:none;
  background:transparent;
  padding:4px 8px;
  border-radius:2px;
  transition:all 0.2s ease;
  cursor:pointer;
  font-size:12px;
  display:flex;
  align-items:center;
  gap:4px;
  border:1px solid transparent;
}
.btn-preview{
  color:var(--primary-color);
  border-color:var(--primary-light);
}
.btn-preview:hover{
  background:var(--primary-color);
  color:white;
}
.btn-delete{
  color:var(--danger-color);
  border-color:var(--danger-light);
}
.btn-delete:hover{
  background:var(--danger-color);
  color:white;
}

.btn-group{
  display:flex;
  gap:6px;
  align-items:center;
}

/* =========================================================
   Button inline loading spinner (global)
   ========================================================= */
.btn-loading{
  position: relative;
  pointer-events: none;
}

.btn-loading > *{
  visibility: hidden;
}

.btn-loading::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  animation: btn-spin .7s linear infinite;
}

@keyframes btn-spin{
  to { transform: rotate(360deg); }
}

/* Preview modal styles */
.preview-container{
  max-height: 70vh;
  overflow: auto;
}
.preview-image{
  max-width: 100%;
  max-height: 60vh;
  border-radius: 4px;
}
.preview-pdf{
  width: 100%;
  height: 500px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.preview-text{
  text-align: left;
  background: var(--surface-2);
  padding: .875rem;
  border-radius: 4px;
  max-height: 60vh;
  overflow: auto;
  font-family: monospace;
  font-size: 12px;
}

html.theme-dark .dropzone{
  background:#0f172a;
  border-color:var(--line-strong);
}
html.theme-dark .file-row{
  background:#0b1020;
  border-color:var(--line-strong);
}
html.theme-dark .file-row:hover{ background:#131d35; }
html.theme-dark .preview-text{ background: #1a2335; }

.table-wrap.card{
  position: relative;
  overflow: visible;
}
.table-wrap .dropdown{
  position: relative;
}
.table-wrap .dropdown-menu{
  z-index: 2050;
}

/* Window upload helper */
.window-upload{
  border:1px dashed var(--line-soft,#e0d5f2);
  border-radius:4px;
  padding:8px 10px;
  background:var(--surface-subtle,#f8f5ff);
  font-size:var(--fs-12,0.75rem);
}
.window-upload small{
  font-size:var(--fs-12,0.6875rem);
}

/* =========================================================
   Sidebar Navigation Styles
   ========================================================= */
.sidebar-stepper{
  border-right: 1px solid var(--line-soft, #e0d5f2);
  padding-right: 0;
}

.sidebar-step{
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-right: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: var(--fs-12);
}

.sidebar-step:hover{
  background-color: var(--surface-subtle, #f8f5ff);
}

.sidebar-step.active{
  background-color: var(--surface-selected, #f0ebff);
  border-right-color: var(--primary, #6d28d9);
  color: var(--primary, #6d28d9);
}

.sidebar-step.completed{
  color: var(--success, #10b981);
}

.sidebar-step.pending{
  color: var(--text, #374151);
}

.sidebar-step.locked{
  color: var(--text-muted, #6b7280);
  cursor: not-allowed;
  opacity: 0.6;
}

.step-indicator{
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-indicator.active{
  background-color: var(--primary, #6d28d9);
  color: white;
}

.step-indicator.completed{
  background-color: var(--success, #10b981);
  color: white;
}

.step-indicator.pending{
  background-color: var(--surface-subtle, #f8f5ff);
  color: var(--text, #374151);
  border: 1px solid var(--line-soft, #e0d5f2);
}

.step-indicator.locked{
  background-color: var(--surface-subtle, #f8f5ff);
  color: var(--text-muted, #6b7280);
  border: 1px solid var(--line-soft, #e0d5f2);
}

.step-content{
  min-height: 500px;
}

.step-arrow{
  margin-left: auto;
  color: var(--primary, #6d28d9);
  font-size: 12px;
}

.step-check{
  margin-left: auto;
  color: var(--success, #10b981);
  font-size: 12px;
}

.sidebar-step.active .step-text{
  font-weight: 600;
}

/* Header button styles */
.header-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Lock icon for disabled steps */
.sidebar-step.locked .step-indicator::before{
  content: "\f023" !important;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Timer icon for pending steps */
.sidebar-step.pending .step-indicator::before{
  content: "\f017" !important;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Tooltip for disabled steps */
.sidebar-step.locked{
  position: relative;
}
.sidebar-step.locked:hover::after{
  content: "Please Fill The Previous Details";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 1000;
}

/* Qualification forms styling */
.qualification-form{
  display: none;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #f8f9fa;
}
.qualification-form.active{
  display: block;
}
.qualification-buttons{
  margin-bottom: 16px;
}

/* Guardian Details form alignment improvements */
.js-parent-card .row.g-3{
  align-items: start;
}
.js-parent-card .form-label{
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: var(--fs-12);
}
.js-parent-card .form-control,
.js-parent-card .form-select{
  margin-bottom: 0.35rem;
}

.qualification-form{ display: none; }
.qualification-form.active{ display: block; }

/* Fees status colors */
.fees-status-added{
  color:#16a34a !important;
}
.fees-status-missing{
  color:#dc2626 !important;
}

/* =========================================================
   Toolbar / Rich editor
   ========================================================= */
.toolbar{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tool{
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 4px 7px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
  line-height: 1;
}

.tool:hover{
  background: var(--page-hover);
  transform: translateY(-1px);
}

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

.tool i{
  font-size: 12px;
  pointer-events: none;
}

.toolbar .tiny{
  font-size: 11px;
  color: var(--muted-color);
  margin-left: auto;
  pointer-events: none;
}

.rte-wrap{ position: relative; }

.rte{
  min-height: 160px;
  max-height: 520px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.rte:focus{
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

.rte-ph{
  position: absolute;
  top: 10px;
  left: 12px;
  color: #9aa3b2;
  font-size: 13px;
  pointer-events: none;
}

.rte.has-content + .rte-ph{ display: none; }

.err[data-for="content_html"]{
  font-size: 11px;
  color: var(--danger-color);
  margin-top: 5px;
  display: none;
}
.err[data-for="content_html"]:not(:empty){ display: block; }

/* Basic Typography Inside RTE */
.rte p{ margin: 0 0 .65em; }

.rte h1,
.rte h2,
.rte h3{
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--ink);
  margin: .75em 0 .35em;
}
.rte h2{ font-size: 1.05rem; }
.rte h3{ font-size: .95rem; }

.rte ul,
.rte ol{
  margin: 0 0 .7em 1.1em;
  padding-left: 1.1em;
}
.rte ul{ list-style: disc; }
.rte ol{ list-style: decimal; }

.rte li{ margin-bottom: .2em; }

.rte a{
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rte a:hover{ color: var(--accent-color); }

.rte strong,
.rte b{ font-weight: 600; }

.rte em{ font-style: italic; }

.rte blockquote{
  margin: .7em 0;
  padding: 7px 10px;
  border-left: 3px solid var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 8%, transparent);
  border-radius: 3px;
  font-style: italic;
}

.rte code{
  font-family: monospace;
  font-size: .9em;
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 3px;
}

.rte pre{
  font-family: monospace;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
}

.rte table{
  border-collapse: collapse;
  width: 100%;
  margin: .7em 0;
  font-size: .88em;
}

.rte th,
.rte td{
  border: 1px solid var(--line-soft);
  padding: 5px 7px;
}

.rte th{
  background: color-mix(in srgb, var(--primary-color) 8%, transparent);
  font-weight: 600;
}

.rte img{
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 8px 0;
}
