/* static/css/app.css */

/* ---------------------------------
   Clean design system (Arabic-like)
---------------------------------- */
:root {
  --navbar-height: 64px;

  /* The one layout number the navigation owns. Everything else — the content
     column, the toggle's position, the flyout anchor — is derived from it, so
     switching states is a width change and never a re-layout. */
  --nav-width: 230px;
  --nav-width-expanded: 230px;
  --nav-width-collapsed: 68px;
  /* Base surfaces */
  --bg: #F8FAFC;
  --surface: #ffffff;
  --surface-2: #ffffff;


  /* Brand (from logo) */
  --brand-navy: #0B3C6D;
  --brand-blue: #1F6FAF;
  --brand-teal: #4FB6BC;
  --brand-mint: #A8E6C3;

    /* Sidebar (dark) */
  --sidebar-bg: #163B5D;
  --sidebar-bg-2: #1C496F;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: rgba(255, 255, 255, 0.82);
  --sidebar-text-muted: rgba(255, 255, 255, 0.55);
  --sidebar-hover-bg: rgba(168, 230, 195, 0.12);
  --sidebar-active-bg: rgba(168, 230, 195, 0.20);
  --sidebar-active-text: var(--brand-mint);
  --sidebar-group-border: rgba(255, 255, 255, 0.12);

  /* Primary brand alias */
  --brand: var(--brand-navy);
  --accent: var(--brand-teal);

  /* Typography */
  --text: #0B1220;
  --muted: #64748B;

  /* Borders */
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Shadows (keep subtle) */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 0 0 rgba(0, 0, 0, 0);

  /* Radius */
  --radius: 20px;
  --radius-sm: 16px;

  /* Focus ring */
  --focus: 0 0 0 2px rgba(11, 60, 109, 0.16);
  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

}


/* -----------------------------
   Base / Page background
------------------------------ */
html,
body {
  height: 100%;
  overflow-x: hidden;
  font-size: 14px;
}

body {
  color: var(--text);
  background: var(--bg);
}

/* Text rendering */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.title {
  letter-spacing: -0.02em;
}

/* -----------------------------
   Layout shell
------------------------------ */
.app-shell {
  min-height: 100vh;
}

/* Page templates start a second shell after the navbar. Its height must be
   only the remaining viewport, otherwise it adds an empty scroll area. */
.app-navbar + .app-shell {
  min-height: calc(100vh - var(--navbar-height));
}

.app-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Sidebar wrapper */
.app-sidebar {
  width: var(--nav-width);
  flex: none;
  height: calc(100vh - 3.25rem);
  overflow-y: auto;
  position: sticky;
  top: 3.25rem;
  border-right: none;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  border-right: 1px solid var(--sidebar-border);
  /* Hide the scrollbar itself while keeping the element scrollable */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.app-sidebar::-webkit-scrollbar {
  display: none;
}

.app-navbar + .app-shell .app-sidebar {
  height: calc(100vh - var(--navbar-height));
  top: var(--navbar-height);
}

/* Content column background */
.app-content {
  background: transparent;
}

/* -----------------------------
   Cards / Boxes (flat + clean)
------------------------------ */
.app-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: none;
}

.box {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* If you use auth card */
.app-card--auth {
  padding: 3rem 2.5rem !important;
}

/* -----------------------------
   Navbar polish (clean)
------------------------------ */
.navbar.app-navbar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--border);
  min-height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(10px);
}

.navbar .navbar-item strong.app-brand {
  letter-spacing: -0.02em;
}


.navbar.app-navbar .navbar-item.brand-container:hover,
.navbar.app-navbar .navbar-item.brand-container:focus,
.navbar.app-navbar .navbar-item.brand-container:active {
  background: #f8fafc !important;
}

.brand-container {
  width: 230px;
  box-sizing: border-box;
  min-width: 0;
  min-height: var(--navbar-height);
  margin-left: 0;
  padding: 0.5rem 1.2rem !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
}

.brand-logo {
  width: 30px;
  height: 30px !important;
  max-height: 30px;
  object-fit: contain;
  margin-right: 10px;
}

.app-brand-text {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Ensure the navbar background stays consistent */
.navbar.app-navbar {
  padding: 0 !important;
}

.navbar-brand,
.navbar-item {
  display: flex;
  align-items: center;
}

.navbar-menu {
  display: flex;
  align-items: center;
}

.navbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding-right: 1.35rem;
}

.app-logout {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding-inline: 13px;
  border: 1px solid #d8e1ea !important;
  border-radius: 11px;
  background: #f8fafc !important;
  color: #294968 !important;
  box-shadow: none !important;
  font-size: 0.78rem;
  font-weight: 700;
}
.app-logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.app-logout:hover { border-color: var(--brand-navy) !important; background: var(--brand-navy) !important; color: #fff !important; }

/* Mobile navigation uses the same menu as the desktop sidebar in a drawer.
   Without this, every page hides .app-sidebar at <=768px while the hamburger
   only exposes the logout action. */
.app-mobile-nav { display: none; }

/* 960, not Bulma's 768: below this the rail is replaced by the drawer. The
   breakpoint has one other copy, in static/js/nav.js. */
@media (max-width: 960px) {
  .navbar.app-navbar .navbar-menu { display: none !important; }
  .app-mobile-nav {
    display: block;
    position: fixed;
    z-index: 100;
    inset: 0;
  }
  .app-mobile-nav__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 24, 39, 0.46);
    border: 0;
    cursor: default;
  }
  .app-mobile-nav__drawer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(86vw, 22rem);
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
    box-shadow: 0 0 2rem rgba(9, 24, 39, 0.28);
  }
  .app-mobile-nav__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--navbar-height);
    padding: 0.75rem 1rem;
    color: #fff;
    font-weight: 700;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .app-mobile-nav__drawer-head .delete { flex: none; }
  .app-mobile-nav__drawer .app-menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 1.25rem;
  }
  .app-mobile-nav__footer {
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--sidebar-border);
  }
  .app-mobile-nav__footer .app-logout {
    width: 100%;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.28) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
  }
}

/* -----------------------------
   Sidebar menu
------------------------------ */
.menu.app-menu {
  padding: 1rem 0.75rem;
}

.menu.app-menu .menu-label {
  color: rgba(15, 23, 42, 0.55);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* The sprite is a definitions carrier, never rendered itself. */
.app-nav-sprite {
  display: none;
}

/* Icon + label on one row. The label is allowed to wrap onto a second line:
   several names ("Individual Development Plan (IDP)", "Responsive Interview
   (Standard)") are simply longer than a 16.66vw column, and truncating them
   with an ellipsis would make neighbouring items indistinguishable. */
.menu.app-menu .menu-list a {
  display: flex;
  /* flex-start, not center: when a long label wraps to two lines the icon must
     stay level with the first line rather than drifting to the block's middle. */
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--sidebar-text);
  background: transparent;
  transition: background .12s ease, color .12s ease;
  position: relative;
}

.app-nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
  /* Stroke geometry set here, once, instead of on all 20 <symbol> elements. */
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: opacity .12s ease;
  /* Optical nudge so the 18px box sits on the text baseline grid. */
  margin-top: 1px;
}

.app-sidebar-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 0.7rem 0.85rem;
  margin: 0 0 0.75rem;
}
.app-sidebar-identity--divided {
  border-bottom: 1px solid var(--sidebar-border);
}
.app-sidebar-identity__avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--sidebar-bg);
  background: var(--brand-mint);
}
.app-sidebar-identity__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.app-sidebar-identity__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-sidebar-identity__email {
  font-size: 0.72rem;
  color: var(--sidebar-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-sidebar-identity__badge {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-mint);
  margin-bottom: 3px;
}
.menu.app-menu .menu-list li.app-nav-admin-item {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--sidebar-border);
}
.menu.app-menu .menu-list a.app-nav-admin-link {
  border: 1px solid rgba(168, 230, 195, 0.30);
  background: rgba(168, 230, 195, 0.07);
  font-weight: 700;
}
.menu.app-menu .menu-list a.app-nav-admin-link:hover {
  background: var(--sidebar-hover-bg);
  border-color: rgba(79, 182, 188, 0.4);
}
.menu.app-menu .menu-list a.app-nav-admin-link.is-active {
  background: var(--sidebar-active-bg);
  border-color: rgba(168, 230, 195, 0.5);
}

.menu.app-menu .menu-list a:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-active-text);
}
.menu.app-menu .menu-list a:hover .app-nav-icon {
  opacity: 1;
}

.menu.app-menu .menu-list a.is-active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
}
.menu.app-menu .menu-list a.is-active .app-nav-icon {
  opacity: 1;
}


/* -----------------------------
   Sidebar nav groups (parent tab + indented children)
   Lives here, not in a feature stylesheet: the sidebar renders on EVERY page,
   so styling it from e.g. kabi_events.css leaves the group unstyled anywhere
   that stylesheet is not loaded.
------------------------------ */

/* The group header is a TAB, not a caption. It carries the same weight as its
   clickable siblings — an earlier cut styled it like Bulma's .menu-label, which
   made the parent smaller and fainter than its own children. */
.menu.app-menu .menu-list .app-nav-group-label {
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sidebar-text);
  /* Not a link: no hover, no pointer, and not selectable as stray text. */
  cursor: default;
  user-select: none;
}

/* Indent so the children's icons line up under the parent's LABEL, not under
   its icon — that is what makes the nesting read at a glance. */
.menu.app-menu .menu-list ul.app-nav-sub {
  margin: 0.1rem 0 0.3rem 1.45rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--sidebar-group-border);
}

/* Children sit lighter than the parent; the contrast carries the hierarchy. */
.menu.app-menu .menu-list ul.app-nav-sub a {
  padding: 0.45rem 0.6rem;
  font-size: 0.86rem;
  color: var(--sidebar-text-muted);
}
.menu.app-menu .menu-list ul.app-nav-sub .app-nav-icon {
  width: 16px;
  height: 16px;
}

.menu.app-menu .menu-list ul.app-nav-sub a:hover {
  color: var(--sidebar-active-text);
}

/* Needed explicitly: the muted child rule above carries one more element in its
   selector than the generic `.menu-list a.is-active`, so it wins on specificity
   and the current child would keep the grey text under its highlight pill. */
.menu.app-menu .menu-list ul.app-nav-sub a.is-active {
  color: var(--sidebar-active-text);
  font-weight: 700;
}

/* Tint the parent when you are inside it, so the open section is obvious even
   though the label itself is never a link. Progressive: browsers without :has()
   just lose the tint, and the child still highlights normally. */
.menu.app-menu .menu-list .app-nav-group:has(a.is-active) .app-nav-group-label {
  color: var(--sidebar-active-text);
}
.menu.app-menu .menu-list .app-nav-group:has(a.is-active) .app-nav-group-label .app-nav-icon {
  opacity: 1;
}


/* Divider inside sidebar */
.navbar-divider {
  background: transparent;
  border-top: 1px solid var(--border);
}

/* -----------------------------
   Buttons (replace heavy black)
------------------------------ */
.button {
  border-radius: 14px;
}

