/* =============================================================================
   Sorgex E3 — shared styles for the learner shell, the admin skin and every
   /e3 page. Loaded only by the -sorgex layouts and the public/login pages, and
   everything is namespaced (.sx-*, .e3*, body.sorgex-*) so no other org is
   affected. Palette from the client mock-ups: navy sidebar, orange accent,
   warm off-white canvas.
   ============================================================================= */
:root {
	--sx-navy: #0F2238;
	--sx-navy-2: #0A1828;
	--sx-orange: #FF4A1C;          /* brand accent: marks, rules, active states */
	--sx-orange-strong: #D63A0E;   /* filled buttons (white text ≥ 4.5:1)       */
	--sx-orange-ink: #B8360B;      /* orange text/links on light surfaces        */
	--sx-orange-soft: #FFE6DC;
	--sx-canvas: #FBF7F3;
	--sx-card: #FFFFFF;
	--sx-line: #EFE5DC;
	--sx-ink: #13233A;
	--sx-ink-2: #4A5667;
	--sx-muted: #7A8594;
	--sx-good: #1E7F4F;
	--sx-good-bg: #E3F4EA;
	--sx-warn: #9A6200;
	--sx-warn-bg: #FFF1D6;
	--sx-bad: #B42318;
	--sx-bad-bg: #FDE7E4;
	/* Tier ramp (ordinal, one hue light→dark; validated): Silver→Diamond */
	--sx-t1: #F4A07A;
	--sx-t2: #EE7340;
	--sx-t3: #D9501C;
	--sx-t4: #A83409;
	--sx-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
	--sx-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
	--sx-radius: 10px;
	--sx-shadow: 0 1px 2px rgba(15, 34, 56, .05), 0 4px 14px rgba(15, 34, 56, .05);
}

