/* =====================================================================
   TalentPanda DESIGN SYSTEM  ·  Skill. Gap. Hire.
   Royal Plum #48235C  ·  Camel Gold #AA896A  ·  Warm Cream #F7F2EC
   Loaded LAST so it re-maps every legacy token (--nc-*, theme --bg/--gold,
   Bootstrap --bs-*) to one palette in light and dark mode.
   ===================================================================== */

:root,
[data-theme="light"] {
  color-scheme: light;
  --tx-primary: #48235C;
  --tx-primary-600: #3A1C4A;
  --tx-primary-400: #6B3A85;
  --tx-primary-050: #F3ECF7;
  --tx-primary-100: #E6D8EE;
  --tx-accent: #AA896A;
  --tx-accent-600: #8F6F51;
  --tx-accent-050: #F5EEE6;
  --tx-bg: #F7F2EC;
  --tx-surface: #FFFFFF;
  --tx-surface-2: #EFE6DA;
  --tx-border: #E4D8CB;
  --tx-text: #1E1426;
  --tx-muted: #6E6177;
  --tx-success: #2E7D5B; --tx-success-050: #E7F3EC;
  --tx-warning: #A86F12; --tx-warning-050: #FBF1DF;
  --tx-danger: #C2413B;  --tx-danger-050: #F8E5E4;
  --tx-info: #3B6FB6;    --tx-info-050: #E6EEF8;
  --tx-shadow: 0 1px 2px rgba(72,35,92,.06), 0 8px 24px rgba(72,35,92,.08);
  --tx-shadow-lg: 0 2px 4px rgba(72,35,92,.06), 0 18px 40px rgba(72,35,92,.14);
  --tx-grad: linear-gradient(135deg, #48235C 0%, #6B3A85 55%, #8F6F51 100%);
  --tx-radius: 16px; --tx-radius-sm: 10px; --tx-radius-lg: 24px;
  --tx-font-head: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tx-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] {
  color-scheme: dark;
  --tx-primary: #C9A9E0;
  --tx-primary-600: #DCC4EC;
  --tx-primary-400: #B48FD0;
  --tx-primary-050: #2A1736;
  --tx-primary-100: #3A2349;
  --tx-accent: #C7A684;
  --tx-accent-600: #D9BE9F;
  --tx-accent-050: #2E241B;
  --tx-bg: #140B1A;
  --tx-surface: #1E1328;
  --tx-surface-2: #281A35;
  --tx-border: #3A2A48;
  --tx-text: #F4EEF8;
  --tx-muted: #B9AAC6;
  --tx-success: #6CC79C; --tx-success-050: #16291F;
  --tx-warning: #E2B45C; --tx-warning-050: #2D2312;
  --tx-danger: #F08A84;  --tx-danger-050: #34171A;
  --tx-info: #8DB4EA;    --tx-info-050: #152238;
  --tx-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
  --tx-shadow-lg: 0 2px 6px rgba(0,0,0,.45), 0 20px 44px rgba(0,0,0,.5);
  --tx-grad: linear-gradient(135deg, #2A1736 0%, #48235C 60%, #6B4F36 100%);
}

/* ---- legacy token re-mapping (every existing page follows the palette) ---- */
:root, [data-theme="light"], [data-theme="dark"] {
  --nc-primary: var(--tx-primary); --nc-primary-hover: var(--tx-primary-600); --nc-primary-dark: var(--tx-primary-600);
  --nc-primary-soft: var(--tx-primary-050); --nc-indigo: var(--tx-primary-400); --nc-purple: var(--tx-primary-400);
  --nc-cyan: var(--tx-accent); --nc-orange: var(--tx-accent);
  --nc-page-bg: var(--tx-bg); --nc-background: var(--tx-bg); --nc-bg: var(--tx-bg);
  --nc-surface: var(--tx-surface); --nc-white: var(--tx-surface); --nc-card-bg: var(--tx-surface);
  --nc-surface-soft: var(--tx-surface-2); --nc-input-bg: var(--tx-surface);
  --nc-text-primary: var(--tx-text); --nc-text-heading: var(--tx-text); --nc-heading: var(--tx-text);
  --nc-text-secondary: var(--tx-muted); --nc-text: var(--tx-text); --nc-text-muted: var(--tx-muted); --nc-muted: var(--tx-muted);
  --nc-border: var(--tx-border); --nc-border-light: var(--tx-border); --nc-border-color: var(--tx-border);
  --nc-input-border: var(--tx-border);
  --nc-shadow-card: var(--tx-shadow); --nc-shadow: var(--tx-shadow); --nc-shadow-hover: var(--tx-shadow-lg);
  /* theme/theme.css tokens */
  --bg: var(--tx-bg); --bg-2: var(--tx-surface-2); --surface: var(--tx-surface); --surface-2: var(--tx-surface-2);
  --line: var(--tx-border); --line-strong: var(--tx-accent);
  --text: var(--tx-text); --muted: var(--tx-muted); --dim: var(--tx-muted);
  --gold: var(--tx-accent); --gold-l: var(--tx-accent-600); --gold-d: var(--tx-accent);
  --emerald: var(--tx-primary); --emerald-l: var(--tx-primary-400);
  --grad-gold: linear-gradient(120deg, #D8C2A8, #AA896A 55%, #8F6F51);
  --tp-bg-primary: var(--tx-bg); --tp-bg-secondary: var(--tx-surface-2); --tp-bg-surface: var(--tx-surface);
  --tp-text-primary: var(--tx-text); --tp-text-muted: var(--tx-muted); --tp-border-color: var(--tx-border);
  /* Bootstrap 5.3 */
  --bs-primary: #48235C; --bs-primary-rgb: 72,35,92;
  --bs-secondary-rgb: 110,97,119;
  --bs-success: #2E7D5B; --bs-success-rgb: 46,125,91;
  --bs-warning: #C98A1B; --bs-warning-rgb: 201,138,27;
  --bs-danger: #C2413B; --bs-danger-rgb: 194,65,59;
  --bs-info: #3B6FB6; --bs-info-rgb: 59,111,182;
  --bs-body-bg: var(--tx-bg); --bs-body-color: var(--tx-text); --bs-body-font-family: var(--tx-font-body);
  --bs-border-color: var(--tx-border); --bs-secondary-color: var(--tx-muted); --bs-tertiary-bg: var(--tx-surface-2);
  --bs-link-color: var(--tx-primary); --bs-link-color-rgb: 72,35,92; --bs-link-hover-color: var(--tx-primary-600);
  --bs-emphasis-color: var(--tx-text); --bs-heading-color: var(--tx-text);
  --bs-primary-bg-subtle: var(--tx-primary-050); --bs-primary-text-emphasis: var(--tx-primary);
  --bs-primary-border-subtle: var(--tx-primary-100);
  --bs-focus-ring-color: rgba(170,137,106,.45);
}
[data-theme="dark"] { --bs-primary-rgb: 201,169,224; --bs-link-color-rgb: 201,169,224; }

html { scroll-behavior: smooth; }
body { background: var(--tx-bg) !important; color: var(--tx-text); font-family: var(--tx-font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--tx-font-head); color: var(--tx-text); letter-spacing: -.015em;
}
.text-muted, .text-secondary { color: var(--tx-muted) !important; }
.text-primary { color: var(--tx-primary) !important; }
.text-dark { color: var(--tx-text) !important; }
.bg-primary { background-color: #48235C !important; }
.bg-light { background-color: var(--tx-surface-2) !important; }
.bg-white { background-color: var(--tx-surface) !important; }
a { color: var(--tx-primary); }
::selection { background: var(--tx-primary-100); }
:focus-visible { outline: 2px solid var(--tx-accent); outline-offset: 2px; }

/* ---- buttons ---- */
.btn { border-radius: var(--tx-radius-sm); font-weight: 600; transition: transform .15s ease-out, box-shadow .2s ease-out, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-tx {
  --bs-btn-bg: #48235C; --bs-btn-border-color: #48235C; --bs-btn-color: #fff;
  --bs-btn-hover-bg: #3A1C4A; --bs-btn-hover-border-color: #3A1C4A; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #2E1540; --bs-btn-active-border-color: #2E1540;
  --bs-btn-disabled-bg: #8C7399; --bs-btn-disabled-border-color: #8C7399;
  box-shadow: 0 6px 16px -6px rgba(72,35,92,.55);
}
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-tx {
  --bs-btn-bg: #B48FD0; --bs-btn-border-color: #B48FD0; --bs-btn-color: #140B1A;
  --bs-btn-hover-bg: #C9A9E0; --bs-btn-hover-border-color: #C9A9E0; --bs-btn-hover-color: #140B1A;
}
.btn-accent {
  --bs-btn-bg: #AA896A; --bs-btn-border-color: #AA896A; --bs-btn-color: #fff;
  --bs-btn-hover-bg: #8F6F51; --bs-btn-hover-border-color: #8F6F51; --bs-btn-hover-color: #fff;
}
.btn-outline-primary {
  --bs-btn-color: var(--tx-primary); --bs-btn-border-color: var(--tx-primary-100);
  --bs-btn-hover-bg: var(--tx-primary-050); --bs-btn-hover-color: var(--tx-primary); --bs-btn-hover-border-color: var(--tx-primary);
  --bs-btn-active-bg: var(--tx-primary-100); --bs-btn-active-color: var(--tx-primary);
}
.btn-light { --bs-btn-bg: var(--tx-surface); --bs-btn-border-color: var(--tx-border); --bs-btn-color: var(--tx-text);
  --bs-btn-hover-bg: var(--tx-surface-2); --bs-btn-hover-border-color: var(--tx-accent); --bs-btn-hover-color: var(--tx-text); }
.btn-dark { --bs-btn-bg: #1E1426; --bs-btn-border-color: #1E1426; --bs-btn-hover-bg: #48235C; --bs-btn-hover-border-color: #48235C; }

/* ---- forms ---- */
.form-control, .form-select { border-radius: var(--tx-radius-sm); border-color: var(--tx-border); background-color: var(--tx-surface); color: var(--tx-text); }
.form-control:focus, .form-select:focus { border-color: var(--tx-accent); box-shadow: 0 0 0 .22rem rgba(170,137,106,.22); background-color: var(--tx-surface); color: var(--tx-text); }
.form-control::placeholder { color: var(--tx-muted); opacity: .75; }
.form-label { font-weight: 600; font-size: .9rem; color: var(--tx-text); margin-bottom: .35rem; }
.form-text { color: var(--tx-muted); }
.form-check-input:checked { background-color: #48235C; border-color: #48235C; }
.invalid-feedback, .errorlist { color: var(--tx-danger); font-size: .85rem; }
ul.errorlist { list-style: none; padding-left: 0; margin: .25rem 0 0; }

/* ---- cards / surfaces ---- */
.card { background: var(--tx-surface); border: 1px solid var(--tx-border); border-radius: var(--tx-radius); box-shadow: var(--tx-shadow); color: var(--tx-text); }
.card-header, .card-footer { background: transparent; border-color: var(--tx-border); }
.tx-card { background: var(--tx-surface); border: 1px solid var(--tx-border); border-radius: var(--tx-radius); box-shadow: var(--tx-shadow); padding: 1.35rem 1.5rem; }
.tx-card-hover { transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s; }
.tx-card-hover:hover { transform: translateY(-3px); box-shadow: var(--tx-shadow-lg); border-color: var(--tx-accent); }
.tx-soft { background: var(--tx-primary-050); border: 1px solid var(--tx-primary-100); border-radius: var(--tx-radius); }
.tx-accent-soft { background: var(--tx-accent-050); border: 1px solid var(--tx-border); border-radius: var(--tx-radius); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--tx-text); --bs-table-border-color: var(--tx-border); --bs-table-hover-bg: var(--tx-primary-050); color: var(--tx-text); }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-muted); font-weight: 700; background: var(--tx-surface-2); border-bottom-width: 1px; }
.dropdown-menu { background: var(--tx-surface); border-color: var(--tx-border); border-radius: 14px; box-shadow: var(--tx-shadow-lg); }
.dropdown-item { color: var(--tx-text); border-radius: 8px; }
.dropdown-item:hover { background: var(--tx-primary-050); color: var(--tx-primary); }
.modal-content { background: var(--tx-surface); border-radius: var(--tx-radius-lg); border-color: var(--tx-border); }
.alert { border-radius: var(--tx-radius-sm); border: 1px solid var(--tx-border); }
.alert-success { background: var(--tx-success-050); color: var(--tx-success); }
.alert-danger, .alert-error { background: var(--tx-danger-050); color: var(--tx-danger); }
.alert-warning { background: var(--tx-warning-050); color: var(--tx-warning); }
.alert-info { background: var(--tx-info-050); color: var(--tx-info); }
.nav-tabs { border-color: var(--tx-border); }
.nav-tabs .nav-link { color: var(--tx-muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--tx-primary); background: transparent; border-bottom-color: var(--tx-accent); }
.nav-pills .nav-link { color: var(--tx-muted); font-weight: 600; border-radius: 999px; }
.nav-pills .nav-link.active { background: var(--tx-primary); color: #fff; }
[data-theme="dark"] .nav-pills .nav-link.active { color: #140B1A; }
.progress { background: var(--tx-surface-2); border-radius: 999px; height: .55rem; }
.progress-bar { background: var(--tx-grad); }
.badge { font-weight: 600; letter-spacing: .01em; }
.pagination .page-link { color: var(--tx-primary); background: var(--tx-surface); border-color: var(--tx-border); }
.pagination .active .page-link { background: #48235C; border-color: #48235C; color: #fff; }

/* ---- status chips ---- */
.tx-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--tx-border); background: var(--tx-surface); color: var(--tx-text); line-height: 1.2; margin: 0 .3rem .35rem 0; }
.tx-chip.ok { background: var(--tx-success-050); color: var(--tx-success); border-color: transparent; }
.tx-chip.warn { background: var(--tx-warning-050); color: var(--tx-warning); border-color: transparent; }
.tx-chip.bad { background: var(--tx-danger-050); color: var(--tx-danger); border-color: transparent; }
.tx-chip.info { background: var(--tx-info-050); color: var(--tx-info); border-color: transparent; }
.tx-chip.plum { background: var(--tx-primary-050); color: var(--tx-primary); border-color: transparent; }
.tx-chip.camel { background: var(--tx-accent-050); color: var(--tx-accent-600); border-color: transparent; }
.tx-dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---- page header ---- */
.tx-page { padding: 2rem 0 3.5rem; }
.tx-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.tx-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--tx-accent); }
.tx-title { font-family: var(--tx-font-head); font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: .2rem 0 .3rem; color: var(--tx-text); }
.tx-sub { color: var(--tx-muted); margin: 0; max-width: 62ch; }

/* ---- KPI / stat cards (bento) ---- */
.tx-bento { display: grid; gap: 1rem; grid-template-columns: repeat(12, 1fr); }
.tx-span-3 { grid-column: span 3; } .tx-span-4 { grid-column: span 4; } .tx-span-5 { grid-column: span 5; }
.tx-span-6 { grid-column: span 6; } .tx-span-7 { grid-column: span 7; } .tx-span-8 { grid-column: span 8; } .tx-span-12 { grid-column: span 12; }
@media (max-width: 1199px) { .tx-span-3 { grid-column: span 6; } .tx-span-4, .tx-span-5, .tx-span-7, .tx-span-8 { grid-column: span 12; } .tx-span-6 { grid-column: span 12; } }
@media (max-width: 575px) { .tx-span-3 { grid-column: span 12; } }
.tx-kpi { position: relative; overflow: hidden; }
.tx-kpi .tx-kpi-label { color: var(--tx-muted); font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: .45rem; }
.tx-kpi .tx-kpi-value { font-family: var(--tx-font-head); font-size: 2.1rem; font-weight: 800; line-height: 1.05; margin-top: .45rem; color: var(--tx-text); font-variant-numeric: tabular-nums; }
.tx-kpi .tx-kpi-foot { font-size: .8rem; color: var(--tx-muted); margin-top: .35rem; }
.tx-kpi-icon { width: 2.4rem; height: 2.4rem; border-radius: 12px; display: inline-grid; place-items: center; background: var(--tx-primary-050); color: var(--tx-primary); font-size: 1.1rem; }
.tx-kpi-icon.camel { background: var(--tx-accent-050); color: var(--tx-accent-600); }
.tx-kpi-icon.ok { background: var(--tx-success-050); color: var(--tx-success); }
.tx-kpi-icon.bad { background: var(--tx-danger-050); color: var(--tx-danger); }
.tx-chart-box { position: relative; height: 280px; }
.tx-chart-box.sm { height: 200px; } .tx-chart-box.lg { height: 340px; }
.tx-section-title { font-family: var(--tx-font-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .5rem; }
.tx-section-title i { color: var(--tx-accent); }

/* ---- hero ---- */
.tx-hero { position: relative; overflow: hidden; border-radius: var(--tx-radius-lg); background: var(--tx-grad); color: #fff; padding: clamp(1.6rem, 4vw, 3rem); }
.tx-hero h1, .tx-hero h2, .tx-hero h3 { color: #fff; }
.tx-hero .tx-sub { color: rgba(255,255,255,.82); }
.tx-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,194,168,.35), transparent 65%); pointer-events: none; }

/* ---- stepper & timeline ---- */
.tx-stepper { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; }
.tx-step { flex: 1 0 96px; text-align: center; font-size: .74rem; font-weight: 600; color: var(--tx-muted); }
.tx-step .bar { height: 6px; border-radius: 999px; background: var(--tx-surface-2); margin-bottom: .45rem; }
.tx-step.done .bar { background: var(--tx-primary); } .tx-step.done { color: var(--tx-text); }
.tx-step.current .bar { background: var(--tx-accent); } .tx-step.current { color: var(--tx-accent-600); }
.tx-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tx-timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--tx-border); }
.tx-timeline li { position: relative; padding: 0 0 1.1rem 3rem; }
.tx-timeline .tx-tl-icon { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tx-surface); border: 2px solid var(--tx-primary-100); color: var(--tx-primary); }
.tx-timeline .tx-tl-meta { font-size: .78rem; color: var(--tx-muted); }