/* Keep your existing HTML class "is-black" but make it brand + clean */
.button.is-black {
  background: var(--brand) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.button.is-black:hover {
  filter: brightness(1.03);
  transform: none;
  box-shadow: none !important;
}

.button.is-black:focus,
.button.is-black:focus-visible {
  box-shadow: var(--focus) !important;
}

/* Secondary actions stay quiet, so the primary navy action remains clear. */
.button.is-light {
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #475569 !important;
  box-shadow: none !important;
}

.button.is-light:hover {
  background: #EAF1F6 !important;
  border-color: #CBD5E1 !important;
}

/* Make danger button a bit cleaner too */
.button.is-danger {
  box-shadow: none !important;
  border-radius: 14px;
}

/* -----------------------------
   Inputs (smooth + consistent)
------------------------------ */
.input,
.select select,
.textarea {
  font-size: 1rem;
  border-radius: 12px;
  border-color: var(--border);
  box-shadow: none;
  min-height: 44px;
  padding-inline: 14px;
}

.input.is-medium {
  min-height: 46px;
  font-size: 1rem;
}

.input:focus,
.input:focus-visible,
.select select:focus,
.textarea:focus {
  box-shadow: var(--focus) !important;
  border-color: rgba(106, 182, 158, 0.55) !important;
}

/* -----------------------------
   Tabs (clean pills)
   Use: <div class="tabs app-tabs">
------------------------------ */
.tabs.app-tabs ul {
  border-bottom: 1px solid var(--border);
}

.tabs.app-tabs a {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 10px 14px;
  color: rgba(15, 23, 42, 0.72);
}

.tabs.app-tabs li.is-active a {
  background: rgba(106, 182, 158, 0.16);
  color: var(--brand);
  font-weight: 700;
}

/* -----------------------------
   Hero typography
------------------------------ */
.app-hero__title {
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.app-hero__subtitle {
  color: var(--muted);
}

/* -----------------------------
   Footer
------------------------------ */
.footer.app-footer {
  font-size: 13px;
  line-height: 1.4;
}


/* Helper */
.hover-link:hover {
  color: var(--text) !important;
  text-decoration: underline;
}

/* ---------------------------------
   Landing Home (marketing-like hero)
---------------------------------- */

landing {
  padding-top: 1rem;
  padding-bottom: 3.25rem;
}

.landing-container {
  max-width: 1120px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: rgba(15, 23, 42, 0.72);
  font-weight: 600;
  font-size: 12px;
}

.landing-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(106, 182, 158, 0.14);
}

.landing-title {
  margin-top: 30px;
  font-size: 45px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #0b1220;
  font-family: var(--font-sans);
  font-weight: 700;
}

.landing-subtitle {
  margin-top: 14px;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.62);
}

.landing-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-secondary {
  background: #ffffff !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--brand) !important;
  box-shadow: none !important;
  border-radius: 14px !important;
}

.landing-secondary:hover {
  background: rgba(106, 182, 158, 0.10) !important;
}

.landing-meta {
  margin-top: 22px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.landing-meta__item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.70);
}

.landing-meta__label {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.60);
  margin-bottom: 4px;
}

.landing-meta__value {
  font-weight: 700;
  color: rgba(15, 23, 42, 0.90);
  font-size: 13px;
}

.landing-logos {
  margin-top: 22px;
}

.landing-logos__hint {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.52);
}

/* Right preview panel */
.landing-preview {
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(900px 420px at 10% 10%, rgba(106, 182, 158, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 10%, rgba(41, 82, 106, 0.14), transparent 55%),
    #ffffff;
  padding: 18px;
}

.landing-preview__top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.landing-pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(41, 82, 106, 0.14);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(15, 23, 42, 0.70);
  font-weight: 600;
  font-size: 12px;
}

.landing-preview__panel {
  border-radius: 22px;
  border: 1px solid rgba(41, 82, 106, 0.12);
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.lp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.lp-card {
  border-radius: 18px;
  border: 1px solid rgba(41, 82, 106, 0.12);
  background: #fff;
  padding: 14px;
}

.lp-card--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-card--footer {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.lp-title {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.88);
}

.lp-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  margin-top: 8px;
}

.lp-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.lp-dot--ok {
  background: #16a34a;
}

.lp-dot--soon {
  background: #f59e0b;
}

.lp-mini__label {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  margin-bottom: 4px;
}

.lp-mini__value {
  font-size: 13px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.88);
}

/* Responsive */
@media (max-width: 1024px) {
  .landing-title {
    font-size: 35px;
  }
}

/* ---------------------------------
   Home hero â€“ BIG logo panel
---------------------------------- */

.landing-media--logo {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 36px;
  border: 1px solid var(--border);
  background:
    radial-gradient(520px 300px at 50% 35%, rgba(47, 184, 172, 0.22), transparent 50%),
    radial-gradient(680px 360px at 50% 65%, rgba(31, 111, 175, 0.18), transparent 55%),
    #ffffff;
}


.aihub-plain {
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* AI Hub text */
.aihub__text--big {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--brand-navy);
}

.hero-copy {
  margin-top: 25px;
  transform: translateX(50px);
}

/* ---------------------------------
   Home hero — intentionally minimal
---------------------------------- */
.landing {
  display: flex;
  min-height: calc(100vh - var(--navbar-height));
  box-sizing: border-box;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
  background:
    radial-gradient(620px 460px at 76% 47%, rgba(168, 230, 195, 0.10), transparent 68%),
    radial-gradient(520px 360px at 25% 56%, rgba(31, 111, 175, 0.035), transparent 70%);
}

.landing-container { max-width: 1040px; }

.landing-hero--simple {
  margin: 0 !important;
  min-height: 410px;
}

.landing-hero__copy { padding-left: 1rem !important; }

.landing-title {
  margin-top: 0;
  max-width: 17ch;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.05;
  color: #102a43;
}

.landing-subtitle {
  max-width: 47ch;
  color: #64748b;
}

.landing-visual {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(232, 248, 240, 0.68), rgba(238, 246, 252, 0.68));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}
.landing-visual__image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; mix-blend-mode: multiply; }


/* --------------------------------------------------------------------------
   PORTRAIT TV — authenticated dashboard
   --------------------------------------------------------------------------
   A 55-inch 4K panel mounted vertically has ample pixels but not a desktop
   viewing distance.  The regular application shell otherwise renders at its
   laptop scale, leaving the navigation and primary content too small to read
   from the booth.  These rules are deliberately limited to the authenticated
   shell (the presence of the sidebar) so public reports and the dedicated
   Kabi Events full-screen interview keep their own responsive treatments.

   The root-size increase lets existing rem-based feature pages scale together;
   the remaining declarations cover the shared chrome and the home page's
   pixel-based hero styles.
   -------------------------------------------------------------------------- */