/* ─── Brand mark ───────────────────────────────────────────── */
.sx-logo { display: inline-flex; flex-direction: column; line-height: 1; color: #fff; text-decoration: none; }
.sx-logo-word { font-family: var(--sx-sans); font-weight: 800; font-size: 25px; letter-spacing: -.01em; }
.sx-logo-word b { color: var(--sx-orange); font-weight: 800; }
.sx-logo-sub { margin-top: 6px; font-size: 11.5px; letter-spacing: .02em; color: #D8DEE6; font-weight: 500; }
.sx-logo-sub i { font-style: normal; margin: 0 6px; opacity: .7; }
.sx-logo.dark { color: var(--sx-navy); }
.sx-logo.dark .sx-logo-sub { color: var(--sx-ink-2); }

/* ─── Learner sidebar ──────────────────────────────────────── */
.sx-sidebar {
	background: var(--sx-navy) !important; color: #fff; font-family: var(--sx-sans);
	width: 200px !important; min-width: 200px;
}
.sx-sidebar .sidebar-content { position: relative; display: flex; flex-direction: column; min-height: 100%; overflow: hidden; }
.sx-sidebar .sx-brand { padding: 18px 20px 26px; position: relative; z-index: 1; }
.sx-nav { list-style: none; margin: 0; padding: 0 10px 0 0; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.sx-nav .nav-item { list-style: none; }
.sx-sidebar .sx-nav .nav-link {
	display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px 8px 20px; white-space: nowrap;
	color: #fff; font-size: 14.5px; font-weight: 500; border-radius: 0 8px 8px 0; text-decoration: none; border: 0;
}
.sx-sidebar .sx-nav .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sx-sidebar .sx-nav .nav-link.active { background: var(--sx-orange); color: #fff; font-weight: 600; }
.sx-sidebar .sx-nav .nav-link i { font-size: 17px; opacity: .85; width: 18px; text-align: center; }
.sx-side-quote { position: relative; z-index: 1; margin: 34px 20px 0 28px; }
.sx-rule { display: block; width: 40px; height: 2px; background: var(--sx-orange); }
.sx-side-quote p { margin: 14px 0; font-family: var(--sx-serif); font-size: 17px; line-height: 1.3; color: #fff; }
.sx-side-art {
	position: relative; margin-top: auto; min-height: 330px; background-size: cover; background-position: center bottom;
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 28%); mask-image: linear-gradient(180deg, transparent 0%, #000 28%);
}
.sx-side-art-text { position: absolute; left: 28px; right: 16px; bottom: 56px; font-family: var(--sx-serif); font-size: 15.5px; line-height: 1.25; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.sx-side-logout { position: absolute; left: 20px; bottom: 16px; color: #ffd3c6 !important; font-size: 13px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.sx-side-logout:hover { color: #fff !important; }

/* ─── Learner / admin top bar ─────────────────────────────── */
.sx-navbar { background: var(--sx-canvas) !important; border: 0 !important; box-shadow: none !important; padding: 14px 18px 6px !important; font-family: var(--sx-sans); }
.sx-navbar-inner { display: flex; align-items: center; gap: 16px; width: 100%; }
.sx-search { flex: 0 1 520px; display: flex; align-items: center; gap: 10px; background: #F3EEE9; border: 1px solid #ECE3DA; border-radius: 8px; padding: 9px 14px; color: var(--sx-muted); }
.sx-search input { border: 0; background: transparent; outline: 0; flex: 1; font-size: 13.5px; color: var(--sx-ink); }
.sx-help { font-weight: 600; color: var(--sx-ink); text-decoration: none; padding: 0 16px; border-right: 1px solid #D9D0C7; }
.sx-user { display: flex; align-items: center; gap: 10px; color: var(--sx-ink); text-decoration: none; }
.sx-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sx-orange-strong); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.sx-who { display: flex; flex-direction: column; line-height: 1.2; }
.sx-who strong { font-size: 14px; }
.sx-who small { font-size: 12.5px; color: var(--sx-muted); }

/* ─── Page scaffold ───────────────────────────────────────── */
.e3 { font-family: var(--sx-sans); color: var(--sx-ink); background: var(--sx-canvas); padding: 8px 6px 28px; max-width: 1480px; }
.e3 *, .e3 *::before, .e3 *::after { box-sizing: border-box; }
.e3 h1, .e3 h2, .e3 h3, .e3 h4 { font-family: var(--sx-sans); color: var(--sx-ink); margin: 0; }
.e3 a { color: var(--sx-orange-ink); }
.e3-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 16px; flex-wrap: wrap; }
.e3-eyebrow { font-size: 13px; letter-spacing: .14em; font-weight: 700; color: var(--sx-orange-ink); text-transform: uppercase; }
.e3-title { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px !important; }
.e3-sub { color: var(--sx-ink-2); font-size: 14.5px; margin-top: 4px; }
.e3-grid { display: grid; gap: 16px; }
.e3-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.e3-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.e3-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.e3-grid.dash-mid { grid-template-columns: minmax(0, 1.55fr) minmax(0, .95fr) minmax(0, 1.1fr); align-items: start; }
.e3-grid.dash-low { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
@media (max-width: 1280px) {
	.e3-grid.dash-mid, .e3-grid.dash-low { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.e3-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.e3-grid.cols-2, .e3-grid.cols-3, .e3-grid.cols-4, .e3-grid.dash-mid, .e3-grid.dash-low { grid-template-columns: minmax(0, 1fr); }
}

.e3-card { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-radius); padding: 18px 20px; box-shadow: var(--sx-shadow); min-width: 0; }
.e3-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.e3-card-head h3 { font-size: 18px; font-weight: 700; }
.e3-link { font-size: 13px; font-weight: 600; color: var(--sx-orange-ink) !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.e3-link::after { content: " \2192"; text-decoration: none; display: inline-block; margin-left: 4px; }
.e3-muted { color: var(--sx-muted); }
.e3-small { font-size: 12.5px; }
.e3-empty { padding: 22px 10px; text-align: center; color: var(--sx-muted); font-size: 14px; }
.e3-divider { height: 1px; background: var(--sx-line); margin: 14px 0; }

/* ─── Hero banner ─────────────────────────────────────────── */
.e3-hero {
	position: relative; overflow: hidden; border-radius: 12px; min-height: 272px; padding: 30px 30px 26px;
	background-color: #F6D9C9; background-repeat: no-repeat; background-size: auto 100%; background-position: right center;
	box-shadow: var(--sx-shadow);
}
.e3-hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, #FBEFE8 0%, rgba(251, 239, 232, .96) 34%, rgba(251, 239, 232, .55) 52%, rgba(251, 239, 232, 0) 68%);
}
.e3-hero > * { position: relative; }
.e3-hero h1 { font-size: 44px; line-height: 1.02; font-weight: 800; letter-spacing: -.02em; margin-top: 10px !important; max-width: 560px; }
.e3-hero .e3-sub { font-size: 16px; max-width: 520px; margin-top: 10px; color: #2B3A4E; }
.e3-hero-quote { position: absolute; right: 30px; top: 50px; font-family: var(--sx-serif); font-size: 24px; line-height: 1.12; color: var(--sx-navy); text-align: left; text-shadow: 0 0 18px rgba(255,255,255,.55); }
.e3-hero-quote .sx-rule { margin-top: 12px; }
.e3-hero-date { position: absolute; right: 18px; top: 16px; font-size: 12.5px; color: var(--sx-ink); }
@media (max-width: 1100px) { .e3-hero-quote { display: none; } .e3-hero::before { background: linear-gradient(90deg, #FBEFE8 0%, rgba(251,239,232,.92) 60%, rgba(251,239,232,.6) 100%); } }
.e3-member-card { display: inline-flex; align-items: center; gap: 16px; margin-top: 20px; background: #fff; border-radius: 10px; padding: 14px 20px; box-shadow: 0 6px 20px rgba(15,34,56,.12); max-width: 100%; flex-wrap: wrap; }
.e3-gem { width: 52px; height: 44px; flex: 0 0 auto; }
.e3-member-card strong { font-size: 20px; display: block; }
.e3-member-card .e3-link { margin-left: 18px; font-size: 14px; }

/* ─── Stat strip ──────────────────────────────────────────── */
.e3-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--sx-line); border-radius: var(--sx-radius); margin: 14px 0 16px; box-shadow: var(--sx-shadow); }
.e3-stat { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-left: 1px solid var(--sx-line); min-width: 0; }
.e3-stat:first-child { border-left: 0; }
.e3-stat-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.e3-stat-label { font-size: 13.5px; color: var(--sx-ink); }
.e3-stat-note { font-size: 13.5px; color: var(--sx-orange-ink); font-weight: 600; }
.e3-meter { height: 8px; border-radius: 4px; background: var(--sx-orange-soft); overflow: hidden; min-width: 90px; flex: 1; }
.e3-meter > span { display: block; height: 100%; background: var(--sx-orange); border-radius: 4px; }
@media (max-width: 1100px) { .e3-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .e3-stat:nth-child(3) { border-left: 0; } }

/* KPI tiles (admin) */
.e3-kpi { background: #fff; border: 1px solid var(--sx-line); border-radius: var(--sx-radius); padding: 16px 20px; box-shadow: var(--sx-shadow); }
.e3-kpi-label { font-size: 13.5px; color: var(--sx-ink); }
.e3-kpi-value { font-size: 29px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.e3-kpi-delta { font-size: 13px; margin-top: 6px; color: var(--sx-muted); }
.e3-kpi-delta b { color: var(--sx-good); margin-right: 6px; }
.e3-kpi-delta b.down { color: var(--sx-bad); }

/* ─── Buttons, pills, badges ──────────────────────────────── */
.e3-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none !important;
	background: var(--sx-orange-strong); color: #fff !important; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 7px;
	font-family: var(--sx-sans); transition: filter .15s ease, transform .15s ease;
}
.e3-btn:hover { filter: brightness(1.07); }
.e3-btn:focus-visible { outline: 3px solid rgba(214, 58, 14, .35); outline-offset: 2px; }
.e3-btn:disabled { opacity: .55; cursor: not-allowed; }
/* The display rules above must not defeat the hidden attribute. */
.e3 [hidden], .e3-btn[hidden], .e3-modal-backdrop[hidden], .e3-tab-panel[hidden] { display: none !important; }
.e3-btn.ghost { background: var(--sx-orange-soft); color: var(--sx-orange-ink) !important; }
.e3-btn.line { background: #fff; color: var(--sx-ink) !important; border: 1px solid #D9D0C7; }
.e3-btn.navy { background: var(--sx-navy); }
.e3-btn.sm { padding: 6px 12px; font-size: 13px; }
.e3-btn.block { width: 100%; }
.e3-btn.arrow::after { content: "\2192"; font-weight: 700; }
.e3-action { font-weight: 700; font-size: 14px; color: var(--sx-orange-ink) !important; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.e3-action::after { content: " \2192"; }
.e3-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #EEF1F4; color: var(--sx-ink-2); white-space: nowrap; }
.e3-badge.good { background: var(--sx-good-bg); color: var(--sx-good); }
.e3-badge.warn { background: var(--sx-warn-bg); color: var(--sx-warn); }
.e3-badge.bad { background: var(--sx-bad-bg); color: var(--sx-bad); }
.e3-badge.orange { background: var(--sx-orange-soft); color: var(--sx-orange-ink); }
.e3-tier-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ─── Tabs ────────────────────────────────────────────────── */
.e3-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.e3-tab { border: 0; background: #F3EEE9; color: var(--sx-ink-2); font-size: 13.5px; padding: 8px 16px; border-radius: 7px 7px 0 0; cursor: pointer; font-family: var(--sx-sans); border-bottom: 3px solid transparent; }
.e3-tab.active { background: #FFF1EA; color: var(--sx-ink); font-weight: 700; border-bottom-color: var(--sx-orange); }
.e3-tab-panel[hidden] { display: none !important; }

/* ─── Course cards ────────────────────────────────────────── */
.e3-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.e3-course { border: 1px solid var(--sx-line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; min-width: 0; }
.e3-course-img { height: 86px; background-size: cover; background-position: center; background-color: #F1E6DD; }
.e3-course-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.e3-course-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.e3-course-meta { font-size: 12.5px; color: var(--sx-muted); }
.e3-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; margin-top: auto; }
.e3-progress .e3-meter { height: 7px; }
.e3-course-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }

/* ─── Donut (CSS conic-gradient) ─────────────────────────── */
.e3-donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.e3-donut { --p: 0; position: relative; width: 150px; height: 150px; border-radius: 50%; flex: 0 0 auto; }
.e3-donut::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: #fff; }
.e3-donut-center { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.e3-donut-center strong { font-size: 27px; font-weight: 800; line-height: 1; }
.e3-donut-center span { font-size: 13px; color: var(--sx-ink-2); margin-top: 4px; }
.e3-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 180px; }
.e3-legend li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 7px 0; font-size: 14px; }
.e3-legend li span:not(:first-child) { color: var(--sx-ink-2); text-align: right; min-width: 36px; }
.e3-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; vertical-align: -1px; }

/* Bar chart (revenue) */
.e3-bars { position: relative; display: flex; align-items: flex-end; gap: 8px; height: 190px; padding: 0 0 22px 40px; }
.e3-bars-grid { position: absolute; left: 40px; right: 0; top: 0; bottom: 22px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.e3-bars-grid div { border-top: 1px solid #F1ECE6; position: relative; }
.e3-bars-grid div span { position: absolute; left: -40px; top: -8px; width: 34px; text-align: right; font-size: 11.5px; color: var(--sx-muted); }
.e3-bar { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 14px; cursor: default; }
.e3-bar i { display: block; background: #F6B89C; border-radius: 4px 4px 0 0; min-height: 2px; }
.e3-bar.current i { background: var(--sx-orange); }
.e3-bar:hover i { filter: brightness(.92); }
.e3-bar b { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11.5px; color: var(--sx-ink-2); font-weight: 500; }
.e3-tip { position: fixed; z-index: 2000; pointer-events: none; background: var(--sx-navy); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.2); white-space: nowrap; }

/* Horizontal bars (categories) */
.e3-hbars { display: flex; flex-direction: column; gap: 12px; }
.e3-hbar { display: grid; grid-template-columns: minmax(120px, 1.1fr) 1.4fr 40px; gap: 12px; align-items: center; font-size: 14px; }
.e3-hbar .e3-meter { height: 10px; background: #F3EEE9; }
.e3-hbar span:last-child { text-align: right; color: var(--sx-ink-2); }

/* Ring (credits) */
.e3-ring { position: relative; width: 170px; height: 170px; margin: 6px auto 12px; }
.e3-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.e3-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.e3-ring-center strong { font-size: 32px; font-weight: 800; line-height: 1; }
.e3-ring-center span { font-size: 13.5px; color: var(--sx-ink-2); margin-top: 4px; }
.e3-ring-legend { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 14px; }

/* ─── Certification journey ───────────────────────────────── */
.e3-journey { list-style: none; margin: 0; padding: 0; position: relative; }
.e3-journey li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; position: relative; font-size: 14px; }
.e3-journey li::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: #EDE5DE; z-index: 0; }
.e3-journey li:first-child::before { top: 50%; }
.e3-journey li:last-child::before { bottom: 50%; }
.e3-step { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; z-index: 1; background: #C9CDD3; color: #fff; }
.e3-step.done { background: var(--sx-orange-strong); }
.e3-step.current { background: #fff; border: 7px solid var(--sx-orange-soft); box-shadow: inset 0 0 0 5px var(--sx-ink); }
.e3-journey .state { color: var(--sx-ink-2); font-size: 13.5px; text-align: right; }

/* ─── Key/value lists ─────────────────────────────────────── */
.e3-kv { list-style: none; margin: 0; padding: 0; }
.e3-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F3EDE7; font-size: 13.5px; }
.e3-kv li:last-child { border-bottom: 0; }
.e3-kv li span:last-child { color: var(--sx-orange-ink); font-weight: 600; text-align: right; }
.e3-media-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: stretch; }
.e3-media { border-radius: 8px; background-size: cover; background-position: center; min-height: 150px; }
@media (max-width: 560px) { .e3-media-row { grid-template-columns: 1fr; } .e3-media { min-height: 110px; } }

/* ─── Promo panel ─────────────────────────────────────────── */
.e3-promo { position: relative; border-radius: 12px; overflow: hidden; color: #fff; padding: 24px 24px 26px; background: var(--sx-navy); min-height: 200px; }
.e3-promo::before { content: ""; position: absolute; inset: 0; background-image: var(--img); background-size: cover; background-position: right center; opacity: .95; }
.e3-promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 34, 56, .96) 0%, rgba(15, 34, 56, .82) 48%, rgba(15, 34, 56, .15) 100%); }
.e3-promo > * { position: relative; z-index: 1; }
.e3-promo h3 { color: #fff !important; font-family: var(--sx-serif) !important; font-weight: 400 !important; font-size: 23px; line-height: 1.2; }
.e3-promo p { font-size: 13.5px; color: #E3E8EF; max-width: 340px; margin: 10px 0 18px; }
.e3-promo.light { background: #F6DDD0; color: var(--sx-ink); }
.e3-promo.light::after { background: linear-gradient(90deg, rgba(251, 239, 232, .97) 0%, rgba(251, 239, 232, .85) 55%, rgba(251, 239, 232, .1) 100%); }
.e3-promo.light h3 { color: var(--sx-ink) !important; }
.e3-promo.light p { color: var(--sx-ink-2); }

/* ─── Tables ──────────────────────────────────────────────── */
.e3-table-wrap { overflow-x: auto; }
.e3-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.e3-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--sx-ink); background: #F7F2EE; padding: 9px 12px; white-space: nowrap; }
.e3-table td { padding: 11px 12px; border-bottom: 1px solid #F1EAE4; vertical-align: middle; }
.e3-table tr:last-child td { border-bottom: 0; }
.e3-table tr:hover td { background: #FFFBF8; }
.e3-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.e3-toolbar .e3-input { max-width: 280px; }

/* Activity timeline */
.e3-timeline { list-style: none; margin: 0; padding: 0; }
.e3-timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 8px 0; position: relative; }
.e3-timeline li::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: -8px; width: 2px; background: #F6CDBD; }
.e3-timeline li:last-child::before { display: none; }
.e3-timeline .dot { width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--sx-orange); background: #fff; margin-top: 2px; }
.e3-timeline strong { font-size: 14px; display: block; }
.e3-timeline small { color: var(--sx-muted); font-size: 12.5px; }

/* Health tiles */
.e3-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.e3-health div { border: 1px solid var(--sx-line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
.e3-health strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-top: 4px; }
.e3-health .ok::before, .e3-health .no::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sx-good); }
.e3-health .no::before { background: var(--sx-warn); }

/* ─── Forms & modal ───────────────────────────────────────── */
.e3-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.e3-field label { font-size: 13px; font-weight: 600; color: var(--sx-ink); }
.e3-input, .e3 select.e3-input, .e3 textarea.e3-input {
	width: 100%; border: 1px solid #DDD3CA; border-radius: 7px; padding: 9px 11px; font-size: 14px; font-family: var(--sx-sans);
	background: #fff; color: var(--sx-ink);
}
.e3-input:focus { outline: 0; border-color: var(--sx-orange); box-shadow: 0 0 0 3px rgba(255, 74, 28, .15); }
.e3-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.e3-hint { font-size: 12.5px; color: var(--sx-muted); }
.e3-alert { border-radius: 8px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; }
.e3-alert.good { background: var(--sx-good-bg); color: var(--sx-good); }
.e3-alert.bad { background: var(--sx-bad-bg); color: var(--sx-bad); }
.e3-alert.warn { background: var(--sx-warn-bg); color: var(--sx-warn); }
.e3-alert.info { background: #EAF1F8; color: #1C4A73; }
.e3-modal-backdrop { position: fixed; inset: 0; background: rgba(10, 24, 40, .55); z-index: 1060; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.e3-modal-backdrop[hidden] { display: none; }
.e3-modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); font-family: var(--sx-sans); color: var(--sx-ink); }
.e3-modal.wide { max-width: 820px; }
.e3-modal h3 { font-size: 19px; font-weight: 700; margin: 0 0 14px; }
.e3-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.e3-toast { position: fixed; right: 20px; bottom: 20px; z-index: 2100; background: var(--sx-navy); color: #fff; padding: 12px 18px; border-radius: 8px; font-family: var(--sx-sans); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 420px; }
.e3-toast.bad { background: var(--sx-bad); }

/* ─── Plan picker ─────────────────────────────────────────── */
.e3-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .e3-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .e3-plans { grid-template-columns: 1fr; } }
.e3-plan { position: relative; border: 1.5px solid var(--sx-line); border-radius: 12px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.e3-plan:hover { border-color: #F2B49A; }
.e3-plan.selected { border-color: var(--sx-orange); box-shadow: 0 0 0 3px rgba(255, 74, 28, .14); }
.e3-plan.current::after { content: "Your tier"; position: absolute; top: -10px; right: 14px; background: var(--sx-navy); color: #fff; font-size: 11.5px; padding: 2px 10px; border-radius: 999px; }
.e3-plan-name { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.e3-plan-price { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.e3-plan-price small { font-size: 13px; color: var(--sx-muted); font-weight: 500; }
.e3-plan ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.e3-plan li::before { content: "\2713"; color: var(--sx-orange-strong); font-weight: 700; margin-right: 8px; }
.e3-seg { display: inline-flex; background: #F3EEE9; border-radius: 8px; padding: 3px; gap: 3px; }
.e3-seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font-size: 13.5px; font-weight: 600; color: var(--sx-ink-2); cursor: pointer; font-family: var(--sx-sans); }
.e3-seg button.active { background: #fff; color: var(--sx-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.e3-summary { border: 1px dashed #E7C7B8; background: #FFF9F5; border-radius: 10px; padding: 16px; }
.e3-summary .row-line { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.e3-summary .total { font-size: 18px; font-weight: 800; border-top: 1px solid #F1DDD2; margin-top: 6px; padding-top: 10px; }

/* ─── Admin skin (existing admin sidebar + navbar, body.sorgex-admin) ─── */
body.sorgex-admin { background: var(--sx-canvas); }
body.sorgex-admin .content-wrapper, body.sorgex-admin .content-inner, body.sorgex-admin .main-content { background: var(--sx-canvas) !important; }
body.sorgex-admin .mypass-modern-sidebar { background: var(--sx-navy) !important; font-family: var(--sx-sans); }
body.sorgex-admin .mypass-modern-sidebar .nav-link { color: #fff !important; font-size: 14.5px; }
body.sorgex-admin .mypass-modern-sidebar .nav-link:hover { background: rgba(255, 255, 255, .07) !important; }
body.sorgex-admin .mypass-modern-sidebar .nav-link.active,
body.sorgex-admin .mypass-modern-sidebar .nav-item > .nav-link.active { background: var(--sx-orange) !important; color: #fff !important; font-weight: 600; }
body.sorgex-admin .mypass-modern-sidebar .nav-group-sub { background: transparent !important; }
body.sorgex-admin .sx-admin-brand { padding: 18px 20px 14px; }
body.sorgex-admin .sx-nav-head { padding: 14px 20px 6px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #9FB0C4; }
body.sorgex-admin .sx-admin-foot { padding: 16px 22px 20px; }
body.sorgex-admin .sx-admin-foot p { font-family: var(--sx-serif); font-size: 17px; line-height: 1.3; color: #fff; margin: 12px 0 0; }
body.sorgex-admin .mypass-navbar-modern { background: var(--sx-canvas) !important; box-shadow: none !important; border-bottom: 0 !important; }
body.sorgex-admin .mypass-navbar-modern .nav-link, body.sorgex-admin .mypass-navbar-modern .navbar-nav-link { color: var(--sx-ink) !important; }
body.sorgex-admin .btn-primary { --btn-bg: var(--sx-orange-strong) !important; --btn-border-color: var(--sx-orange-strong) !important; --btn-hover-bg: #C23409 !important; --btn-hover-border-color: #C23409 !important; }
body.sorgex-admin .mypass-modern-sidebar .theme-mode { display: none !important; }

@media (prefers-reduced-motion: reduce) { .e3-btn, .e3-plan { transition: none; } }