/* ---- agent stepper (career guidance) ---- */
.tx-agents { display: grid; gap: .75rem; }
.tx-agent { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--tx-border); border-radius: 14px; background: var(--tx-surface); transition: border-color .2s, background .2s; }
.tx-agent .ic { width: 2.4rem; height: 2.4rem; border-radius: 12px; display: grid; place-items: center; background: var(--tx-surface-2); color: var(--tx-muted); flex: none; }
.tx-agent.running { border-color: var(--tx-accent); background: var(--tx-accent-050); }
.tx-agent.running .ic { background: var(--tx-accent); color: #fff; animation: tx-pulse 1.2s ease-in-out infinite; }
.tx-agent.done .ic { background: var(--tx-primary); color: #fff; }
@keyframes tx-pulse { 50% { transform: scale(.92); opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .tx-agent.running .ic { animation: none; } }

/* ---- gap matrix ---- */
.tx-matrix { overflow-x: auto; }
.tx-matrix table { border-collapse: separate; border-spacing: 4px; }
.tx-matrix th.skill { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .75rem; font-weight: 600; color: var(--tx-muted); padding: .3rem 0; white-space: nowrap; }
.tx-matrix td.cell { width: 26px; height: 26px; border-radius: 6px; }
.tx-matrix td.matched { background: var(--tx-success); } .tx-matrix td.under_evidenced { background: #C98A1B; }
.tx-matrix td.missing { background: var(--tx-danger); } .tx-matrix td.na { background: var(--tx-surface-2); }
.tx-matrix td.row-label { font-size: .82rem; font-weight: 600; white-space: nowrap; padding-right: .6rem; }

/* ---- empty states / skeleton ---- */
.tx-empty { text-align: center; padding: 2.5rem 1rem; color: var(--tx-muted); }
.tx-empty i { font-size: 2.2rem; color: var(--tx-accent); display: block; margin-bottom: .6rem; }
.tx-skeleton { background: linear-gradient(90deg, var(--tx-surface-2), var(--tx-surface), var(--tx-surface-2)); background-size: 200% 100%;
  animation: tx-shimmer 1.3s infinite; border-radius: 10px; min-height: 1rem; }
@keyframes tx-shimmer { to { background-position: -200% 0; } }

/* ---- entrance motion ---- */
.tx-rise { animation: tx-rise .45s ease-out both; }
.tx-rise:nth-child(2) { animation-delay: .05s; } .tx-rise:nth-child(3) { animation-delay: .1s; } .tx-rise:nth-child(4) { animation-delay: .15s; }
@keyframes tx-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tx-rise { animation: none; } }

/* ---- navbar / brand ---- */
.app-navbar { background: color-mix(in srgb, var(--tx-surface) 88%, transparent) !important; backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--tx-border) !important; box-shadow: 0 1px 0 rgba(72,35,92,.04); }
.app-navbar .brand-logo { height: 34px !important; width: auto !important; }
.tp-logo-dark { display: none !important; }
[data-theme="dark"] .tp-logo-light { display: none !important; }
[data-theme="dark"] .tp-logo-dark { display: inline-block !important; }
.app-navbar .nav-link, .app-navbar .nc-mega-trigger { color: var(--tx-text) !important; font-weight: 600; }
.app-navbar .nav-link:hover, .app-navbar .nav-link.active { color: var(--tx-primary) !important; }
.tx-nav-ai { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem !important; margin: 0 .2rem; border-radius: 999px;
  background: var(--tx-primary-050); color: var(--tx-primary) !important; font-weight: 700; }
.tx-nav-ai:hover, .tx-nav-ai.active { background: #48235C; color: #fff !important; }
[data-theme="dark"] .tx-nav-ai:hover, [data-theme="dark"] .tx-nav-ai.active { color: #140B1A !important; background: #C9A9E0; }
.tx-nav-ai .bi { color: var(--tx-accent); }
.tx-nav-ai:hover .bi, .tx-nav-ai.active .bi { color: inherit; }

/* ---- auth split screen ---- */
.tx-auth { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 991px) { .tx-auth { grid-template-columns: 1fr; } .tx-auth-brand { display: none !important; } }
.tx-auth-brand { position: relative; overflow: hidden; background: var(--tx-grad); color: #fff; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; }
.tx-auth-brand h2, .tx-auth-brand h3 { color: #fff; }
.tx-auth-brand .tx-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; pointer-events: none; }
.tx-auth-brand .tx-orb.one { width: 360px; height: 360px; right: -120px; top: -100px; background: radial-gradient(circle, #D8C2A8, transparent 65%); }
.tx-auth-brand .tx-orb.two { width: 280px; height: 280px; left: -100px; bottom: -80px; background: radial-gradient(circle, #8C5BA8, transparent 65%); }
.tx-auth-loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; position: relative; z-index: 1; }
.tx-auth-loop div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: .8rem .7rem; font-size: .8rem; }
.tx-auth-loop i { display: block; font-size: 1.2rem; margin-bottom: .3rem; color: #E9D9C6; }
.tx-auth-form { display: flex; align-items: center; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem); }
.tx-auth-card { width: 100%; max-width: 480px; }
.tx-roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.4rem; }
@media (max-width: 480px) { .tx-roles { grid-template-columns: repeat(2, 1fr); } }
.tx-role { border: 1.5px solid var(--tx-border); background: var(--tx-surface); border-radius: 14px; padding: .7rem .4rem; text-align: center; cursor: pointer;
  color: var(--tx-text); text-decoration: none; font-weight: 700; font-size: .82rem; transition: border-color .2s, background .2s, transform .15s; }
.tx-role i { display: block; font-size: 1.25rem; margin-bottom: .25rem; color: var(--tx-accent); }
.tx-role:hover { border-color: var(--tx-accent); transform: translateY(-2px); color: var(--tx-text); }
.tx-role.active { border-color: var(--tx-primary); background: var(--tx-primary-050); color: var(--tx-primary); }
.tx-role.active i { color: var(--tx-primary); }
.tx-wizard-steps { display: flex; gap: .4rem; margin-bottom: 1.3rem; }
.tx-wizard-steps span { flex: 1; height: 6px; border-radius: 999px; background: var(--tx-surface-2); }
.tx-wizard-steps span.on { background: var(--tx-primary); }
.tx-step-pane { display: none; } .tx-step-pane.on { display: block; animation: tx-rise .3s ease-out; }

/* ---- footer ---- */
footer, .site-footer { background: var(--tx-surface) !important; color: var(--tx-muted); border-top: 1px solid var(--tx-border); }

/* ---- utilities ---- */
.tx-gap-sm { gap: .5rem !important; }
.tx-mono { font-variant-numeric: tabular-nums; }
.tx-divider { height: 1px; background: var(--tx-border); margin: 1.2rem 0; }
.tx-link-arrow { font-weight: 600; text-decoration: none; }
.tx-link-arrow::after { content: " →"; transition: margin .15s; }
.tx-link-arrow:hover::after { margin-left: .2rem; }
.tx-avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--tx-primary-050); color: var(--tx-primary); font-weight: 800; flex: none; }
.tx-sticky-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--tx-surface) 92%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--tx-border); padding: .8rem 0; margin-top: 1.5rem; z-index: 5; }
@media (max-width: 575px) { .tx-card { padding: 1.1rem; } .tx-page { padding-top: 1.2rem; } }

/* ---- assistant (Trixie) trigger ---- */
.tx-bot-trigger { background: var(--tx-surface) !important; border: 2px solid var(--tx-accent) !important;
  box-shadow: 0 10px 28px -8px rgba(72,35,92,.55) !important; }
.tx-bot-trigger img { border-radius: 14px; }
.tx-bot-badge-online { background: #2E7D5B !important; }
.tx-chat-header { background: var(--tx-grad) !important; }
.tx-bot-tooltip-hint { background: #1E1426 !important; }

/* ---- mobile nav: legacy rule forced the menu open; keep it collapsed until toggled ---- */
@media (max-width: 991.98px) {
  .app-navbar .navbar-collapse.collapse:not(.show) { display: none !important; }
  .app-navbar .navbar-collapse.collapsing { display: flex !important; }
  .app-navbar .navbar-collapse { background: var(--tx-surface) !important; border-color: var(--tx-border) !important; }
}