@media (orientation: portrait) {
  html.tv-portrait:has(.app-sidebar) {
    font-size: 32px;
  }

  html.tv-portrait body:has(.app-sidebar) {
    font-size: 1rem;
  }

  html.tv-portrait body:has(.app-sidebar) .app-navbar {
    min-height: 6.5rem;
  }

  html.tv-portrait body:has(.app-sidebar) .brand-container {
    width: 16.6667vw;
    padding-inline: 1.25rem !important;
  }

  html.tv-portrait body:has(.app-sidebar) .brand-logo {
    width: 4.5rem;
    height: 4.5rem !important;
    max-height: none;
    margin-right: 0.6rem;
  }

  html.tv-portrait body:has(.app-sidebar) .app-brand-text {
    font-size: 1rem;
  }

  html.tv-portrait body:has(.app-sidebar) .navbar-end {
    padding-right: 1.5rem;
  }

  html.tv-portrait body:has(.app-sidebar) .navbar .button.is-small {
    min-height: 2.9rem;
    padding-inline: 1.25rem;
    font-size: 0.8rem;
  }

  html.tv-portrait body:has(.app-sidebar) .app-sidebar {
    min-height: calc(100vh - 6.5rem);
    overflow-y: auto;
    top: 6.5rem;
    border-right: 1px solid var(--border);
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu {
    padding: 1.2rem 0.7rem;
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list a,
  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list .app-nav-group-label {
    gap: 0.55rem;
    padding: 0.6rem 0.55rem;
    font-size: 0.7rem;
    line-height: 1.4;
    border-radius: 0.6rem;
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list ul.app-nav-sub a {
    padding: 0.48rem 0.5rem;
    font-size: 0.62rem;
  }

  html.tv-portrait body:has(.app-sidebar) .app-nav-icon {
    width: 0.8rem;
    height: 0.8rem;
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list ul.app-nav-sub .app-nav-icon {
    width: 0.68rem;
    height: 0.68rem;
  }

  html.tv-portrait body:has(.app-sidebar) .app-section {
    padding: 3rem 2.25rem;
  }

  html.tv-portrait body:has(.app-sidebar) .container {
    max-width: min(100%, 52rem) !important;
  }

  html.tv-portrait body:has(.app-sidebar) .input,
  html.tv-portrait body:has(.app-sidebar) .select select,
  html.tv-portrait body:has(.app-sidebar) .textarea {
    min-height: 2.8rem;
    font-size: 0.72rem;
  }

  html.tv-portrait body:has(.app-sidebar) .button {
    min-height: 2.6rem;
    font-size: 0.72rem;
  }

  /* The home page becomes a deliberate portrait composition instead of a
     laptop-width two-column hero stranded across the top of the TV. */
  html.tv-portrait body:has(.app-sidebar) .landing {
    min-height: calc(100vh - 6.5rem);
    display: flex;
    align-items: center;
    padding-block: 3rem;
  }

  html.tv-portrait body:has(.app-sidebar) .landing-container {
    max-width: 52rem !important;
    width: 100%;
  }

  html.tv-portrait body:has(.app-sidebar) .landing-container > .columns {
    align-items: center;
    flex-direction: column;
    gap: 3rem;
  }

  html.tv-portrait body:has(.app-sidebar) .landing-container > .columns > .column {
    width: 100%;
    flex: none;
  }

  html.tv-portrait body:has(.app-sidebar) .hero-copy {
    margin-top: 0;
    transform: none;
    padding-inline: 0;
    text-align: center;
  }

  html.tv-portrait body:has(.app-sidebar) .landing-title {
    margin-top: 0;
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1.02;
  }

  html.tv-portrait body:has(.app-sidebar) .landing-subtitle {
    margin: 1.25rem auto 0;
    max-width: 34ch;
    font-size: 0.92rem;
    line-height: 1.65;
  }

  html.tv-portrait body:has(.app-sidebar) .aihub-plain {
    width: 100%;
  }

  html.tv-portrait body:has(.app-sidebar) .aihub__logo--big {
    display: block;
    width: min(100%, 42rem);
    height: auto;
  }
}


@media (max-width: 1024px) {
  .landing-media--logo {
    min-height: 600px;
  }

  .aihub__logo--big {
    width: 190px;
  }

  .aihub__text--big {
    font-size: 34px;
  }

}

@media (max-width: 768px) {
  .brand-container { width: auto; min-width: auto; margin-left: 0; padding-inline: 0.85rem !important; }
  .landing { min-height: auto; padding: 1rem 0.75rem 2rem; }
  .landing-hero__copy { padding-left: 0 !important; }
  .landing-visual { min-height: 220px; margin-top: 0.5rem; }
}

/* The home hero is designed to fit one desktop viewport. Avoid a redundant
   page scrollbar while preserving normal scrolling on smaller screens. */
@media (min-width: 769px) {
  .home-shell {
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
  }
}

/* 55-inch vertical demo display (2160 × 3840).
   This deliberately changes typography only: it keeps every feature's layout
   intact while making controls and labels readable at presentation distance. */
@media (min-width: 2100px) and (max-width: 2200px) and (min-height: 3700px) {
  html, body { font-size: 32px; }

  .app-sidebar.column.is-2 { flex: none; width: 28vw; }
  .brand-container { width: 28vw; }

  .menu.app-menu { padding: 1.5rem 1.2rem; }
  .app-sidebar-identity { padding: 1.25rem 1.05rem 1.15rem; }
  .app-sidebar-identity__avatar { width: 60px; height: 60px; font-size: 1rem; }
  .app-sidebar-identity__badge { font-size: 0.66rem; }
  .app-sidebar-identity__name { font-size: 0.86rem; }
  .app-sidebar-identity__email { font-size: 0.76rem; }
  .menu.app-menu .menu-list a {
    gap: 0.9rem;
    padding: 0.8rem 0.9rem;
    font-size: 1.22rem;
    line-height: 1.35;
  }
  .app-nav-icon { width: 30px; height: 30px; }
  .menu.app-menu .menu-list ul.app-nav-sub a { font-size: 1rem; }

  .button, .input, .select select, .textarea { font-size: 1rem; }
  .label { font-size: 0.9rem; }
  .help { font-size: 0.78rem; }

  /* Shared service content: most tools are built from these primitives. */
  .app-content { font-size: 1.1rem; }
  .app-content h1, .app-content .title.is-1, .app-content .title.is-2 {
    font-size: 2rem !important;
    line-height: 1.15;
  }
  .app-content h2, .app-content .title.is-3, .app-content .title.is-4 {
    font-size: 1.45rem !important;
    line-height: 1.25;
  }
  .app-content .button {
    min-height: 2.5rem;
    padding-inline: 1rem;
    font-size: 0.95rem !important;
  }
  .app-content .input, .app-content .select select, .app-content .textarea {
    min-height: 2.5rem;
    padding-inline: 0.9rem;
    font-size: 1rem !important;
  }
  .app-content .label { font-size: 0.9rem !important; }
  .app-content .help { font-size: 0.78rem !important; }
  .app-content .table th { font-size: 0.78rem; }
  .app-content .table td { font-size: 0.9rem; }
}

/* ---------------------------------
   User Management â€“ NEW list UI + forms
   (Replace old segmented/search-result styles)
---------------------------------- */

.user-mgmt__container {
  max-width: 980px;
}

.user-mgmt__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.user-mgmt__title {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
}

.user-mgmt__subtitle {
  margin-top: 6px;
  color: var(--muted);
}

/* Header right actions (Add user button) */
.user-mgmt__header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ---------------------------------
   List filters row
---------------------------------- */

.user-mgmt-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
}

.user-mgmt-filters__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-mgmt-filters__search .input {
  min-height: 36px;
  /* â†“ from 44px */
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 12px;
}

/* Dropdowns */
.user-mgmt-filters__select select {
  min-height: 36px;
  height: 36px;
  padding: 0 36px 0 12px;
  /* space for arrow */
  font-size: 13px;
  border-radius: 12px;
}

/* Clear button */
.user-mgmt-filters__clear {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 12px;
}

/* Icon alignment inside search */
.user-mgmt-filters__search .icon {
  height: 36px;
}


.user-mgmt-filters__count {
  color: var(--muted);
  font-weight: 700;
}

/* ---------------------------------
   List table (modern clean)
---------------------------------- */

.user-mgmt-table {
  border: 1px solid rgba(11, 60, 109, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.user-mgmt-table__head,
.user-mgmt-table__row {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr 0.9fr 0.9fr 0.6fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
}

.user-mgmt-table__head {
  font-size: 10px;
  font-weight: 750;
  color: var(--muted);
  background: rgba(11, 60, 109, 0.03);
  border-bottom: 1px solid rgba(11, 60, 109, 0.08);
}

.user-mgmt-table__row+.user-mgmt-table__row {
  border-top: 1px solid rgba(11, 60, 109, 0.08);
}

.user-mgmt-table__row:hover {
  background: rgba(106, 182, 158, 0.06);
}

.user-mgmt-table__primary {
  font-weight: 750;
}

.user-mgmt-table__muted {
  color: var(--muted);
  font-size: 13px;
}

.user-mgmt-table__actions {
  display: flex;
  justify-content: flex-end;
}

.user-mgmt-editbtn {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
}

.user-mgmt-editbtn:hover {
  background: rgba(106, 182, 158, 0.10);
}

.user-mgmt-table__empty {
  padding: 16px 14px;
  color: var(--muted);
}

/* Role pill */
.user-mgmt-pill {
  font-size: 12px;
  font-weight: 750;
}

.user-mgmt-pill.is-super {
  color: #2C5282;
}

.user-mgmt-pill.is-regular {
  color: #2B8C8D;
}

/* Status badge */
.user-mgmt-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
}

.user-mgmt-status.is-on {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.10);
}

.user-mgmt-status.is-off {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
}

/* ---------------------------------
   Pagination (matches screenshot)
---------------------------------- */

.user-mgmt-pager {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.pager-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 10px;
  color: rgba(15, 23, 42, 0.75);
  cursor: pointer;
}

.pager-btn:hover {
  background: rgba(106, 182, 158, 0.08);
}

.pager-btn.is-active {
  background: var(--brand-navy);
  color: #fff;
  border-color: rgba(15, 23, 42, 0.92);
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-ellipsis {
  width: 30px;
  text-align: center;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 800;
}

/* ---------------------------------
   Form mode header (Back bar)
---------------------------------- */

.user-mgmt-backbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-mgmt-backbar__title {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.85);
}

.user-mgmt__form {
  margin-top: 18px;
}

/*Date valid until*/
.date-valid {
  color: #16a34a;
  /* Green-600 */
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


.date-expired {
  color: #dc2626;
  /* Red-600 */
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* ---------------------------------
   Keep your compact form spacing (unchanged intent)
---------------------------------- */

/* Reduce space between fields */
.user-mgmt-form .field {
  margin-bottom: 0.5rem;
}

.user-mgmt-form .label {
  margin-bottom: 0px;
  font-size: 13px;
}

.user-mgmt-form .input,
.user-mgmt-form .select select {
  min-height: 25px;
  padding-top: 2px;
  padding-bottom: 4px;
}

/* Reduce vertical gap between column rows */
.user-mgmt-form .column {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Compact sections (Access / Features) */
.user-mgmt__section {
  padding: 0px;
  border: none;
  background: transparent;
}

/* Section header spacing */
.user-mgmt__section-head {
  margin-bottom: 6px;
}

.user-mgmt__features {
  margin-top: 4px;
  gap: 4px 8px;
}

/* Flags row (Active / Superuser) */
.user-mgmt__flags {
  margin-top: 2px;
}

/* Action buttons spacing */
.user-mgmt__actions {
  margin-top: 8px;
}

.user-mgmt-form .help {
  margin-top: 4px;
  font-size: 12px;
}

/* Divider */
.user-mgmt__divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0 1rem 0;
  display: block;
}

/* Radio Button Group */
.user-mgmt__radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-right: 24px;
  font-size: 14px;
}

.user-mgmt__radio input[type="radio"] {
  accent-color: var(--brand);
  transform: scale(1.1);
  margin: 0;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 16px;
  margin-top: 6px;
}

.features-grid .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 0;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------
   Responsive: list columns reduce on mobile
---------------------------------- */
@media (max-width: 768px) {
  .user-mgmt__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-mgmt-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .user-mgmt-filters__search {
    width: 100%;
    padding: 0;
  }

  .user-mgmt-table__head,
  .user-mgmt-table__row {
    grid-template-columns: 1.6fr 0.8fr 0.8fr;
  }

  /* Hide Valid Until + Edit on small screens */
  .user-mgmt-table__head> :nth-child(4),
  .user-mgmt-table__head> :nth-child(5),
  .user-mgmt-table__row> :nth-child(4),
  .user-mgmt-table__row> :nth-child(5) {
    display: none;
  }
}


/* On very small screens, let it stack or shrink if needed */
@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
    /* Stack vertically on mobile */
  }
}

/* ---------------------------------
   CV Parser â€“ clean + borderless
---------------------------------- */

.cvp__container {
  max-width: 1100px;
}

.cvp__header {
  margin-bottom: 14px;
}

.cvp__title {
  font-size: 24px;
  font-weight: 700;
  /* not too bold */
  letter-spacing: -0.02em;
  margin: 0;
}

.cvp__subtitle {
  margin-top: 6px;
  color: var(--muted);
}

/* top controls row */
.cvp__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cvp__primary {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
}

/* language radios (pill style) */
.cvp__lang {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cvp__lang-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 4px;
}

.cvp-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0px;
  background: rgba(255, 255, 255, 0.70);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.78);
}

.cvp-radio input {
  accent-color: var(--brand);
  margin: 0;
}

/* Upload surface (single clean element) */
.cvp-drop {
  border: 1px dashed rgba(11, 60, 109, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.70);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.cvp-drop.is-drag {
  background: rgba(106, 182, 158, 0.10);
  border-color: rgba(106, 182, 158, 0.35);
}

.cvp-drop__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cvp-drop__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(11, 60, 109, 0.12);
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cvp-drop__title {
  font-weight: 600;
  /* not heavy */
  color: rgba(15, 23, 42, 0.86);
}

.cvp-drop__hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.cvp-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cvp-drop__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cvp-file__name {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.86);
}

.cvp-file__meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.cvp-error {
  margin-top: 12px;
}

/* Result area â€“ no boxes, just clean spacing */
.cvp-result {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cvp-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cvp-summary__item {
  padding: 10px 0;
}

.cvp-summary__label {
  font-size: 12px;
  color: var(--muted);
}

.cvp-summary__value {
  margin-top: 4px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.88);
  word-break: break-word;
  font-weight: 500;
}

.cvp-divider {
  height: 1px;
  background: rgba(11, 60, 109, 0.10);
  margin: 14px 0;
}

/* Sections: subtle details/summary, no heavy borders */
.cvp-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cvp-sec {
  border: 1px solid rgba(11, 60, 109, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.cvp-sec__sum {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid rgba(11, 60, 109, 0.06);
  border-left: 5px solid var(--brand-teal);
}

.cvp-sec__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy);
  letter-spacing: -0.01em;
}

.cvp-sec__meta {
  font-size: 12px;
  color: var(--muted);
}


.cvp-kv {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cvp-kv__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
}

.cvp-kv__k {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cvp-kv__v {
  color: rgba(15, 23, 42, 0.85);
  font-weight: 400;
  word-break: break-word;
}

.cvp-list {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cvp-item {
  border: 1px solid rgba(11, 60, 109, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.80);
  overflow: hidden;
}

.cvp-item__title {
  padding: 10px 12px;
  font-weight: 600;
  background: rgba(106, 182, 158, 0.08);
}

.cvp-item__body {
  padding: 10px 12px;
}

.cvp-text {
  padding: 12px 14px;
  color: rgba(15, 23, 42, 0.85);
  white-space: pre-wrap;
}

.cvp-textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(79, 182, 188, 0.15);
}


/* Responsive */
@media (max-width: 1024px) {
  .cvp-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cvp__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .cvp-summary {
    grid-template-columns: 1fr;
  }

  .cvp-kv__row {
    grid-template-columns: 1fr;
  }
}


/* Dropzone */
.cvp-drop {
  position: relative;
  border: 1px dashed rgba(11, 60, 109, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cvp-drop.is-drag {
  background: rgba(106, 182, 158, 0.10);
  border-color: rgba(106, 182, 158, 0.35);
}

.cvp-drop__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(11, 60, 109, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
}

.cvp-drop__title {
  font-weight: 800;
}

.cvp-drop__hint {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.60);
  margin-top: 2px;
}

.cvp-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Selected file row */
.cvp-file {
  margin-top: 10px;
  border: 1px solid rgba(11, 60, 109, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cvp-file__name {
  font-weight: 800;
}

.cvp-file__meta {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.60);
  margin-top: 2px;
}

/* Right side */
.cvp-empty {
  padding: 18px 12px;
  color: rgba(15, 23, 42, 0.62);
}

/* Summary cards */
.cvp-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.cvp-mini {
  border: 1px solid rgba(11, 60, 109, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 12px;
}

.cvp-mini__label {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  margin-bottom: 4px;
}

.cvp-mini__value {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.90);
  font-size: 13px;
  word-break: break-word;
}

/* Sections */
.cvp-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.cvp-sec {
  border: 1px solid rgba(11, 60, 109, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.cvp-sec__sum {
  padding: 12px 14px;
  cursor: default;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.85);
  background: rgba(11, 60, 109, 0.03);
}

.cvp-sec__meta {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 700;
}

.cvp-kv {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cvp-kv__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: baseline;
}

.cvp-kv__k {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 800;
}

.cvp-kv__v {
  color: rgba(15, 23, 42, 0.85);
  word-break: break-word;
}

/* List cards */
.cvp-list {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cvp-item {
  border: 1px solid rgba(11, 60, 109, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.80);
  overflow: hidden;
}

.cvp-item__title {
  padding: 10px 12px;
  font-weight: 800;
  background: rgba(106, 182, 158, 0.08);
}

.cvp-item__body {
  padding: 10px 12px;
}

.cvp-text {
  padding: 12px 14px;
  color: rgba(15, 23, 42, 0.85);
  white-space: pre-wrap;
}

.cvp-badges {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cvp-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 60, 109, 0.12);
  background: rgba(106, 182, 158, 0.10);
  color: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.cvp-bullets {
  margin: 10px 0 0 0;
  padding-left: 18px;
  color: rgba(15, 23, 42, 0.82);
}

.cvp-bullets li {
  margin: 6px 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .cvp-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cvp-cards {
    grid-template-columns: 1fr;
  }

  .cvp-kv__row {
    grid-template-columns: 1fr;
  }
}


/* ---------------------------------
   Realtime Interview
---------------------------------- */

.iv-card {
  background: var(--surface);
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 520px;
  margin: 0 auto;
}

.iv-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 42ch;
  margin: 0 auto;
}

.iv-hint {
  font-size: 13px;
  color: var(--brand-teal);
  font-weight: 600;
}

/* Welcome step – icon circle */
.iv-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, rgba(79, 182, 188, 0.22), rgba(79, 182, 188, 0.06) 70%);
  border: 1px solid rgba(79, 182, 188, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--brand-teal);
}

/* Welcome step – form card */
.iv-welcome-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.75rem 1.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Each labeled dropdown row */
.iv-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.iv-form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(15, 23, 42, 0.55);
  text-transform: uppercase;
}

/* Hint / warning text */
.iv-form-hint {
  font-size: 12px;
  color: var(--brand-teal);
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(79, 182, 188, 0.08);
  border: 1px solid rgba(79, 182, 188, 0.18);
}


/* Icon circle */
.iv-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(79, 182, 188, 0.10);
  color: var(--brand-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.iv-icon-circle--success {
  background: rgba(22, 163, 74, 0.10);
  color: #16a34a;
}

/* Spinner */
.iv-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-teal);
  border-radius: 50%;
  animation: iv-spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* Mic test */
.iv-mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.iv-mic-btn:hover:not(:disabled) {
  border-color: var(--brand-teal);
}

.iv-mic-btn.is-testing {
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}

.iv-mic-btn.is-passed {
  border-color: #16a34a;
  color: #16a34a;
  cursor: default;
}

.iv-mic-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.iv-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-teal);
  animation: iv-pulse 1s infinite;
}

