/* =========================================================================
   Oasis v2 — Design System
   Palette extracted from the institute logo:
     red #b21f24 · navy #1f2f6b · cyan #0b82b0 · green #5fa83f · orange #f0a012
   Arabic-first, RTL, professional / educational / warm.
   ========================================================================= */

:root {
  /* Brand */
  --c-primary:        #b21f24;  /* logo red — main brand */
  --c-primary-700:    #951a1f;
  --c-primary-600:    #c3262b;
  --c-primary-soft:   #fbecec;
  --c-navy:           #1f2f6b;  /* logo navy — trust, headings */
  --c-navy-700:       #17234f;
  --c-cyan:           #0b82b0;  /* logo cyan — links, info */
  --c-cyan-soft:      #e6f4f9;
  --c-green:          #5fa83f;  /* logo green — success / free */
  --c-green-soft:     #ecf6e6;
  --c-orange:         #f0a012;  /* logo orange — accent / highlight */
  --c-orange-soft:    #fdf1da;

  /* Neutrals */
  --c-ink:            #222b36;  /* main text */
  --c-ink-soft:       #4f5a66;
  --c-muted:          #5e6975;  /* muted text — AA (≈4.6:1 on white) */
  --c-line:           #e7eaf0;  /* borders */
  --c-bg:             #ffffff;
  --c-bg-soft:        #f7f8fb;  /* cool soft sections */
  --c-bg-warm:        #faf7f2;  /* warm "oasis sand" sections */
  --c-navy-tint:      #f2f4fa;

  /* Status (payments etc.) */
  --c-success:        #2e8b4f;
  --c-warning:        #d98410;
  --c-danger:         #c0392b;
  --c-paid:           #2e8b4f;
  --c-pending:        #d98410;

  /* Typography scale */
  --fs-xs:   .8rem;
  --fs-sm:   .9rem;
  --fs-base: 1rem;
  --fs-lg:   1.15rem;
  --fs-xl:   1.4rem;
  --fs-2xl:  1.85rem;
  --fs-3xl:  2.4rem;
  --fs-hero: clamp(2rem, 4.5vw, 3.1rem);

  /* Spacing */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem;

  /* Shape */
  --radius-sm: .45rem;
  --radius:    .8rem;
  --radius-lg: 1.25rem;
  --radius-pill: 50rem;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(31, 47, 107, .06);
  --shadow:    0 6px 20px rgba(31, 47, 107, .08);
  --shadow-md: 0 12px 32px rgba(31, 47, 107, .12);
  --shadow-primary: 0 10px 26px rgba(178, 31, 36, .28);

  --bs-primary: var(--c-primary);
  --bs-link-color: var(--c-cyan);
}

/* ------------------------------------------------------------ base / type */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

html { scroll-behavior: smooth; }
body {
  /* Client requirement (2026-07-04): Tajawal ONLY, Medium (500) as the
     base weight — sans-serif kept strictly as a missing-glyph fallback. */
  font-family: "Tajawal", sans-serif;
  font-weight: 500;
  color: var(--c-ink);
  background: var(--c-bg);
  font-size: var(--fs-base);
  line-height: 1.75;
  /* Safety net against sub-pixel horizontal scroll from Bootstrap's negative
     row gutters in RTL. `clip` (not `hidden`) keeps position:sticky working. */
  overflow-x: clip;
}
h1,h2,h3,h4,h5,h6 { font-family: "Tajawal", sans-serif; font-weight: 800; color: var(--c-navy); line-height: 1.35; }
a { color: var(--c-cyan); text-decoration: none; }
a:hover { color: var(--c-navy); }
.text-muted { color: var(--c-muted) !important; }
strong, b { font-weight: 700; }