@keyframes iv-pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.35
  }
}

/* Camera preview */
.iv-video-box {
  width: 100%;
  height: 280px;
  background: #0a0a0a;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  transform: scaleX(-1);
}

.iv-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iv-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  transform: scaleX(-1);
}

.iv-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-teal);
  box-shadow: 0 0 8px var(--brand-teal);
  animation: iv-scan 2s infinite linear;
  opacity: 0.7;
}

@keyframes iv-scan {
  0% {
    top: 0
  }

  50% {
    top: 100%
  }

  100% {
    top: 0
  }
}

.iv-success-msg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.20);
  color: #16a34a;
  font-weight: 600;
  font-size: 13px;
}



/* Interview layout: call fixed at top, question/transcript below */
.iv-interview-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.iv-call-wrapper {
  flex-shrink: 0;
  width: 100%;
}

.iv-below-panel {
  margin-top: 12px;
  flex-shrink: 0;
  margin-top: 1rem;
  min-height: 0;
}

/* Call view */
.iv-call {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.iv-call video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.iv-centered-content {
  max-width: 800px;
  /* Must match the .iv-call max-width */
  margin: 0 auto;
}

/* Avatar PiP enlarged */
.iv-avatar-pip {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 220px;
  height: 220px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  background: #fff;
  overflow: hidden;
  z-index: 20;
}

.iv-avatar-pip img,
.iv-avatar-pip canvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #fffefe;
  box-sizing: border-box;
}

/* Status badge */
.iv-status-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 10;
}

.iv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.iv-status-badge.is-listening .iv-dot {
  background: #3b82f6;
  animation: iv-pulse 1s infinite;
}

/* Timer inline within status badge */
.iv-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.iv-timer-text {
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}

/* Topic pill bottom-left overlay inside the call view */
.iv-topic-pill {
  position: absolute;
  bottom: 90px;
  left: 16px;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.88);
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  z-index: 10;
}

/* â”€â”€ Call toolbar â”€â”€ */
.iv-call-toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  z-index: 30;
}

/* Mic toggle button */
.iv-mic-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iv-mic-toggle:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.30);
}

/* Voice detected green glow */
.iv-mic-toggle.is-active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.22);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: iv-mic-pulse 1.2s ease infinite;
}

/* Muted red */
.iv-mic-toggle.is-muted {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.30);
  color: #fca5a5;
}

.iv-mic-toggle.is-muted:hover {
  background: rgba(239, 68, 68, 0.40);
}

@keyframes iv-mic-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.08);
  }
}

/* End call button */
.iv-end-call {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.iv-end-call:hover {
  background: #dc2626;
  transform: scale(1.06);
}

.iv-end-call:active {
  transform: scale(0.97);
}

/* Question banner shown during user's answer, fixed height so long text scrolls */
.iv-question-banner {
  background: rgba(59, 130, 246, 0.06);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.iv-question-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 750;
  color: #3b82f6;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.iv-question-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.5;
  max-height: 4.5em;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Transcript bar */
.iv-transcript {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.iv-transcript-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--brand-teal);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.iv-transcript-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--brand-navy);
  line-height: 1.5;
}

/* Responsive: shrink avatar on smaller screens */
@media (max-width: 768px) {
  .iv-avatar-pip {
    width: 150px;
    height: 150px;
    border-radius: 14px;
  }

  .iv-mic-toggle,
  .iv-end-call {
    width: 46px;
    height: 46px;
  }

  .iv-call-toolbar {
    gap: 14px;
    padding: 8px 18px;
  }
}


/* ==================================================================
   Technical Profile — Complete Styles
   ================================================================== */

.tp__container {
  max-width: 1200px;
}

/* Page Header */
.tp__hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.tp__hero-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(11, 60, 109, 0.22);
}

.tp__page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin: 0;
}

.tp__page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
  max-width: 55ch;
}

/* Input Panel */
.tp-panel {
  margin-bottom: 20px;
}

/* Controls Row */
.tp__controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tp__lang-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp__lang-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tp__lang-pills {
  display: flex;
  gap: 4px;
}

/* Pill Toggles */
.tp-pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
  background: rgba(11, 60, 109, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.tp-pill:hover {
  color: var(--brand-navy);
  background: rgba(11, 60, 109, 0.08);
}

.tp-pill.is-active {
  color: #fff;
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  box-shadow: 0 2px 8px rgba(11, 60, 109, 0.18);
}

/* Generate Button */
.tp-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  margin-left: auto;
}

.tp-generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(11, 60, 109, 0.25);
}

.tp-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tp-generate-btn.is-loading {
  pointer-events: none;
}

.tp-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tpSpin 0.6s linear infinite;
}

@keyframes tpSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Two-Column Input Grid */
.tp-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tp-input-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-input-col__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-input-col__badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tp-input-col__badge--cv {
  background: rgba(11, 60, 109, 0.08);
  color: var(--brand-navy);
}

.tp-input-col__badge--jd {
  background: rgba(79, 182, 188, 0.12);
  color: var(--brand-teal);
}

.tp-input-col__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

/* Drop Zone */
.tp-drop {
  position: relative;
  border: 2px dashed rgba(11, 60, 109, 0.14);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(11, 60, 109, 0.015);
}

.tp-drop:hover,
.tp-drop.is-drag {
  border-color: var(--brand-teal);
  background: rgba(79, 182, 188, 0.04);
}

.tp-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.tp-drop__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.tp-drop__cloud {
  color: rgba(11, 60, 109, 0.35);
}

.tp-drop__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tp-drop__title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.70);
}

.tp-drop__hint {
  font-size: 11px;
  color: var(--muted);
}

.tp-drop__file {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.tp-drop__file-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.tp-drop__file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-navy);
}

.tp-drop__file-size {
  font-size: 11px;
  color: var(--muted);
}

.tp-drop__remove {
  margin-left: auto;
  pointer-events: all;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}

/* OR Divider */
.tp-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tp-or-divider::before,
.tp-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(11, 60, 109, 0.10);
}

/* Textarea */
.tp-textarea {
  width: 100%;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(11, 60, 109, 0.12);
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  color: rgba(15, 23, 42, 0.85);
  background: rgba(11, 60, 109, 0.015);
  transition: border-color 0.15s;
  line-height: 1.65;
}

.tp-textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(79, 182, 188, 0.12);
}

/* Error Banner */
.tp-error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Results wrapper */
.tp-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Results Header */
.tp-results__header {
  padding: 8px 0 4px;
  border-bottom: 2px solid rgba(11, 60, 109, 0.08);
  margin-bottom: 4px;
}

.tp-results__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.tp-results__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ==================================================================
   Score Banner — 5 Circular Donuts in a Row (big center)
   ================================================================== */
.tp-score-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.97));
  border: 1px solid rgba(11, 60, 109, 0.09);
  box-shadow: 0 4px 24px rgba(11, 60, 109, 0.06);
  flex-wrap: wrap;
}

.tp-score-donut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.tp-score-donut-item--big {
  margin: 0 10px;
}

.tp-score-donut-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* SVG Donut base */
.tp-donut {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp-donut svg {
  transform: rotate(-90deg);
}

.tp-donut__track {
  fill: none;
  stroke: rgba(11, 60, 109, 0.08);
  stroke-linecap: round;
}

.tp-donut__fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .2, 1);
}

.tp-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
}

/* Fit badge inline */
.tp-fit-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  border: 1.5px solid rgba(11, 60, 109, 0.14);
  background: rgba(11, 60, 109, 0.04);
  color: var(--muted);
}

.tp-fit-badge-inline.is-high {
  border-color: rgba(22, 163, 74, 0.30);
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
}

.tp-fit-badge-inline.is-moderate {
  border-color: rgba(245, 158, 11, 0.30);
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

.tp-fit-badge-inline.is-low {
  border-color: rgba(185, 74, 74, 0.25);
  background: rgba(185, 74, 74, 0.07);
  color: #b94a4a;
}

/* ==================================================================
   Tab Navigation
   ================================================================== */
.tp-tabs {
  display: flex;
  gap: 4px;
  background: rgba(11, 60, 109, 0.04);
  border-radius: 14px;
  padding: 4px;
  width: fit-content;
}

.tp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.60);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.tp-tab:hover {
  color: var(--brand-navy);
  background: rgba(11, 60, 109, 0.06);
}

.tp-tab.is-active {
  background: #fff;
  color: var(--brand-navy);
  box-shadow: 0 1px 6px rgba(11, 60, 109, 0.12);
}

.tp-tab-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==================================================================
   Cards
   ================================================================== */
.tp-card {
  background: #fff;
  border: 1px solid rgba(11, 60, 109, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(11, 60, 109, 0.04);
}

.tp-card__head {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  background: rgba(11, 60, 109, 0.025);
  border-bottom: 1px solid rgba(11, 60, 109, 0.06);
}

.tp-card__head-accent {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  margin-right: 12px;
  flex-shrink: 0;
}

.tp-card__head-accent--blue {
  background: var(--brand-blue);
}

.tp-card__head-accent--teal {
  background: var(--brand-teal);
}

.tp-card__head-accent--navy {
  background: var(--brand-navy);
}

.tp-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
  flex: 1;
}

.tp-card__meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-left: auto;
}

.tp-card__body {
  padding: 18px;
}

.tp-card__body--flush {
  padding: 0;
}

.tp-prose {
  color: rgba(15, 23, 42, 0.80);
  line-height: 1.75;
  font-size: 13.5px;
  white-space: pre-wrap;
  margin: 0;
}

/* ==================================================================
   Skills Summary Grid (Summary tab — required skill rings)
   ================================================================== */
.tp-skills-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.tp-skill-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 8px 10px;
  border-radius: 14px;
  background: rgba(11, 60, 109, 0.02);
  border: 1px solid rgba(11, 60, 109, 0.07);
  transition: background 0.12s, transform 0.12s;
}

.tp-skill-pill:hover {
  background: rgba(79, 182, 188, 0.05);
  transform: translateY(-1px);
}

.tp-skill-pill__ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp-skill-pill__ring svg {
  transform: rotate(-90deg);
}

.tp-skill-pill__ring-track {
  fill: none;
  stroke: rgba(11, 60, 109, 0.08);
  stroke-linecap: round;
}

.tp-skill-pill__ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .2, 1);
}

.tp-skill-pill__ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.tp-skill-pill__name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.75);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

/* ==================================================================
   Unified Skill Cards (Skills tab — per-skill rows)
   ================================================================== */
.tp-skill-cards {
  display: flex;
  flex-direction: column;
}

.tp-skill-row {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(11, 60, 109, 0.06);
  transition: background 0.12s;
}

.tp-skill-row:last-child {
  border-bottom: none;
}

.tp-skill-row:hover {
  background: rgba(79, 182, 188, 0.04);
}

.tp-skill-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tp-skill-row__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-navy);
}

.tp-skill-row__score-badge {
  font-size: 12px;
  font-weight: 750;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.tp-skill-row__visuals {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tp-skill-row__donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tp-skill-row__donut-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tp-skill-row__exp-wrap {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tp-skill-row__exp-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.tp-skill-row__exp-label>span:first-child {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tp-skill-row__duration {
  font-size: 13px;
  font-weight: 750;
  color: var(--brand-navy);
}

.tp-skill-row__exp-track {
  height: 10px;
  border-radius: 5px;
  background: rgba(11, 60, 109, 0.08);
  overflow: hidden;
}

.tp-skill-row__exp-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #818cf8, #6366f1);
  transition: width 0.9s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}

.tp-skill-row__exp-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.tp-skill-row__exp-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.tp-skill-row__nodata {
  font-size: 12px;
  color: var(--muted);
}

.tp-skill-row__analysis {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(11, 60, 109, 0.02);
  border: 1px solid rgba(11, 60, 109, 0.06);
  font-size: 12px;
  color: rgba(15, 23, 42, 0.60);
  line-height: 1.65;
}

.tp-skill-row__analysis svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--brand-teal);
}

/* ==================================================================
   Analysis Detail Items + Threshold Marker
   ================================================================== */
.tp-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-detail-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(11, 60, 109, 0.02);
  border: 1px solid rgba(11, 60, 109, 0.06);
  transition: background 0.12s;
}

.tp-detail-item:hover {
  background: rgba(79, 182, 188, 0.05);
}

.tp-detail-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tp-detail-item__name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.80);
}

.tp-detail-item__score {
  font-size: 18px;
  font-weight: 800;
}

.tp-detail-item__track-wrap {
  position: relative;
  margin-bottom: 10px;
}

.tp-detail-item__track {
  height: 8px;
  border-radius: 4px;
  background: rgba(11, 60, 109, 0.08);
  overflow: visible;
  position: relative;
}

.tp-detail-item__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}

.tp-detail-item__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.tp-detail-item__note {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.52);
  line-height: 1.65;
  margin: 0;
}

/* Threshold marker at 70 */
.tp-threshold-marker {
  position: absolute;
  top: -4px;
  left: 70%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.tp-threshold-marker__line {
  width: 2px;
  height: 18px;
  background: rgba(11, 60, 109, 0.30);
  border-radius: 1px;
}

.tp-threshold-marker__label {
  font-size: 9px;
  font-weight: 750;
  color: rgba(11, 60, 109, 0.45);
  margin-top: 1px;
}

.tp-detail-item__zone-labels {
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
}

.tp-zone-label--high {
  font-size: 10px;
  font-weight: 650;
  color: #16a34a;
  letter-spacing: 0.02em;
}

.tp-threshold-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 11px;
  color: rgba(11, 60, 109, 0.50);
  font-weight: 600;
}

.tp-threshold-legend__dot {
  width: 2px;
  height: 14px;
  background: rgba(11, 60, 109, 0.35);
  border-radius: 1px;
  flex-shrink: 0;
}

/* ==================================================================
   Gauge Grid (Predictive Insights)
   ================================================================== */
.tp-gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tp-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px 16px;
  border-radius: 14px;
  background: rgba(11, 60, 109, 0.025);
  border: 1px solid rgba(11, 60, 109, 0.07);
}

.tp-gauge-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.65);
  text-align: center;
}

/* ==================================================================
   Versatility (Radar Chart)
   ================================================================== */
.tp-versatility {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

.tp-versatility__radar {
  flex-shrink: 0;
}

.tp-versatility__legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tp-versatility__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-versatility__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tp-versatility__name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.70);
  min-width: 105px;
}

.tp-versatility__val {
  font-size: 14px;
  font-weight: 750;
}

/* Empty state */
.tp-empty-state {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ==================================================================
   Responsive
   ================================================================== */
@media (max-width: 1024px) {
  .tp-inputs {
    grid-template-columns: 1fr;
  }

  .tp-gauge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tp-skills-summary-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  }
}

@media (max-width: 768px) {
  .tp__hero-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tp__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .tp-tabs {
    flex-wrap: wrap;
    width: 100%;
  }

  .tp-tab {
    flex: 1;
    justify-content: center;
  }

  .tp-score-banner {
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .tp-gauge-grid {
    grid-template-columns: 1fr;
  }

  .tp-skill-row__visuals {
    flex-direction: column;
    align-items: flex-start;
  }
}.jg__hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.jg__hero-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(11, 60, 109, 0.22);
}

.jg__page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin: 0;
}

.jg__page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
  max-width: 55ch;
}

/* Input Panel */
.jg-panel {
  margin-bottom: 20px;
}

/* Controls Row */
.jg__controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.jg__lang-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jg__lang-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jg__lang-pills {
  display: flex;
  gap: 4px;
}

/* Pill Toggles */
.jg-pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
  background: rgba(11, 60, 109, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.jg-pill:hover {
  color: var(--brand-navy);
  background: rgba(11, 60, 109, 0.08);
}

.jg-pill.is-active {
  color: #fff;
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  box-shadow: 0 2px 8px rgba(11, 60, 109, 0.18);
}

/* Generate Button */
.jg-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  margin-left: auto;
}

.jg-generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(11, 60, 109, 0.25);
}

.jg-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.jg-generate-btn.is-loading {
  pointer-events: none;
}

.jg-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jgSpin 0.6s linear infinite;
}

@keyframes jgSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Two-Column Input Grid */
.jg-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.jg-input-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jg-input-col__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jg-input-col__badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jg-input-col__badge--cv {
  background: rgba(11, 60, 109, 0.08);
  color: var(--brand-navy);
}

.jg-input-col__badge--jd {
  background: rgba(79, 182, 188, 0.12);
  color: var(--brand-teal);
}

.jg-input-col__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

/* Drop Zone */
.jg-drop {
  position: relative;
  border: 2px dashed rgba(11, 60, 109, 0.14);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(11, 60, 109, 0.015);
}

.jg-drop:hover,
.jg-drop.is-drag {
  border-color: var(--brand-teal);
  background: rgba(79, 182, 188, 0.04);
}

.jg-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.jg-drop__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.jg-drop__cloud {
  color: rgba(11, 60, 109, 0.35);
}

.jg-drop__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jg-drop__title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.70);
}

.jg-drop__hint {
  font-size: 11px;
  color: var(--muted);
}

.jg-drop__file {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.jg-drop__file-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.jg-drop__file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-navy);
}

.jg-drop__file-size {
  font-size: 11px;
  color: var(--muted);
}

.jg-drop__remove {
  margin-left: auto;
  pointer-events: all;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}

/* OR Divider */
.jg-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.jg-or-divider::before,
.jg-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(11, 60, 109, 0.10);
}

/* Textarea */
.jg-textarea {
  width: 100%;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(11, 60, 109, 0.12);
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  color: rgba(15, 23, 42, 0.85);
  background: rgba(11, 60, 109, 0.015);
  transition: border-color 0.15s;
  line-height: 1.65;
}

.jg-textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(79, 182, 188, 0.12);
}

/* Error Banner */
.jg-error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Results wrapper */
.jg-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Results Header */
.jg-results__header {
  padding: 8px 0 4px;
  border-bottom: 2px solid rgba(11, 60, 109, 0.08);
  margin-bottom: 4px;
}

.jg-results__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.jg-results__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ==================================================================
   Score Banner — 5 Circular Donuts in a Row (big center)
   ================================================================== */
.jg-score-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.97));
  border: 1px solid rgba(11, 60, 109, 0.09);
  box-shadow: 0 4px 24px rgba(11, 60, 109, 0.06);
  flex-wrap: wrap;
}

.jg-score-donut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.jg-score-donut-item--big {
  margin: 0 10px;
}

.jg-score-donut-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* SVG Donut base */
.jg-donut {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jg-donut svg {
  transform: rotate(-90deg);
}

.jg-donut__track {
  fill: none;
  stroke: rgba(11, 60, 109, 0.08);
  stroke-linecap: round;
}

.jg-donut__fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .2, 1);
}

.jg-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
}

/* Fit badge inline */
.jg-fit-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  border: 1.5px solid rgba(11, 60, 109, 0.14);
  background: rgba(11, 60, 109, 0.04);
  color: var(--muted);
}

.jg-fit-badge-inline.is-high {
  border-color: rgba(22, 163, 74, 0.30);
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
}

.jg-fit-badge-inline.is-moderate {
  border-color: rgba(245, 158, 11, 0.30);
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

.jg-fit-badge-inline.is-low {
  border-color: rgba(185, 74, 74, 0.25);
  background: rgba(185, 74, 74, 0.07);
  color: #b94a4a;
}

/* ==================================================================
   Tab Navigation
   ================================================================== */
.jg-tabs {
  display: flex;
  gap: 4px;
  background: rgba(11, 60, 109, 0.04);
  border-radius: 14px;
  padding: 4px;
  width: fit-content;
}

.jg-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.60);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.jg-tab:hover {
  color: var(--brand-navy);
  background: rgba(11, 60, 109, 0.06);
}

.jg-tab.is-active {
  background: #fff;
  color: var(--brand-navy);
  box-shadow: 0 1px 6px rgba(11, 60, 109, 0.12);
}

.jg-tab-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==================================================================
   Cards
   ================================================================== */
.jg-card {
  background: #fff;
  border: 1px solid rgba(11, 60, 109, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(11, 60, 109, 0.04);
}

.jg-card__head {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  background: rgba(11, 60, 109, 0.025);
  border-bottom: 1px solid rgba(11, 60, 109, 0.06);
}

.jg-card__head-accent {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  margin-right: 12px;
  flex-shrink: 0;
}

.jg-card__head-accent--blue {
  background: var(--brand-blue);
}

.jg-card__head-accent--teal {
  background: var(--brand-teal);
}

.jg-card__head-accent--navy {
  background: var(--brand-navy);
}

.jg-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
  flex: 1;
}

.jg-card__meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-left: auto;
}

.jg-card__body {
  padding: 18px;
}

.jg-card__body--flush {
  padding: 0;
}

.jg-prose {
  color: rgba(15, 23, 42, 0.80);
  line-height: 1.75;
  font-size: 13.5px;
  white-space: pre-wrap;
  margin: 0;
}

/* ==================================================================
   Skills Summary Grid (Summary tab — required skill rings)
   ================================================================== */
.jg-skills-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.jg-skill-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 8px 10px;
  border-radius: 14px;
  background: rgba(11, 60, 109, 0.02);
  border: 1px solid rgba(11, 60, 109, 0.07);
  transition: background 0.12s, transform 0.12s;
}

.jg-skill-pill:hover {
  background: rgba(79, 182, 188, 0.05);
  transform: translateY(-1px);
}

.jg-skill-pill__ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jg-skill-pill__ring svg {
  transform: rotate(-90deg);
}

.jg-skill-pill__ring-track {
  fill: none;
  stroke: rgba(11, 60, 109, 0.08);
  stroke-linecap: round;
}