::selection { background: var(--c-primary); color: #fff; }

/* Section rhythm + titles */
.section { padding: var(--sp-8) 0; }
.section-soft { background: var(--c-bg-soft); }
.section-warm { background: var(--c-bg-warm); }
.section-navy { background: var(--c-navy); color: #fff; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto var(--sp-6); }
.section-eyebrow {
  display: inline-block; font-weight: 700; font-size: var(--fs-sm);
  color: var(--c-primary); background: var(--c-primary-soft);
  padding: .25rem .9rem; border-radius: var(--radius-pill); margin-bottom: var(--sp-3);
}
.section-title { font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.section-sub { color: var(--c-muted); font-size: var(--fs-lg); }
.section-navy .section-title, .section-navy h2, .section-navy h3 { color: #fff; }

/* divider accent under inline titles */
.title-accent { position: relative; padding-bottom: .6rem; }
.title-accent::after {
  content: ""; position: absolute; bottom: 0; inset-inline-start: 0;
  width: 56px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-orange));
}

/* ------------------------------------------------------------------ buttons */
.btn { font-weight: 700; border-radius: var(--radius-sm); padding: .6rem 1.4rem; transition: all .18s ease; }
.btn-lg { padding: .8rem 2rem; font-size: var(--fs-lg); }
.btn-brand { background: var(--c-primary); border: 1px solid var(--c-primary); color: #fff; }
.btn-brand:hover { background: var(--c-primary-700); border-color: var(--c-primary-700); color: #fff; box-shadow: var(--shadow-primary); transform: translateY(-1px); }
.btn-outline-brand { background: transparent; border: 1.5px solid var(--c-primary); color: var(--c-primary); }
.btn-outline-brand:hover { background: var(--c-primary); color: #fff; }
.btn-navy { background: var(--c-navy); border: 1px solid var(--c-navy); color: #fff; }
.btn-navy:hover { background: var(--c-navy-700); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--c-orange); border: 1px solid var(--c-orange); color: #3d2a00; }
.btn-accent:hover { background: #d98e0c; color: #3d2a00; }
.btn-light-ghost { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-light-ghost:hover { background: #fff; color: var(--c-navy); }

/* ------------------------------------------------------------------ badges */
.badge-soft { font-weight: 700; padding: .35em .7em; border-radius: var(--radius-pill); font-size: var(--fs-xs); }
.badge-cat   { background: var(--c-navy-tint); color: var(--c-navy); }
.badge-free  { background: var(--c-green-soft); color: var(--c-success); }
.badge-paid  { background: var(--c-cyan-soft); color: var(--c-cyan); }
.badge-hot   { background: var(--c-orange-soft); color: var(--c-warning); }
.badge-status-active   { background: var(--c-green-soft); color: var(--c-success); }
.badge-status-pending  { background: var(--c-orange-soft); color: var(--c-warning); }
.badge-status-finished { background: var(--c-navy-tint); color: var(--c-navy); }
.badge-status-cancelled,.badge-status-withdrawn { background: #f1f3f5; color: var(--c-muted); }

/* -------------------------------------------------------------------- cards */
.card { border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-soft { background: var(--c-bg-soft); }

/* Course card */
.course-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; height: 100%; }
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.course-card .thumb {
  position: relative; aspect-ratio: 16 / 10; background: var(--c-navy-tint);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  /* The card is a flex column; without this the thumb shrinks below its
     aspect-ratio height and the lost height becomes a white gap above the
     footer. flex:0 0 auto locks the thumb to its aspect-ratio height. */
  flex: 0 0 auto;
}
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-card .thumb .thumb-fallback {
  font-size: 2.6rem; font-weight: 800; color: #fff;
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-navy), var(--c-cyan));
}
.course-card .thumb .cat-chip {
  position: absolute; top: .7rem; inset-inline-start: .7rem;
  background: rgba(255,255,255,.92); color: var(--c-navy); font-weight: 700;
  font-size: var(--fs-xs); padding: .25rem .7rem; border-radius: var(--radius-pill);
  backdrop-filter: blur(2px);
}
.course-card .thumb .ribbon {
  position: absolute; top: .7rem; inset-inline-end: .7rem;
}
.course-card .card-body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; height: calc(100% - 0px); }
.course-card .course-title {
  font-size: 1.08rem; font-weight: 700; color: var(--c-navy); margin-bottom: .35rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.9em;
}
.course-card .course-meta { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: .9rem; }
.course-card .course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.price-now { color: var(--c-primary); font-weight: 800; font-size: 1.15rem; }
.price-old { color: var(--c-muted); text-decoration: line-through; font-size: .9rem; margin-inline-start: .35rem; }
.price-cur { font-size: .8em; font-weight: 700; }

/* feature / why-us tiles */
.feature-tile { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.6rem 1.4rem; height: 100%; transition: .18s; }
.feature-tile:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.feature-ic {
  width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem; color: #fff;
}
.ic-red    { background: linear-gradient(135deg, var(--c-primary), var(--c-primary-600)); }
.ic-navy   { background: linear-gradient(135deg, var(--c-navy), #2c3f86); }
.ic-cyan   { background: linear-gradient(135deg, var(--c-cyan), #16a0d0); }
.ic-green  { background: linear-gradient(135deg, var(--c-green), #6fbf4a); }
.ic-orange { background: linear-gradient(135deg, var(--c-orange), #f7b21f); }

/* category pill grid */
.cat-card {
  display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: .8rem 1rem; transition: .18s; height: 100%;
}
.cat-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.cat-card .cat-ic { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; object-fit: cover;
  background: linear-gradient(135deg, var(--c-navy), var(--c-cyan)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.cat-card .cat-name { font-weight: 700; color: var(--c-navy); font-size: .98rem; }

/* ------------------------------------------------------------------- navbar */
.topbar { background: var(--c-navy); color: #dfe5f4; font-size: var(--fs-sm); }
.topbar a { color: #dfe5f4; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .4; }
.site-navbar { background: #fff; box-shadow: 0 2px 14px rgba(31,47,107,.07); padding-top: .5rem; padding-bottom: .5rem; }
.site-navbar .navbar-brand img { height: 52px; width: auto; }
.site-navbar .nav-link { color: var(--c-navy); font-weight: 700; padding: .5rem .9rem !important; border-radius: var(--radius-sm); }
.site-navbar .nav-link:hover { color: var(--c-primary); }
.site-navbar .nav-link.active { color: var(--c-primary); }
.navbar-toggler { border-color: var(--c-line); }

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(11,130,176,.10), transparent 60%),
    radial-gradient(900px 420px at 0% 110%, rgba(240,160,18,.10), transparent 55%),
    linear-gradient(120deg, #fbfcff 0%, var(--c-bg-warm) 100%);
  border-bottom: 1px solid var(--c-line);
}
.hero-inner { padding: var(--sp-8) 0; }
.hero h1 { font-size: var(--fs-hero); margin-bottom: 1rem; }
.hero .hero-accent { color: var(--c-primary); }
.hero .lead { font-size: var(--fs-xl); color: var(--c-ink-soft); margin-bottom: 1.6rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-pill); padding: .35rem 1rem; font-weight: 700; color: var(--c-navy);
  box-shadow: var(--shadow-sm); margin-bottom: 1.2rem; font-size: var(--fs-sm);
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-green); }
.hero-art {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--c-navy), var(--c-cyan)); aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.hero-art img { max-width: 78%; max-height: 78%; filter: drop-shadow(0 8px 24px rgba(0,0,0,.25)); }

/* -------------------------------------------------------------------- stats */
.stat { text-align: center; padding: 1.1rem .5rem; }
.stat .num { font-size: var(--fs-3xl); font-weight: 800; line-height: 1; color: #fff; }
.stat .lbl { color: rgba(255,255,255,.82); font-weight: 500; margin-top: .35rem; }
.section-navy .stat .num { background: linear-gradient(90deg,#fff,#ffe0b3); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* --------------------------------------------------------------- testimonial */
.quote-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.5rem; height: 100%; position: relative; }
.quote-card::before { content: "\201D"; position: absolute; top: .1rem; inset-inline-end: 1rem; font-size: 3.2rem; color: var(--c-primary-soft); font-family: "Tajawal", sans-serif; line-height: 1; }
.quote-card .q-text { color: var(--c-ink-soft); margin-bottom: 1rem; position: relative; z-index: 1; }
.quote-card .q-name { font-weight: 800; color: var(--c-navy); }
.quote-card .q-role { font-size: var(--fs-sm); color: var(--c-muted); }
.q-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg,var(--c-primary),var(--c-orange)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; flex:0 0 auto; }

/* ------------------------------------------------------------------- footer */
.site-footer { background: var(--c-navy); color: #c9d2ec; padding-top: var(--sp-7); }
.site-footer h5 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer a { color: #c9d2ec; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-logo { height: 64px; margin-bottom: 1rem; }
.site-footer .foot-links li { margin-bottom: .5rem; list-style: none; }
.site-footer .foot-links { padding: 0; margin: 0; }
.site-footer .contact-row { display: flex; gap: .6rem; margin-bottom: .6rem; }
.site-footer .contact-row .ic { color: var(--c-orange); flex: 0 0 auto; }
.foot-social a { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1);
  align-items: center; justify-content: center; margin-inline-end: .4rem; transition: .18s; }
.foot-social a:hover { background: var(--c-primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--sp-6); padding: 1rem 0; font-size: var(--fs-sm); color: #9fabd0; }

/* -------------------------------------------------------------- page header */
.page-hero {
  background: linear-gradient(120deg, var(--c-navy), var(--c-navy-700));
  color: #fff; padding: var(--sp-7) 0; position: relative; overflow: hidden;
}
.page-hero::after { content:""; position:absolute; inset-block:0; inset-inline-end:-40px; width: 320px;
  background: radial-gradient(circle at 70% 30%, rgba(240,160,18,.25), transparent 60%); }
.page-hero h1 { color: #fff; font-size: var(--fs-2xl); margin: 0; position: relative; }
.page-hero .crumb { color: #b9c2e2; position: relative; }
.page-hero .crumb a { color: #b9c2e2; }

/* --------------------------------------------------------------------- forms */
.auth-card { max-width: 480px; margin-inline: auto; }
.form-card { max-width: 640px; margin-inline: auto; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--c-line); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--c-cyan); box-shadow: 0 0 0 .2rem rgba(11,130,176,.15); }
.form-label { font-weight: 700; color: var(--c-navy); margin-bottom: .35rem; }
.input-aff { display: flex; align-items: center; gap: .6rem; }

/* filter chips */
.filter-chip {
  border: 1.5px solid var(--c-line); background: #fff; color: var(--c-ink-soft); font-weight: 700;
  border-radius: var(--radius-pill); padding: .4rem 1.1rem; font-size: var(--fs-sm); transition: .15s;
}
.filter-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* price box (course detail) */
.price-box { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 1rem; }
.price-box .pb-head { background: linear-gradient(135deg, var(--c-navy), var(--c-cyan)); color: #fff; padding: 1.4rem; text-align: center; }
.price-box .pb-amount { font-size: 2.1rem; font-weight: 800; }
.price-box .pb-body { padding: 1.2rem; }
.spec-row { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px dashed var(--c-line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: var(--c-muted); }
.spec-row .v { font-weight: 700; color: var(--c-navy); }

/* empty state */
.empty-state { text-align: center; padding: var(--sp-7) 1rem; color: var(--c-muted); }
.empty-state .ic { font-size: 3rem; margin-bottom: .6rem; opacity: .6; }

/* prose (rich legacy HTML content) */
.prose { color: var(--c-ink-soft); line-height: 1.9; }
.prose h2, .prose h3, .prose h4 { color: var(--c-navy); margin: 1.4rem 0 .7rem; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose td, .prose th { border: 1px solid var(--c-line); padding: .5rem .7rem; }

/* --------------------------------------------------------------- dashboard */
.dash-shell { background: var(--c-bg-soft); min-height: 70vh; }
.dash-side .list-group-item { border: 0; border-radius: var(--radius-sm) !important; font-weight: 700; color: var(--c-navy); margin-bottom: .25rem; }
.dash-side .list-group-item.active { background: var(--c-primary); color: #fff; }
.dash-side .list-group-item:not(.active):hover { background: var(--c-primary-soft); color: var(--c-primary); }
.kpi-card { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.2rem; background: #fff; position: relative; overflow: hidden; }
.kpi-card .kpi-ic { position: absolute; inset-inline-end: 1rem; top: 1rem; font-size: 1.6rem; opacity: .25; }
.kpi-card .kpi-value { font-size: 1.9rem; font-weight: 800; color: var(--c-navy); line-height: 1; }
.kpi-card .kpi-label { color: var(--c-muted); font-size: var(--fs-sm); margin-top: .3rem; }
.kpi-card.kpi-red { border-top: 3px solid var(--c-primary); }
.kpi-card.kpi-navy { border-top: 3px solid var(--c-navy); }
.kpi-card.kpi-cyan { border-top: 3px solid var(--c-cyan); }
.kpi-card.kpi-green { border-top: 3px solid var(--c-green); }
.table thead th { color: var(--c-navy); font-weight: 700; border-bottom: 2px solid var(--c-line); }
.table { vertical-align: middle; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
  .price-box { position: static; margin-top: 1.5rem; }
  .hero-art { margin-top: 2rem; }
}
@media (max-width: 575.98px) {
  :root { --fs-2xl: 1.5rem; --fs-3xl: 1.9rem; }
  .section { padding: var(--sp-7) 0; }
  .site-navbar .navbar-brand img { height: 42px; }
  .hero-inner { padding: var(--sp-7) 0; }
  .topbar .topbar-hide-sm { display: none !important; }
}

/* ----------------------------------------------------- accessibility */
/* Visible keyboard focus everywhere (was missing). */
a:focus-visible, button:focus-visible, .btn:focus-visible,
.form-control:focus-visible, .form-select:focus-visible,
.filter-chip:focus-visible, .nav-link:focus-visible {
  outline: 3px solid var(--c-cyan);
  outline-offset: 2px;
  box-shadow: none;
}
/* Skip-to-content link for screen-reader / keyboard users.
   Hidden ABOVE the viewport (vertical) so it never causes horizontal scroll. */
.skip-link {
  position: fixed; inset-inline-start: 12px; top: 0; z-index: 2000;
  transform: translateY(-130%); transition: transform .15s ease;
  background: var(--c-navy); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { transform: translateY(0); color: #fff; }
/* Respect reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .course-card:hover, .feature-tile:hover, .cat-card:hover, .btn:hover { transform: none !important; }
}

/* ------------------------------------------------------- WhatsApp FAB */
.whatsapp-fab {
  position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 1040;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
  box-shadow: 0 8px 22px rgba(37,211,102,.45); transition: transform .15s ease;
}
.whatsapp-fab:hover { color: #fff; transform: scale(1.07); }

/* ----------------------------------------------- sticky mobile CTA bar */
.mobile-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 1035;
  background: #fff; border-top: 1px solid var(--c-line); box-shadow: 0 -4px 16px rgba(31,47,107,.1);
  padding: .6rem .9rem; display: none; align-items: center; justify-content: space-between; gap: .8rem;
}
.mobile-cta .mc-price { font-weight: 800; color: var(--c-primary); }
@media (max-width: 991.98px) {
  .mobile-cta { display: flex; }
  body.has-mobile-cta { padding-bottom: 72px; }
}

/* ------------------------------------------------------- misc helpers */
.trust-strip { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; }
.trust-strip .ts { display: flex; align-items: center; gap: .5rem; color: var(--c-ink-soft); font-weight: 600; font-size: var(--fs-sm); }
.trust-strip .ts i { color: var(--c-green); font-size: 1.1rem; }
.benefit-li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .8rem; }
.benefit-li i { color: var(--c-green); font-size: 1.25rem; flex: 0 0 auto; margin-top: .15rem; }
.help-card { background: linear-gradient(135deg, var(--c-navy-tint), #fff); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.3rem; }
.audience-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius-pill); padding: .4rem .9rem; font-weight: 600; font-size: var(--fs-sm); margin: 0 0 .5rem; }

/* =========================================================================
   Dashboard UX refinement (Phase 17): grouped sidebar, priority fieldsets
   ========================================================================= */

/* --- Workflow-grouped sidebar ------------------------------------------- */
.dash-side { position: sticky; top: 1rem; align-self: flex-start; }
.dash-side .side-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--c-muted);
  letter-spacing: .04em;
  margin: 1rem .75rem .35rem;
  padding-inline-start: .25rem;
  border-inline-start: 3px solid var(--c-orange);
}
.dash-side .side-label:first-child { margin-top: 0; }
.dash-side .list-group-item { padding-block: .5rem; font-size: var(--fs-sm); }
.dash-side .list-group-item i { inline-size: 1.25rem; text-align: center; margin-inline-end: .35rem; color: var(--c-cyan); }
.dash-side .list-group-item.active i { color: #fff; }
.dash-side .list-group-item:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 2px;
}

/* --- Priority fieldsets + two-column form grid --------------------------- */
.form-section { border: 0; padding: 0; margin: 0 0 1.5rem; min-inline-size: 0; }
.form-section:last-of-type { margin-bottom: 1rem; }
.form-section-title {
  float: none; width: auto;              /* reset bootstrap legend */
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--c-navy);
  padding-inline-start: .6rem;
  border-inline-start: 3px solid var(--c-primary);
  margin-bottom: .9rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1rem;
}
.form-grid .form-cell { margin-bottom: .65rem; min-inline-size: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 575.98px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-grid .form-label { margin-bottom: .25rem; font-weight: 700; font-size: var(--fs-sm); color: var(--c-ink-soft); }

/* --- Quick actions strip (dashboard home) ------------------------------- */
.quick-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.quick-actions .qa {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: var(--fs-sm);
  color: var(--c-navy);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.quick-actions .qa i { color: var(--c-primary); }
.quick-actions .qa:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.quick-actions .qa:focus-visible { outline: 2px solid var(--c-navy); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .quick-actions .qa { transition: none; }
}

/* =========================================================================
   Dashboard Shell v2 — dedicated admin chrome + dark mode
   Sidebar: permanently dark navy (brand). Content: themable via
   [data-dash-theme="dark"] working WITH bootstrap's data-bs-theme.
   ========================================================================= */

:root {
  --dash-bg:    #f4f6fb;
  --dash-card:  #ffffff;
  --dash-line:  #e7eaf0;
  --dash-ink:   #222b36;
  --dash-muted: #5e6975;
  --dash-side-from: #1a2650;
  --dash-side-to:   #111a3a;
}
[data-dash-theme="dark"] {
  --dash-bg:    #0e1322;
  --dash-card:  #161d31;
  --dash-line:  #26314f;
  --dash-ink:   #e7ecf7;
  --dash-muted: #94a2c0;
}

/* --- Topbar --------------------------------------------------------------- */
.dash-topbar {
  background: var(--dash-card);
  border-bottom: 1px solid var(--dash-line);
  padding: .55rem 0;
  position: sticky; top: 0; z-index: 1030;
}
.dash-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.dash-brand img { height: 34px; width: auto; }
.dash-brand span { font-weight: 800; color: var(--c-navy); font-size: 1.05rem; }
[data-dash-theme="dark"] .dash-brand span { color: #dfe6ff; }
.dash-topbar-sep { width: 1px; height: 26px; background: var(--dash-line); }
.dash-top-link { color: var(--dash-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 700; }
.dash-top-link:hover { color: var(--c-primary); }
.dash-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--dash-line); background: transparent;
  color: var(--dash-muted); font-size: 1.05rem; text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.dash-icon-btn:hover { color: var(--c-primary); border-color: var(--c-primary); }
.dash-icon-btn:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; }
.dash-bell-badge {
  position: absolute; top: -5px; inset-inline-end: -5px;
  background: var(--c-primary); color: #fff; font-size: .68rem; font-weight: 800;
  border-radius: 50rem; padding: .1rem .38rem; line-height: 1.1;
}
/* toggle shows the icon of the mode you'd switch TO */
.dash-ic-light { display: none; }
[data-dash-theme="dark"] .dash-ic-dark { display: none; }
[data-dash-theme="dark"] .dash-ic-light { display: inline; }
.dash-user-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; border: 1px solid var(--dash-line);
  border-radius: 10px; padding: .3rem .7rem .3rem .5rem;
  font-weight: 700; font-size: var(--fs-sm); color: var(--dash-ink);
}
.dash-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), var(--c-navy));
  color: #fff; font-weight: 800; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* --- Shell + sidebar ------------------------------------------------------ */
.dash-shell { background: var(--dash-bg); min-height: calc(100vh - 56px); }
.dash-nav {
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, var(--dash-side-from), var(--dash-side-to));
  border-radius: var(--radius);
  padding: .8rem .6rem;
  box-shadow: 0 8px 24px rgba(10, 16, 40, .18);
}
.dash-nav .side-label {
  border-inline-start: 3px solid var(--c-orange);
  color: #8b98c4;
  font-size: .72rem; font-weight: 800; letter-spacing: .05em;
  margin: .85rem .35rem .3rem; padding-inline-start: .45rem;
}
.dash-nav .side-label:first-child { margin-top: 0; }
.dash-link {
  display: flex; align-items: center; gap: .55rem;
  color: #c7d0ea; text-decoration: none;
  font-size: var(--fs-sm); font-weight: 700;
  padding: .48rem .65rem; border-radius: .55rem;
  border-inline-start: 3px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.dash-link i { width: 1.15rem; text-align: center; color: #6fb7d6; font-size: 1rem; }
.dash-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.dash-link.active {
  background: rgba(178, 31, 36, .28);
  border-inline-start-color: var(--c-primary-600);
  color: #fff;
}
.dash-link.active i { color: #ff9d9d; }
.dash-link:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 1px; }
.dash-side-badge {
  background: var(--c-primary); color: #fff; font-size: .7rem; font-weight: 800;
  border-radius: 50rem; padding: .05rem .45rem; margin-inline-start: auto;
}
@media (prefers-reduced-motion: reduce) {
  .dash-link, .dash-icon-btn { transition: none; }
}

/* --- Dark content area: cover our hardcoded utilities --------------------- */
[data-dash-theme="dark"] .dash-shell .card {
  background-color: var(--dash-card);
  border: 1px solid var(--dash-line) !important;
  box-shadow: none !important;
}
[data-dash-theme="dark"] .dash-shell .bg-white { background-color: var(--dash-card) !important; }
[data-dash-theme="dark"] .dash-shell .bg-light { background-color: #1b2440 !important; }
[data-dash-theme="dark"] .dash-shell .text-muted { color: var(--dash-muted) !important; }
[data-dash-theme="dark"] .dash-shell .border,
[data-dash-theme="dark"] .dash-shell .border-top,
[data-dash-theme="dark"] .dash-shell .border-bottom { border-color: var(--dash-line) !important; }
[data-dash-theme="dark"] .dash-shell h1,
[data-dash-theme="dark"] .dash-shell h2,
[data-dash-theme="dark"] .dash-shell .h4,
[data-dash-theme="dark"] .dash-shell .h5,
[data-dash-theme="dark"] .dash-shell .h6 { color: var(--dash-ink); }
[data-dash-theme="dark"] .dash-shell .kpi-card {
  background: var(--dash-card); border-color: var(--dash-line);
}
[data-dash-theme="dark"] .dash-shell .kpi-card .kpi-value { color: var(--dash-ink); }
[data-dash-theme="dark"] .dash-shell .quick-actions .qa {
  background: var(--dash-card); border-color: var(--dash-line); color: var(--dash-ink);
}
[data-dash-theme="dark"] .dash-shell .quick-actions .qa:hover { border-color: var(--c-primary); }
[data-dash-theme="dark"] .dash-shell .badge-soft {
  filter: none; background: rgba(255, 255, 255, .09); color: var(--dash-ink);
}
[data-dash-theme="dark"] .dash-shell .form-section-title { color: #aebbe0; }
[data-dash-theme="dark"] .dash-shell .form-grid .form-label { color: var(--dash-muted); }
[data-dash-theme="dark"] .dash-shell .spec-row { border-color: var(--dash-line); }

/* =========================================================================
   Dashboard v2.1 — modern, consistent tables & forms (both themes)
   ========================================================================= */

:root { --dash-th: #f2f4fa; --dash-hover: #f8f5f5; }
[data-dash-theme="dark"] { --dash-th: #1b2440; --dash-hover: #1d2540; }

/* --- Tables: quiet headers, airy rows, soft hover ------------------------- */
.dash-shell .card { border-radius: var(--radius); overflow: hidden; }
.dash-shell .table { margin-bottom: 0; }
.dash-shell .table thead th {
  background: var(--dash-th);
  color: var(--dash-muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .02em;
  border-bottom: 0;
  padding: .7rem 1rem;
  white-space: nowrap;
}
.dash-shell .table tbody td {
  padding: .68rem 1rem;
  border-color: var(--dash-line);
  vertical-align: middle;
}
.dash-shell .table tbody tr:last-child td { border-bottom: 0; }
.dash-shell .table-hover tbody tr:hover td { background: var(--dash-hover); }
.dash-shell .table a { font-weight: 700; }
.dash-shell .card > .card-header + .table-responsive .table thead th,
.dash-shell .card > .card-header ~ div .table thead th { border-top: 1px solid var(--dash-line); }

/* --- Forms: consistent inputs, calm borders, brand focus ------------------ */
.dash-shell .form-control,
.dash-shell .form-select {
  border-radius: .55rem;
  border-color: var(--dash-line);
  padding: .5rem .8rem;
  font-size: var(--fs-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.dash-shell .form-control:focus,
.dash-shell .form-select:focus {
  border-color: var(--c-cyan);
  box-shadow: 0 0 0 .2rem rgba(11, 130, 176, .12);
}
.dash-shell .form-control-sm, .dash-shell .form-select-sm { border-radius: .5rem; }
.dash-shell .form-label { font-weight: 700; font-size: var(--fs-sm); color: var(--dash-muted); margin-bottom: .3rem; }
.dash-shell .form-check-input { border-color: var(--dash-line); }
.dash-shell .form-check-input:checked { background-color: var(--c-primary); border-color: var(--c-primary); }
.dash-shell .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(178, 31, 36, .12); }
.dash-shell .form-text { color: var(--dash-muted); }
[data-dash-theme="dark"] .dash-shell .form-control,
[data-dash-theme="dark"] .dash-shell .form-select {
  background-color: #10182c;
  border-color: var(--dash-line);
  color: var(--dash-ink);
}
[data-dash-theme="dark"] .dash-shell .form-control::placeholder { color: #5d6a8c; }

/* Card headers used as list titles — align with the new table header look */
.dash-shell .card > .card-header {
  font-size: var(--fs-sm);
  color: var(--dash-ink);
  padding-bottom: .6rem;
}

/* Buttons inside table rows: keep them compact and vertically centered */
.dash-shell .table .btn-sm { --bs-btn-padding-y: .18rem; --bs-btn-font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  .dash-shell .form-control, .dash-shell .form-select { transition: none; }
}

/* --- Reports: print-friendly (charts are canvases — they print as-is) ---- */
@media print {
  .dash-topbar, .dash-side, .d-print-none { display: none !important; }
  .dash-shell { background: #fff; min-height: auto; }
  .dash-shell .col-lg-10 { width: 100%; flex: 0 0 100%; max-width: 100%; }
  .dash-shell .card { box-shadow: none !important; border: 1px solid #d9dee8 !important; break-inside: avoid; }
  .report-block { break-inside: avoid; }
  .kpi-card { break-inside: avoid; }
  @page { size: A4; margin: 12mm; }
}

/* --- Interactive calendar (FullCalendar) --------------------------------- */
.cal-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: -1px; margin-inline-end: .25rem; }
#calendar { --fc-border-color: var(--dash-line); --fc-page-bg-color: transparent;
  --fc-today-bg-color: rgba(240, 160, 18, .08); font-size: var(--fs-sm); }
#calendar .fc-toolbar-title { font-size: 1.05rem; font-weight: 800; color: var(--dash-ink); }
#calendar .fc-button { background: var(--c-navy); border-color: var(--c-navy); font-weight: 700; font-size: var(--fs-xs); }
#calendar .fc-button:hover { background: var(--c-navy-700); }
#calendar .fc-button-active { background: var(--c-primary) !important; border-color: var(--c-primary) !important; }
#calendar .fc-event { border-radius: 6px; font-size: .78rem; cursor: pointer; }
#calendar .fc-col-header-cell-cushion, #calendar .fc-daygrid-day-number { color: var(--dash-muted); font-weight: 700; text-decoration: none; }
#calendar .fc-timegrid-slot-label { color: var(--dash-muted); font-size: .72rem; }
[data-dash-theme="dark"] #calendar .fc-list, [data-dash-theme="dark"] #calendar .fc-list-day-cushion { background: var(--dash-card); }
@media print { #calendar .fc-toolbar { display: none; } }