.jg-skill-pill__ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .2, 1);
}

.jg-skill-pill__ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.jg-skill-pill__name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.75);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

/* ==================================================================
   Unified Skill Cards (Skills tab — per-skill rows)
   ================================================================== */
.jg-skill-cards {
  display: flex;
  flex-direction: column;
}

.jg-skill-row {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(11, 60, 109, 0.06);
  transition: background 0.12s;
}

.jg-skill-row:last-child {
  border-bottom: none;
}

.jg-skill-row:hover {
  background: rgba(79, 182, 188, 0.04);
}

.jg-skill-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.jg-skill-row__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-navy);
}

.jg-skill-row__score-badge {
  font-size: 12px;
  font-weight: 750;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.jg-skill-row__visuals {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.jg-skill-row__donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.jg-skill-row__donut-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jg-skill-row__exp-wrap {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.jg-skill-row__exp-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.jg-skill-row__exp-label>span:first-child {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jg-skill-row__duration {
  font-size: 13px;
  font-weight: 750;
  color: var(--brand-navy);
}

.jg-skill-row__exp-track {
  height: 10px;
  border-radius: 5px;
  background: rgba(11, 60, 109, 0.08);
  overflow: hidden;
}

.jg-skill-row__exp-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #818cf8, #6366f1);
  transition: width 0.9s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}

.jg-skill-row__exp-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.jg-skill-row__exp-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.jg-skill-row__nodata {
  font-size: 12px;
  color: var(--muted);
}

.jg-skill-row__analysis {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(11, 60, 109, 0.02);
  border: 1px solid rgba(11, 60, 109, 0.06);
  font-size: 12px;
  color: rgba(15, 23, 42, 0.60);
  line-height: 1.65;
}

.jg-skill-row__analysis svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--brand-teal);
}

/* ==================================================================
   Analysis Detail Items + Threshold Marker
   ================================================================== */
.jg-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jg-detail-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(11, 60, 109, 0.02);
  border: 1px solid rgba(11, 60, 109, 0.06);
  transition: background 0.12s;
}

.jg-detail-item:hover {
  background: rgba(79, 182, 188, 0.05);
}

.jg-detail-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.jg-detail-item__name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.80);
}

.jg-detail-item__score {
  font-size: 18px;
  font-weight: 800;
}

.jg-detail-item__track-wrap {
  position: relative;
  margin-bottom: 10px;
}

.jg-detail-item__track {
  height: 8px;
  border-radius: 4px;
  background: rgba(11, 60, 109, 0.08);
  overflow: visible;
  position: relative;
}

.jg-detail-item__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}

.jg-detail-item__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.jg-detail-item__note {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.52);
  line-height: 1.65;
  margin: 0;
}

/* Threshold marker at 70 */
.jg-threshold-marker {
  position: absolute;
  top: -4px;
  left: 70%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.jg-threshold-marker__line {
  width: 2px;
  height: 18px;
  background: rgba(11, 60, 109, 0.30);
  border-radius: 1px;
}

.jg-threshold-marker__label {
  font-size: 9px;
  font-weight: 750;
  color: rgba(11, 60, 109, 0.45);
  margin-top: 1px;
}

.jg-detail-item__zone-labels {
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
}

.jg-zone-label--high {
  font-size: 10px;
  font-weight: 650;
  color: #16a34a;
  letter-spacing: 0.02em;
}

.jg-threshold-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 11px;
  color: rgba(11, 60, 109, 0.50);
  font-weight: 600;
}

.jg-threshold-legend__dot {
  width: 2px;
  height: 14px;
  background: rgba(11, 60, 109, 0.35);
  border-radius: 1px;
  flex-shrink: 0;
}

/* ==================================================================
   Gauge Grid (Predictive Insights)
   ================================================================== */
.jg-gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.jg-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px 16px;
  border-radius: 14px;
  background: rgba(11, 60, 109, 0.025);
  border: 1px solid rgba(11, 60, 109, 0.07);
}

.jg-gauge-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.65);
  text-align: center;
}

/* ==================================================================
   Versatility (Radar Chart)
   ================================================================== */
.jg-versatility {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

.jg-versatility__radar {
  flex-shrink: 0;
}

.jg-versatility__legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jg-versatility__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jg-versatility__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.jg-versatility__name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.70);
  min-width: 105px;
}

.jg-versatility__val {
  font-size: 14px;
  font-weight: 750;
}

/* Empty state */
.jg-empty-state {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ==================================================================
   Responsive
   ================================================================== */
@media (max-width: 1024px) {
  .jg-inputs {
    grid-template-columns: 1fr;
  }

  .jg-gauge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .jg-skills-summary-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  }
}

@media (max-width: 768px) {
  .jg__hero-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .jg__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .jg-tabs {
    flex-wrap: wrap;
    width: 100%;
  }

  .jg-tab {
    flex: 1;
    justify-content: center;
  }

  .jg-score-banner {
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .jg-gauge-grid {
    grid-template-columns: 1fr;
  }

  .jg-skill-row__visuals {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* CV -Builder */
.template-selection {
    display: flex;
    justify-content: center;
    gap: 15px; /* Use gap instead of padding on labels for better scaling */
    border-bottom: 1px solid #dee2e6;
    flex-wrap: nowrap; /* Prevents them from wrapping to a new line */
}

.template-mini-preview {
    /* Use fixed dimensions to prevent the 'squish' */
    width: 70px;
    height: 95px;
    /* This is the key: contain ensures the whole image fits without distortion */
    /* cover is also fine IF the width/height are fixed */
    object-fit: cover;
    /* Prevent the browser from shrinking the image width under pressure */
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.template-selection label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px; /* Reduced padding */
    flex-shrink: 0; /* Ensures the label doesn't compress */
}

.template-selection label:hover {
  transform: scale(1.08);   /* Slightly bigger on hover */
}

.template-selection input[type="radio"] {
  display: none;
}

.template-selection input[type="radio"]:checked + .template-preview {
  border: 4px solid #007BFF;   /* Highlight selected template */
}

[x-cloak] { display: none !important; }

/* Split Screen Layout */
.split-screen-container {
  display: flex;
  height: calc(100vh - 120px);
  overflow: hidden;
}

/* Left Preview Panel */
.preview-panel {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #dee2e6;
  overflow: hidden;
}

.preview-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
}

.preview-frame {
  flex-grow: 1;
  margin: 20px;
  background: #525659; /* PDF-viewer style dark background */
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

#cv-frame {
  background: white;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  width: 100%;
  height: 100%;
  border: none;
}

/* Template Overlay */
.template-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.template-overlay .icon.is-large {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.template-selector-mini {
  text-align: center;
  max-width: 300px;
}

.template-option {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s;
}

.template-option:hover {
  transform: scale(1.05);
}

.template-option.selected {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.template-option input[type="radio"]:checked + .template-mini-preview {
    border-color: #5F53F5;
    box-shadow: 0 0 8px rgba(95, 83, 245, 0.4);
    transform: translateY(-2px);
}

.template-option img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  display: block;
}

.download-pdf-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
  transition: all 0.2s;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-pdf-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}

/* Right Form Panel */
.form-panel {
  flex: 1; /* CHANGE THIS from width: 400px to flex: 1 */
  background: transparent;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #dee2e6;
  overflow: hidden;
}

.form-panel-header {
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-section {
  padding: 16px 20px;
  background: transparent;
  border-bottom: 1px solid #dee2e6;
}

.form-fields-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* Form Sections */
.form-section {
  margin-bottom: 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  overflow: hidden;
}

.form-section-toggle {
  width: 100%;
  padding: 10px 12px;
  background: #f8f9fa;
  border: none;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.2s;
}

.form-section-toggle:hover {
  background: #e9ecef;
}

.form-section-content {
  padding: 12px;
  background: white;
}

/* Experience/Education Items */
.experience-item,
.education-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

/* Tags */
.tags.are-small .tag {
  font-size: 11px;
  height: 20px;
  line-height: 18px;
  padding: 0 6px;
}

.loader-card {
  width: 250px;
  background: #111926;
  border: 1px solid #1f2a3a;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.preview {
  position: relative;
  height: 250px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(255,255,255,0.1);
  margin: 15px 0;
}

.cv-image-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  filter: grayscale(20%);
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #00ff8c;
  box-shadow: 0 0 15px #00ff8c, 0 0 30px rgba(0, 255, 140, 0.5);
  z-index: 20;
  animation: scan-move 2.2s linear infinite;
}

.scan-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(0, 255, 140, 0.15), transparent);
  z-index: 19;
  animation: scan-move 2.2s linear infinite;
}

@keyframes scan-move {
  0% { transform: translateY(-10px); }
  100% { transform: translateY(350px); }
}

.title-text {
  color: #c9d4e5;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint-text {
  color: #8fa3bf;
  font-size: 11px;
  text-align: center;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .split-screen-container {
    flex-direction: column;
  }

 /* Make the frame take up the rest of the height */
.preview-panel {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

  .form-panel {
    width: 100%;
    height: calc(100vh - 420px);
  }
}

/* Lang Toggle */
.language-switch {
  display: flex;
  gap: 12px;
}

.lang-option {
  flex: 1;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.lang-option input {
  display: none;
}

.lang-option span {
  display: block;
}

.lang-option input:checked + span {
  font-weight: 600;
}

.lang-option input:checked ~ span,
.lang-option input:checked + span {
  color: #0061d1;
}

.lang-option:has(input:checked) {
  border-color: #5F53F5;
  background: #eef5ff;
}

.empty-row {
  display: none;
}

/* ---------------------------------
   Big 5 Description Generator UI
---------------------------------- */
.b5-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.b5-trait-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.b5-trait-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 8px;
}

.b5-trait-desc {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.b5-levels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.b5-level {
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid var(--border);
  background: rgba(11, 60, 109, 0.02);
}

.b5-level--low {
  border-left-color: #f59e0b;
}

.b5-level--mid {
  border-left-color: #3b82f6;
}

.b5-level--high {
  border-left-color: #10b981;
}

.b5-level-name {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--muted);
}

.b5-level-text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}

/* ==========================================================================
   RTC INTERVIEW
   ========================================================================== */

  /* ── RTC Interview: Premium Glassmorphism UI ── */

  .rtc-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(79, 182, 188, .18), rgba(31, 111, 175, .14));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-teal);
    margin-bottom: 8px;
  }

  .rtc-setup {
    max-width: 520px;
    margin: 0 auto;
  }

  .rtc-setup .field+.field {
    margin-top: 18px;
  }

  .rtc-call-wrapper {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
  }

  /* ═══ MOTION SPHERE ═══ */
  .rtc-sphere-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 28px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rtc-sphere-glow {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 182, 188, .18) 0%, transparent 70%);
    transition: all .6s ease;
    animation: sphere-idle 4s ease-in-out infinite;
  }

  .rtc-sphere-container.is-speaking .rtc-sphere-glow {
    inset: -28px;
    background: radial-gradient(circle, rgba(79, 182, 188, .28) 0%, rgba(31, 111, 175, .12) 50%, transparent 75%);
    animation: sphere-speak-glow 1.2s ease-in-out infinite;
  }

  .rtc-sphere-container.is-listening .rtc-sphere-glow {
    inset: -22px;
    background: radial-gradient(circle, rgba(59, 130, 246, .22) 0%, transparent 70%);
    animation: sphere-listen-glow 2s ease-in-out infinite;
  }

  .rtc-sphere {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    background:
      radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35) 0%, transparent 50%),
      radial-gradient(circle at 65% 70%, rgba(11, 60, 109, .15) 0%, transparent 50%),
      linear-gradient(145deg, var(--brand-navy), var(--brand-blue), var(--brand-teal));
    box-shadow:
      0 8px 32px rgba(11, 60, 109, .22),
      inset 0 -4px 12px rgba(0, 0, 0, .12),
      inset 0 4px 12px rgba(255, 255, 255, .15);
    transition: transform .4s ease, box-shadow .4s ease;
    animation: sphere-idle-morph 6s ease-in-out infinite;
  }

  .rtc-sphere-container.is-speaking .rtc-sphere {
    animation: sphere-speaking 0.8s ease-in-out infinite;
    box-shadow:
      0 8px 40px rgba(79, 182, 188, .35),
      0 0 60px rgba(79, 182, 188, .15),
      inset 0 -4px 12px rgba(0, 0, 0, .12),
      inset 0 4px 12px rgba(255, 255, 255, .18);
  }

  .rtc-sphere-container.is-listening .rtc-sphere {
    background:
      radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35) 0%, transparent 50%),
      radial-gradient(circle at 65% 70%, rgba(59, 130, 246, .18) 0%, transparent 50%),
      linear-gradient(145deg, #1e40af, #3b82f6, #60a5fa);
    animation: sphere-listening 2.5s ease-in-out infinite;
    box-shadow:
      0 8px 32px rgba(59, 130, 246, .25),
      0 0 48px rgba(59, 130, 246, .10),
      inset 0 -4px 12px rgba(0, 0, 0, .10),
      inset 0 4px 12px rgba(255, 255, 255, .18);
  }

  .rtc-sphere-ring {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity .5s;
  }

  .rtc-sphere-container.is-speaking .rtc-sphere-ring {
    opacity: 1;
  }

  .rtc-sphere-ring:nth-child(2) {
    border-top-color: rgba(79, 182, 188, .4);
    border-right-color: rgba(79, 182, 188, .2);
    animation: ring-spin 2s linear infinite;
  }

  .rtc-sphere-ring:nth-child(3) {
    width: 138px;
    height: 138px;
    border-bottom-color: rgba(31, 111, 175, .35);
    border-left-color: rgba(31, 111, 175, .15);
    animation: ring-spin 3s linear infinite reverse;
  }

  @keyframes sphere-idle {

    0%,
    100% {
      transform: scale(1)
    }

    50% {
      transform: scale(1.02)
    }
  }

  @keyframes sphere-idle-morph {

    0%,
    100% {
      border-radius: 50%
    }

    33% {
      border-radius: 48% 52% 50% 50%
    }

    66% {
      border-radius: 50% 48% 52% 50%
    }
  }

  @keyframes sphere-speaking {
    0% {
      transform: scale(1);
      border-radius: 50%;
    }

    25% {
      transform: scale(1.08);
      border-radius: 47% 53% 51% 49%;
    }

    50% {
      transform: scale(0.96);
      border-radius: 52% 48% 49% 51%;
    }

    75% {
      transform: scale(1.06);
      border-radius: 49% 51% 53% 47%;
    }

    100% {
      transform: scale(1);
      border-radius: 50%;
    }
  }

  @keyframes sphere-listening {

    0%,
    100% {
      transform: scale(1);
      border-radius: 50%;
    }

    50% {
      transform: scale(1.04);
      border-radius: 48% 52% 50% 50%;
    }
  }

  @keyframes sphere-speak-glow {

    0%,
    100% {
      opacity: .7;
      transform: scale(1)
    }

    50% {
      opacity: 1;
      transform: scale(1.08)
    }
  }

  @keyframes sphere-listen-glow {

    0%,
    100% {
      opacity: .5;
      transform: scale(1)
    }

    50% {
      opacity: .8;
      transform: scale(1.04)
    }
  }

  @keyframes ring-spin {
    0% {
      transform: translate(-50%, -50%) rotate(0deg)
    }

    100% {
      transform: translate(-50%, -50%) rotate(360deg)
    }
  }

  .rtc-sphere-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-navy);
    letter-spacing: -.01em;
    margin-bottom: 6px;
  }

  .rtc-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--border);
    backdrop-filter: blur(6px);
    margin-bottom: 20px;
    transition: background .3s;
  }

  .rtc-status-tag .rtc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(79, 182, 188, .22);
  }

  .rtc-status-tag.is-listening .rtc-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .22);
    animation: rtc-blink 1s ease-in-out infinite;
  }

  @keyframes rtc-blink {

    0%,
    100% {
      opacity: 1
    }

    50% {
      opacity: .4
    }
  }

  /* Silence countdown indicator */
  .rtc-silence-bar {
    width: 200px;
    height: 3px;
    border-radius: 99px;
    background: rgba(0, 0, 0, .08);
    margin: 0 auto 16px;
    overflow: hidden;
    opacity: 0;
    transition: opacity .3s;
  }

  .rtc-silence-bar.is-active {
    opacity: 1;
  }

  .rtc-silence-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--brand-teal), #dc2626);
    width: 0%;
    transition: width linear;
  }

  .rtc-visualiser-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
  }

  .rtc-vis-card {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .72);
    padding: 14px;
  }

  .rtc-vis-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .04em;
    margin-bottom: 8px;
  }

  .rtc-canvas {
    width: 100%;
    height: 80px;
    border-radius: 10px;
    background: #f8fafc;
  }

  .rtc-convo-log {
    margin-top: 24px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 0;
  }

  .rtc-msg {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 8px;
    animation: msg-in .25s ease-out;
  }

  @keyframes msg-in {
    from {
      opacity: 0;
      transform: translateY(6px)
    }

    to {
      opacity: 1;
      transform: translateY(0)
    }
  }

  .rtc-msg.is-ai {
    background: rgba(79, 182, 188, .08);
    border: 1px solid rgba(79, 182, 188, .16);
  }

  .rtc-msg.is-user {
    background: rgba(31, 111, 175, .06);
    border: 1px solid rgba(31, 111, 175, .12);
  }

  .rtc-msg-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
  }

  .rtc-msg.is-ai .rtc-msg-avatar {
    background: linear-gradient(135deg, var(--brand-navy), var(--brand-teal));
  }

  .rtc-msg.is-user .rtc-msg-avatar {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
  }

  .rtc-msg-body {
    flex: 1;
  }

  .rtc-msg-sender {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .03em;
    margin-bottom: 3px;
  }

  .rtc-msg-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
  }

  .rtc-live-indicator {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--border);
    margin-bottom: 8px;
  }

  .rtc-live-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-teal);
    letter-spacing: .03em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .rtc-live-label .typing-dots span {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-teal);
    animation: typing-bounce .6s ease-in-out infinite;
  }

  .rtc-live-label .typing-dots span:nth-child(2) {
    animation-delay: .15s;
  }

  .rtc-live-label .typing-dots span:nth-child(3) {
    animation-delay: .3s;
  }

  @keyframes typing-bounce {

    0%,
    100% {
      opacity: .3;
      transform: translateY(0)
    }

    50% {
      opacity: 1;
      transform: translateY(-3px)
    }
  }

  .rtc-live-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
  }

  .rtc-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
  }

  .rtc-btn-mic,
  .rtc-btn-end {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, box-shadow .15s;
  }

  .rtc-btn-mic {
    background: var(--brand-navy);
    color: #fff;
  }

  .rtc-btn-mic:hover {
    transform: scale(1.06);
  }

  .rtc-btn-mic.is-muted {
    background: rgba(11, 60, 109, .12);
    color: var(--brand-navy);
  }

  .rtc-btn-end {
    background: #dc2626;
    color: #fff;
  }

  .rtc-btn-end:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 20px rgba(220, 38, 38, .25);
  }

  .rtc-feedback {
    margin-top: 28px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .82);
    padding: 24px;
    text-align: left;
  }

  .rtc-feedback-section+.rtc-feedback-section {
    margin-top: 18px;
  }

  /*
   CHATBOT INTERVIEW PREP
  */
  .cip-shell {
    max-width: 1280px;
    margin: 0 auto;
  }

  .cip-hero {
    padding: 12px 0 28px;
  }

  .cip-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(79, 182, 188, 0.12);
    color: var(--brand-navy);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
  }

  .cip-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .cip-setup,
  .cip-chat-card,
  .cip-scorecard {
    border-radius: 22px;
    padding: 24px;
  }

  .cip-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .cip-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }

  .cip-status-label,
  .cip-score-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: var(--muted);
  }

  .cip-status-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-navy);
  }

  .cip-status-pill,
  .cip-score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(11, 60, 109, 0.08);
    color: var(--brand-navy);
    font-size: 12px;
    font-weight: 800;
  }

  .cip-status-pill.is-done {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
  }

  .cip-messages {
    min-height: 420px;
    max-height: 540px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px;
  }

  .cip-empty {
    border: 1px dashed rgba(11, 60, 109, 0.16);
    border-radius: 18px;
    padding: 22px;
    color: var(--muted);
    background: rgba(11, 60, 109, 0.03);
  }

  .cip-message {
    max-width: 88%;
    padding: 16px 18px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(11, 60, 109, 0.06);
  }

  .cip-message.is-assistant {
    align-self: flex-start;
    background: linear-gradient(180deg, rgba(79, 182, 188, 0.12), rgba(79, 182, 188, 0.04));
    border: 1px solid rgba(79, 182, 188, 0.18);
  }

  .cip-message.is-user {
    align-self: flex-end;
    background: linear-gradient(180deg, rgba(11, 60, 109, 0.08), rgba(11, 60, 109, 0.03));
    border: 1px solid rgba(11, 60, 109, 0.12);
  }

  .cip-message-role {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
  }

  .cip-message-body {
    white-space: pre-wrap;
    line-height: 1.7;
    color: var(--text);
  }

  .cip-message[dir="rtl"] {
    text-align: right;
  }

  .cip-message[dir="rtl"] .cip-message-body {
    unicode-bidi: plaintext;
  }

  .cip-writing-body {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    line-height: 1.7;
  }

  .cip-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .cip-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--brand-teal);
    opacity: 0.35;
    animation: cip-typing-bounce 0.8s ease-in-out infinite;
  }

  .cip-typing-dots span:nth-child(2) {
    animation-delay: 0.12s;
  }

  .cip-typing-dots span:nth-child(3) {
    animation-delay: 0.24s;
  }

  @keyframes cip-typing-bounce {
    0%, 80%, 100% {
      transform: translateY(0);
      opacity: 0.35;
    }
    40% {
      transform: translateY(-3px);
      opacity: 1;
    }
  }

  .cip-composer {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--border);
  }

  .cip-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
  }

  .cip-score-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
  }

  .cip-score-meta-card,
  .cip-score-row {
    border-radius: 18px;
    background: rgba(11, 60, 109, 0.04);
    border: 1px solid rgba(11, 60, 109, 0.08);
    padding: 16px;
  }

  .cip-score-list,
  .cip-score-evidence {
    margin-top: 8px;
    color: var(--text);
    line-height: 1.6;
  }

  .cip-score-row + .cip-score-row {
    margin-top: 12px;
  }

  .cip-score-row-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
  }

  .cip-score-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
  }

  .cip-job-description__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .cip-job-description__list {
    list-style-type: disc;
    padding-inline-start: 20px;
  }

  .cip-job-description[dir="rtl"] {
    text-align: right;
  }

  .cip-job-description[dir="rtl"] p,
  .cip-job-description[dir="rtl"] li,
  .cip-job-description[dir="rtl"] .tag {
    unicode-bidi: plaintext;
  }

  @media (max-width: 1023px) {
    .cip-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 768px) {
    .cip-chat-head,
    .cip-score-row-top {
      flex-direction: column;
      align-items: flex-start;
    }

    .cip-score-meta,
    .cip-score-footer {
      grid-template-columns: 1fr;
    }

    .cip-message {
      max-width: 100%;
    }

    .cip-job-description__head {
      flex-direction: column;
      align-items: flex-start;
    }

    .cip-job-description[dir="rtl"] .cip-job-description__head {
      align-items: flex-end;
    }
  }

  .rtc-fb-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-teal);
    letter-spacing: .03em;
    margin-bottom: 6px;
  }

  .rtc-fb-value {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
  }

  .rtc-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-navy);
    letter-spacing: -.02em;
  }

  .rtc-score-badge span {
    font-size: 16px;
    color: var(--muted);
    font-weight: 500;
  }

  @media (max-width:768px) {
    .rtc-visualiser-wrap {
      grid-template-columns: 1fr;
    }
  }

/* TV / LARGE PORTRAIT DISPLAY ~ 2160 × 3840 */
@media screen and (min-width: 1600px) and (orientation: portrait) {
  .app-sidebar {
    width: 600px;
    min-width: 600px;
    max-width: 600px;
  }
  .menu.app-menu {
    padding: 30px 25px;
  }
  .brand-container {
    width: 600px;
    min-width: 600px;
    min-height: 220px;
    display: flex;
    align-items: center;
  }
  .brand-logo {
    width: 180px !important;
    height: 180px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
  }
  .app-brand-text {
    font-size: 60px !important;
    line-height: 1.2;
  }
  .menu.app-menu .menu-list > li > a {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 24px 20px;
    font-family: var(--font-sans);
    font-size: 60px;
    font-weight: 500;
    line-height: 1.35;
    /* The shared sidebar is dark after the sidebar-menu merge.  This
       large-display override previously restored the old dark-on-light text,
       making TV navigation almost invisible. */
    color: var(--sidebar-text);
    border-radius: 16px;
  }
  .menu.app-menu .menu-list > li > a > .app-nav-icon {
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
    margin-top: 0;
  }
  .menu.app-menu .menu-list .app-nav-group-label {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 24px 20px;
    font-size: 60px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sidebar-text);
  }
  .menu.app-menu .menu-list
  .app-nav-group-label .app-nav-icon {
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
  }
  .menu.app-menu .menu-list ul.app-nav-sub {
    margin: 12px 0 20px 55px;
    padding-left: 25px;
    border-left: 3px solid var(--sidebar-group-border);
  }
  .menu.app-menu .menu-list ul.app-nav-sub a {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 16px;
    font-size: 48px !important;
    font-weight: 500;
    line-height: 1.4;
    color: var(--sidebar-text-muted);
  }
  .menu.app-menu .menu-list
  ul.app-nav-sub a .app-nav-icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px;
    margin-top: 0;
  }
  .menu.app-menu .menu-list
  ul.app-nav-sub a.is-active {
    font-weight: 700;
  }
}

/* Keep the sidebar readable even when Chrome emulates the 4K panel with a
   smaller CSS viewport and a high device-pixel ratio.  These rules key off
   the TV class, which is based on the rendered pixel dimensions. */
@media (orientation: portrait) {
  html.tv-portrait body:has(.app-sidebar) .app-sidebar.column.is-2 {
    flex: none;
    width: 28vw;
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list > li > a,
  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list .app-nav-group-label {
    gap: clamp(1rem, 1.1vw, 1.5rem);
    padding: clamp(1.1rem, 1.2vw, 1.6rem) clamp(0.9rem, 1vw, 1.3rem);
    font-size: clamp(1.5rem, 2.5vw, 3.4rem) !important;
    line-height: 1.28;
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list > li > a > .app-nav-icon,
  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list .app-nav-group-label .app-nav-icon {
    width: clamp(1.9rem, 2.25vw, 3.1rem);
    height: clamp(1.9rem, 2.25vw, 3.1rem);
    flex-basis: clamp(1.9rem, 2.25vw, 3.1rem);
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list ul.app-nav-sub a {
    gap: clamp(0.8rem, 0.9vw, 1.2rem);
    padding: clamp(0.85rem, 1vw, 1.2rem);
    font-size: clamp(1.2rem, 1.9vw, 2.5rem) !important;
    line-height: 1.3;
  }

  html.tv-portrait body:has(.app-sidebar) .menu.app-menu .menu-list ul.app-nav-sub .app-nav-icon {
    width: clamp(1.5rem, 1.7vw, 2.25rem) !important;
    height: clamp(1.5rem, 1.7vw, 2.25rem) !important;
    flex-basis: clamp(1.5rem, 1.7vw, 2.25rem);
  }
}


/* =================================================================
   Collapsible main navigation
   =================================================================

   Two states, one variable. `html.nav-collapsed` is set by an inline script in
   base.html before first paint and toggled by static/js/nav.js; every rule
   below hangs off it.

   Scoping note: the sidebar partial is included twice — once as the desktop
   rail inside .app-sidebar, once inside .app-mobile-nav__drawer. Every
   collapsed rule is therefore prefixed with .app-sidebar so the drawer copy is
   never affected. The drawer is always the expanded layout, which is also what
   the responsive rules below require.
   ================================================================= */

html.nav-collapsed {
  --nav-width: var(--nav-width-collapsed);
}

/* Bulma sizes .column.is-2 inside a min-width media query, which outranks a
   single-class selector. !important is the honest way to hand the width to the
   variable without editing the 24 page templates that carry the column class. */
.app-sidebar {
  width: var(--nav-width) !important;
  flex: 0 0 var(--nav-width) !important;
  max-width: none !important;
  transition: width 0.18s ease, flex-basis 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .app-sidebar { transition: none; }
}

/* ---- the toggle ----------------------------------------------------------
   Fixed rather than absolute: the sidebar scrolls its own overflow, and an
   absolutely positioned button inside it would scroll away and be clipped. */
.app-nav-toggle {
  position: fixed;
  top: calc(var(--navbar-height) + 1.15rem);
  left: calc(var(--nav-width) - 13px);
  z-index: 30;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg-2);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(9, 24, 39, 0.28);
  transition: left 0.18s ease, right 0.18s ease, background 0.15s ease;
}
.app-nav-toggle:hover { background: var(--brand-blue); color: #fff; }
.app-nav-toggle:focus-visible { outline: 2px solid var(--brand-mint); outline-offset: 2px; }
.app-nav-toggle__chevron {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}
/* Points inward to collapse, outward to expand. */
html.nav-collapsed .app-nav-toggle__chevron { transform: rotate(180deg); }

/* The drawer carries its own close button; this one would be a second control
   for a state the drawer does not have. */
.app-mobile-nav .app-nav-toggle { display: none; }

/* ---- collapsed rail ---------------------------------------------------- */
html.nav-collapsed .app-sidebar .app-menu { padding: 1rem 0.5rem; }

html.nav-collapsed .app-sidebar .menu-list > li > a,
html.nav-collapsed .app-sidebar .menu-list > li > .app-nav-group-label {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}

/* The label stays in the accessibility tree — it is the item's name, and a rail
   of unnamed icons is unusable with a screen reader. */
html.nav-collapsed .app-sidebar .menu-list > li > a > span,
html.nav-collapsed .app-sidebar .menu-list > li > .app-nav-group-label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

html.nav-collapsed .app-sidebar .app-nav-caret { display: none; }

/* Group headings give way to a thin divider, so the rail keeps the grouping
   without the words. */
html.nav-collapsed .app-sidebar .menu-list .menu-label {
  height: 1px;
  margin: 0.6rem 0.45rem;
  padding: 0;
  overflow: hidden;
  text-indent: -999em;
  background: var(--sidebar-group-border);
}

/* ---- identity reduces to the avatar ------------------------------------ */
html.nav-collapsed .app-sidebar .app-sidebar-identity {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
html.nav-collapsed .app-sidebar .app-sidebar-identity__info { display: none; }

/* ---- tooltips ----------------------------------------------------------
   Only on the rail, and only for the pointer and the keyboard — data-label is
   written by nav.js from the label it is standing in for. */
html.nav-collapsed .app-sidebar .menu-list > li > a,
html.nav-collapsed .app-sidebar .menu-list > li > .app-nav-group-label { position: relative; }

html.nav-collapsed .app-sidebar .menu-list > li > a::after,
html.nav-collapsed .app-sidebar .menu-list > li > .app-nav-group-label::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  padding: 0.3rem 0.55rem;
  border-radius: 7px;
  background: #0F2439;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(9, 24, 39, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
html.nav-collapsed .app-sidebar .menu-list > li > a:hover::after,
html.nav-collapsed .app-sidebar .menu-list > li > a:focus-visible::after,
html.nav-collapsed .app-sidebar .menu-list > li > .app-nav-group-label:hover::after,
html.nav-collapsed .app-sidebar .menu-list > li > .app-nav-group-label:focus-visible::after {
  opacity: 1;
}
/* A tooltip beside an open flyout would sit on top of it. */
html.nav-collapsed .app-sidebar .app-nav-group.has-flyout .app-nav-group-label::after {
  display: none;
}

/* ---- the group label is a button now ----------------------------------- */
.menu.app-menu .menu-list button.app-nav-group-label {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu.app-menu .menu-list button.app-nav-group-label:focus-visible {
  outline: 2px solid var(--brand-mint);
  outline-offset: -2px;
  border-radius: 8px;
}
.app-nav-caret {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.app-nav-group.is-open > .app-nav-group-label .app-nav-caret { transform: rotate(180deg); }

/* ---- flyout ------------------------------------------------------------
   Opens beside the rail instead of growing it, which is the rule the rail's
   fixed width depends on. */
html.nav-collapsed .app-sidebar .app-nav-group { position: relative; }

html.nav-collapsed .app-sidebar .app-nav-group ul.app-nav-sub {
  position: fixed;
  left: calc(var(--nav-width) + 8px);
  top: var(--app-flyout-top, 50%);
  z-index: 45;
  min-width: 13.5rem;
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--sidebar-border);
  border-radius: 10px;
  background: var(--sidebar-bg-2);
  box-shadow: 0 10px 26px rgba(9, 24, 39, 0.38);
}

.app-nav-sub__title {
  padding: 0.25rem 0.55rem 0.4rem;
  color: var(--sidebar-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Inline, the group's own label is directly above; a second heading repeating
   it would be noise. */
html:not(.nav-collapsed) .app-nav-sub__title { display: none; }

/* =================================================================
   Right to left
   Everything mirrors: the rail moves to the right edge, the toggle to its left
   with the chevron flipped, and tooltips and flyouts open toward the content.
   ================================================================= */
[dir="rtl"] .app-sidebar {
  border-right: none;
  border-left: 1px solid var(--sidebar-border);
}
[dir="rtl"] .app-nav-toggle {
  left: auto;
  right: calc(var(--nav-width) - 13px);
}
html[dir="rtl"] .app-nav-toggle__chevron,
[dir="rtl"] .app-nav-toggle__chevron { transform: rotate(180deg); }
html.nav-collapsed[dir="rtl"] .app-nav-toggle__chevron,
html.nav-collapsed [dir="rtl"] .app-nav-toggle__chevron { transform: rotate(0deg); }

[dir="rtl"] .app-nav-caret { margin-left: 0; margin-right: auto; }
[dir="rtl"] .menu.app-menu .menu-list button.app-nav-group-label { text-align: right; }

html.nav-collapsed[dir="rtl"] .app-sidebar .menu-list > li > a::after,
html.nav-collapsed[dir="rtl"] .app-sidebar .menu-list > li > .app-nav-group-label::after,
html.nav-collapsed [dir="rtl"] .app-sidebar .menu-list > li > a::after,
html.nav-collapsed [dir="rtl"] .app-sidebar .menu-list > li > .app-nav-group-label::after {
  left: auto;
  right: calc(100% + 10px);
}
html.nav-collapsed[dir="rtl"] .app-sidebar .app-nav-group ul.app-nav-sub,
html.nav-collapsed [dir="rtl"] .app-sidebar .app-nav-group ul.app-nav-sub {
  left: auto;
  right: calc(var(--nav-width) + 8px);
}

/* =================================================================
   Drawer widths
   Below this the rail is replaced by the off-canvas drawer, the collapse
   control is withdrawn, and the saved preference is ignored — the drawer is
   always the expanded layout. The breakpoint has one other copy, in nav.js.
   ================================================================= */
@media (max-width: 960px) {
  /* The saved preference does not apply here: the drawer is always the
     expanded layout, and the rail it would narrow is not on screen. */
  html.nav-collapsed { --nav-width: var(--nav-width-expanded); }
  .app-sidebar { display: none !important; }
  .app-nav-toggle { display: none; }
  .app-mobile-nav .app-sidebar-identity__info { display: flex; }
}
