* { box-sizing: border-box; }
html {
  height: 100%;
  width: 100%;
}

:root {
  --bg: #f4f5f7;
  --bg-soft-1: #e5e7eb;
  --bg-soft-2: #e5e7eb;
  --bg-soft-3: #d9dde3;
  --glass-opacity: 1;
  --panel: #ffffff;
  --panel-alt: #f0f2f4;
  --text: #1f2933;
  --muted: #5b6673;
  --acc1: #d7dce2;
  --acc2: #3f4c5c;
  --acc3: #2f3a45;
  --glass-border: rgba(96, 108, 118, 0.18);
  --glass-border-soft: rgba(143, 153, 163, 0.12);
  --glass-border-strong: rgba(96, 108, 118, 0.32);
  --glass-highlight: rgba(255, 255, 255, 0.6);
  --glow-primary: transparent;
  --glow-secondary: transparent;
  --nav-ambient-primary: rgba(99, 102, 241, 0.55);
  --nav-ambient-secondary: rgba(236, 72, 153, 0.4);
  --nav-ambient-tertiary: rgba(56, 189, 248, 0.35);
  --nav-surface-gradient: linear-gradient(160deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.9));
  --nav-surface-dark: linear-gradient(160deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.92));
  --nav-outline: rgba(99, 110, 123, 0.16);
  --nav-outline-strong: rgba(63, 76, 92, 0.35);
  --nav-highlight: linear-gradient(180deg, rgba(56, 189, 248, 1), rgba(59, 130, 246, 1));
  --nav-text-muted: rgba(91, 102, 115, 0.85);
  --nav-badge-bg: rgba(99, 102, 241, 0.16);
  --nav-badge-text: #4338ca;
  --shadow-xl: 0 20px 40px rgba(31, 41, 55, 0.08);
  --shadow-lg: 0 14px 30px rgba(31, 41, 55, 0.08);
  --shadow-md: 0 10px 24px rgba(31, 41, 55, 0.06);
  --shadow-sm: 0 4px 12px rgba(31, 41, 55, 0.05);
  --border-radius-lg: 20px;
  --border-radius-md: 14px;
  --border-radius-sm: 8px;
  --ease-spring: ease;
  --nav-width: 236px;
  --nav-width-collapsed: 78px;
  --page-padding-x: clamp(20px, 4vw, 48px);
  --page-padding-top: clamp(16px, 3vw, 32px);
  --page-padding-bottom: 48px;
  --topbar-height: 72px;
  --header-height: 64px;
  --btn-shadow: none;
  --resume-surface: #ffffff;
  --resume-surface-alt: #f4f5f7;
  --resume-border: rgba(99, 110, 123, 0.16);
  --resume-border-strong: rgba(99, 110, 123, 0.32);
  --resume-glow: transparent;
  --resume-accent: #3f4c5c;
  --resume-accent-soft: rgba(63, 76, 92, 0.12);
  --resume-accent-alt: #2f3a45;
  --resume-success: #3f6b4f;
  --resume-warning: #b88737;
  --surface: #ffffff;
  --surface-alt: #edf0f3;
  --surface-border: rgba(99, 110, 123, 0.16);
  --surface-border-strong: rgba(63, 76, 92, 0.28);
  --surface-glow: transparent;
  --control-bg: #ffffff;
  --control-bg-strong: #f4f5f7;
  --control-border: rgba(99, 110, 123, 0.18);
  --control-border-strong: rgba(63, 76, 92, 0.32);
  --pro-surface-1: #ffffff;
  --pro-surface-2: #f3f4f6;
  --pro-control-1: #ffffff;
  --pro-control-2: #e5e7eb;
  --kpi-sparkline-color: #3f4c5c;
  --kpi-forecast-color: #8d7855;
  --kpi-target-color: rgba(63, 76, 92, 0.6);
  --kpi-badge-bg: rgba(143, 153, 163, 0.2);
  --kpi-badge-text: #3f4c5c;
  --kpi-positive-bg: rgba(63, 107, 79, 0.16);
  --kpi-positive-text: #2c5b40;
  --kpi-negative-bg: rgba(159, 72, 68, 0.16);
  --kpi-negative-text: #7a2f2b;
  --pro-border-muted: rgba(143, 153, 163, 0.24);
  --pro-border: rgba(99, 110, 123, 0.24);
  --pro-border-strong: rgba(63, 76, 92, 0.34);
  --pro-primary: #3f4c5c;
  --pro-primary-strong: #2f3a45;
  --pro-primary-soft: rgba(63, 76, 92, 0.12);
  --pro-primary-glow: transparent;
  --pro-highlight: rgba(143, 153, 163, 0.2);
  --pro-shadow-lg: 0 18px 40px rgba(31, 41, 55, 0.12);
  --pro-shadow-xl: 0 24px 56px rgba(31, 41, 55, 0.14);
  --pro-shell-top: #ffffff;
  --pro-shell-bottom: #eef1f4;
  --pro-shell-border: rgba(143, 153, 163, 0.3);
  --pro-shell-border-strong: rgba(63, 76, 92, 0.32);
  --pro-shell-highlight: rgba(255, 255, 255, 0.4);
  --pro-accent-main: #3f4c5c;
  --pro-accent-strong: #2f3a45;
  --pro-accent-soft: rgba(63, 76, 92, 0.16);
  --pro-accent-glow: transparent;
  --pro-accent-shadow: rgba(31, 41, 55, 0.18);
  --pro-panel-top: #ffffff;
  --pro-panel-bottom: #f1f3f6;
  --pro-control-top: #ffffff;
  --pro-control-bottom: #e5e7eb;
  --pro-card-top: #ffffff;
  --pro-card-bottom: #f5f6f8;
  --theme-gradient-main: none;
  --theme-gradient-accent: none;
  --theme-microtexture: none;
  --theme-microtexture-size: 0;
  --theme-microtexture-opacity: 0;
  --theme-transition-duration: 160ms;
  --hero-motion-distance: 0;
  --theme-hero-surface: #ffffff;
  --theme-hero-overlay: none;
  --theme-hero-visual: none;
  --theme-hero-border: var(--surface-border);
  --theme-hero-shadow: none;
  --theme-hero-visual-shadow: none;
  --theme-illustration-primary: rgba(63, 76, 92, 0.2);
  --theme-illustration-secondary: rgba(143, 153, 163, 0.2);
  --theme-illustration-tertiary: rgba(99, 110, 123, 0.3);
  --theme-illustration-stroke: rgba(143, 153, 163, 0.3);
  --theme-illustration-glimmer: rgba(143, 153, 163, 0.4);
  --theme-illustration-size: clamp(180px, 24vw, 280px);
  --theme-illustration-top: 0;
  --theme-illustration-right: auto;
  --theme-illustration-left: auto;
  --theme-illustration-opacity: 0.75;
  --modal-backdrop: rgba(15, 23, 42, 0.55);
  --modal-surface: #ffffff;
  --modal-border: rgba(15, 23, 42, 0.08);
  --modal-shadow: 0 32px 80px rgba(15, 23, 42, 0.18);
  --modal-shadow-active: 0 36px 96px rgba(15, 23, 42, 0.2);
  --modal-actions-surface: #ffffff;
  --modal-actions-border: rgba(15, 23, 42, 0.06);
  --modal-actions-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.06);
  --modal-body-surface: #f8fafc;
  --modal-body-border: rgba(15, 23, 42, 0.06);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.96rem;
  line-height: 1.55;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

@supports (height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}
body::before,
body::after {
  content: none !important;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

@supports (height: 100dvh) {
  .app-shell {
    min-height: 100dvh;
  }
}

.app-shell__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
}

@supports (height: 100dvh) {
  .app-shell__content {
    min-height: 100dvh;
  }
}

.sidebar {
  width: var(--nav-width);
  background: var(--nav-surface-gradient);
  border-right: 1px solid var(--nav-outline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 12px 0 32px rgba(15, 23, 42, 0.04);
  --sidebar-padding-block: clamp(8px, calc(0.45rem + 0.35vw), 14px);
  --sidebar-padding-inline: clamp(10px, 2.4vw, 18px);
  padding: var(--sidebar-padding-block) var(--sidebar-padding-inline);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(calc(16px * var(--glass-opacity, 1)));
  --sidebar-padding-y: calc(var(--sidebar-padding-block) * 2);
  --sidebar-nav-gap: clamp(0px, 0.35rem, 10px);
  --sidebar-brand-min: clamp(32px, calc(2.1rem + 0.25vw), 48px);
  --sidebar-brand-block: calc(var(--sidebar-padding-y) + var(--sidebar-brand-min) + var(--sidebar-nav-gap));
  --sidebar-height: 100vh;
}

@supports (height: 100dvh) {
  .sidebar {
    min-height: 100dvh;
    height: 100dvh;
    --sidebar-height: 100dvh;
  }
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sidebar-nav-gap);
  flex: 1;
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

.sidebar__ambient {
  position: absolute;
  inset: -18% -35%;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.05);
  opacity: 0.85;
}

.sidebar__ambient-orb {
  position: absolute;
  width: clamp(180px, 32vw, 320px);
  height: clamp(180px, 32vw, 320px);
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.68;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
  animation: sidebar-orb-float 18s ease-in-out infinite;
}

.sidebar__ambient-orb--primary {
  top: -16%;
  left: -12%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), var(--nav-ambient-primary));
  animation-delay: -4s;
}

.sidebar__ambient-orb--secondary {
  bottom: -10%;
  right: -8%;
  background: radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.65), var(--nav-ambient-secondary));
  animation-delay: -11s;
}

.sidebar__ambient-noise {
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.5px, transparent 0.5px);
  background-size: 22px 22px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  animation: sidebar-noise-fade 12s ease-in-out infinite;
}

@keyframes sidebar-orb-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  25% {
    transform: translate3d(12px, -16px, 0) scale(1.04);
  }
  50% {
    transform: translate3d(-10px, 12px, 0) scale(1.02);
  }
  75% {
    transform: translate3d(18px, 6px, 0) scale(1.05);
  }
}

@keyframes sidebar-noise-fade {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.18;
  }
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(8px, calc(0.55rem + 0.18vw), 12px) clamp(8px, 1.3vw, 12px);
  margin-bottom: clamp(4px, calc(0.35rem + 0.2vw), 10px);
  border-radius: clamp(10px, calc(0.9rem + 0.4vw), 18px);
  border: 1px solid transparent;
  background: linear-gradient(140deg, rgba(63, 76, 92, 0.08), rgba(143, 153, 163, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease,
    transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.sidebar__logo-wrap {
  width: clamp(42px, calc(2.6rem + 0.3vw), 56px);
  height: clamp(42px, calc(2.6rem + 0.3vw), 56px);
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(226, 232, 240, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px rgba(31, 41, 55, 0.12);
}

.sidebar__logo {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.sidebar__brand-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar__name {
  font-size: clamp(1rem, calc(1.05rem + 0.25vw), 1.22rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.sidebar__tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.sidebar__nav {
  --nav-item-gap: clamp(2px, calc(0.3rem + 0.1vw), 10px);
  --nav-item-block: clamp(44px, calc(2.3rem + 0.25vw), 54px);
  display: flex;
  flex-direction: column;
  gap: var(--nav-item-gap);
  flex: 1;
  min-height: 0;
  align-items: stretch;
  margin-top: clamp(4px, calc(0.35rem + 0.2vw), 12px);
  position: relative;
  z-index: 1;
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 14px);
  padding-block: clamp(4px, 0.8vh, 10px);
  position: relative;
}

.sidebar__section + .sidebar__section {
  border-top: 1px solid rgba(99, 110, 123, 0.12);
  padding-top: clamp(10px, 1.6vh, 18px);
  margin-top: clamp(10px, 1.6vh, 18px);
}

.sidebar__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-inline: clamp(6px, 1vw, 10px);
  color: var(--nav-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  font-weight: 600;
}

.sidebar__section-label {
  white-space: nowrap;
}

.sidebar__section-caption {
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
  text-transform: none;
}

.sidebar__menu,
.sidebar__section-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--nav-item-gap);
}

.sidebar__menu-item {
  position: relative;
}

.sidebar__menu-link {
  inline-size: 100%;
  display: flex;
  align-items: center;
  gap: clamp(10px, calc(var(--nav-item-block) * 0.24), 14px);
  padding: clamp(10px, calc(var(--nav-item-block) * 0.38), 14px)
    clamp(10px, 1.4vw, 14px);
  border-radius: clamp(10px, calc(var(--nav-item-block) * 0.32), 14px);
  color: var(--text);
  font-weight: 560;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08), 0 10px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(0.5px);
  transition: color 0.25s ease, transform 0.25s ease, background 0.35s ease,
    box-shadow 0.35s ease;
}

.sidebar__menu-link:focus {
  outline: none;
}

.sidebar__menu-link::before {
  content: '';
  position: absolute;
  inset-block: clamp(6px, 0.9vh, 12px);
  left: clamp(4px, 0.6vw, 8px);
  width: 5px;
  border-radius: 999px;
  background: var(--nav-highlight);
  opacity: 0;
  transform: scaleY(0.45);
  transform-origin: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar__menu-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sidebar__menu-link:hover,
.sidebar__menu-link:focus-visible {
  transform: translateX(4px);
  outline: none;
  color: var(--acc2);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.18), 0 16px 32px rgba(15, 23, 42, 0.12);
}

.sidebar__menu-link:hover::before,
.sidebar__menu-link:focus-visible::before {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar__menu-link:hover::after,
.sidebar__menu-link:focus-visible::after {
  opacity: 0.55;
}

.sidebar__icon {
  --icon-size: clamp(42px, calc(var(--nav-item-block) * 0.8), 56px);
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: clamp(12px, calc(var(--icon-size) * 0.28), 18px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, calc(var(--nav-item-block) * 0.34), 2.4rem);
  position: relative;
  flex-shrink: 0;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(226, 232, 240, 0.54));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.sidebar__menu-link .sidebar__icon,
.sidebar__menu-link .sidebar__icon-glyph {
  opacity: 1;
  visibility: visible;
}

.sidebar__icon::before {
  content: '';
  position: absolute;
  inset: 22%;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.26), rgba(59, 130, 246, 0));
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar__icon-glow {
  position: absolute;
  inset: -22%;
  border-radius: inherit;
  background: radial-gradient(circle, var(--nav-ambient-tertiary), transparent 68%);
  filter: blur(18px);
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar__icon-glyph {
  position: relative;
  z-index: 1;
  filter: none;
}

.sidebar__menu-link:hover:not(.is-active) .sidebar__icon::before,
.sidebar__menu-link:focus-visible:not(.is-active) .sidebar__icon::before {
  opacity: 0.65;
  transform: scale(1);
}

.sidebar__menu-link:hover:not(.is-active) .sidebar__icon-glow,
.sidebar__menu-link:focus-visible:not(.is-active) .sidebar__icon-glow {
  opacity: 0.58;
  transform: scale(1);
}

.sidebar__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar__label {
  font-size: clamp(0.9rem, calc(var(--nav-item-block) * 0.18), 1.02rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease, max-width 0.3s ease;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.sidebar__meta {
  font-size: clamp(0.7rem, calc(var(--nav-item-block) * 0.12), 0.82rem);
  color: var(--nav-text-muted);
  letter-spacing: 0.02em;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  text-transform: none;
}

@keyframes sidebar-glow-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.95;
  }
}

.sidebar__menu-link.is-active,
.sidebar__menu-link[aria-current="page"] {
  color: var(--acc2);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.24), 0 18px 40px rgba(56, 189, 248, 0.18);
}

.sidebar__menu-link.is-active::before,
.sidebar__menu-link[aria-current="page"]::before {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar__menu-link.is-active::after,
.sidebar__menu-link[aria-current="page"]::after {
  opacity: 0.65;
}

.sidebar__menu-link.is-active .sidebar__icon::before,
.sidebar__menu-link[aria-current="page"] .sidebar__icon::before {
  opacity: 1;
  transform: scale(1.08);
}

.sidebar__menu-link.is-active .sidebar__icon-glow,
.sidebar__menu-link[aria-current="page"] .sidebar__icon-glow {
  opacity: 0.92;
  transform: scale(1.08);
  animation: sidebar-glow-pulse 2s ease-in-out infinite;
}

.sidebar__menu-link.is-active .sidebar__icon-glyph,
.sidebar__menu-link[aria-current="page"] .sidebar__icon-glyph {
  filter: none;
}

.sidebar__menu-link.is-active .sidebar__label,
.sidebar__menu-link[aria-current="page"] .sidebar__label {
  font-weight: 600;
}

.sidebar__menu-link.is-active .sidebar__meta,
.sidebar__menu-link[aria-current="page"] .sidebar__meta {
  opacity: 1;
  color: var(--acc2);
}

.sidebar__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 18px);
  padding-top: clamp(14px, 2vh, 24px);
  position: relative;
  z-index: 1;
}

.sidebar__command {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(10px, 0.85rem, 14px) clamp(12px, 1.2rem, 16px);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 16px 32px rgba(15, 23, 42, 0.12);
  color: var(--text);
  font-weight: 560;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease,
    background 0.3s ease;
}

.sidebar__command:hover,
.sidebar__command:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.34);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2), 0 22px 38px rgba(99, 102, 241, 0.22);
  outline: none;
}

.sidebar__command-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(99, 102, 241, 0.4));
  font-size: 1.3rem;
  filter: drop-shadow(0 8px 12px rgba(99, 102, 241, 0.3));
}

.sidebar__command-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.sidebar__command-shortcut {
  margin: 0;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(248, 250, 252, 0.75);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__profile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: clamp(12px, 1.1rem, 16px);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 18px 42px rgba(15, 23, 42, 0.16);
}

.sidebar__profile-status {
  position: absolute;
  top: clamp(10px, 1.1vw, 14px);
  left: clamp(14px, 1.4vw, 18px);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 1), rgba(56, 189, 248, 0.2));
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
  pointer-events: none;
}

.sidebar__profile-avatar {
  width: clamp(48px, 4vw, 56px);
  height: clamp(48px, 4vw, 56px);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(236, 72, 153, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 32px rgba(236, 72, 153, 0.32);
}

.sidebar__profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sidebar__profile-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.sidebar__profile-role {
  font-size: 0.78rem;
  color: var(--nav-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar__profile-theme,
.sidebar__profile-pin {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.72);
  display: grid;
  place-items: center;
  color: var(--nav-text-muted);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.3s ease, background 0.3s ease,
    color 0.3s ease;
}

.sidebar__profile-theme:hover,
.sidebar__profile-theme:focus-visible,
.sidebar__profile-pin:hover,
.sidebar__profile-pin:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(255, 255, 255, 0.82);
  color: var(--acc2);
  outline: none;
}

.sidebar__profile-pin[aria-pressed="true"] {
  color: rgba(99, 102, 241, 1);
  border-color: rgba(99, 102, 241, 0.38);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.32), 0 12px 24px rgba(99, 102, 241, 0.22);
}

.sidebar__profile-theme .theme-toggle__icon {
  font-size: 1.05rem;
}

.sidebar:hover .sidebar__brand,
.sidebar:focus-within .sidebar__brand,
.sidebar[data-expanded='true'] .sidebar__brand {
  border-color: rgba(63, 76, 92, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 22px 40px rgba(15, 23, 42, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 240, 244, 0.92));
}

@media (hover: hover) and (min-width: 901px) {
  .sidebar {
    width: var(--nav-width-collapsed);
  }

  .sidebar:hover,
  .sidebar:focus-within,
  .sidebar[data-expanded='true'] {
    width: var(--nav-width);
    padding-inline: clamp(18px, 3vw, 26px);
  }

  .sidebar[data-expanded='true'] .sidebar__brand,
  .sidebar:hover .sidebar__brand,
  .sidebar:focus-within .sidebar__brand {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 240, 244, 0.92));
    border-color: rgba(63, 76, 92, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 22px 40px rgba(15, 23, 42, 0.12);
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) {
    --collapsed-padding: clamp(6px, 1vw, 10px);
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__brand {
    justify-content: center;
    padding-inline: var(--collapsed-padding);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__brand-meta,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__label,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__meta,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__tagline,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__section-head,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__command-label,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__command-shortcut,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__profile-meta,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__profile-theme,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__profile-pin {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__section-head {
    max-height: 0;
    overflow: hidden;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__brand-meta {
    max-width: 0;
    flex: 0 0 auto;
    overflow: hidden;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__command {
    justify-content: center;
    gap: 0;
    padding-inline: var(--collapsed-padding);
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__profile {
    grid-template-columns: auto;
    justify-content: center;
    padding-inline: var(--collapsed-padding);
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__profile-avatar {
    margin-inline: auto;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__profile-status {
    opacity: 0;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link {
    justify-content: center;
    padding-inline: var(--collapsed-padding);
    gap: 0;
    background: transparent;
    box-shadow: none;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link::before,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link::after {
    opacity: 0;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__text {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link {
    transform: translateX(0);
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link .sidebar__icon {
    margin-inline-end: 0;
    background: transparent;
    box-shadow: none;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link .sidebar__icon::before {
    opacity: 0;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link .sidebar__icon-glow {
    opacity: 0;
    transform: scale(0.75);
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link.is-active,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link[aria-current="page"] {
    background: transparent;
    box-shadow: none;
  }

  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link.is-active .sidebar__icon::before,
  .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link[aria-current="page"] .sidebar__icon::before {
    opacity: 0;
  }

  body.dark .sidebar:not(:hover):not(:focus-within):not([data-expanded='true']) .sidebar__menu-link {
    background: transparent;
  }
}

body.dark {
  --nav-text-muted: rgba(186, 199, 216, 0.88);
}

body.dark .sidebar {
  background: var(--nav-surface-dark);
  border-right: 1px solid rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.1), 12px 0 32px rgba(2, 6, 23, 0.6);
}

body.dark .sidebar__ambient-orb--primary {
  background: radial-gradient(circle at 30% 30%, rgba(30, 41, 59, 0.85), rgba(59, 130, 246, 0.45));
}

body.dark .sidebar__ambient-orb--secondary {
  background: radial-gradient(circle at 70% 70%, rgba(30, 41, 59, 0.8), rgba(236, 72, 153, 0.55));
}

body.dark .sidebar__ambient-noise {
  opacity: 0.22;
}

body.dark .sidebar__menu-link {
  color: rgba(226, 232, 240, 0.96);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18), 0 16px 30px rgba(2, 6, 23, 0.52);
}

body.dark .sidebar__menu-link:hover,
body.dark .sidebar__menu-link:focus-visible {
  background: rgba(30, 41, 59, 0.72);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.32), 0 24px 40px rgba(30, 64, 175, 0.46);
}

body.dark .sidebar__menu-link.is-active,
body.dark .sidebar__menu-link[aria-current="page"] {
  color: rgba(191, 219, 254, 1);
  background: rgba(30, 64, 175, 0.58);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.42), 0 28px 56px rgba(30, 64, 175, 0.5);
}

body.dark .sidebar__brand {
  background: linear-gradient(140deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.85));
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.18), 0 22px 40px rgba(2, 6, 23, 0.4);
}

body.dark .sidebar:hover .sidebar__brand,
body.dark .sidebar:focus-within .sidebar__brand,
body.dark .sidebar[data-expanded='true'] .sidebar__brand {
  background: linear-gradient(140deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.25), 0 26px 48px rgba(2, 6, 23, 0.45);
}

body.dark .sidebar__icon {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.72));
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.4), 0 8px 18px rgba(2, 6, 23, 0.45);
}

body.dark .sidebar__command {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(59, 130, 246, 0.24);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12), 0 20px 44px rgba(2, 6, 23, 0.55);
  color: rgba(226, 232, 240, 0.98);
}

body.dark .sidebar__command-icon {
  background: radial-gradient(circle at 35% 35%, rgba(191, 219, 254, 0.9), rgba(30, 64, 175, 0.55));
  filter: drop-shadow(0 10px 18px rgba(37, 99, 235, 0.5));
}

body.dark .sidebar__command:hover,
body.dark .sidebar__command:focus-visible {
  background: rgba(30, 64, 175, 0.65);
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.38), 0 26px 52px rgba(30, 64, 175, 0.55);
}

body.dark .sidebar__command-shortcut {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(59, 130, 246, 0.36);
  color: rgba(191, 219, 254, 0.9);
}

body.dark .sidebar__profile {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18), 0 28px 52px rgba(2, 6, 23, 0.6);
}

body.dark .sidebar__profile-name {
  color: rgba(226, 232, 240, 0.98);
}

body.dark .sidebar__profile-role {
  color: rgba(148, 163, 184, 0.9);
}

body.dark .sidebar__profile-theme,
body.dark .sidebar__profile-pin {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(59, 130, 246, 0.26);
  color: rgba(191, 219, 254, 0.82);
}

body.dark .sidebar__profile-theme:hover,
body.dark .sidebar__profile-theme:focus-visible,
body.dark .sidebar__profile-pin:hover,
body.dark .sidebar__profile-pin:focus-visible {
  background: rgba(30, 64, 175, 0.68);
  border-color: rgba(147, 197, 253, 0.45);
  color: rgba(226, 232, 240, 0.98);
}

body.dark .sidebar__profile-pin[aria-pressed="true"] {
  background: rgba(30, 64, 175, 0.7);
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.38), 0 18px 36px rgba(30, 64, 175, 0.45);
}

body.dark .sidebar__menu-link.is-active .sidebar__icon-glyph,
body.dark .sidebar__menu-link[aria-current="page"] .sidebar__icon-glyph {
  filter: none;
}

.topbar {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 16px);
  padding: 0 clamp(14px, 2vw, 24px);

  background: var(--bg);
  color: var(--text);

  min-height: var(--topbar-height);
  width: 100%;
  flex-wrap: wrap;
  align-content: flex-start;
  row-gap: clamp(6px, 1vw, 12px);
}

.topbar__primary {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: clamp(6px, 1vw, 10px);
}

.nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;

  background: var(--surface-alt);

  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {

  background: #e4e8ed;

  outline: none;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 600;
  flex: 0 0 auto;
}

.topbar__utility-row {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: clamp(6px, 1vw, 10px);
}

.topbar__utility-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 14px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar__logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.topbar__name {
  font-size: clamp(1rem, 2vw, 1.15rem);
  white-space: nowrap;
}

.topbar-nav {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  align-items: stretch;
  padding: clamp(2px, 0.6vw, 6px) 0;
  position: relative;
}

.topbar-nav::-webkit-scrollbar {
  height: 6px;
}

.topbar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.topbar-nav__list {
  display: flex;
  align-items: stretch;
  gap: clamp(6px, 1.2vw, 14px);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.topbar-nav__item {
  flex: 1 1 0;
  min-width: 0;
}

.topbar-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 8px);
  padding: clamp(8px, 1.8vw, 14px) clamp(12px, 2.4vw, 18px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.82rem, 1.1vw, 1.02rem);
  letter-spacing: 0.005em;
  min-width: 0;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.topbar-nav__link:hover,
.topbar-nav__link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-color: rgba(99, 110, 123, 0.32);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 16px 34px rgba(15, 23, 42, 0.12);
}

.topbar-nav__link.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(59, 130, 246, 0.85));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 16px 36px rgba(56, 189, 248, 0.32);
}

.topbar-nav__link.is-active .topbar-nav__icon {
  opacity: 1;
}

.topbar-nav__icon {
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  line-height: 1;
  opacity: 0.8;
}

.topbar-nav__label {
  line-height: 1.1;
  white-space: nowrap;
}

body.dark .topbar-nav__link {
  background: rgba(15, 23, 42, 0.68);
  color: rgba(226, 232, 240, 0.86);
  border-color: rgba(51, 65, 85, 0.55);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.16), 0 12px 28px rgba(2, 6, 23, 0.55);
}

body.dark .topbar-nav__link:hover,
body.dark .topbar-nav__link:focus-visible {
  background: rgba(30, 41, 59, 0.92);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.45);
}

body.dark .topbar-nav__link.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(14, 165, 233, 0.9));
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.35);
}

.topbar-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  position: relative;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1), rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0));
}

.topbar-nav::-webkit-scrollbar {
  height: 6px;
}

.topbar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.topbar-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  white-space: nowrap;
}

.topbar-nav__item {
  flex: 0 0 auto;
}

.topbar-nav__link {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1.4vw, 12px);
  padding: clamp(10px, 2.4vw, 16px) clamp(14px, 3.6vw, 22px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.9rem, 1.4vw, 1.06rem);
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.topbar-nav__link:hover,
.topbar-nav__link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-color: rgba(99, 110, 123, 0.32);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 16px 34px rgba(15, 23, 42, 0.12);
}

.topbar-nav__link.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(59, 130, 246, 0.85));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 16px 36px rgba(56, 189, 248, 0.32);
}

.topbar-nav__link.is-active .topbar-nav__icon {
  opacity: 1;
}

.topbar-nav__icon {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1;
  opacity: 0.8;
}

.topbar-nav__label {
  white-space: nowrap;
}

body.dark .topbar-nav {
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1), rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0));
}

body.dark .topbar-nav__link {
  background: rgba(15, 23, 42, 0.68);
  color: rgba(226, 232, 240, 0.86);
  border-color: rgba(51, 65, 85, 0.55);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.16), 0 12px 28px rgba(2, 6, 23, 0.55);
}

body.dark .topbar-nav__link:hover,
body.dark .topbar-nav__link:focus-visible {
  background: rgba(30, 41, 59, 0.92);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.45);
}

body.dark .topbar-nav__link.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(14, 165, 233, 0.9));
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.35);
}

.topbar__spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 16px);
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: clamp(6px, 1vw, 10px);
}

.topbar__action {
  margin: 0;
}

.team-chat-settings-popover {
  position: fixed;
  top: calc(var(--topbar-height, 64px) + clamp(10px, 1.4vw, 20px));
  right: clamp(16px, 2vw, 32px);
  z-index: 1040;
  width: min(300px, calc(100vw - 32px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.team-chat-settings-popover[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.team-chat-settings-popover__inner {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.94));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  padding: 18px;
  outline: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-chat-settings-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-chat-settings-popover__header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.team-chat-settings-popover__close {
  border: none;
  background: transparent;
  color: rgba(15, 23, 42, 0.65);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.team-chat-settings-popover__close:hover,
.team-chat-settings-popover__close:focus-visible {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(15, 23, 42, 0.85);
  outline: none;
}

.team-chat-settings-popover__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-chat-font-scale {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.7);
}

.team-chat-font-scale span {
  font-weight: 600;
  color: #0f172a;
}

.team-chat-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.team-chat-font-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.team-chat-font-btn--increase {
  background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
  box-shadow: 0 12px 20px rgba(74, 222, 128, 0.32);
}

.team-chat-font-btn--decrease {
  background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
  box-shadow: 0 12px 20px rgba(248, 113, 113, 0.32);
}

.team-chat-font-btn:hover,
.team-chat-font-btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(0.95);
  box-shadow: 0 14px 22px rgba(15, 23, 42, 0.2);
}

.team-chat-font-btn:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.4);
  outline-offset: 2px;
}

.topbar__actions .security-topbar-notes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
  border: 1px solid #93c5fd;
  color: #0f172a;
  box-shadow: 0 12px 24px rgba(147, 197, 253, 0.32);
  font-weight: 600;
  transition: filter 0.2s ease;
}

.topbar__actions .security-topbar-notes:hover {
  filter: brightness(0.97);
}

.topbar__actions .security-topbar-notes span[aria-hidden] {
  font-size: 1.15rem;
}

.topbar__actions .user-pill {
  display: inline;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
}

.topbar__settings {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.95) 0%, rgba(203, 213, 225, 0.9) 100%);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.topbar__settings:hover,
.topbar__settings:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.18);
  filter: brightness(0.97);
}

.topbar__settings span[aria-hidden] {
  font-size: 1.05rem;
}

.quick-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 12px);
  flex-wrap: nowrap;
}

.topbar__theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-alt);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  flex: 0 0 auto;
}

.topbar__theme-toggle:hover,
.topbar__theme-toggle:focus-visible {
  transform: translateY(-1px);
  background: var(--control-bg);
  border-color: var(--surface-border-strong);
  outline: none;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

.topbar__theme-toggle:focus-visible {
  outline: 2px solid rgba(63, 76, 92, 0.24);
  outline-offset: 3px;
}

.topbar__theme-toggle .theme-toggle__icon {
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1;
}

.topbar__theme-toggle .theme-toggle__icon--moon {
  display: none;
}

body.dark .topbar__theme-toggle {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.4);
  color: #f8fafc;
}

body.dark .topbar__theme-toggle:hover,
body.dark .topbar__theme-toggle:focus-visible {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 10px 24px rgba(8, 14, 28, 0.45);
}

body.dark .topbar__theme-toggle .theme-toggle__icon--sun {
  display: none;
}

body.dark .topbar__theme-toggle .theme-toggle__icon--moon {
  display: inline;
}

.quick-link {
  width: clamp(30px, 2.6vw, 34px);
  height: clamp(30px, 2.6vw, 34px);
  border-radius: 8px;
  border: none;

  background: var(--surface-alt);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3px, 0.6vw, 4px);
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.quick-link img {
  width: clamp(16px, 1.8vw, 20px);
  height: 20px;

}

.quick-link:hover,
.quick-link:focus-visible {

  background: #e4e8ed;
  outline: 2px solid rgba(63, 76, 92, 0.24);

  outline-offset: 3px;
}

.quick-link--action {
  font-size: 1.1rem;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--surface-border);
  font-weight: 500;
  color: var(--text);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1200;
}

body.sidebar-open .mobile-nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.sidebar-open {
  overflow: hidden;
}

@media (min-width: 901px) {
  .nav-toggle {
    display: none;
  }

  .mobile-nav-overlay {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(260px, 80vw);
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 1300;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-nav-overlay {
    display: block;
  }
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}
a {
  color: var(--acc2);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--acc3);
  text-decoration: underline;
}
h1,h2,h3 { margin: 0 0 10px 0; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.row { display:flex; gap:12px; flex-wrap: wrap; }
.col { flex: 1 1 380px; }
.page {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: var(--page-padding-top) var(--page-padding-x) var(--page-padding-bottom);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
  position: relative;
  min-height: max(
    0px,
    calc(100vh - var(--topbar-height) - var(--page-padding-top) - var(--page-padding-bottom))
  );
}

@supports (height: 100dvh) {
  .page {
    min-height: max(
      0px,
      calc(100dvh - var(--topbar-height) - var(--page-padding-top) - var(--page-padding-bottom))
    );
  }
}
.page::before {
  content: none;
}
.content {
  position: relative;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  transform: none;
  transition: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.content::before,
.content::after {
  display: none;
}
.content:focus-within {
  box-shadow: none;
  transform: none;
}
.content > * {
  position: relative;
  z-index: 1;
}
.content > * + * {
  margin-top: clamp(24px, 3vw, 40px);
}

.page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 56px);
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.page > .page-section {
  flex: 1 1 auto;
  min-height: auto;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.section-header h1,
.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

.section-header .section-subtitle {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 22px);
}

.section-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.section-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

[data-theme] {
  position: relative;
  isolation: isolate;
  --theme-gradient-main-active: var(--theme-gradient-main);
  --theme-gradient-accent-active: var(--theme-gradient-accent);
  --theme-microtexture-active: var(--theme-microtexture);
  --theme-microtexture-size-active: var(--theme-microtexture-size);
  --theme-microtexture-opacity-active: var(--theme-microtexture-opacity);
}


[data-theme="employees"] {
  --theme-gradient-main: none;
  --theme-gradient-accent: none;
  --theme-microtexture: none;
  --theme-microtexture-size: 0;
  --theme-microtexture-opacity: 0;
  --theme-illustration-opacity: 0;
  --surface-border-strong: rgba(15, 23, 42, 0.18);
}

[data-theme="finance"] {
  --theme-gradient-main: none;
  --theme-gradient-accent: none;
  --theme-microtexture: none;
  --theme-microtexture-size: 0;
  --theme-microtexture-opacity: 0;
  --theme-illustration-opacity: 0;
}


[data-theme]::before {
  content: "";
  position: absolute;
  inset: clamp(-36px, -4vw, -18px);
  background-image: var(--theme-gradient-main-active), var(--theme-gradient-accent-active);
  background-size: 140% 140%, 120% 120%;
  background-repeat: no-repeat;
  opacity: 0.85;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity var(--theme-transition-duration) var(--ease-spring), transform var(--theme-transition-duration) var(--ease-spring);
  pointer-events: none;
  z-index: -3;
}

[data-theme]::after {
  content: "";
  position: absolute;
  inset: -1px;
  background-image: var(--theme-microtexture-active);
  background-size: var(--theme-microtexture-size-active);
  background-repeat: repeat;
  opacity: var(--theme-microtexture-opacity-active);
  mix-blend-mode: soft-light;
  animation: themeTextureDrift 32s linear infinite;
  pointer-events: none;
  z-index: -2;
}

[data-theme] > :not(.theme-illustration):not(style) {
  position: relative;
  z-index: 1;
}

[data-theme].theme-context--ready::before,
[data-theme].theme-context--ready::after {
  transition: opacity var(--theme-transition-duration) var(--ease-spring), transform var(--theme-transition-duration) var(--ease-spring);
}

[data-theme].is-theme-transitioning::before {
  opacity: 0.6;
  transform: translate3d(0, 6px, 0) scale(0.98);
}

[data-theme].is-theme-transitioning::after {
  opacity: calc(var(--theme-microtexture-opacity-active) * 0.6);
}

.theme-illustration {
  position: absolute;
  top: var(--theme-illustration-top, -14%);
  right: var(--theme-illustration-right, -6%);
  left: var(--theme-illustration-left, auto);
  width: var(--theme-illustration-size);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: var(--theme-illustration-opacity, 1);
  filter: drop-shadow(0 24px 60px rgba(3, 8, 23, 0.42));
  z-index: 0;
}

.theme-illustration__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-illustration__orb {
  fill: var(--theme-illustration-primary);
  opacity: 0.42;
  transform-origin: center;
  animation: themeOrbFloat 18s ease-in-out infinite;
}

.theme-illustration__orb--secondary {
  fill: var(--theme-illustration-secondary);
  opacity: 0.36;
  animation-duration: 26s;
}

.theme-illustration__orb--tertiary {
  fill: var(--theme-illustration-tertiary);
  opacity: 0.28;
  animation-duration: 32s;
}

.theme-illustration__path {
  fill: none;
  stroke: var(--theme-illustration-stroke);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 6 18;
  animation: themeOrbit 28s linear infinite;
}

.theme-illustration__node {
  fill: var(--theme-illustration-secondary);
  opacity: 0.75;
  animation: themeSparkle 7.5s ease-in-out infinite alternate;
}

.theme-illustration__node--accent {
  fill: var(--theme-illustration-tertiary);
  animation-duration: 6.8s;
}

.theme-illustration__spark circle {
  fill: var(--theme-illustration-glimmer);
  opacity: 0.45;
  animation: themeSparkle 8.5s ease-in-out infinite alternate;
}

.theme-illustration__svg--front .theme-illustration__spark circle:nth-child(2) {
  animation-delay: 1.2s;
}

.theme-illustration__svg--front .theme-illustration__spark circle:nth-child(3) {
  animation-delay: 2s;
}

[data-hero] {
  position: relative;
  opacity: 0;
  transform: translate3d(0, var(--hero-motion-distance, 32px), 0) scale(0.98);
  filter: blur(0.6px);
  transition: opacity 420ms var(--ease-spring), transform 560ms var(--ease-spring), filter 520ms ease;
}

[data-hero].is-hero-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: none;
}

@keyframes themeTextureDrift {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 60px 40px;
  }
  100% {
    background-position: 0 0;
  }
}

@keyframes themeOrbFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(8px, -12px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes themeOrbit {
  0% {
    stroke-dashoffset: 0;
    opacity: 0.55;
  }
  50% {
    opacity: 0.85;
  }
  100% {
    stroke-dashoffset: -320;
    opacity: 0.55;
  }
}

@keyframes themeSparkle {
  0% {
    opacity: 0.12;
    transform: scale(0.85);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.15);
  }
  100% {
    opacity: 0.12;
    transform: scale(0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme]::after {
    animation: none;
  }
  .theme-illustration__orb,
  .theme-illustration__path,
  .theme-illustration__spark circle,
  .theme-illustration__node,
  [data-hero] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}


/* Module theme palettes */
[data-theme] {
  --theme-gradient-main: radial-gradient(140% 140% at 12% 12%, rgba(67, 56, 202, 0.28), transparent 70%);
  --theme-gradient-accent: radial-gradient(130% 150% at 88% 6%, rgba(6, 182, 212, 0.22), transparent 75%);
  --theme-hero-surface: linear-gradient(160deg, rgba(31, 41, 55, 0.94), rgba(15, 23, 42, 0.96));
  --theme-hero-overlay: linear-gradient(140deg, rgba(17, 24, 39, 0.7) 0%, rgba(17, 24, 39, 0.3) 70%, transparent 90%);
  --theme-hero-visual: radial-gradient(120% 120% at 46% 22%, rgba(67, 56, 202, 0.3), transparent 70%), linear-gradient(160deg, rgba(6, 182, 212, 0.18), rgba(6, 182, 212, 0.14));
  --theme-hero-border: rgba(67, 56, 202, 0.38);
  --theme-hero-shadow: 0 40px 110px rgba(8, 12, 24, 0.65);
  --theme-hero-visual-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3), 0 28px 72px rgba(8, 12, 24, 0.38);
  --theme-illustration-primary: rgba(6, 182, 212, 0.45);
  --theme-illustration-secondary: rgba(6, 182, 212, 0.38);
  --theme-illustration-tertiary: rgba(148, 163, 184, 0.48);
  --theme-illustration-stroke: rgba(148, 163, 184, 0.32);
  --theme-illustration-glimmer: rgba(6, 182, 212, 0.58);
  --theme-illustration-size: clamp(240px, 32vw, 360px);
  --theme-illustration-top: -14%;
  --theme-illustration-right: -6%;
  --theme-illustration-opacity: 1;
  --theme-microtexture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%234338ca' stroke-opacity='.22' stroke-width='1'%3E%3Cpath d='M0 50h200M0 100h200M0 150h200'/%3E%3Cpath d='M50 0v200M100 0v200M150 0v200'/%3E%3C/g%3E%3Cg fill='%2306b6d4' fill-opacity='.16'%3E%3Ccircle cx='28' cy='28' r='1.6'/%3E%3Ccircle cx='172' cy='88' r='1.4'/%3E%3Ccircle cx='108' cy='172' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  --theme-microtexture-opacity: 0.32;
}

[data-theme="finance"] {
  --theme-gradient-main: none;
  --theme-gradient-accent: none;
  --theme-microtexture: none;
  --theme-microtexture-size: 0;
  --theme-microtexture-opacity: 0;
  --theme-illustration-opacity: 0;
}

[data-theme="employees"] {
  --theme-gradient-main: none;
  --theme-gradient-accent: none;
  --theme-microtexture: none;
  --theme-microtexture-size: 0;
  --theme-microtexture-opacity: 0;
  --theme-illustration-opacity: 0;
  --surface-border-strong: rgba(15, 23, 42, 0.18);
}

.nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-width);
  padding: 24px 20px 32px;
  border-right: 1px solid var(--pro-shell-border);
  background: linear-gradient(188deg, var(--pro-shell-top), var(--pro-shell-bottom));
  box-shadow: 0 34px 94px var(--pro-accent-shadow);
  overflow-y: auto;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 6;
  transform: translateZ(0);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 14px -16px 14px 8px;
  border-radius: clamp(24px, 3.6vw, 38px);
  background: linear-gradient(180deg, var(--pro-shell-highlight), transparent 72%);
  opacity: 0.48;
  pointer-events: none;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.24);
  border-radius: 999px;
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 4px 22px;
  border-bottom:1px solid rgba(100, 116, 139, 0.16);
  margin-bottom: 2px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(148, 163, 184, 0.35));
  transition: transform 0.6s var(--ease-spring);
}
.brand-logo:hover { transform: rotate(-6deg) scale(1.05); }
.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.94rem;
}
.nav-links {
  display:flex;
  flex-direction: column;
  gap:12px;
}
.nav-group {
  display:flex;
  flex-direction: column;
  gap:12px;
  margin-top: 6px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.nav-group-heading {
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 14px;
  border-radius: calc(var(--border-radius-sm) - 2px);
  border: 1px solid var(--pro-shell-border);
  background: linear-gradient(140deg, rgba(148, 163, 184, 0.18), rgba(7, 16, 32, 0.44));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 20px 46px rgba(3, 10, 26, 0.45);
  text-transform: none;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.88);
}
.nav-group-heading .ico {
  font-size: 1.2rem;
  filter: drop-shadow(0 6px 14px rgba(6, 182, 212, 0.45));
}
.nav-group-title {
  display:flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.nav-group-title-main {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.92);
}
.nav-group-title-sub {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(148, 163, 184, 0.85);
}
.nav-group-links {
  display:flex;
  flex-direction: column;
  gap:10px;
  padding-left: 4px;
}
.nav-group-links a {
  padding-left: 26px;
}
.nav a {
  position: relative;
  display:flex;
  gap:12px;
  align-items:center;
  padding: 11px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--pro-shell-border);
  background: linear-gradient(142deg, var(--pro-control-top), var(--pro-control-bottom));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 54px rgba(3, 10, 26, 0.64);
  color: rgba(226, 232, 240, 0.74);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring), border-color 0.3s ease, background 0.35s ease, color 0.3s ease, text-shadow 0.35s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--border-radius-sm) - 2px);
  background: linear-gradient(120deg, var(--pro-accent-glow), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.nav a > span:last-child {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav a .ico {
  opacity: 0.72;
  transition: opacity 0.3s ease;
}


.nav a:not([aria-current="page"]):not(.is-active) > span:last-child {

}

.nav a:hover,
.nav a:focus-visible,

.nav a[aria-current="page"],
.nav a.is-active {

  color: var(--pro-accent-soft);
}

.nav a:hover > span:last-child,
.nav a:focus-visible > span:last-child,

.nav a[aria-current="page"] > span:last-child,
.nav a.is-active > span:last-child {

  color: var(--pro-accent-soft);
}

.nav a:hover .ico,
.nav a:focus-visible .ico,

.nav a[aria-current="page"] .ico,
.nav a.is-active .ico {

  opacity: 1;
}

.nav a.nav-link-it {
  align-items: flex-start;
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav a .nav-link-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.2;
}

.nav a .nav-link-title {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a.nav-link-it .nav-link-title {
  text-transform: none;
}

.nav a .nav-link-sub {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: none;
  color: rgba(148, 163, 184, 0.85);
}

body.light .nav a .nav-link-sub {
  color: rgba(71, 85, 105, 0.75);
}
.nav a:hover,
.nav a:focus-visible {
  transform: translate3d(6px, -3px, 0);
  border-color: var(--pro-shell-border-strong);
  background: linear-gradient(138deg, rgba(67, 56, 202, 0.32), rgba(7, 16, 32, 0.98));
  box-shadow: 0 36px 82px rgba(5, 18, 42, 0.78);
  text-shadow: 0 0 18px var(--pro-accent-glow);
}
.nav a[aria-current="page"],
.nav a.is-active {
  transform: translate3d(6px, -3px, 0);
  border-color: var(--pro-shell-border-strong);
  background: linear-gradient(138deg, rgba(67, 56, 202, 0.32), rgba(7, 16, 32, 0.98));
  box-shadow: 0 36px 82px rgba(5, 18, 42, 0.78);
  text-shadow: 0 0 18px var(--pro-accent-glow);
}
.nav a[aria-current="page"]::after,
.nav a.is-active::after {
  opacity: 1;
}
.nav a:hover::after,
.nav a:focus-visible::after { opacity: 1; }
.nav a:focus-visible { outline: 2px solid rgba(6, 182, 212, 0.45); outline-offset: 3px; }
.ico { font-size: 1.35rem; }

.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  padding: 18px var(--page-padding-x) 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-header__primary {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.6vw, 24px);
  flex-wrap: wrap;
}

.app-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  margin: 0;
  margin-right: auto;
}

.app-header .brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.45));
  transition: transform 0.35s var(--ease-spring);
}

.app-header .brand-logo:hover,
.app-header .brand-logo:focus-visible {
  transform: translate3d(0, -2px, 0) scale(1.03);
}

.app-header .brand-name {
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--acc3);
}

.app-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.app-header__action {
  margin: 0;
}

.app-header .user-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(226, 232, 240, 0.6);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.app-header .nav-toggle {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: none;
  color: var(--acc2);
}

.app-header .nav-toggle:hover,
.app-header .nav-toggle:focus-visible {
  border-color: rgba(67, 56, 202, 0.4);
  box-shadow: 0 8px 18px rgba(67, 56, 202, 0.16);
}

.app-header__nav {
  position: relative;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  padding: 8px 12px;
}

.app-header__nav-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 8px;
  width: 100%;
  overflow: visible;
  padding: 0;
}

.app-header__nav-scroll::-webkit-scrollbar,
.app-header__nav-scroll::-webkit-scrollbar-thumb {
  display: none;
}

.app-header__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.app-header__nav a .ico {
  font-size: 1.05rem;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-header__nav a:hover,
.app-header__nav a:focus-visible {
  color: var(--acc3);
  background: rgba(67, 56, 202, 0.08);
  box-shadow: 0 6px 14px rgba(67, 56, 202, 0.12);
}

.app-header__nav a:hover .ico,
.app-header__nav a:focus-visible .ico {
  opacity: 1;
  transform: translateY(-1px);
}

.app-header__nav a.is-active,
.app-header__nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--acc2);
  box-shadow: 0 12px 24px rgba(67, 56, 202, 0.2);
}

.app-header__nav a.is-active .ico,
.app-header__nav a[aria-current="page"] .ico {
  opacity: 1;
}

.app-header__nav a .nav-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.app-header__nav a .nav-link-title {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-header__nav a.nav-link-it {
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}

.app-header__nav a.nav-link-it .nav-link-title {
  text-transform: none;
}

.app-header__nav a .nav-link-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(71, 85, 105, 0.7);
}

.app-header__nav::after,
.app-header__nav-scroll::before,
.app-header__nav-scroll::after {
  content: none;
  display: none;
}

.user-pill {
  background: linear-gradient(145deg, rgba(15, 24, 38, 0.96), rgba(9, 18, 32, 0.94));
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--pro-shell-border);
  box-shadow: 0 18px 42px var(--pro-accent-shadow);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring);
  color: var(--pro-accent-soft);
}
.user-pill:hover { transform: translate3d(0, -2px, 0); box-shadow: 0 26px 52px rgba(5, 18, 42, 0.7); }
.nav-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: none;

  background: var(--surface-alt);

  color: inherit;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-toggle:hover {

  background: #e4e8ed;
  transform: translateY(-2px);
}
.nav-toggle:focus-visible {
  outline: 2px solid rgba(63, 76, 92, 0.24);

  outline-offset: 3px;
}
.nav-toggle-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s var(--ease-spring);
}
.nav-toggle-icon--close {
  opacity: 0;
  transform: scale(0.6) rotate(-12deg);
}
body.mobile-nav-open .nav-toggle {

  background: #dce1e6;

  box-shadow: none;
  transform: translateY(-2px);
}
body.mobile-nav-open .nav-toggle-icon--open {
  opacity: 0;
  transform: scale(0.6) rotate(-12deg);
}
body.mobile-nav-open .nav-toggle-icon--close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.mobile-nav-overlay { display: none; }

@media (max-width: 1024px) {
  :root {
    --page-padding-x: 24px;
    --page-padding-top: 28px;
    --page-padding-bottom: 56px;
  }

  .page {
    margin-left: 0;
    padding: var(--page-padding-top) var(--page-padding-x) var(--page-padding-bottom);
  }

  .nav {
    width: min(320px, 82vw);
    transform: translateX(-100%);
    transition: transform 0.32s ease, box-shadow 0.32s ease;
    box-shadow: none;
    z-index: 12;
  }

  body.mobile-nav-open .nav {
    transform: translateX(0);
    box-shadow: 0 34px 88px rgba(5, 12, 28, 0.7);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 8, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
  }

  body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  :root {
    --header-height: 96px;
  }

  .app-header {
    padding: 12px var(--page-padding-x) 8px;
    gap: 10px;
  }

  .app-header__primary {
    justify-content: space-between;
  }

  .app-header__nav {
    position: fixed;
    top: calc(var(--header-height) - 6px);
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    border: none;
    margin: 0;
    transform: translate3d(0, -12px, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s var(--ease-spring);
  }

  .app-header__nav::after {
    display: none;
  }

  .app-header__nav-scroll {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 18px var(--page-padding-x) 48px;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-header__nav-scroll::before,
  .app-header__nav-scroll::after {
    display: none;
  }

  body.mobile-nav-open .app-header__nav {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  .mobile-nav-overlay {
    z-index: 15;
  }
}

@media (max-width: 1024px) {
  .topbar__utility-row {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .topbar__utility-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .topbar {
    gap: clamp(6px, 3vw, 12px);
    padding: 12px clamp(12px, 4vw, 20px);
  }

  .topbar__utility-row {
    width: 100%;
  }

  .topbar__utility-actions {
    gap: clamp(8px, 2vw, 12px);
  }
}

@media (max-width: 640px) {
  :root {
    --page-padding-x: 16px;
    --page-padding-top: 24px;
    --header-height: 88px;
    --page-padding-bottom: 48px;
  }

  .topbar {
    padding: 14px 16px;
    gap: 12px;
  }

  .app-header {
    padding: 12px var(--page-padding-x) 6px;
  }

  .app-header__primary {
    gap: 12px;
  }

  .app-header__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .app-header .user-pill {
    width: 100%;
    text-align: center;
  }

  .quick-links {
    width: auto;
    justify-content: flex-start;
  }

  .topbar__primary {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(8px, 2vw, 12px);
  }

  .topbar-nav {
    width: 100%;
  }

  .topbar__utility-row {
    width: 100%;
    gap: clamp(10px, 2.4vw, 16px);
    justify-content: flex-start;
  }

  .topbar__utility-actions {
    width: 100%;
    justify-content: flex-start;
    gap: clamp(8px, 2vw, 12px);
  }

  .topbar__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .user-pill {
    width: auto;
    justify-content: center;
  }

  .content {
    padding: 24px 20px 36px;
  }

  .nav {
    width: min(88vw, 280px);
  }
}

.card {
  position: relative;
  background: linear-gradient(160deg, var(--pro-card-top), var(--pro-card-bottom));
  border: 1px solid var(--pro-shell-border);
  border-radius: clamp(22px, 2.4vw, 28px);
  padding: clamp(22px, 2.5vw, 28px);
  box-shadow: 0 30px 72px rgba(5, 12, 28, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-spring), border-color 0.35s ease;
  overflow: hidden;
  transform: translateZ(0);
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 65%);
}
.card::after {
  background: none;
}
.card:focus-within {
  transform: none;
  box-shadow: 0 0 0 2px rgba(63, 76, 92, 0.18);
  border-color: var(--surface-border-strong);
}
.card:focus-within::before,
.card:focus-within::after { opacity: 1; }
.card.wide { padding: clamp(26px, 3vw, 32px); }
.glassy {
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: none;
}

.btn {
  --btn-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--surface-border-strong);
  background: #3f4c5c;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn.secondary {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--surface-border);
}

.btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(37, 99, 235, 0.65);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  border-color: rgba(30, 64, 175, 0.7);
  color: #ffffff;
}

.btn.logout {
  background: linear-gradient(135deg, #ff5f6d 0%, #d92d20 100%);
  border-color: #d92d20;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(217, 45, 32, 0.35);
}

.btn.danger {
  background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
  border-color: rgba(185, 28, 28, 0.6);
  color: #000000;
  box-shadow: 0 8px 20px rgba(248, 113, 113, 0.28);
}

.btn.email {
  background: #3f4c5c;
  border-color: #3f4c5c;
  color: #ffffff;
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn.tiny {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.btn:hover {
  background: #2f3a45;
  border-color: #2f3a45;
}

.btn.secondary:hover {
  background: #e1e6eb;
  border-color: var(--surface-border-strong);
}

.btn.theme-add {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
  border-color: #93c5fd;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(147, 197, 253, 0.32);
}

.btn.theme-add:hover,
.btn.theme-add:focus-visible {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
  border-color: #93c5fd;
  color: #0f172a;
  filter: brightness(0.98);
}

.btn.theme-share {
  background: linear-gradient(135deg, #fef3c7 0%, #facc15 100%);
  border-color: #facc15;
  color: #111827;
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.3);
}

.btn.theme-share:hover,
.btn.theme-share:focus-visible {
  background: linear-gradient(135deg, #fef3c7 0%, #facc15 100%);
  border-color: #facc15;
  color: #111827;
  filter: brightness(0.99);
}

.btn.theme-preview {
  background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
  border-color: #bfdbfe;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(147, 197, 253, 0.24);
}

.btn.theme-preview:hover,
.btn.theme-preview:focus-visible {
  background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
  border-color: #bfdbfe;
  color: #0f172a;
  filter: brightness(0.98);
}

.btn.logout:hover {
  background: linear-gradient(135deg, #ff837f 0%, #b42318 100%);
  border-color: #b42318;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(180, 35, 24, 0.45);
}

.btn.danger:hover,
.btn.danger:focus-visible {
  background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%);
  border-color: rgba(185, 28, 28, 0.8);
  color: #000000;
  box-shadow: 0 10px 24px rgba(248, 113, 113, 0.3);
}

.btn:focus-visible {
  outline: 2px solid #2f3a45;
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn .icon { display: inline-flex; align-items: center; margin-right: 6px; }
.btn .icon svg { width: 16px; height: 16px; }
.input,
select.input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border:1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.input:focus,
select.input:focus {
  outline: none;
  border-color: var(--control-border-strong);
  box-shadow: 0 0 0 2px rgba(63, 76, 92, 0.2);
  background: var(--control-bg-strong);
}
select.input option { color: #0b1220; background: #fff; }

[data-lockable="true"].is-editing :is(input, select, textarea)[data-lockable-field]:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([hidden]) {
  background: rgba(63, 76, 92, 0.12);
  border-color: rgba(63, 76, 92, 0.4);
  box-shadow: 0 0 0 1px rgba(63, 76, 92, 0.2);
}

[data-lockable="true"].is-editing :is(input, select, textarea)[data-lockable-field]:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([hidden]):focus {
  box-shadow: 0 0 0 2px rgba(63, 76, 92, 0.25);
}

[data-lockable="true"].is-editing .checkbox-inline {
  background: rgba(63, 76, 92, 0.12);
  border-color: rgba(63, 76, 92, 0.35);
  border-style: solid;
}

[data-lockable="true"] [data-lockable-save-group] {
  display: none;
}

[data-lockable="true"].is-editing [data-lockable-save-group] {
  display: flex;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: clamp(12px, 2vw, 18px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: none;
  color: var(--text);
}

.table thead th {
  background: var(--surface-alt);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.table th,
.table td {
  text-align: left;
  padding: clamp(12px, 1.8vw, 16px) clamp(14px, 2vw, 18px);
  border-bottom: 1px solid var(--surface-border);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background 0.2s ease;
}

.table tbody tr:nth-child(odd),
.table tbody tr:nth-child(even) {
  background: transparent;
}

.table tbody tr:hover {
  background: var(--surface-alt);
}

.table td.actions {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.docs-section { margin-top:24px; padding-top:16px; border-top:1px solid rgba(148, 163, 184, 0.18); }
.docs-section .table th:nth-child(2),
.docs-section .table td:nth-child(2) { width: 140px; }

.auth-wrap {
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: calc(100vh - 200px);
  padding: 48px 0;
}
.auth-wrap::before {
  content: none;
}
.auth-wrap > :not(.theme-illustration) { position: relative; z-index: 1; }
.auth-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(420px, 100%);
  padding: 40px 42px;
  border-radius: 28px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: none;
  display:flex;
  flex-direction: column;
  gap: 24px;
}
.auth-card::after {
  content: none;
}
.auth-card > * {
  position: relative;
  z-index: 1;
}
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.25), rgba(255, 79, 216, 0.25));
  border: 1px solid rgba(91, 68, 255, 0.24);
  color: rgba(71, 85, 105, 0.85);
}
.auth-card h1 { font-size: 2rem; letter-spacing: -0.01em; margin: 0; }
.auth-header { display:flex; flex-direction: column; gap: 8px; }
.auth-subtitle { color: rgba(71, 85, 105, 0.8); margin: 0; line-height: 1.6; }
.auth-benefits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(71, 85, 105, 0.8);
}
.auth-benefits li .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.2), rgba(217, 161, 84, 0.18));
  color: #4338ca;
  font-size: 0.95rem;
}
.auth-google {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-google--disabled {
  align-items: stretch;
}
.auth-google--disabled .alert {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(30, 41, 59, 0.8);
}
.auth-google .g_id_signin,
.auth-google [data-google-button] {
  display: flex;
  justify-content: center;
}
.auth-google .g_id_signin > div,
.auth-google [data-google-button] > div {
  width: 100%;
}
.auth-google [data-google-error] {
  margin: 0;
}
.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.6);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.4);
}
.auth-card .form-footnote {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.7);
  text-align: center;
}
.auth-card .form-footnote a {
  color: var(--acc3);
  font-weight: 600;
}
.form-grid { display:flex; flex-direction: column; gap:16px; }
.form-grid label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.75);
}
.form-grid .btn { margin-top: 8px; }
.alert { padding: 14px 16px; border-radius: 16px; border:1px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65); }
.alert.error { background: rgba(254, 226, 226, 0.92); border-color: rgba(220, 38, 38, 0.45); color: #7f1d1d; }
.alert.info { background: rgba(224, 242, 254, 0.92); border-color: rgba(6, 182, 212, 0.4); color: #075985; }
.alert.success {
  background: rgba(220, 252, 231, 0.9);
  border-color: rgba(22, 163, 74, 0.4);
  color: #14532d;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.25);
}
.alert.success .muted { color: rgba(34, 197, 94, 0.8); }
.alert.success a {
  color: #16a34a;
  text-shadow: none;
}
.alert.success a:hover {
  color: #16a34a;
  text-shadow: 0 0 12px rgba(22, 163, 74, 0.35);
}

.app-alerts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px clamp(14px, 2.2vw, 24px) 0;
}

.app-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

.app-alert-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.app-alert-message {
  font-weight: 500;
}

.app-alert-link {
  color: var(--acc2);
  font-weight: 500;
  text-decoration: underline;
}

.app-alert-link:hover,
.app-alert-link:focus {
  color: var(--acc3);
}

.app-alert-dismiss {
  background: var(--surface-alt);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.app-alert-dismiss:hover,
.app-alert-dismiss:focus {
  background: var(--surface-alt);
  border-color: var(--surface-border-strong);
}

  color: #4338ca;
}

  color: #4338ca;
}

  background: rgba(255, 255, 255, 0.85);
  color: #1f2937;
  border-color: rgba(148, 163, 184, 0.4);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
  align-items: stretch;
}

.kpi { text-align:center; }
.kpi-label { font-size:.9rem; color: var(--muted); }
.kpi-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 14px);
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.kpi-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.company-metrics-grid .kpi-label {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}
.company-metrics-grid .kpi-value {
  font-size: clamp(1.65rem, 4.2vw, 2rem);
}
.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(28px, 6vw, 38px);
  height: clamp(28px, 6vw, 38px);
  flex-shrink: 0;
}
.kpi-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.32));
}
.kpi-insights {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.kpi-sparkline {
  width: 100%;
  height: 44px;
  display: block;
}
.kpi-sparkline--hidden {
  display: none;
}
.kpi-comparison {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--kpi-badge-bg);
  color: var(--kpi-badge-text);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.kpi-badge--positive {
  background: var(--kpi-positive-bg);
  color: var(--kpi-positive-text);
}
.kpi-badge--negative {
  background: var(--kpi-negative-bg);
  color: var(--kpi-negative-text);
}
.kpi-insights .kpi-empty {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}
.gradient-purple {
  background-image: linear-gradient(135deg, rgba(79, 70, 229, 0.42), rgba(67, 56, 202, 0.28));
}

.gradient-cyan {
  background-image: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(6, 182, 212, 0.24));
}

.gradient-rose {
  background-image: linear-gradient(135deg, rgba(139, 92, 246, 0.42), rgba(79, 70, 229, 0.24));
}

.gradient-green {
  background-image: linear-gradient(135deg, rgba(16, 185, 129, 0.42), rgba(34, 197, 94, 0.26));
}

.gradient-red {
  background-image: linear-gradient(135deg, rgba(239, 68, 68, 0.45), rgba(234, 88, 12, 0.28));
}

.badge { padding: 2px 8px; border-radius: 999px; font-size: .8rem; margin-left: 6px; color: #e2e8f0; }
.badge.ok { background: rgba(34,197,94,0.22); border:1px solid rgba(34,197,94,0.45); color: #16a34a; }
.badge.warn { background: rgba(248,113,113,0.22); border:1px solid rgba(248,113,113,0.45); color: #f3f4f6; }

.active-card { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); }
.inactive-card { background: rgba(244,63,94,0.15); border-color: rgba(244,63,94,0.4); }

.modal {
  position: fixed;
  inset: 0;
  --modal-gutter-y: clamp(24px, 6vh, 72px);
  --modal-gutter-x: clamp(16px, 6vw, 96px);
  padding: var(--modal-gutter-y) var(--modal-gutter-x);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--modal-backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-x: hidden;
  overflow-y: auto;
  transition: opacity 0.36s ease, visibility 0s linear 0.36s;
}
.modal.hidden { display:none; }
.modal.modal--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
#addUserModal,
#editUserModal { background: none; }
.modal-content {
  position: relative;
  width: min(960px, calc(100vw - 2 * var(--modal-gutter-x)));
  max-width: 100%;
  margin: 0;
  display:flex;
  flex-direction:column;
  border-radius: clamp(20px, 2.6vw, 28px);
  background: var(--modal-surface);
  border: 1px solid var(--modal-border);
  box-shadow: var(--modal-shadow);
  overflow: hidden;
  opacity: 0;
  will-change: opacity, box-shadow;
  transition: opacity 0.3s ease, box-shadow 0.4s ease;
  max-height: calc(100vh - 2 * var(--modal-gutter-y));
  overflow: hidden;
}
.modal-content::before {
  content: none;
}
.modal.modal--active .modal-content {
  opacity: 1;
  box-shadow: var(--modal-shadow-active);
}
.modal-content.small {
  width: min(580px, calc(100vw - 2 * var(--modal-gutter-x)));
}
.modal-content.wide {
  width: min(1120px, calc(100vw - 2 * var(--modal-gutter-x)));
}
.modal-content.xl {
  width: min(1380px, calc(100vw - 2 * var(--modal-gutter-x)));
}
.modal-content.xxl {
  width: min(1560px, calc(100vw - 2 * var(--modal-gutter-x)));
}
#preview_modal {
  --modal-gutter-y: clamp(8px, 4vh, 28px);
  --modal-gutter-x: clamp(12px, 6vw, 72px);
  padding: var(--modal-gutter-y) var(--modal-gutter-x);
}

.modal-content.preview-modal {
  width: min(1440px, calc(100vw - 2 * var(--modal-gutter-x)));
  max-height: min(92vh, calc(100vh - 2 * var(--modal-gutter-y)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#preview_modal .modal-content.preview-modal {
  width: calc(100vw - 2 * var(--modal-gutter-x));
  max-height: calc(100vh - 2 * var(--modal-gutter-y));
  height: calc(100vh - 2 * var(--modal-gutter-y));
}

#preview_modal .preview-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(16px, 2.4vw, 26px);
  overflow: hidden;
}

#preview_modal .modal-preview-frame {
  height: 100%;
  max-height: none;
  min-height: 0;
}

.modal-actions.preview-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 28px);
  padding: clamp(18px, 2.6vw, 26px) clamp(22px, 3vw, 34px);
  background:
    radial-gradient(80% 120% at 12% 8%, rgba(67, 56, 202, 0.18), transparent 70%),
    radial-gradient(60% 90% at 88% 18%, rgba(139, 92, 246, 0.16), transparent 74%),
    linear-gradient(175deg, rgba(10, 17, 34, 0.94), rgba(8, 13, 28, 0.84));
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 26px 64px rgba(5, 12, 28, 0.55);
}

.modal-actions.preview-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(148, 163, 184, 0.28), transparent 65%);
  opacity: 0.35;
}

.preview-meta {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 20px);
  min-width: 0;
  z-index: 1;
}

.preview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 6vw, 66px);
  height: clamp(52px, 6vw, 66px);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(67, 56, 202, 0.3), rgba(6, 182, 212, 0.26));
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.45);
  font-size: clamp(0.72rem, 2vw, 0.95rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.9);
}

.preview-meta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.preview-name {
  margin: 0;
  font-size: clamp(1.12rem, 2.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(248, 250, 255, 0.94);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: clamp(220px, 38vw, 460px);
}

.preview-subtitle {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.68);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: clamp(240px, 44vw, 560px);
}

.preview-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vw, 18px);
  flex-wrap: wrap;
  z-index: 1;
}

.preview-actions form {
  display: inline-flex;
  margin: 0;
}

.preview-actions .btn {
  min-width: clamp(120px, 14vw, 168px);
  justify-content: center;
}

.preview-toast {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 2.4vw, 28px);
  transform: translate3d(-50%, 20px, 0);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.32), rgba(16, 185, 129, 0.26));
  color: rgba(236, 253, 245, 0.92);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-spring);
  z-index: 5;
}

.preview-toast.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.preview-toast.error {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.36), rgba(220, 38, 38, 0.28));
  color: rgba(255, 241, 242, 0.94);
}

.modal-content.preview-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.6vw, 26px);
  padding: clamp(22px, 3vw, 36px);
  background:
    radial-gradient(110% 160% at 18% 18%, rgba(67, 56, 202, 0.18), transparent 70%),
    radial-gradient(90% 120% at 82% 88%, rgba(139, 92, 246, 0.16), transparent 75%),
    linear-gradient(185deg, rgba(9, 13, 25, 0.96), rgba(5, 8, 18, 0.94));
}
.modal-actions {
  position: relative;
  display:flex;
  flex-wrap:wrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 2vw, 16px);
  padding: clamp(18px, 2.4vw, 26px) clamp(22px, 3vw, 30px);
  border-bottom: 1px solid var(--modal-actions-border);
  background: var(--modal-actions-surface);
  box-shadow: var(--modal-actions-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
}
.modal-actions::before {
  content: none;
}
.modal-actions > * {
  flex:0 0 auto;
  min-width: 0;
}
.modal-actions .btn {
  width:auto;
  text-align:center;
  box-shadow: 0 10px 24px rgba(67, 56, 202, 0.15);
}
.modal-actions .btn.secondary {
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.18);
}
.modal-actions .btn.danger {
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.2);
}
.modal-actions.close-right { justify-content:flex-end; }
.modal-actions.close-right > * { flex:0 0 auto; min-width: 0; }
.modal-actions.close-right .btn { width:auto; }
.modal-actions.close-right::before { display: none; }
.modal-body {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(20px, 2.6vw, 30px);
  background: var(--modal-body-surface);
  border-top: 1px solid var(--modal-body-border);
  box-shadow: none;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.modal-preview-frame {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: clamp(420px, 72vh, 980px);
  max-height: min(80vh, calc(100vh - 2 * var(--modal-gutter-y)));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 2.8vw, 32px);
  border-radius: clamp(22px, 3vw, 32px);
  background:
    linear-gradient(155deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.modal-preview-frame iframe,
.modal-preview-frame img,
.modal-preview-frame video,
.modal-preview-frame embed,
.modal-preview-frame object {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border-radius: clamp(18px, 2.6vw, 28px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(148, 163, 184, 0.16);
}
.modal-preview-frame iframe {
  border: 0;
  background: #ffffff;
}
.modal-preview-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ffffff;
}
.modal-preview-frame video,
.modal-preview-frame embed,
.modal-preview-frame object {
  background: #ffffff;
}

.modal-preview-frame.pdf-preview-active {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  overflow-y: auto;
  padding: clamp(14px, 2.4vw, 26px);
}

.modal-preview-frame.pdf-browser-active {
  align-items: stretch;
  justify-content: stretch;
  padding: clamp(14px, 2.2vw, 24px);
}

.pdfjs-preview {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
  padding: clamp(6px, 1.4vw, 14px);
}

.pdfjs-preview-status {
  width: min(100%, 860px);
  text-align: center;
  padding: clamp(18px, 2.6vw, 30px);
  border-radius: clamp(16px, 2.6vw, 24px);
  background: rgba(15, 23, 42, 0.65);
  color: rgba(226, 232, 240, 0.88);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.6;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.pdfjs-page {
  width: min(100%, 920px);
  background: rgba(15, 23, 42, 0.58);
  border-radius: clamp(18px, 2.8vw, 28px);
  padding: clamp(12px, 2.2vw, 22px);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.48), 0 0 0 1px rgba(148, 163, 184, 0.2);
  display: flex;
  justify-content: center;
}

.pdfjs-page canvas {
  width: 100% !important;
  height: auto !important;
  border-radius: clamp(12px, 2vw, 20px);
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.35);
}

.pdf-native-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.pdf-native-object {
  width: 100%;
  height: 100%;
  min-height: clamp(360px, 62vh, 920px);
  border: 0;
  background: #0b1220;
}

.pdf-native-object .pdf-native-fallback {
  padding: clamp(18px, 2.4vw, 26px);
}

.preview-frame-fallback {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(226, 232, 240, 0.82);
}

.preview-frame-fallback p {
  margin: 0;
  max-width: clamp(260px, 42vw, 520px);
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.95rem;
}

.preview-frame-fallback .btn {
  min-width: clamp(140px, 16vw, 180px);
}


@media (max-width: 1024px) {
  .modal-content.preview-modal {
    width: min(96vw, calc(100vw - 2 * var(--modal-gutter-x)));
  }
  .modal-preview-frame {
    height: clamp(480px, 74vh, 920px);
    padding: clamp(14px, 3vw, 24px);
    border-radius: clamp(18px, 3vw, 26px);
  }
}

@media (max-width: 720px) {
  .modal-actions.preview-toolbar {
    justify-content: flex-start;
    gap: clamp(10px, 3vw, 18px);
  }
  .modal-actions.preview-toolbar .btn {
    min-width: unset;
  }
  .modal-preview-frame {
    height: clamp(360px, 68vh, 780px);
    padding: clamp(12px, 4vw, 18px);
  }
}
.modal-content > .pad,
.modal-content > form.pad,
.modal-content > .modal-body {
  flex: 1 1 auto;
  padding: clamp(20px, 2.6vw, 30px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.pad { padding: clamp(18px, 2.5vw, 26px); }

[data-modal-title] {
  margin-top: 0;
  margin-bottom: clamp(12px, 2.4vw, 18px);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: -0.01em;
}

[data-modal-description] {
  margin: -6px 0 clamp(18px, 3vw, 24px);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.modal-content details {
  background: rgba(255,255,255,0.05);
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 12px;
  flex: 1 1 100%;
}
.modal-content details summary {
  cursor: pointer;
  font-weight: 600;
  margin: -8px -8px 8px;
  padding: 8px;
}

@media (max-width: 1024px) {
  .modal {
    --modal-gutter-y: clamp(20px, 8vh, 56px);
    --modal-gutter-x: clamp(16px, 8vw, 80px);
  }

  .modal-content {
    border-radius: clamp(24px, 4vw, 32px);
  }

  .modal-actions {
    gap: clamp(10px, 3vw, 16px);
    padding: clamp(18px, 4vw, 26px);
  }
}

@media (max-width: 768px) {
  .modal {
    --modal-gutter-x: clamp(14px, 10vw, 56px);
  }

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

  .modal-actions > * {
    min-width: 100%;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .modal-actions.close-right {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions.close-right::before {
    display: block;
    content: "";
  }

  .modal-actions.close-right > * {
    width: 100%;
  }

  .modal-actions.close-right .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .modal {
    --modal-gutter-y: clamp(16px, 12vh, 32px);
    --modal-gutter-x: clamp(12px, 10vw, 32px);
  }

  .modal-content {
    border-radius: clamp(22px, 6vw, 28px);
  }

  .modal-body {
    padding: clamp(20px, 7vw, 28px);
  }
}

@media (max-height: 720px) {
  .modal {
    --modal-gutter-y: clamp(16px, 10vh, 48px);
    align-items: flex-start;
  }
}

.logo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 12px; align-items: center; }
.logo-item { text-align: center; }
.logo-item img { width: 64px; height: 64px; object-fit: contain; }
.logo-chip { background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.logo-chip:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.logo-chip img { width: 64px; height: 64px; object-fit: contain; }

@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.animate-pop {
  animation: none;
  opacity: 1;
  transform: none;
}
.delay-1,
.delay-2,
.delay-3 {
  animation-delay: 0s;
}

body.dark {
  --bg: #0b1220;
  --bg-soft-1: rgba(6, 182, 212, 0.24);
  --bg-soft-2: rgba(67, 56, 202, 0.2);
  --bg-soft-3: rgba(6, 182, 212, 0.18);
  --panel: rgba(17, 24, 39, var(--glass-opacity));
  --panel-alt: rgba(15, 23, 42, 0.94);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --surface: rgba(17, 24, 39, 0.92);
  --surface-alt: rgba(11, 18, 33, 0.88);
  --surface-border: rgba(148, 163, 184, 0.3);
  --surface-border-strong: rgba(67, 56, 202, 0.42);
  --surface-glow: rgba(6, 182, 212, 0.3);
  --control-bg: rgba(15, 23, 42, 0.88);
  --control-bg-strong: rgba(11, 18, 33, 0.94);
  --control-border: rgba(148, 163, 184, 0.32);
  --control-border-strong: rgba(67, 56, 202, 0.5);
  color: var(--text);
  background:
    radial-gradient(1200px 780px at 8% -12%, var(--bg-soft-1), transparent 60%),
    radial-gradient(960px 640px at 92% -10%, var(--bg-soft-2), transparent 65%),
    radial-gradient(1300px 860px at 52% 108%, var(--bg-soft-3), transparent 72%),
    linear-gradient(180deg, #0b1220 0%, #111827 100%);
  --modal-backdrop: rgba(2, 6, 23, 0.72);
  --modal-surface: rgba(15, 23, 42, 0.94);
  --modal-border: rgba(148, 163, 184, 0.35);
  --modal-shadow: 0 32px 80px rgba(8, 47, 73, 0.4);
  --modal-shadow-active: 0 36px 96px rgba(6, 182, 212, 0.25);
  --modal-actions-surface: rgba(15, 23, 42, 0.92);
  --modal-actions-border: rgba(148, 163, 184, 0.22);
  --modal-actions-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.55);
  --modal-body-surface: rgba(10, 17, 34, 0.88);
  --modal-body-border: rgba(148, 163, 184, 0.18);
}

body.dark::before {
  background:
    radial-gradient(38% 42% at 14% 18%, rgba(6, 182, 212, 0.3), transparent 60%),
    radial-gradient(46% 48% at 86% 18%, rgba(67, 56, 202, 0.22), transparent 62%),
    radial-gradient(60% 58% at 50% 88%, rgba(6, 182, 212, 0.24), transparent 70%);
  opacity: 0.55;
}

body.dark::after {
  background:
    radial-gradient(42% 48% at 12% 80%, rgba(6, 182, 212, 0.2), transparent 65%),
    radial-gradient(40% 46% at 88% 74%, rgba(67, 56, 202, 0.18), transparent 68%),
    radial-gradient(36% 38% at 55% 18%, rgba(6, 182, 212, 0.18), transparent 75%);
  mix-blend-mode: screen;
  opacity: 0.42;
}

body.dark a { color: var(--acc1); }
body.dark a:hover {
  color: var(--acc3);
  text-shadow: 0 0 18px var(--glow-primary);
}

body.dark .mobile-nav-overlay {
  background: rgba(7, 12, 24, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.light {
  --bg: #f9fafb;
  --bg-soft-1: rgba(67, 56, 202, 0.1);
  --bg-soft-2: rgba(6, 182, 212, 0.08);
  --bg-soft-3: rgba(6, 182, 212, 0.08);
  --text: #111827;
  --muted: #4b5563;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-border: rgba(17, 24, 39, 0.08);
  --surface-border-strong: rgba(67, 56, 202, 0.2);
  --surface-glow: rgba(6, 182, 212, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

body.light::before {
  background:
    radial-gradient(60% 60% at 12% -20%, rgba(67, 56, 202, 0.12), transparent 70%),
    radial-gradient(48% 48% at 88% -10%, rgba(6, 182, 212, 0.1), transparent 72%);
  opacity: 0.35;
}

body.light::after {
  background:
    radial-gradient(48% 52% at 50% 110%, rgba(67, 56, 202, 0.08), transparent 70%),
    radial-gradient(36% 40% at 52% 40%, rgba(6, 182, 212, 0.06), transparent 78%);
  opacity: 0.25;
}

body.light a { color: var(--acc2); }
body.light a:hover { color: var(--acc3); }

body.light .content,
body.light .card,
body.light .nav,
body.light .glassy {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.light .content::before,
body.light .content::after {
  content: none;
}

body.light .app-header,
body.light .app-header__nav {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body.light .app-header .brand-name {
  color: var(--acc3);
}

body.light .app-header .nav-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
  color: var(--acc2);
}

body.light .app-header .nav-toggle:hover,
body.light .app-header .nav-toggle:focus-visible {
  border-color: rgba(67, 56, 202, 0.4);
  box-shadow: 0 8px 18px rgba(67, 56, 202, 0.16);
}

body.light .quick-link {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

body.light .quick-link:hover,
body.light .quick-link:focus-visible {
  border-color: rgba(67, 56, 202, 0.4);
  box-shadow: 0 16px 32px rgba(67, 56, 202, 0.15);
}

body.light .app-header .user-pill {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(226, 232, 240, 0.7);
  color: var(--text);
}

body.light .app-header__nav::after,
body.light .app-header__nav-scroll::before,
body.light .app-header__nav-scroll::after {
  content: none;
}

body.light .app-header__nav a {
  color: var(--muted);
}

body.light .app-header__nav a:hover,
body.light .app-header__nav a:focus-visible {
  color: var(--acc3);
  background: rgba(67, 56, 202, 0.1);
  box-shadow: 0 6px 14px rgba(67, 56, 202, 0.12);
}

body.light .app-header__nav a.is-active,
body.light .app-header__nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--acc2);
  box-shadow: 0 12px 24px rgba(67, 56, 202, 0.2);
}

body.light .modal {
  background: rgba(15, 23, 42, 0.45);
}

body.light .modal-content {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.18);
}

body.light .modal-actions {
  background: #ffffff;
  border-bottom-color: rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.06);
}

body.light .modal-body {
  background: #f8fafc;
  border-top-color: rgba(15, 23, 42, 0.06);
}

body.light .modal-preview-frame {
  background: linear-gradient(155deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

body.light .table,
body.light .table thead th,
body.light .table tbody tr {
  background: #ffffff;
  color: inherit;
  box-shadow: none;
}

body.light .input,
body.light select.input {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.26);
  color: var(--text);
}

body.light .mobile-nav-overlay {
  background: rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* --- Password toggle (login) --- */
.form_control.has_password_toggle {
  position: relative;
}
.toggle_password_btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: inherit;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.toggle_password_btn:hover {
  transform: translateY(-50%) scale(1.03);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(91, 68, 255, 0.18);
}
.toggle_password_btn:active { transform: translateY(-50%) scale(0.98); }
.toggle_password_btn:focus-visible {
  outline: 2px solid rgba(217, 161, 84, 0.45);
  outline-offset: 3px;
}
.toggle_password_btn .icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}
.hidden { display: none !important; }
.sr_only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* --- Finance --- */
.finance-page,
.it-page { display:flex; flex-direction:column; gap:28px; }
.finance-header,
.it-header { display:flex; align-items:center; justify-content:space-between; }
.finance-header h1,
.it-header h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.finance-header p,
.it-header p { margin: 6px 0 0; max-width: 680px; }
.finance-tabs,
.it-tabs { display:flex; flex-wrap:wrap; gap:10px; align-items:stretch; padding: clamp(12px, 2vw, 18px); border-radius: var(--border-radius-lg); border:1px solid rgba(148, 163, 184, 0.18); background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(11, 18, 32, 0.78)); }
.finance-tab,
.it-tab { flex:1 1 200px; display:inline-flex; align-items:center; justify-content:flex-start; gap:10px; padding: 10px 14px; border-radius: 12px; border:1px solid transparent; background: rgba(15, 23, 42, 0.45); color: inherit; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease; }
.finance-tab:hover,
.it-tab:hover,
.finance-tab:focus-visible,
.it-tab:focus-visible { background: rgba(67, 56, 202, 0.18); border-color: rgba(67, 56, 202, 0.32); }
.finance-tab:focus-visible,
.it-tab:focus-visible { outline: 2px solid rgba(67, 56, 202, 0.4); outline-offset: 2px; }
.finance-tab.active,
.it-tab.active { background: rgba(67, 56, 202, 0.24); border-color: rgba(148, 163, 184, 0.32); color: rgba(226, 232, 240, 0.96); box-shadow: inset 0 0 0 1px rgba(67, 56, 202, 0.32); }
.finance-tab-icon { font-size: 1.35rem; line-height: 1; }
.it-tab-icon { font-size: 1.6rem; line-height: 1; }
.finance-tab-panels,
.it-tab-panels { display:flex; flex-direction:column; gap:26px; }
.finance-panel,
.it-panel { display:none; flex-direction:column; gap:24px; }
.finance-panel.active,
.it-panel.active { display:flex; }
.finance-panel[hidden],
.it-panel[hidden] { display:none !important; }
.finance-contacts-page { display:flex; flex-direction:column; gap:24px; }
.finance-contacts-header { display:flex; flex-direction:column; gap:8px; }
.finance-contacts-header h2 { margin:0; font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.finance-contacts-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:22px; align-items:stretch; }
.finance-contacts-card { display:flex; flex-direction:column; gap:24px; padding: clamp(20px, 2.6vw, 30px); }
.finance-contacts-card-header { display:flex; align-items:center; gap:18px; }
.finance-contacts-card-icon { flex:0 0 auto; width:54px; height:54px; border-radius:18px; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:1rem; letter-spacing:0.08em; text-transform:uppercase; color:rgba(15, 23, 42, 0.88); background:linear-gradient(135deg, rgba(148, 163, 184, 0.4), rgba(226, 232, 240, 0.95)); box-shadow:0 12px 24px -16px rgba(15, 23, 42, 0.8); }
.finance-contacts-card-heading { display:flex; flex-direction:column; gap:4px; }
.finance-contacts-card-heading h3 { margin:0; font-size: clamp(1.05rem, 2vw, 1.32rem); }
.finance-contacts-list { display:grid; gap:16px; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); }
.finance-contact-card { display:flex; flex-direction:column; gap:16px; padding:18px; border-radius:18px; border:1px solid rgba(148, 163, 184, 0.3); background:linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(148, 163, 184, 0.08)); box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.finance-contact-card-main { display:flex; flex-direction:column; gap:6px; }
.finance-contact-card-main h4 { margin:0; font-size:1.02rem; }
.finance-contact-card-description { margin:0; font-size:0.9rem; color:rgba(226, 232, 240, 0.92); }
.finance-contact-card-meta { display:grid; gap:14px; grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); margin:0; }
.finance-contact-card-meta div { display:flex; flex-direction:column; gap:4px; }
.finance-contact-card-meta dt { font-size:0.72rem; text-transform:uppercase; letter-spacing:0.12em; opacity:0.6; margin:0; }
.finance-contact-card-meta dd { margin:0; font-size:0.95rem; font-weight:500; }
.finance-contact-card-meta a { color:inherit; text-decoration:underline; text-decoration-color:rgba(226, 232, 240, 0.4); text-decoration-thickness:1px; }
.finance-contact-card-meta a:hover { text-decoration-color:rgba(226, 232, 240, 0.8); }

@media (max-width: 720px) {
  .finance-contacts-card { gap:20px; }
  .finance-contacts-card-header { align-items:flex-start; }
  .finance-contacts-card-icon { width:48px; height:48px; border-radius:16px; font-size:0.95rem; }
  .finance-contact-card { padding:16px; }
  .finance-contact-card-meta { grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); }
}
.rates-page { display:flex; flex-direction:column; gap:24px; }
.rates-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; flex-wrap:wrap; }
.rates-header h2 { margin:0; font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
.rates-header p { margin:6px 0 0; max-width:560px; }
.rates-header .header-actions { align-items:center; }
.rates-kpis .kpi-sub { font-size:0.78rem; margin-top:6px; opacity:0.72; }
.kpi-pill { display:inline-flex; align-items:center; justify-content:center; gap:6px; margin-left:10px; padding:2px 10px; border-radius:999px; font-size:0.75rem; background:rgba(255,255,255,0.14); color:inherit; }
.rates-filters-card .filters-form .col { flex:1 1 180px; }
.rates-table-card { display:flex; flex-direction:column; gap:14px; }
.rates-table-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.rates-table-meta { display:flex; align-items:center; justify-content:flex-end; gap:12px; font-size:0.82rem; }
.rates-table tbody tr.rate-expiring { background: rgba(6, 182, 212, 0.08); }
.rates-table tbody tr.rate-expiring:hover { background: rgba(6, 182, 212, 0.14); }
.rate-role { display:flex; flex-direction:column; gap:4px; }
.rate-role-title { font-weight:600; }
.rate-role-dept { text-transform:uppercase; letter-spacing:0.04em; }
.rate-employee { display:flex; flex-direction:column; gap:2px; }
.rate-employee .tiny { font-size:0.7rem; letter-spacing:0.03em; }
.text-right { text-align:right; }
.text-warning { color:#f59e0b; font-weight:600; }
.rates-form { display:flex; flex-direction:column; gap:20px; }
.rates-form-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:18px; }
.rates-field { display:flex; flex-direction:column; gap:6px; font-size:0.82rem; letter-spacing:0.04em; text-transform:uppercase; color:rgba(148, 163, 184, 0.88); }
.rates-field.full-width { grid-column:1 / -1; }
.rates-field .input, .rates-field textarea.input, .rates-field select.input { font-size:0.95rem; letter-spacing:0; text-transform:none; }
.rates-field textarea.input { resize:vertical; min-height:110px; }
.form-message { display:none; padding:12px 14px; border-radius:12px; background:rgba(248, 113, 113, 0.14); border:1px solid rgba(248, 113, 113, 0.45); color:#f59e0b; font-size:0.85rem; }
.form-message.visible { display:block; }
.form-message.success { background:rgba(16, 185, 129, 0.16); border-color:rgba(16, 185, 129, 0.5); color:#16a34a; }
.rates-table .muted { opacity:0.75; }

body.light .finance-tabs,
body.light .it-tabs { background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94)); border-color: rgba(148, 163, 184, 0.24); }
body.light .finance-tab,
body.light .it-tab { background: rgba(255, 255, 255, 0.86); border-color: rgba(148, 163, 184, 0.32); color: #111827; box-shadow: none; }
body.light .finance-tab:hover,
body.light .it-tab:hover,
body.light .finance-tab:focus-visible,
body.light .it-tab:focus-visible { background: rgba(67, 56, 202, 0.16); border-color: rgba(67, 56, 202, 0.34); }
body.light .finance-tab.active,
body.light .it-tab.active { color:#111827; background: rgba(67, 56, 202, 0.2); box-shadow: inset 0 0 0 1px rgba(67, 56, 202, 0.26); }

/* --- Finance refresh --- */
.finance-page {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.8vw, 36px);
  width: calc(100% + var(--page-padding-x) * 2);
  margin: 0 calc(var(--page-padding-x) * -1);
  padding-inline: clamp(10px, 2vw, 28px);
  padding-top: clamp(16px, 2.4vw, 32px);
  padding-bottom: clamp(32px, 4vw, 54px);
}

@media (max-width: 720px) {
  .finance-page {
    width: 100%;
    margin: 0;
    padding-inline: clamp(8px, 5vw, 18px);
  }
}

.finance-hero {
  position: relative;
}

.finance-hero .hero-stage {
  position: relative;
  padding: clamp(16px, 2.2vw, 26px);
  border-radius: clamp(18px, 2.6vw, 30px);
  border: 1px solid var(--surface-border-strong);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
}

.finance-hero .hero-stage::after {
  display: none;
}

.finance-hero .hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vw, 16px);
}

.finance-hero .hero-copy {
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 1vw, 9px);
}

.finance-hero .hero-tagline {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(71, 85, 105, 0.85);
  font-weight: 700;
}

.finance-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.9vw, 2.25rem);
  letter-spacing: 0.01em;
}

.finance-hero .hero-subcopy {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(0.85rem, 1.2vw, 0.98rem);
  line-height: 1.5;
}

.finance-hero .hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.2vw, 16px);
  margin-top: clamp(12px, 1.5vw, 18px);
}

.finance-hero .hero-actions .btn {
  min-width: clamp(140px, 12vw, 180px);
  justify-content: center;
}

.finance-hero .hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(12px, 2vw, 18px);
  align-items: stretch;
}

.finance-hero .hero-metric {
  padding: clamp(14px, 1.8vw, 20px) clamp(16px, 2vw, 24px);
  border-radius: 18px;
  border: 1px solid var(--surface-border-strong);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
  min-height: clamp(110px, 12.5vw, 140px);
  box-shadow: none;
}

.finance-hero .hero-metric::after {
  display: none;
}

.finance-hero .hero-metric-label {
  font-size: clamp(0.72rem, 1vw, 0.84rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.finance-hero .hero-metric-value {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 700;
  color: var(--text);
}

.finance-hero .hero-metric-caption {
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  color: var(--muted);
  margin-top: auto;
}

.finance-hero .hero-visual {
  position: relative;
  z-index: 1;
  border-radius: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--surface-border);
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.08), rgba(59, 130, 246, 0.05));
  padding: clamp(18px, 2.2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.finance-hero-summary {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vw, 16px);
  width: 100%;
}

.finance-hero-summary h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.finance-hero-summary dl {
  margin: 0;
  display: grid;
  gap: clamp(8px, 1.4vw, 12px);
}

.finance-hero-summary dt {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.finance-hero-summary dd {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 1080px) {
  .finance-hero .hero-stage {
    grid-template-columns: 1fr;
  }

  .finance-hero .hero-visual {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .finance-hero .hero-actions {
    width: 100%;
  }

  .finance-hero .hero-actions .btn {
    flex: 1 1 auto;
    width: 100%;
  }
}

.finance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1.2vw, 12px);
  align-items: stretch;
  padding: clamp(14px, 2.2vw, 18px);
  border-radius: clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--surface-border-strong);
  background: var(--surface);
  box-shadow: none;
}

.finance-tab {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: clamp(12px, 1.6vw, 14px) clamp(16px, 1.8vw, 18px);
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.finance-tab:hover {
  transform: translateY(-1px);
  background: var(--surface);
  border-color: var(--surface-border-strong);
}

.finance-tab:focus-visible {
  outline: 2px solid rgba(67, 56, 202, 0.35);
  outline-offset: 2px;
}

.finance-tab.active {
  background: var(--surface);
  border-color: rgba(67, 56, 202, 0.45);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.finance-tab-icon {
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(67, 56, 202, 0.85);
}

.finance-tab-panels {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 2.4vw, 30px);
}

.finance-panel {
  display: none;
  flex-direction: column;
  gap: clamp(20px, 2.2vw, 26px);
}

.finance-panel.active {
  display: flex;
}

.finance-panel[hidden] {
  display: none !important;
}

.finance-page .card {
  background: var(--surface);
  border: 1px solid var(--surface-border-strong);
  box-shadow: none;
}

.finance-page .card::before,
.finance-page .card::after {
  content: none;
}

.finance-page .kpi-grid .card {
  background: var(--surface-alt);
  border: 1px solid var(--surface-border-strong);
  box-shadow: none;
}

.finance-page .kpi-grid .card::before,
.finance-page .kpi-grid .card::after {
  content: none;
}

.finance-page .btn {
  background: linear-gradient(135deg, #4338ca, #2563eb);
  border-color: rgba(67, 56, 202, 0.42);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(67, 56, 202, 0.18);
}

.finance-page .btn:hover {
  background: linear-gradient(135deg, #4338ca, #1d4ed8);
}

.finance-page .btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--surface-border-strong);
  box-shadow: none;
}

.finance-page .btn.secondary:hover {
  background: var(--surface-alt);
}

.finance-page .btn.tiny,
.finance-page .btn.small {
  padding: 6px 12px;
  box-shadow: none;
}

.finance-page .btn.tiny.secondary,
.finance-page .btn.small.secondary {
  background: var(--surface-alt);
  border-color: var(--surface-border);
  color: var(--text);
}

.finance-page .btn.danger {
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-color: rgba(220, 38, 38, 0.55);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
}

.finance-page .btn.danger.tiny,
.finance-page .btn.danger.small {
  box-shadow: none;
}

.finance-page .filters-card,
.finance-page .rates-filters-card,
.finance-page .rates-table-card,
.finance-page .expenses-table,
.finance-page .finance-contacts-card {
  border-color: var(--surface-border-strong);
}

.finance-page .table thead {
  background: var(--surface-alt);
}

.finance-page .table th {
  color: rgba(15, 23, 42, 0.78);
}

.finance-page .expenses-table tbody tr:nth-child(even) {
  background: rgba(67, 56, 202, 0.04);
}

.finance-page .expenses-table tbody tr:hover {
  background: rgba(67, 56, 202, 0.08);
}

.finance-page .rates-table tbody tr.rate-expiring {
  background: rgba(234, 179, 8, 0.12);
}

.finance-page .rates-table tbody tr.rate-expiring:hover {
  background: rgba(234, 179, 8, 0.18);
}

.finance-page .rates-table tbody tr:not(.rate-expiring):nth-child(even) {
  background: rgba(67, 56, 202, 0.04);
}

.finance-page .rates-table tbody tr:not(.rate-expiring):hover {
  background: rgba(67, 56, 202, 0.08);
}

.finance-metric-card {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
}

.finance-contacts-page {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.2vw, 26px);
}

.finance-contacts-grid {
  gap: clamp(18px, 2.2vw, 24px);
}

.finance-contacts-card {
  gap: clamp(18px, 2vw, 22px);
  padding: clamp(20px, 2.6vw, 30px);
}

.finance-contacts-card-icon {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.12), rgba(59, 130, 246, 0.12));
  border: 1px solid var(--surface-border-strong);
  color: #1f2937;
  box-shadow: none;
}

.finance-contact-card {
  border: 1px solid var(--surface-border-strong);
  background: var(--surface-alt);
  box-shadow: none;
}

.finance-contact-card-description {
  color: var(--muted);
}

.finance-contact-card-meta a {
  color: inherit;
  text-decoration-color: rgba(67, 56, 202, 0.4);
}

.finance-contact-card-meta a:hover {
  text-decoration-color: rgba(67, 56, 202, 0.8);
}

@media (max-width: 640px) {
  .finance-tabs {
    flex-direction: column;
  }

  .finance-tab {
    flex: 1 1 auto;
    width: 100%;
  }
}

body.light .finance-tabs {
  background: var(--surface);
  border-color: var(--surface-border-strong);
}

body.light .finance-tab {
  background: var(--surface-alt);
  border-color: transparent;
  color: var(--text);
  box-shadow: none;
}

body.light .finance-tab:hover,
body.light .finance-tab:focus-visible {
  background: var(--surface);
  border-color: var(--surface-border-strong);
}

body.light .finance-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* --- Expenses page --- */
.expenses-page { display:flex; flex-direction:column; gap:20px; }
.expense-header { display:flex; align-items:center; justify-content:space-between; gap: 18px; flex-wrap: wrap; }

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.header-actions .btn {
  min-width: clamp(120px, 12vw, 150px);
  justify-content: center;
}
.expenses-page .filters-form .col { flex:1 1 160px; }
.expenses-page .btn { background: linear-gradient(135deg, #4338ca, #2563eb); }
.expenses-page .btn.secondary { background: var(--surface); color: var(--text); border-color: var(--surface-border-strong); }

.expenses-page .filters-form .filter-action{display:flex;align-items:flex-end;gap:8px;}
.expenses-page .filters-form .filter-action .btn{flex:1;}

.tag-select{display:flex;flex-wrap:wrap;gap:8px;}
.tag-option{position:relative;display:inline-flex;align-items:center;cursor:pointer;}
.tag-option input{position:absolute;opacity:0;width:1px;height:1px;margin:0;padding:0;border:0;}
.tag-option span{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:12px;background:rgba(255,255,255,0.1);color:#ccc;transition:background .3s,color .3s;}
.tag-option input:checked+span{background:linear-gradient(135deg,#4338ca,#4338ca);color:#fff;}
.tag-select:not(.editing) .del-tag{display:none;}
.del-tag{background:none;border:none;color:#dc2626;cursor:pointer;font-size:12px;font-weight:bold;}
.del-tag:hover{color:#fff;}
.expenses-page .vendor-input-wrap{position:relative;}
.expenses-page .suggestions{position:absolute;top:100%;left:0;width:100%;background:rgba(0,0,0,0.85);border-radius:8px;margin-top:4px;max-height:150px;overflow:auto;z-index:10;}
.expenses-page .suggestions div{padding:4px 8px;display:flex;align-items:center;gap:6px;cursor:pointer;}
.expenses-page .suggestions div:hover{background:rgba(255,255,255,0.1);}
.expenses-page .suggestions img{width:20px;height:20px;object-fit:contain;}
.vendor-logo{width:40px;height:40px;object-fit:contain;}
.logo-preview{margin-top:4px;}
.logo-preview img{width:40px;height:40px;object-fit:contain;display:block;}
.logo-preview a{display:inline-block;margin-top:4px;font-size:12px;}
.expenses-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.expenses-table tbody tr:hover { background: rgba(255,255,255,0.06); }

#expense_modal .modal-content {
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82));
  border: 1px solid rgba(6, 182, 212, 0.24);
  box-shadow: 0 28px 80px rgba(12, 10, 8, 0.55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
#expense_form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
#expense_form .form-section {
  position: relative;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.7));
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 18px 45px rgba(12, 10, 8, 0.38);
  overflow: hidden;
}
#expense_form .form-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, rgba(67, 56, 202, 0.22), transparent 70%);
  opacity: 0.85;
  pointer-events: none;
}
#expense_form .form-section > * {
  position: relative;
  z-index: 1;
}
#expense_form .form-section h4 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
#expense_form .section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
#expense_form .form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#expense_form .form-field.full-width {
  grid-column: 1 / -1;
}
#expense_form label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.78);
}
#expense_form .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#expense_form .tag-actions {
  display: flex;
  gap: 8px;
}
#expense_form .tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  margin-top: 6px;
  border-radius: 14px;
  background: rgba(240, 245, 255, 0.65);
  border: 1px dashed rgba(91, 68, 255, 0.22);
}
#expense_form .tag-select .tag-option span {
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(0, 245, 160, 0.16);
  color: rgba(71, 85, 105, 0.88);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
#expense_form .tag-select .tag-option span:hover {
  background: rgba(6, 182, 212, 0.28);
}
#expense_form .tag-select .tag-option input:checked + span {
  background: linear-gradient(135deg, #4338ca, #06b6d4);
  color: #f8fafc;
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.3);
}
#expense_form .tag-actions .btn {
  min-width: auto;
}
#expense_form .tag-actions .btn.tiny {
  padding: 5px 10px;
}
#expense_form .input,
#expense_form select.input {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  background: rgba(15, 23, 42, 0.62);
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
#expense_form .input:focus,
#expense_form select.input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
  background: rgba(15, 23, 42, 0.75);
}
#expense_form .input::placeholder {
  color: rgba(226, 232, 240, 0.6);
}
#expense_form .logo-preview {
  margin-top: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(6, 182, 212, 0.22);
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
#expense_form .logo-preview img {
  width: 48px;
  height: 48px;
}
#expense_form .logo-preview a {
  margin-top: 0;
  font-size: 0.8rem;
  color: rgba(6, 182, 212, 0.9);
}
#expense_form .form-actions {
  display: flex;
  justify-content: flex-end;
}
#expense_form .form-actions .btn {
  min-width: 180px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.3);
}

.expenses-table .table td.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}
.expenses-table .table td.actions form {
  margin: 0;
}
.expenses-table .table td.actions .btn {
  flex: 0 0 auto;
}

.resumes-page {
  gap: 24px;
}

.resumes-page .resumes-hero {
  border: 1px solid var(--glass-border-strong);
  background:
    radial-gradient(135% 160% at 14% 12%, rgba(67, 56, 202, 0.38), transparent 62%),
    radial-gradient(150% 130% at 86% 12%, rgba(129, 140, 248, 0.26), transparent 68%),
    linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.84));
  box-shadow: var(--shadow-lg);
}

.resumes-page .resumes-hero::after {
  background: linear-gradient(138deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.42) 52%, rgba(15, 23, 42, 0.16) 76%, transparent 92%);
  opacity: 0.82;
}

.resumes-page .resumes-hero .company-hero-text h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.4rem);
}

.resumes-page .resumes-hero .company-hero-text p {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.85);
}

.resumes-page .resumes-hero .resume-badges {
  margin-top: 10px;
}

.resumes-page .resumes-hero .resume-badges .company-badge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.32), rgba(129, 140, 248, 0.22));
  border-color: rgba(148, 163, 184, 0.5);
  color: rgba(248, 250, 252, 0.94);
}

.resumes-page .resumes-hero .resume-cta {
  gap: 12px;
  align-items: stretch;
}

.resumes-page .resumes-hero .resume-cta .btn {
  min-width: clamp(180px, 26vw, 220px);
  width: 100%;
  box-shadow: 0 24px 56px rgba(12, 20, 38, 0.6);
}

.resumes-page .resumes-hero .resume-cta .btn.secondary {
  box-shadow: 0 22px 48px rgba(7, 16, 28, 0.56);
}

@media (min-width: 640px) {
  .resumes-page .resumes-hero .resume-cta {
    align-items: center;
  }

  .resumes-page .resumes-hero .resume-cta .btn {
    width: auto;
  }
}

.resumes-page .resumes-hero .recruiting-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.recruiting-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.recruiting-tablist .tab-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--resume-border);
  background: rgba(19, 17, 14, 0.6);
  color: var(--resume-accent);
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.recruiting-tablist .tab-toggle.is-active {
  background: linear-gradient(135deg, var(--resume-accent), var(--resume-accent-alt));
  color: #1f2937;
  box-shadow: 0 10px 30px rgba(217, 161, 84, 0.28);
}

.recruiting-tabpanels {
  display: block;
}

.candidate-board {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
}

.candidate-board-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.candidate-board-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.candidate-board-copy h3 {
  margin-bottom: 0.25rem;
}

.candidate-board-columns {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .candidate-board-columns {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.candidate-column {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface-alt);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 280px;
  position: relative;
}

.candidate-column-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.candidate-column-title h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--resume-accent);
}

.candidate-column-title p {
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

.candidate-column-header .badge.neutral {
  background: rgba(245, 201, 122, 0.18);
  border: 1px solid var(--resume-border);
  color: var(--resume-accent);
}

.candidate-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 160px;
  flex: 1;
}

.candidate-column-body.is-drop-target {
  outline: 2px dashed var(--resume-accent);
  outline-offset: 4px;
  background: rgba(245, 201, 122, 0.08);
  border-radius: 0.6rem;
}

.candidate-column-empty {
  border: 1px dashed var(--resume-border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  background: rgba(13, 11, 9, 0.6);
}

.candidate-card {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.candidate-card:active {
  cursor: grabbing;
}

.candidate-card.is-dragging {
  opacity: 0.75;
  transform: scale(0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.candidate-card-name {
  font-weight: 600;
  font-size: 1rem;
}

.candidate-card-role {
  margin: 0;
}

.candidate-card-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.candidate-card-contact a {
  color: inherit;
  text-decoration: none;
}

.candidate-card-contact a:hover,
.candidate-card-contact a:focus {
  text-decoration: underline;
}

.candidate-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.candidate-detail-modal .candidate-detail-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.candidate-detail-heading h3 {
  margin: 0;
  font-size: 1.4rem;
}

.candidate-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.candidate-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.candidate-detail-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .candidate-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.candidate-detail-column h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.candidate-detail-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.candidate-detail-contact a {
  color: var(--resume-accent);
  text-decoration: none;
}

.candidate-detail-contact a:hover,
.candidate-detail-contact a:focus {
  text-decoration: underline;
}

.candidate-detail-summary p {
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.candidate-detail-summary .muted.tiny {
  margin-top: 0.5rem;
}

.candidate-modal .modal-header h3 {
  margin-bottom: 0.25rem;
}

.candidate-modal .modal-header p {
  margin: 0;
}


.resumes-page .kpi-grid,
.resume-library-page .kpi-grid {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: clamp(8px, 1vw, 18px);
  align-items: stretch;
}

.resumes-page .kpi-grid .card,
.resume-library-page .kpi-grid .card {
  flex: 1 1 0;
  min-width: 0;

  padding: clamp(5px, 0.5vw, 8px);
  border-radius: clamp(10px, 1.1vw, 14px);
  background-color: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--resume-border);
  box-shadow: none;
  text-align: left;
}

.resumes-page .kpi-label,
.resume-library-page .kpi-label {
  font-size: 0.6rem;

  letter-spacing: 0.04em;

  text-transform: uppercase;

  color: rgba(226, 232, 240, 0.82);
}

.resumes-page .kpi-value,
.resume-library-page .kpi-value {
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  gap: clamp(2px, 0.6vw, 6px);

  color: #f8fafc;
  justify-content: flex-start;
}


.resumes-page .kpi-icon,
.resume-library-page .kpi-icon {
  width: clamp(10px, 1.6vw, 16px);
  height: clamp(10px, 1.6vw, 16px);

}

.resumes-page .kpi-insights,
.resume-library-page .kpi-insights {
  display: none;
}

@media (max-width: 900px) {

  .resumes-page .kpi-grid,
  .resume-library-page .kpi-grid {

    flex-wrap: wrap;
  }

  .resumes-page .kpi-grid .card,
  .resume-library-page .kpi-grid .card {
    flex: 1 1 calc(50% - clamp(8px, 1vw, 18px));
    min-width: clamp(180px, 48%, 100%);
  }
}

@media (max-width: 600px) {
  .resumes-page .kpi-grid .card,
  .resume-library-page .kpi-grid .card {
    flex-basis: 100%;
    min-width: 100%;
  }
}

.resumes-page .filters-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.72));
  border: 1px solid var(--resume-border);
  box-shadow: 0 18px 46px rgba(12, 10, 8, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resumes-page .filters-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resumes-page .filters-card-copy h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.resumes-page .filters-card-copy p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
  max-width: 460px;
}

.resumes-page .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.resumes-page .filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resumes-page .filters-form {
  align-items: flex-end;
  gap: 18px;
}

.resumes-page .filters-form .col {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resumes-page .filters-form .col.filter-action {
  flex: 0 0 150px;
  align-items: flex-end;
  justify-content: flex-end;
  flex-direction: row;
  gap: 8px;
}

.resumes-page .filters-form label {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.7);
}

.resumes-page .filters-form .input,
.resumes-page .filters-form select.input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--resume-border);
  border-radius: 14px;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resumes-page .filters-form .input:focus,
.resumes-page .filters-form select.input:focus {
  outline: none;
  border-color: var(--resume-border-strong);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.resumes-page .filters-form .input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.resumes-page .filters-form .tag-select {
  margin-top: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

.resumes-page .filters-form .tag-option span {
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.92);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.resumes-page .filters-form .tag-option span:hover {
  background: rgba(148, 163, 184, 0.24);
}

.resumes-page .filters-form .tag-option input:checked + span {
  background: linear-gradient(135deg, var(--resume-accent), var(--resume-accent-alt));
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(34, 211, 238, 0.25);
}

.resumes-table .clearance-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resumes-table .clearance-pills .badge {
  margin: 0;
}

.resumes-page .resume-table {
  padding: 26px;
  border-radius: 26px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.78));
  border: 1px solid var(--resume-border);
  box-shadow: 0 30px 80px rgba(12, 10, 8, 0.4);
}

.resumes-page .resumes-table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 12px 28px rgba(12, 10, 8, 0.3);
}

.resumes-page .resumes-table-tools-left {
  flex: 1 1 240px;
}

.resumes-page .resumes-table-tools-left .input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--resume-border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resumes-page .resumes-table-tools-left .input:focus {
  outline: none;
  border-color: var(--resume-border-strong);
  box-shadow: 0 0 0 3px rgba(217, 161, 84, 0.25);
}

.resumes-page .resumes-table-tools-left .input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.resumes-page .resumes-table-tools-right {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.65);
}

.resumes-page .resume-table .table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.resumes-page .resume-table .table thead th {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.24), rgba(15, 23, 42, 0.7));
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  padding: 14px 18px;
}

.resumes-page .resume-table .table tbody tr {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.resumes-page .resume-table .table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.45);
}

.resumes-page .resume-table .table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.55);
}

.resumes-page .resume-table .table tbody tr:hover {
  background: rgba(67, 56, 202, 0.2);
  box-shadow: inset 0 0 0 1px rgba(131, 182, 255, 0.35);
}

.resumes-page .resume-table .table th,
.resumes-page .resume-table .table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.resumes-page .resume-table .table tbody td {
  color: rgba(226, 232, 240, 0.9);
}

.resumes-page .resume-table .table tbody tr:last-child td {
  border-bottom: none;
}


.resume-library-page .kpi-text {
  font-weight: 600;
}


.resume-library-page .filters-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.resume-library-page .filters-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.resume-library-page .filters-card-copy h3 {
  margin: 0;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
}

.resume-library-page .filters-card-copy p {
  margin: 8px 0 0;
  max-width: 520px;
}

.resume-library-page .filters-card-header .btn {
  align-self: flex-start;
}

.resume-library-page .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.resume-library-page .filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-library-page .filter-field--full {
  grid-column: 1 / -1;
}

.resume-library-page .filter-field label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.resume-library-page .filter-field .input,
.resume-library-page .filter-field select.input {
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  background: rgba(15, 23, 42, 0.68);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.55);
}

.resume-library-page .filter-field .input:focus,
.resume-library-page .filter-field select.input:focus {
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.25);
}

.resume-library-page .filter-field .input::placeholder {
  color: rgba(148, 163, 184, 0.66);
}

.resume-library-page .resume-table {
  padding: 0 0 12px 0;
}

.resume-library-page .resume-table-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 16px;
}

.resume-library-page .resume-table-title h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.resume-library-page .resume-table-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.resume-library-page .resume-table-summary {
  margin-left: auto;
  min-width: 180px;
  text-align: right;
}

@media (max-width: 720px) {
  .resume-library-page .resume-table-summary {
    text-align: left;
  }
}

body.light .resume-library-page .filter-field .input,
body.light .resume-library-page .filter-field select.input {
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

body.light .resume-library-page .filter-field .input::placeholder {
  color: rgba(100, 116, 139, 0.7);
}

.resumes-page .resume-modal {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 26px 48px rgba(8, 11, 19, 0.56);
  border-radius: 28px;
  backdrop-filter: blur(18px);
}

.resume-modal .pad {
  padding: 32px 32px 28px;
}

.resume-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.resume-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(6, 182, 212, 0.18));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.42);
}

.resume-modal-icon svg {
  width: 28px;
  height: 28px;
}

.resume-modal-copy h3 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.resume-modal-copy p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
}

.resume-list td {
  vertical-align: top;
}

.resume-name-link {
  font-weight: 700;
  color: #dbeafe;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.resume-name-link:hover,
.resume-name-link:focus {
  color: #dbeafe;
  text-shadow: 0 0 12px rgba(196, 181, 253, 0.35);
}

.resume-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.resume-status .badge {
  margin: 0;
}

.resume-status .badge.ok {
  background: rgba(52, 211, 153, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #16a34a;
}

.resume-status .badge.warn {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f59e0b;
}

.badge.info {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.24), rgba(15, 74, 163, 0.32));
  border: 1px solid rgba(131, 182, 255, 0.55);
  color: var(--pro-accent-soft);
}

.badge.info.muted {
  background: rgba(100, 116, 139, 0.22);
  border: 1px dashed rgba(148, 163, 184, 0.42);
  color: rgba(226, 232, 240, 0.65);
}

.resume-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.85);
}

.resume-contact div {
  word-break: break-word;
}

.resume-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resume-actions .btn {
  flex: 0 0 auto;
}

.resume-file-status {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.68);
}

.resume-file-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--resume-border);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.65));
  box-shadow: 0 12px 30px rgba(12, 10, 8, 0.32);
}

.resume-file-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resume-file-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(226, 232, 240, 0.6);
}

.resume-file-name {
  font-weight: 600;
  color: #f8fafc;
}

.resume-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resumes-detail-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.resumes-detail-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.resumes-detail-page .card.glassy {
  border: 1px solid var(--resume-border);
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.72));
  box-shadow: 0 26px 70px rgba(12, 10, 8, 0.45);
  border-radius: 26px;
  padding: 26px;
}

.resumes-detail-page .detail-header {
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(217, 161, 84, 0.35), transparent 50%),
              radial-gradient(120% 140% at 100% 0%, rgba(34, 211, 238, 0.28), transparent 60%),
              rgba(15, 23, 42, 0.85);
}

.resumes-detail-page .detail-header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.resumes-detail-page .detail-header-actions .btn {
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
}

.resumes-detail-page .detail-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resumes-detail-page .detail-title h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.resumes-detail-page .detail-meta {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.95rem;
}

.resumes-detail-page .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.resumes-detail-page .detail-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.resumes-detail-page .detail-card h3 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.resumes-detail-page .detail-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.resumes-detail-page .detail-item {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.resumes-detail-page .detail-item dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(226, 232, 240, 0.65);
  margin-bottom: 6px;
}

.resumes-detail-page .detail-item dd {
  margin: 0;
  font-size: 1rem;
  color: #f8fafc;
}

.resumes-detail-page .detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resumes-detail-page .detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.resumes-detail-page .detail-actions .btn {
  flex: 0 0 auto;
}

.resumes-detail-page .resume-file-card {
  padding: clamp(16px, 1.8vw, 22px);
  gap: 10px;
}

.resumes-detail-page .resume-file-card .resume-file-header {
  gap: 10px;
}

.resumes-detail-page .resume-file-card .resume-file-meta {
  margin-top: 2px;
}

.resumes-detail-page .resume-file-card .resume-file-inline {
  padding: 12px 16px;
  gap: 12px;
}

.resumes-detail-page .resume-file-card .resume-file-body {
  margin-top: 0;
}

.resume-file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.resume-file-meta {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.7);
  margin-top: 4px;
}

.resume-file-body {
  padding: 0;
  background: transparent;
  border: none;
  min-height: 0;
  display: block;
}

.resume-file-body.compact {
  padding: 0;
}

.resume-file-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--resume-border);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.72));
  box-shadow: 0 18px 36px rgba(8, 11, 19, 0.45);
}

.resume-file-inline .resume-file-info {
  gap: 6px;
}

.resume-file-inline .resume-file-actions {
  justify-content: flex-end;
}

.resume-file-inline .resume-file-actions .btn {
  flex: 0 0 auto;
}

.ai-prompt-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.ai-prompt-form.ai-prompt-disabled {
  opacity: 0.65;
}

.ai-prompt-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.88);
}

.ai-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ai-prompt-status {
  min-height: 18px;
  color: rgba(226, 232, 240, 0.65);
}

.ai-prompt-status.error {
  color: #dc2626;
}

.resume-notes-card {
  gap: 18px;
}

.resume-notes-card .notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.resume-notes-card .note-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resume-notes-card .note-form textarea {
  min-height: 90px;
  resize: vertical;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 12px;
  color: inherit;
}

.resume-notes-card .note-form textarea:focus {
  outline: none;
  border-color: var(--resume-border-strong);
  box-shadow: 0 0 0 3px rgba(217, 161, 84, 0.25);
}

.resume-notes-card .note-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.resume-notes-card .note-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(12, 10, 8, 0.28);
}

.resume-notes-card .note-bubble.mine {
  background: linear-gradient(135deg, var(--resume-accent), var(--resume-accent-alt));
  color: #f8fafc;
  margin-left: auto;
  border-bottom-right-radius: 10px;
}

.resume-notes-card .note-bubble.other {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.9);
  margin-right: auto;
  border-bottom-left-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.resume-notes-card .note-bubble .meta {
  font-size: 0.75rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  opacity: 0.85;
}

.resume-notes-card .note-bubble .meta em {
  font-style: normal;
  color: rgba(226, 232, 240, 0.7);
}

.resume-notes-card .note-bubble .meta .btn {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
}

#resume_modal .modal-content {
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.78));
  border: 1px solid var(--resume-border);
  box-shadow: 0 32px 90px rgba(12, 10, 8, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

#resume_form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

#resume_form .form-section {
  position: relative;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.68));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 45px rgba(12, 10, 8, 0.35);
  overflow: hidden;
}

#resume_form .form-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 0% 0%, var(--resume-accent-soft), transparent 70%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

#resume_form .form-section > * {
  position: relative;
  z-index: 1;
}

#resume_form .form-section h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#resume_form .section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

#resume_form .form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#resume_form .form-field.full-width {
  grid-column: 1 / -1;
}

#resume_form label {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
}

#resume_form .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#resume_form .tag-actions {
  display: flex;
  gap: 8px;
}

#resume_form .tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

#resume_form .tag-select .tag-option span {
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.95);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#resume_form .tag-select .tag-option span:hover {
  background: rgba(148, 163, 184, 0.28);
}

#resume_form .tag-select .tag-option input:checked + span {
  background: linear-gradient(135deg, var(--resume-accent), var(--resume-accent-alt));
  color: #f8fafc;
  box-shadow: 0 12px 32px rgba(217, 161, 84, 0.3);
}

#resume_form .input,
#resume_form select.input {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.65);
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#resume_form .input:focus,
#resume_form select.input:focus {
  outline: none;
  border-color: var(--resume-border-strong);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
  background: rgba(15, 23, 42, 0.72);
}

#resume_form .input::placeholder {
  color: rgba(226, 232, 240, 0.55);
}

#resume_form .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

#resume_form .checkbox-inline input {
  width: 18px;
  height: 18px;
  accent-color: var(--resume-accent);
}

#resume_form .checkbox-inline span {
  color: rgba(226, 232, 240, 0.85);
}

#resume_form .form-actions {
  display: flex;
  justify-content: flex-end;
}

#resume_form .form-actions .btn {
  min-width: 180px;
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.28);
}

@media (max-width: 768px) {
  .resume-file-body {
    min-height: 120px;
    padding: 16px;
  }

  .resumes-page .resumes-hero,
  .resumes-page .filters-card,
  .resumes-page .resume-table,
  .resumes-detail-page .card.glassy {
    padding: 20px;
  }
}

/* --- Company page --- */
.company-hero {
  position: relative;

  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 22vw, 240px);
  grid-template-areas:
    "text visual"
    "cta visual";
  align-items: center;
  gap: clamp(10px, 1.8vw, 18px);
  padding: clamp(12px, 1.8vw, 18px);
  border-radius: clamp(16px, 2.4vw, 22px);

  border: 1px solid var(--theme-hero-border, var(--glass-border-strong));
  background: var(
    --theme-hero-surface,
    radial-gradient(120% 140% at 12% 10%, rgba(255, 255, 255, 0.12), transparent 52%),
    radial-gradient(140% 120% at 88% 12%, rgba(67, 56, 202, 0.2), transparent 60%),
    linear-gradient(150deg, rgba(67, 56, 202, 0.2), rgba(67, 56, 202, 0.18), rgba(15, 23, 42, 0.9))
  );
  box-shadow: 0 18px 46px rgba(5, 9, 20, 0.55);
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.company-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(
    --theme-hero-overlay,
    linear-gradient(130deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.4) 55%, rgba(15, 23, 42, 0.15) 78%, transparent 90%)
  );
  opacity: 0.55;
  pointer-events: none;
}

.company-hero > * {
  position: relative;
  z-index: 1;
}

.company-hero-text {
  display: flex;
  flex-direction: column;

  gap: 6px;
  max-width: 420px;
  grid-area: text;

}

.company-hero-visual {
  position: relative;

  grid-area: visual;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1.6vw, 12px);
  border-radius: clamp(14px, 2vw, 18px);

  background: var(
    --theme-hero-visual,
    radial-gradient(120% 120% at 50% 20%, rgba(6, 182, 212, 0.14), transparent 60%),
    linear-gradient(160deg, rgba(6, 182, 212, 0.12), rgba(67, 56, 202, 0.1))
  );
  box-shadow: var(
    --theme-hero-visual-shadow,
    inset 0 0 0 1px rgba(148, 163, 184, 0.18),
    0 18px 36px rgba(15, 23, 42, 0.32)
  );
}

.company-hero-visual img {

  width: clamp(96px, 12vw, 160px);

  height: auto;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.32));
}

.company-hero--compact {
  grid-template-columns: minmax(0, 1fr) clamp(120px, 18vw, 180px);
  gap: clamp(8px, 1.4vw, 16px);
  padding: clamp(10px, 1.4vw, 16px);
}

.company-hero--compact .company-hero-text {
  gap: 4px;
}

.company-hero--compact .company-hero-text h2 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
}

.company-hero--compact .company-hero-text p {
  font-size: 0.78rem;
}

.company-hero--compact .company-badges {
  gap: 4px;
  margin-top: 0;
}

.company-hero--compact .company-badge {
  font-size: 0.72rem;
  padding: 6px 10px;
}

.company-hero--compact .company-hero-visual {
  padding: clamp(4px, 1vw, 10px);
}

.company-hero--compact .company-hero-visual img {
  width: clamp(70px, 9vw, 120px);
}

.company-hero-text h2 {
  margin: 0;

  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: -0.005em;
  line-height: 1.15;

}

.company-hero-text p {
  margin: 0;

  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.78);

}

.company-badges {
  display: flex;
  flex-wrap: wrap;

  gap: 6px;
  margin-top: 2px;

}

.company-badges .company-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.05em;

  text-transform: uppercase;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.24), rgba(30, 41, 59, 0.52));
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: rgba(248, 250, 252, 0.9);
  box-shadow: 0 14px 30px rgba(5, 12, 28, 0.36);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.company-cta {
  display: flex;

  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  grid-area: cta;
}

.company-cta .btn {
  min-width: 0;
  padding: 8px 14px;
  font-size: 0.82rem;
  box-shadow: 0 12px 28px rgba(67, 56, 202, 0.18);
}

.company-cta .btn.secondary {
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.18);
}

.company-page {
  gap: clamp(16px, 2.4vw, 22px);
}

.company-page .kpi-grid {

  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: clamp(8px, 1vw, 18px);
  align-items: stretch;
}

.company-page .kpi-grid > .kpi {
  flex: 1 1 0;
  min-width: 0;

}

.company-page .kpi {
  position: relative;
  padding: clamp(5px, 0.5vw, 8px);
  border-radius: clamp(10px, 1.1vw, 14px);
  background: linear-gradient(160deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  text-align: left;
}

.company-page .kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 58%),
    radial-gradient(circle at 78% 78%, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0) 62%);
  z-index: 1;
  mix-blend-mode: screen;
}

.company-page .kpi > * {
  position: relative;
  z-index: 2;
}

.company-page .kpi-value {
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  gap: clamp(2px, 0.6vw, 6px);

  justify-content: flex-start;
}

.company-page .kpi-icon {

  width: clamp(10px, 1.6vw, 16px);
  height: clamp(10px, 1.6vw, 16px);

}

@media (max-width: 900px) {
  .company-page .kpi-grid {

    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .company-page .kpi-grid > .kpi {
    flex: 1 1 calc(50% - clamp(8px, 1vw, 18px));
    min-width: clamp(160px, 48%, 100%);
  }
}

@media (max-width: 600px) {
  .company-page .kpi-grid > .kpi {
    flex-basis: 100%;
    min-width: 100%;

  }
}

.company-page .company-metrics-grid {
  margin-top: 0;
}

.company-page .kpi-label {
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.company-page .kpi-text {
  color: #0b1120;
}

.company-page .kpi-caption,
.company-page .kpi-value small {
  color: #111827;
}

.company-page .kpi-insights {
  margin-top: 6px;
}

.company-page .kpi-sparkline {
  height: 24px;
}

@media (max-width: 960px) {
  .company-hero {
    grid-template-columns: minmax(0, 1fr) clamp(140px, 28vw, 200px);
  }
}

@media (max-width: 768px) {
  .company-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "cta"
      "visual";
    align-items: flex-start;
  }

  .company-hero-visual {

    justify-self: flex-start;

  }
}

@media (max-width: 640px) {
  .company-cta {
    width: 100%;
    justify-content: flex-start;
  }

  .company-cta .btn {
    width: auto;
  }
}

@media (max-width: 520px) {
  .company-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .company-cta .btn {
    width: 100%;
  }

  .company-badges {
    gap: 4px;
  }

  .company-badges .company-badge {
    width: 100%;
    justify-content: center;
  }
}

.company-page .company-about {
  border-radius: 26px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--resume-border);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.78));
  box-shadow: 0 26px 70px rgba(12, 10, 8, 0.38);
}

.company-page .company-about h3 {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin: 0;
}

.company-page .company-about p {
  margin: 0;
  line-height: 1.65;
  color: #000000;
}

.company-page .company-about .btn.edit-details {
  background: linear-gradient(135deg, #e0f2fe 0%, #93c5fd 100%);
  border-color: #93c5fd;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(147, 197, 253, 0.28);
}

.company-page .company-about .btn.edit-details:hover,
.company-page .company-about .btn.edit-details:focus-visible {
  background: linear-gradient(135deg, #dbeafe 0%, #60a5fa 100%);
  border-color: #60a5fa;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(96, 165, 250, 0.32);
}

.company-page .company-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.company-page .company-capability {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(67, 56, 202, 0.38), rgba(67, 56, 202, 0.34), rgba(6, 182, 212, 0.32));
  border: 1px solid rgba(148, 163, 184, 0.42);
  color: #000000;
  box-shadow: 0 18px 44px rgba(8, 14, 26, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex: 0 1 auto;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring);
}

.company-page .company-capability:hover,
.company-page .company-capability:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(14, 23, 42, 0.5);
}

@media (max-width: 600px) {
  .company-page .company-capability {
    flex: 1 1 calc(50% - 12px);
  }
}

@media (max-width: 420px) {
  .company-page .company-capability {
    flex: 1 1 100%;
  }
}


.company-page .company-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(8px, 1.2vw, 14px);
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: thin;
}

.company-page .company-facts::-webkit-scrollbar {
  height: 6px;
}

.company-page .company-facts::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 999px;
}

.company-page .company-facts::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.8);
}

.company-page .company-facts li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8vw, 8px);
  padding: clamp(10px, 1.2vw, 14px) clamp(14px, 1.8vw, 20px);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(160deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.88));
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  min-height: clamp(84px, 9vw, 120px);
  min-width: clamp(140px, 16vw, 220px);
  flex: 1 1 clamp(140px, 16vw, 220px);
  overflow: hidden;
}

.company-page .company-facts .fact-heading {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.9vw, 12px);
  margin-bottom: clamp(0px, 0.4vw, 4px);
}

.company-page .company-facts .fact-heading strong {
  font-size: clamp(0.58rem, 0.72vw, 0.7rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f172a;
}

.company-page .company-facts .fact-value,
.company-page .company-facts .fact-link-value,
.company-page .company-facts .fact-text {
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0b1120;
  line-height: 1.15;
}

.company-page .company-facts .fact-value.muted {
  font-size: clamp(0.78rem, 0.92vw, 0.9rem);
  font-weight: 600;
  color: rgba(15, 23, 42, 0.62);
}

.company-page .company-facts li.fact-link {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.company-page .company-facts li.fact-link:hover,
.company-page .company-facts li.fact-link:focus-within {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}

.company-page .company-facts .fact-link-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.company-page .company-facts .fact-link-value:hover,
.company-page .company-facts li.fact-link:focus-within .fact-link-value {
  color: #1d4ed8;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.company-page .company-facts .fact-link-value:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.4);
  outline-offset: 4px;
  border-radius: 12px;
}

.company-page .company-facts .fact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(26px, 3.4vw, 32px);
  height: clamp(26px, 3.4vw, 32px);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.company-page .company-facts .fact-icon img {
  width: 68%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 600px) {
  .kpi-grid {
    gap: clamp(12px, 4vw, 16px);
  }
}

@media (max-width: 520px) {
  .company-page .company-facts {
    gap: clamp(6px, 2.4vw, 10px);
  }
}

.company-page .company-sections {
  gap: 24px;
}

.company-page .company-files-card {
  padding: clamp(18px, 3vw, 22px);
  border-radius: 26px;
  border: 1px solid var(--resume-border);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.78));
  box-shadow: 0 30px 80px rgba(12, 10, 8, 0.4);
}

.company-page .company-files-card .table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.92);
}

.company-page .company-files-card .table th,
.company-page .company-files-card .table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.company-page .company-files-card .table thead th {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.24), rgba(15, 23, 42, 0.7));
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.company-page .company-files-card .table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.45);
}

.company-page .company-files-card .table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.55);
}

.company-page .company-files-card .table tbody tr:hover {
  background: rgba(67, 56, 202, 0.2);
  box-shadow: inset 0 0 0 1px rgba(131, 182, 255, 0.35);
}

body.light .company-page .company-files-card .table {
  background: rgba(248, 250, 252, 0.9);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
  color: var(--text);
}

body.light .company-page .company-files-card .table th,
body.light .company-page .company-files-card .table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

body.light .company-page .company-files-card .table thead th {
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.85), rgba(248, 250, 252, 0.95));
  color: rgba(71, 85, 105, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.26);
}

body.light .company-page .company-files-card .table tbody tr:nth-child(odd) {
  background: rgba(226, 232, 240, 0.55);
}

body.light .company-page .company-files-card .table tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.8);
}

body.light .company-page .company-files-card .table tbody tr:hover {
  background: rgba(79, 70, 229, 0.12);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.25);
}

body.light .company-page .company-files-card .table a {
  color: var(--acc2);
  font-weight: 600;
}

body.light .company-page .company-files-card .table a:hover,
body.light .company-page .company-files-card .table a:focus-visible {
  color: var(--acc3);
}

.company-page .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.security-page .security-layout {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
}

.security-page .security-kpi-grid {
  margin: clamp(4px, 1.2vw, 12px) 0 clamp(10px, 2vw, 18px);
}

#security_notes_modal {
  --modal-gutter-x: 0;
  --modal-gutter-y: 0;
  padding: 0;
}

.security-page .security-notes-modal-content,
#security_notes_modal .security-notes-modal-content {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

.security-page .security-notes-modal-body,
#security_notes_modal .security-notes-modal-body {
  padding: clamp(26px, 3vw, 40px);
  background: linear-gradient(178deg, rgba(8, 47, 73, 0.92), rgba(15, 23, 42, 0.94));
  border-top: 1px solid rgba(6, 182, 212, 0.22);
  box-shadow: inset 0 1px 0 rgba(6, 182, 212, 0.12);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.8vw, 32px);
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

.security-page .security-notes-modal-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 72ch;
}

.security-page .security-notes-toolbar,
#security_notes_modal .security-notes-toolbar {
  background: linear-gradient(178deg, rgba(8, 47, 73, 0.92), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid rgba(6, 182, 212, 0.18);
  box-shadow: inset 0 -1px 0 rgba(6, 182, 212, 0.12);
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 18px);
}

.security-page .security-notes-toolbar-buttons,
#security_notes_modal .security-notes-toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.security-page .security-notes-toolbar .btn.sky,
#security_notes_modal .security-notes-toolbar .btn.sky {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
  border-color: #93c5fd;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(147, 197, 253, 0.35);
}

.security-page .security-notes-toolbar .btn.sky:hover,
#security_notes_modal .security-notes-toolbar .btn.sky:hover {
  filter: brightness(0.97);
}

.security-page .security-notes-toolbar .btn.danger,
#security_notes_modal .security-notes-toolbar .btn.danger {
  background: linear-gradient(135deg, #fecaca 0%, #f87171 100%);
  border-color: #f87171;
  color: #111827;
  box-shadow: 0 8px 20px rgba(248, 113, 113, 0.3);
}

.security-page .security-notes-toolbar .btn.danger:hover,
#security_notes_modal .security-notes-toolbar .btn.danger:hover {
  filter: brightness(0.97);
}

.security-page .security-notes-modal,
#security_notes_modal .security-notes-modal {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 26px);
  flex: 1 1 auto;
  min-height: 0;
}

.security-page .security-notes-layout,
#security_notes_modal .security-notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 24px);
  flex: 1 1 auto;
  min-height: 0;
}

@media (min-width: 1024px) {
  .security-page .security-notes-layout,
  #security_notes_modal .security-notes-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.security-page .security-notes-add,
#security_notes_modal .security-notes-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 600;
}

.security-page .security-notes-add span[aria-hidden],
#security_notes_modal .security-notes-add span[aria-hidden] {
  font-size: 1.1rem;
}

.security-page .security-notes-form-container.is-hidden,
#security_notes_modal .security-notes-form-container.is-hidden {
  display: none;
}


.security-page .security-notes-forms,
#security_notes_modal .security-notes-forms {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
}

.security-page .security-notes-tables,
#security_notes_modal .security-notes-tables {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 24px);
  min-height: 0;
}

.security-page .security-notes-form-card,
.security-page .security-table-card,
#security_notes_modal .security-notes-form-card,
#security_notes_modal .security-table-card {
  padding: clamp(18px, 2.6vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
  min-height: 0;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.security-page .security-notes-form-card,
#security_notes_modal .security-notes-form-card {
  background: rgba(15, 23, 42, 0.72);
}

.security-page .security-table-card,
#security_notes_modal .security-table-card {
  background: rgba(15, 23, 42, 0.56);
}

.security-page .security-table-header,
#security_notes_modal .security-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.security-page .security-table-header h4,
#security_notes_modal .security-table-header h4 {
  margin: 0;
  font-size: 1.05rem;
}

.security-page .security-notes-form-card form,
#security_notes_modal .security-notes-form-card form {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vw, 16px);
}

.security-page .security-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  padding: clamp(12px, 2vw, 18px);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(11, 18, 32, 0.78));
}

.security-page .security-notes-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.security-page .security-notes-form-card textarea,
.security-page .security-notes-form-card input[type='text'],
.security-page .security-notes-form-card input[type='search'],
.security-page .security-notes-form-card input[type='email'],
.security-page .security-notes-form-card input:not([type]),
#security_notes_modal .security-notes-form-card textarea,
#security_notes_modal .security-notes-form-card input[type='text'],
#security_notes_modal .security-notes-form-card input[type='search'],
#security_notes_modal .security-notes-form-card input[type='email'],
#security_notes_modal .security-notes-form-card input:not([type]) {
  background: rgba(15, 23, 42, 0.6);
}

.security-page .security-notes-form-card textarea,
#security_notes_modal .security-notes-form-card textarea {

  min-height: clamp(140px, 24vh, 220px);

  resize: vertical;
}

.security-page .security-table-wrapper,
#security_notes_modal .security-table-wrapper {
  position: relative;
  overflow-x: auto;
  border-radius: var(--border-radius-sm, 16px);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.security-page .security-table,
#security_notes_modal .security-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.security-page .security-table thead,
#security_notes_modal .security-table thead {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.78);
  z-index: 1;
}

.security-page .security-table th,
.security-page .security-table td,
#security_notes_modal .security-table th,
#security_notes_modal .security-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 0.9rem;
}

.security-page .security-table tbody tr:last-child th,
.security-page .security-table tbody tr:last-child td,
#security_notes_modal .security-table tbody tr:last-child th,
#security_notes_modal .security-table tbody tr:last-child td {
  border-bottom: none;
}

.security-page .security-table-primary,
#security_notes_modal .security-table-primary {
  max-width: 0;
}

.security-page .security-table-title,
#security_notes_modal .security-table-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: #f8fafc;
}

.security-page .security-table-description,
#security_notes_modal .security-table-description {
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.security-page .security-table-secondary,
#security_notes_modal .security-table-secondary {
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.security-page .security-table-date,
#security_notes_modal .security-table-date {
  white-space: nowrap;
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.85rem;
}

.security-page .security-table-actions,
#security_notes_modal .security-table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
  width: 1%;
}

.security-page .security-table-action-header,
#security_notes_modal .security-table-action-header {
  text-align: right;
  white-space: nowrap;
}

.security-page .security-table-action,
#security_notes_modal .security-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 80px;
  font-weight: 600;
}

.security-page .security-table-action--edit,
#security_notes_modal .security-table-action--edit {
  background: linear-gradient(135deg, #e0f2fe 0%, #93c5fd 100%);
  border-color: #93c5fd;
  color: #0f172a;
  box-shadow: 0 6px 18px rgba(147, 197, 253, 0.28);
}

.security-page .security-table-action--delete,
#security_notes_modal .security-table-action--delete {
  background: linear-gradient(135deg, #fecaca 0%, #f87171 100%);
  border-color: #f87171;
  color: #111827;
  box-shadow: 0 6px 18px rgba(248, 113, 113, 0.28);
}

.security-page .security-table-action:focus-visible,
#security_notes_modal .security-table-action:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.65);
  outline-offset: 2px;
}

.security-page .security-table-empty,
#security_notes_modal .security-table-empty {
  text-align: center;
  padding: clamp(18px, 2.4vw, 24px);
  color: rgba(226, 232, 240, 0.85);
}

.security-page .security-tab {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.45);
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.security-page .security-tab:hover,
.security-page .security-tab:focus-visible {
  background: rgba(67, 56, 202, 0.16);
  border-color: rgba(67, 56, 202, 0.35);
}

.security-page .security-tab:focus-visible {
  outline: 2px solid rgba(6, 182, 212, 0.45);
  outline-offset: 2px;
}

.security-page .security-tab.active {
  background: rgba(67, 56, 202, 0.22);
  border-color: rgba(148, 163, 184, 0.32);
  color: rgba(226, 232, 240, 0.96);
  box-shadow: inset 0 0 0 1px rgba(67, 56, 202, 0.35);
}

.security-page .security-tab-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.security-page .security-tab-panels {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.8vw, 28px);
}

.security-page .security-panel {
  display: none;
}

.security-page .security-panel.active {
  display: block;
}

.security-page .security-documents-grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
}

.security-page .security-employee-card .card-header {
  align-items: flex-start;
}

.security-page .security-employee-card .card-header .btn {
  white-space: nowrap;
}

.security-page .security-employee-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.security-page .security-employee-table {
  min-width: 720px;
}

.security-page .security-employee-table th,
.security-page .security-employee-table td {
  vertical-align: middle;
}

.security-page .security-employee-doc-link {
  color: var(--primary-200);
  font-weight: 600;
}

.security-page .security-employee-doc-link:hover,
.security-page .security-employee-doc-link:focus {
  text-decoration: underline;
}

.security-page .security-employee-table th:nth-child(1),
.security-page .security-employee-table td:nth-child(1) {
  min-width: 180px;
}

.security-page .security-employee-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.security-page .security-employee-actions form {
  margin: 0;
}

.security-page .security-employee-actions .btn.icon-only {
  border-radius: 999px;
}

.security-page .security-employee-actions .btn.icon-only .icon {
  font-size: 1rem;
}

.security-page .security-employee-card .empty-state {
  padding: 18px;
  text-align: center;
}

.security-page .security-current-file {
  margin: 0 0 12px;
}

body.light .security-page .security-tab {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.32);
  color: #111827;
  box-shadow: none;
}

body.light .security-page .security-tab:hover,
body.light .security-page .security-tab:focus-visible {
  background: rgba(67, 56, 202, 0.14);
  border-color: rgba(67, 56, 202, 0.35);
}

body.light .security-page .security-tab.active {
  color: #111827;
  background: rgba(67, 56, 202, 0.18);
  box-shadow: inset 0 0 0 1px rgba(67, 56, 202, 0.24);
}

.security-page .security-card .card-header {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(12px, 2vw, 28px);
  margin-bottom: clamp(22px, 4vw, 36px);
  padding-bottom: clamp(10px, 2vw, 16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.security-page .security-card {
  padding: clamp(18px, 2.6vw, 26px);
  border-radius: clamp(18px, 2.4vw, 24px);
  gap: clamp(16px, 2vw, 24px);
}

.security-page .security-card .card-header > div {
  flex: 1 1 280px;
}

.security-page .security-card .card-header .btn {
  margin-left: auto;
}

.security-page .security-card .card-header h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
}

.security-page .security-card .card-header p,
.security-page .security-card .card-header .muted {
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .security-page .security-card .card-header {
    align-items: stretch;
  }

  .security-page .security-card .card-header .btn {
    width: 100%;
  }
}

.security-page .security-card .table th,
.security-page .security-card .table td {
  padding: clamp(12px, 1.8vw, 16px);
  font-size: 0.82rem;
}

.security-page .security-card .table th {
  letter-spacing: 0.06em;
}

.security-page .security-card .table td a {
  font-size: 0.82rem;
}

.security-page .security-contracts-card {
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
}

.security-page .security-contracts-list {
  display: grid;
  gap: clamp(16px, 2.2vw, 24px);
}

.security-page .security-contract-card {
  padding: clamp(16px, 2.4vw, 22px);
  border-radius: clamp(16px, 2vw, 22px);
}


.security-page .card:focus-within {

  transform: translateZ(0);
  box-shadow: 0 30px 72px rgba(5, 12, 28, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  border-color: var(--pro-shell-border);
}


.security-page .card:focus-within::before,
.security-page .card:focus-within::after {

  opacity: 0;
}

.security-page .security-contract-card .card-header {
  align-items: flex-start;
  margin-bottom: clamp(12px, 2vw, 18px);
  padding-bottom: clamp(8px, 1.6vw, 12px);
}

.security-page .security-contract-heading h3 {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.security-page .security-contract-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
}

.security-page .security-contract-actions {
  gap: 8px;
}

.security-page .security-contract-columns {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.security-page .security-contract-column h4 {
  margin: 0 0 10px;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.security-page .security-contract-column .table th,
.security-page .security-contract-column .table td {
  font-size: 0.8rem;
}

.security-page .security-contract-column .card-actions-row {
  gap: 6px;
}

.security-page .security-contract-column .btn.tiny {
  padding: 6px 10px;
  font-size: 0.72rem;
}

.security-page .security-contract-card .btn.tiny .icon {
  margin-right: 4px;
}

.security-page .company-cta .btn {
  padding: 10px 16px;
  font-size: 0.8rem;
}

.security-page .company-hero-text .muted.small {
  font-size: 0.78rem;
}

.security-page .company-badge {
  padding: 6px 10px;
  font-size: 0.7rem;
}

.company-page .card-header h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}

.company-page .card-actions-row {
  gap: 6px;
  flex-wrap: nowrap;
}

.company-page .card-actions-row form {
  margin: 0;
}

.company-page .leadership-card {
  border-radius: 24px;
  padding: clamp(18px, 3vw, 22px);
  border: 1px solid var(--resume-border);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.78));
  box-shadow: 0 26px 70px rgba(12, 10, 8, 0.38);
  margin-bottom: 24px;
}

.company-page .leadership-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.company-page .leadership-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.company-page .leadership-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.company-page .leadership-card .contact-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.95);
}

.company-page .leadership-card .contact-title {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.82);
}

.company-page .leadership-card .contact-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.company-page .company-logos-card {
  border-radius: 24px;
  padding: clamp(18px, 3vw, 22px);
  border: 1px solid var(--resume-border);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.78));
  box-shadow: 0 26px 70px rgba(12, 10, 8, 0.38);
}

.company-page .company-logos-card .card-header {
  margin-bottom: 10px;
}

.company-page .company-logos-card p {
  margin-bottom: 14px;
  color: rgba(148, 163, 184, 0.86);
}

.company-page .logo-gallery {
  border-radius: 18px;
  padding: clamp(12px, 2.2vw, 16px);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
  .company-page .company-about,
  .company-page .company-files-card,
  .company-page .leadership-card,
  .company-page .company-logos-card {
    padding: 20px;
    border-radius: 22px;
  }

  .company-page .company-facts {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* --- Accounts page --- */
.accounts-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.accounts-page .page-subtitle {
  margin: 6px 0 0;
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.95rem;
}

.accounts-page .kpi-grid .card {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
  box-shadow: 0 18px 48px rgba(12, 10, 8, 0.32);
}

.accounts-page .kpi-label {
  color: rgba(226, 232, 240, 0.72);
  letter-spacing: 0.08em;
}

.accounts-page .kpi-value {
  font-size: 2rem;
  font-weight: 700;
}

.accounts-filters-card {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
  padding: 22px;
  box-shadow: 0 22px 60px rgba(12, 10, 8, 0.38);
}

.account-filters .filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.account-filters .filter-field {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-filters .filter-field label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.88);
}

.account-filters .filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.account-filters .filter-actions .btn {
  min-width: 140px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--resume-border);
  color: #e2e8f0;
  box-shadow: 0 8px 26px rgba(12, 10, 8, 0.32);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.4);
}

.accounts-table-card {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
  box-shadow: 0 26px 70px rgba(12, 10, 8, 0.42);
  padding: 0;
  overflow: hidden;
}

.accounts-table-container {
  width: 100%;
  overflow-x: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  color: inherit;
}

.accounts-table thead th {
  text-align: left;
  padding: 18px 20px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.88);
  background: rgba(15, 23, 42, 0.75);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.accounts-table tbody tr {
  background: linear-gradient(160deg, rgba(24, 21, 17, 0.82), rgba(16, 14, 11, 0.76));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.accounts-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(12, 10, 8, 0.38);
}

.account-row.active-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.86), rgba(6, 182, 212, 0.35));
}

.account-row.expiring-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.86), rgba(251, 191, 36, 0.28));
}

.account-row.inactive-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.86), rgba(185, 28, 28, 0.32));
}

.account-cell {
  padding: 20px;
  vertical-align: top;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.account-cell:last-child {
  border-right: none;
}

.account-overview {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.account-logo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: 1px solid var(--resume-border);
  background: rgba(148, 163, 184, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 40px rgba(12, 10, 8, 0.48);
  overflow: hidden;
}

.account-logo-wrap a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.account-logo-wrap img.account-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.vendor-placeholder {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(79, 70, 229, 0.3);
  letter-spacing: 0.08em;
}

.account-overview-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.account-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.account-vendor {
  margin: 0;
  color: rgba(148, 163, 184, 0.85);
}

.account-visit-link {
  color: var(--resume-accent-alt);
  font-size: 0.85rem;
  text-decoration: none;
}

.account-visit-link:hover,
.account-visit-link:focus {
  text-decoration: underline;
}

.account-status-cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.account-status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-status-indicator .badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-start;
}

.account-actions .btn {
  min-width: 92px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.btn.account-action {
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 30px rgba(15, 118, 200, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.btn.account-edit {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.95), rgba(6, 182, 212, 0.88));
}

.btn.account-delete {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.92), rgba(239, 68, 68, 0.85));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.34), 0 0 0 1px rgba(239, 68, 68, 0.25) inset;
}

.account-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-flags .tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(217, 161, 84, 0.32), rgba(22, 163, 74, 0.22));
  border: 1px solid rgba(148, 163, 184, 0.32);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 32px rgba(12, 10, 8, 0.45);
}

.account-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0;
}

.account-detail-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-detail-item dt {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.88);
}

.account-detail-item dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.account-card-credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.credential-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.credential-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.88);
}

.credential-chip {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.74));
  color: inherit;
  cursor: pointer;
  font-family: 'JetBrains Mono','Fira Mono','Courier New',monospace;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 16px 36px rgba(12, 10, 8, 0.45);
}

.credential-chip .credential-value {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

.credential-chip small {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.75);
  margin-top: 6px;
}

.credential-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(12, 10, 8, 0.5);
}

.credential-chip.copied {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.5) inset, 0 18px 40px rgba(16, 185, 129, 0.35);
}

.account-card-extras {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.credential-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 14px;
  border: 1px solid rgba(245, 201, 122, 0.32);
  background: linear-gradient(150deg, rgba(217, 161, 84, 0.22), rgba(24, 21, 17, 0.82));
  padding: 12px 14px;
  color: rgba(250, 240, 221, 0.92);
}

.credential-note .note-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(245, 201, 122, 0.9);
}

.credential-note .note-value {
  font-size: 0.9rem;
  line-height: 1.5;
}

.account-notes {
  border-radius: 14px;
  border: 1px solid rgba(245, 201, 122, 0.35);
  background: linear-gradient(160deg, rgba(67, 56, 202, 0.25), rgba(15, 23, 42, 0.78));
  padding: 12px 14px;
  color: rgba(237, 233, 254, 0.95);
}

.account-notes .account-notes-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.95);
  margin-bottom: 6px;
}

.account-notes-content {
  white-space: pre-line;
  line-height: 1.6;
}

.accounts-table .account-empty-row td {
  text-align: center;
  padding: 32px 20px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.6);
  font-size: 0.95rem;
  color: rgba(148, 163, 184, 0.88);
}

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

  .account-filters .filter-actions {
    justify-content: flex-start;
  }

  .accounts-table {
    min-width: 720px;
  }

  .account-cell {
    padding: 16px;
  }

  .account-overview {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .account-logo-wrap {
    width: 80px;
    height: 80px;
  }

  .account-actions {
    justify-content: flex-start;
  }
}

#account_modal .modal-content {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
}

#account_modal .modal-actions {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

#account_modal .modal-heading {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#account_modal .modal-heading h3 {
  margin: 0;
  font-size: 1.35rem;
}

#account_modal .modal-heading p {
  margin: 0;
  color: rgba(148, 163, 184, 0.85);
}

#account_form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#account_form .form-section {
  position: relative;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--resume-border);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.78));
  box-shadow: 0 22px 60px rgba(12, 10, 8, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}

#account_form .form-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 0% 0%, rgba(217, 161, 84, 0.18), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

#account_form .form-section > * {
  position: relative;
  z-index: 1;
}

#account_form .form-section h4 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

#account_form .section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

#account_form .form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#account_form .form-field.full-width {
  grid-column: 1 / -1;
}

#account_form label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.88);
  font-weight: 600;
}

#account_form .input,
#account_form select.input {
  border: 1px solid var(--resume-border);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.45) inset;
}

#account_form .input:focus,
#account_form select.input:focus {
  border-color: var(--resume-border-strong);
  box-shadow: 0 0 0 1px var(--resume-border-strong);
}

#account_form .input::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

#account_form .checkbox-field {
  display: flex;
  align-items: flex-end;
}

#account_form .checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.45);
}

#account_form .checkbox-inline input {
  width: auto;
  accent-color: var(--resume-accent);
}

#account_form .checkbox-inline span {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: #e2e8f0;
  text-transform: none;
}

#account_form .field-hint {
  margin: 6px 0 0;
}

#account_form .logo-preview {
  margin-top: 8px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.45);
  padding: 12px;
  color: rgba(148, 163, 184, 0.78);
  text-align: center;
}

#account_form .logo-preview img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

#account_form textarea.input {
  min-height: 110px;
  resize: vertical;
}

#account_form .form-actions {
  display: flex;
  justify-content: flex-end;
}

#account_form .form-actions .btn {
  min-width: 180px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  #account_form .section-grid {
    grid-template-columns: 1fr;
  }

  #account_form .checkbox-field {
    align-items: stretch;
  }
}

/* --- Settings page --- */
.settings-page {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vw, 36px);
}
.settings-page .settings-hero {
  margin: 0;
}
.settings-page .settings-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr);
  gap: clamp(12px, 2vw, 22px);
  padding: clamp(18px, 2.6vw, 28px);
  border-radius: clamp(20px, 2.6vw, 30px);
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(226, 232, 240, 0.9));
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.settings-page .settings-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.18), transparent 60%);
  opacity: 0.6;
}
.settings-page .settings-stage > * {
  position: relative;
  z-index: 1;
}
.settings-hero__content {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 12px);
}
.settings-hero__tagline {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: #0f172a;
}
.settings-hero__content h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  letter-spacing: 0.01em;
  color: #0f172a;
}
.settings-hero__copy {
  margin: 0;
  font-size: clamp(0.82rem, 1.2vw, 0.96rem);
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.7);
  max-width: 560px;
}
.settings-hero__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(10px, 1.6vw, 18px);
  align-items: stretch;
}
.settings-metric {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: linear-gradient(160deg, rgba(241, 245, 249, 0.96), rgba(226, 232, 240, 0.88));
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
  padding: clamp(12px, 1.6vw, 18px);
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1vw, 8px);
}
.settings-metric__label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(15, 23, 42, 0.55);
}
.settings-metric__value {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 700;
  color: #0f172a;
}
.settings-metric__caption {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.55);
}
.settings-page .settings-grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
}
.settings-page .settings-grid.primary {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.settings-page .settings-grid.secondary {
  grid-template-columns: minmax(480px, 2fr) minmax(260px, 1fr);
}
.settings-page .settings-grid.logs-grid {
  grid-template-columns: 1fr;
}
.settings-page .settings-grid.secondary > * {
  height: 100%;
}
.settings-page .settings-card {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 18px);
  padding: clamp(18px, 2.3vw, 26px);
  border-radius: clamp(18px, 2.3vw, 26px);
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.88));
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
}
.settings-page .danger-zone {
  background: linear-gradient(160deg, rgba(254, 242, 242, 0.97), rgba(254, 226, 226, 0.9));
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.16);
}
.settings-page .danger-zone .btn {
  width: 100%;
  box-shadow: none;
}
.settings-page .settings-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(12px, 1.8vw, 18px);
}
.settings-page .settings-card-header h3 {
  margin: 0 0 4px;
  font-size: clamp(1.1rem, 1.6vw, 1.24rem);
  letter-spacing: 0.01em;
  color: #0f172a;
}
.settings-page .settings-card-header p {
  margin: 0;
  color: rgba(15, 23, 42, 0.6);
}
.settings-page .settings-card-body {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 16px);
}
.settings-page .logs-card .settings-card-body {
  gap: clamp(14px, 1.6vw, 18px);
}
.settings-page .logs-card .logs-table {
  max-height: 420px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.92);
}
.settings-page .logs-card .logs-table table {
  min-width: 100%;
}
.settings-page .logs-card .log-context {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(226, 232, 240, 0.65);
  border-radius: 12px;
  padding: 8px 12px;
}
.settings-page .logs-card .log-level {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(15, 23, 42, 0.6);
}
.settings-page .input-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.55);
}
.settings-page .range-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-page .range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.45);
}
.settings-page .range-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.45), rgba(14, 165, 233, 0.35));
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}
.settings-page .range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.settings-page .range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.settings-page .settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.24);
  color: #1d4ed8;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.settings-page .settings-chip strong {
  font-size: 0.95rem;
  color: #1e3a8a;
}
.settings-page .settings-chip.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  color: #15803d;
}
.settings-page .logo-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.settings-page .logo-upload-form .input {
  flex: 1 1 240px;
  min-width: 200px;
}
.settings-page .logo-upload-form .btn {
  flex: 0 0 auto;
}
.settings-page .empty-state {
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(226, 232, 240, 0.4);
  text-align: center;
  color: rgba(15, 23, 42, 0.6);
}
.settings-page .empty-state p {
  margin: 0;
}
.settings-page .logo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.settings-page .logo-item {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.settings-page .logo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}
.settings-page .logo-asset {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-page .logo-asset .settings-chip.success {
  position: absolute;
  top: -12px;
  right: -12px;
  box-shadow: none;
}
.settings-page .logo-chip {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(226, 232, 240, 0.55);
}
.settings-page .logo-chip img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.settings-page .logo-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.settings-page .logo-actions form {
  margin: 0;
}
.settings-page .settings-table {
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.settings-page .settings-table .table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.settings-page .settings-table thead th {
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.85), rgba(203, 213, 225, 0.7));
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}
.settings-page .settings-table tbody tr {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.settings-page .settings-table tbody tr:nth-child(odd) {
  background: rgba(226, 232, 240, 0.45);
}
.settings-page .settings-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.95);
}
.settings-page .settings-table tbody tr:hover {
  background: rgba(191, 219, 254, 0.45);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}
.settings-page .settings-table td,
.settings-page .settings-table th {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.settings-page .settings-table td.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.settings-page .settings-table td.actions form {
  margin: 0;
}
.settings-page .settings-card-body .alert {
  margin: 0;
}

@media (max-width: 1080px) {
  .settings-page .settings-grid.secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .settings-page .settings-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .settings-page {
    gap: 24px;
  }
  .settings-page .settings-stage {
    padding: clamp(16px, 5vw, 22px);
  }
  .settings-page .settings-grid.primary {
    grid-template-columns: 1fr;
  }
}

/* AI resume insights */
.ai-insights-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

#resume_ai_section.ai-insights-panel {
  border-top: 1px solid var(--surface-border);
  padding-top: 18px;
  margin-top: 12px;
}

#resume_ai_section.ai-insights-panel::before {
  content: "";
  position: absolute;
  inset: -12px -18px -12px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(160deg, rgba(67, 56, 202, 0.18), rgba(15, 74, 163, 0.12));
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
  filter: blur(0.5px);
}

.ai-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border);
  background: linear-gradient(150deg, rgba(67, 56, 202, 0.12), rgba(15, 74, 163, 0.08));
  box-shadow: 0 18px 44px rgba(5, 9, 20, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ai-summary-card.compact {
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(5, 9, 20, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.ai-card-visual {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 18px;
  border: 1px solid var(--glass-border-strong);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.36), rgba(67, 56, 202, 0.24));
  box-shadow: 0 16px 32px rgba(5, 9, 20, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: var(--acc1);
}

.ai-summary-card .ai-card-visual {
  width: 56px;
  height: 56px;
  min-width: 56px;
}

.ai-summary-card.compact .ai-card-visual {
  width: 48px;
  height: 48px;
  min-width: 48px;
}

.ai-card-visual::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.3), transparent 70%);
  opacity: 0.7;
}

.ai-icon-placeholder svg {
  width: 22px;
  height: 22px;
  display: block;
  color: currentColor;
  opacity: 0.92;
}

.ai-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-card-title {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  font-weight: 600;
}

.ai-card-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ai-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(140deg, rgba(67, 56, 202, 0.22), rgba(12, 56, 136, 0.16));
  box-shadow: 0 14px 32px rgba(5, 9, 20, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  color: var(--acc1);
}

.ai-section-icon svg {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

.ai-group-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-group-text .ai-tag-label {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.78);
}

.ai-highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ai-highlight-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.ai-highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(67, 56, 202, 0.16), rgba(12, 56, 136, 0.1));
  box-shadow: 0 16px 36px rgba(5, 9, 20, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), border-color 0.25s ease;
}

.ai-highlight-card:hover,
.ai-highlight-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--glass-border-strong);
  box-shadow: 0 22px 46px rgba(5, 9, 20, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ai-highlight-card .ai-card-visual {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 16px;
}

.ai-highlight-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
}

.ai-highlight-title {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.ai-highlight-detail {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.ai-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-chip-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.14), rgba(15, 74, 163, 0.1));
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.3;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-spring), border-color 0.22s ease;
}

.ai-chip-card:hover,
.ai-chip-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--glass-border-strong);
  box-shadow: 0 14px 28px rgba(5, 9, 20, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ai-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.32), rgba(67, 56, 202, 0.2));
  display: grid;
  place-items: center;
  color: var(--acc1);
}

.ai-chip-icon svg {
  width: 16px;
  height: 16px;
}

.ai-chip-text {
  white-space: nowrap;
}

.ai-highlight-card[data-highlight-type="certification"] .ai-card-visual,
.ai-chip-card[data-chip-type="certification"] .ai-chip-icon {
  background: radial-gradient(circle at 30% 30%, rgba(245, 201, 122, 0.42), rgba(217, 161, 84, 0.28));
  color: var(--resume-accent);
}

.ai-highlight-card[data-highlight-type="clearance"] .ai-card-visual,
.ai-chip-card[data-chip-type="clearance"] .ai-chip-icon {
  background: radial-gradient(circle at 32% 28%, rgba(52, 211, 153, 0.42), rgba(16, 185, 129, 0.32));
  color: var(--resume-success);
}

.ai-highlight-card[data-highlight-type="skill"] .ai-card-visual,
.ai-chip-card[data-chip-type="skill"] .ai-chip-icon {
  background: radial-gradient(circle at 30% 30%, rgba(129, 140, 248, 0.4), rgba(67, 56, 202, 0.28));
  color: rgba(191, 219, 254, 0.95);
}

.ai-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.ai-detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 720px) {
  .ai-highlight-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .ai-summary-card {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-summary-card .ai-card-visual {
    width: 52px;
    height: 52px;
    min-width: 52px;
  }
}

.resume-ai-chat-card {
  margin-top: 18px;
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--resume-border);
  background: var(--resume-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 12px 32px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resume-ai-chat-card.chat-disabled {
  opacity: 0.75;
}

.resume-ai-chat-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resume-ai-chat-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.resume-ai-chat-status {
  color: var(--muted);
}

.resume-ai-chat-status.error {
  color: #dc2626;
}

.resume-ai-chat-messages {
  border: 1px solid var(--resume-border);
  background: var(--resume-surface-alt);
  border-radius: var(--border-radius-sm);
  padding: 18px;
  min-height: 240px;
  max-height: 460px;
  overflow-y: auto;
  position: relative;
}

.resumes-detail-page .resume-ai-chat-messages {
  min-height: clamp(320px, 40vh, 560px);
  max-height: clamp(540px, 60vh, 800px);
}

.resume-ai-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resume-ai-chat-empty {
  position: absolute;
  inset: 50% 14px auto 14px;
  transform: translateY(-50%);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.resume-ai-chat-card.chat-loading .resume-ai-chat-empty {
  display: none;
}

.resume-ai-chat-message {
  display: flex;
}

.resume-ai-chat-message.from-user {
  justify-content: flex-end;
}

.resume-ai-chat-message.from-assistant,
.resume-ai-chat-message.thinking {
  justify-content: flex-start;
}

.resume-ai-chat-bubble {
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--resume-surface);
  border: 1px solid var(--resume-border);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.resume-ai-chat-message.from-user .resume-ai-chat-bubble {
  background: linear-gradient(135deg, var(--resume-accent), var(--resume-accent-alt));
  border: none;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(124, 58, 237, 0.26);
}

.resume-ai-chat-message.thinking .resume-ai-chat-bubble {
  font-style: italic;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border-style: dashed;
}

.resume-ai-chat-message.from-assistant .resume-ai-chat-bubble {
  background: var(--resume-surface-alt);
}

.resume-ai-chat-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resume-ai-chat-form .input {
  min-height: 68px;
  resize: vertical;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--resume-border);
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.resume-ai-chat-card.chat-disabled .resume-ai-chat-form .input,
.resume-ai-chat-card.chat-disabled .resume-ai-chat-form .btn {
  opacity: 0.7;
  pointer-events: none;
}

.resume-ai-chat-card.chat-loading .resume-ai-chat-form .btn {
  pointer-events: none;
}

.resume-ai-chat-actions {
  display: flex;
  justify-content: flex-end;
}

.resume-ai-chat-actions .btn {
  min-width: 110px;
}

@media (max-width: 640px) {
  .resume-ai-chat-card {
    padding: 18px;
    gap: 16px;
  }

  .resume-ai-chat-messages {
    min-height: 200px;
    max-height: 360px;
    padding: 16px;
  }

  .resumes-detail-page .resume-ai-chat-messages {
    min-height: clamp(260px, 55vh, 380px);
    max-height: clamp(380px, 70vh, 520px);
  }

  .resume-ai-chat-actions .btn {
    width: 100%;
  }
}

.ai-assistant-widget {
  position: fixed;
  bottom: clamp(18px, 3.5vw, 32px);
  right: clamp(18px, 3.5vw, 32px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  pointer-events: none;
}

.ai-assistant-widget > * {
  pointer-events: auto;
}

.ai-assistant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid rgba(131, 182, 255, 0.65);
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.92), rgba(15, 74, 163, 0.92));
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 24px 48px rgba(5, 9, 20, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring), background 0.3s ease, opacity 0.3s ease;
}

.ai-assistant-toggle:hover,
.ai-assistant-toggle:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 32px 72px rgba(5, 9, 20, 0.65), 0 0 0 1px rgba(142, 191, 255, 0.42) inset;
}

.ai-assistant-toggle:focus-visible {
  outline: 3px solid rgba(142, 191, 255, 0.55);
  outline-offset: 3px;
}

.ai-assistant-toggle-icon {
  font-size: 1.3rem;
}

.ai-assistant-toggle-text {
  font-size: 0.95rem;
}

.ai-assistant-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #0b1220;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.35);
}

.ai-assistant-widget.ai-assistant-open .ai-assistant-toggle {
  background: linear-gradient(135deg, rgba(12, 56, 136, 0.95), rgba(9, 30, 74, 0.95));
}

.ai-assistant-widget.ai-assistant-has-messages:not(.ai-assistant-open) .ai-assistant-toggle {
  box-shadow: 0 28px 64px rgba(5, 9, 20, 0.6), 0 0 0 1px rgba(52, 211, 153, 0.35) inset;
}

.ai-assistant-panel {
  position: absolute;
  bottom: calc(100% + 16px);
  right: 0;
  width: min(360px, calc(100vw - 36px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--surface-border);
  background: linear-gradient(160deg, var(--surface), var(--surface-alt));
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 16px, 0) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.28s ease, transform 0.32s var(--ease-spring), visibility 0.28s ease;
  pointer-events: none;
}

.ai-assistant-open .ai-assistant-panel {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.ai-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
}

.ai-assistant-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-assistant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(67, 56, 202, 0.22);
  border: 1px solid rgba(131, 182, 255, 0.45);
  box-shadow: 0 12px 26px rgba(5, 9, 20, 0.38);
  font-size: 1.2rem;
}

.ai-assistant-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ai-assistant-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.ai-assistant-status.error {
  color: #dc2626;
}

.ai-assistant-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ai-assistant-close:hover,
.ai-assistant-close:focus-visible {
  color: #f8fafc;
  border-color: rgba(142, 191, 255, 0.6);
  transform: rotate(90deg);
  outline: none;
}

.ai-assistant-warning {
  margin: 0 20px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(248, 180, 0, 0.12);
  border: 1px solid rgba(248, 196, 113, 0.55);
  color: #f59e0b;
  font-size: 0.85rem;
}

.ai-assistant-messages {
  margin: 12px 20px;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  flex: 1 1 auto;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-assistant-messages--empty {
  justify-content: center;
  text-align: center;
}

.ai-assistant-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-assistant-empty {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-assistant-message {
  display: flex;
}

.ai-assistant-message.from-user {
  justify-content: flex-end;
}

.ai-assistant-message.from-assistant,
.ai-assistant-message.thinking {
  justify-content: flex-start;
}

.ai-assistant-bubble {
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: 0 14px 30px rgba(5, 9, 20, 0.18);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-assistant-message.from-user .ai-assistant-bubble {
  background: linear-gradient(135deg, var(--pro-accent-main), var(--pro-accent-strong));
  border: none;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(67, 56, 202, 0.28);
}

.ai-assistant-message.thinking .ai-assistant-bubble {
  font-style: italic;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.16);
  border-style: dashed;
}

.ai-assistant-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px;
}

.ai-assistant-input {
  min-height: 68px;
  resize: vertical;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  padding: 12px 14px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ai-assistant-input:focus {
  outline: none;
  border-color: var(--control-border-strong);
  background: var(--control-bg-strong);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.28);
}

.ai-assistant-actions {
  display: flex;
  justify-content: flex-end;
}

.ai-assistant-actions .btn {
  min-width: 120px;
}

.team-chat-section {
  width: 100%;
  margin: 0 0 clamp(24px, 4vw, 40px);
  scroll-margin-top: clamp(96px, 12vw, 140px);
}

.team-chat-widget--section {
  align-items: stretch;
  pointer-events: auto;
  gap: 0;
}

.team-chat-widget--section > * {
  pointer-events: auto;
  width: 100%;
}

.team-chat-workspace {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 32px);
}

.team-chat-main-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 18px);
  margin-left: auto;
}

.team-chat-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: rgba(226, 232, 240, 0.96);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.team-chat-settings-button:hover,
.team-chat-settings-button:focus-visible {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(30, 64, 175, 0.62);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.team-chat-settings-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.team-chat-settings-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

.team-chat-settings-dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 30px);
  z-index: 35;
}

.team-chat-settings-dialog.hidden {
  display: none;
}

.team-chat-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.team-chat-settings-window {
  position: relative;
  width: min(420px, 92vw);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.95);
  color: rgba(226, 232, 240, 0.96);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
  padding: clamp(18px, 3vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.team-chat-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.team-chat-settings-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.team-chat-settings-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  color: rgba(96, 165, 250, 0.95);
  font-size: 1.1rem;
}

.team-chat-settings-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.team-chat-settings-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: transparent;
  color: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.team-chat-settings-close:hover,
.team-chat-settings-close:focus-visible {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(37, 99, 235, 0.26);
  color: rgba(226, 232, 240, 0.98);
  outline: none;
}

.team-chat-settings-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-chat-settings-body .team-chat-device-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-chat-settings-body .team-chat-device-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.team-chat-settings-body .team-chat-device-control label {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
}

.team-chat-settings-body .team-chat-device-control select {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
  padding: 7px 12px;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-chat-settings-body .team-chat-device-control select:focus-visible {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.18);
  outline: none;
}

.team-chat-settings-body .team-chat-device-status {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.85);
}

.team-chat-user-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.team-chat-user-picker:hover,
.team-chat-user-picker:focus-visible {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(30, 58, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.18);
  outline: none;
}

.team-chat-user-picker:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.team-chat-user-picker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 0.95rem;
}

.team-chat-user-dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 30px);
  z-index: 30;
}

.team-chat-user-dialog.hidden {
  display: none;
}

.team-chat-user-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.team-chat-user-dialog-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 22px);
  width: min(560px, 100%);
  max-height: min(540px, 90vh);
  padding: clamp(20px, 3vw, 28px);
  border-radius: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.88));
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.46);
  overflow: hidden;
}

.team-chat-user-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 16px);
}

.team-chat-user-dialog-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-chat-user-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(150deg, rgba(96, 165, 250, 0.35), rgba(6, 182, 212, 0.26));
  font-size: 1.05rem;
}

.team-chat-user-dialog-header h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: rgba(226, 232, 240, 0.95);
}

.team-chat-user-dialog-close {
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px;
  border-radius: 999px;
  cursor: pointer;
}

.team-chat-user-dialog-close:hover,
.team-chat-user-dialog-close:focus-visible {
  background: rgba(51, 65, 85, 0.45);
  color: rgba(248, 250, 252, 0.95);
  outline: none;
}

.team-chat-user-dialog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 18px);
  align-items: center;
  justify-content: space-between;
}

.team-chat-user-dialog .team-chat-search {
  flex: 1 1 220px;
}

.team-chat-search {
  position: relative;
  flex: 1 1 180px;
}

.team-chat-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.78);
  color: rgba(226, 232, 240, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-chat-search input:focus {
  outline: none;
  border-color: rgba(147, 197, 253, 0.8);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.28);
}

.team-chat-search input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.team-chat-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(147, 197, 253, 0.45);
  background: rgba(67, 56, 202, 0.36);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.team-chat-refresh:hover,
.team-chat-refresh:focus-visible {
  border-color: rgba(191, 219, 254, 0.85);
  background: rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}

.team-chat-refresh[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.team-chat-main {
  min-width: 0;
}

.team-chat-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-height: clamp(260px, 45vh, 420px);
  overflow-y: auto;
  padding-right: 12px;
  padding-inline-end: 12px;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(71, 85, 105, 0.7) transparent;
}

.team-chat-user-item {
  margin: 0;
  padding: 0;
}

.team-chat-user {
  display: grid;
  gap: 6px;
  width: 100%;
  border-radius: clamp(16px, 2vw, 20px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
  color: rgba(226, 232, 240, 0.92);
  text-align: left;
  padding: 14px 18px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.team-chat-user:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.team-chat-user:hover,
.team-chat-user:focus-visible {
  border-color: rgba(147, 197, 253, 0.7);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.48);
  transform: translateY(-1px);
}

.team-chat-user.active {
  border-color: rgba(67, 56, 202, 0.85);
  box-shadow: 0 20px 36px rgba(67, 56, 202, 0.4);
  background: linear-gradient(160deg, rgba(67, 56, 202, 0.75), rgba(15, 23, 42, 0.95));
}

.team-chat-user--pinned {
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.45);
}

.team-chat-user-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.team-chat-user-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(148, 163, 184, 0.82);
}

.team-chat-user-name {
  font-weight: 600;
  font-size: 1rem;
  color: rgba(226, 232, 240, 0.98);
}

.team-chat-user-time {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}

.team-chat-user-meta {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.85);
}

.team-chat-user-presence {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.8);
}

.team-chat-user-presence--online {
  color: rgba(34, 197, 94, 0.9);
  font-weight: 600;
}

.team-chat-user-snippet {
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.82);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-chat-user-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(67, 56, 202, 0.85);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
}

.team-chat-user-empty {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(148, 163, 184, 0.85);
}

.team-chat-user-empty.hidden {
  display: none;
}

.team-chat-user-list::-webkit-scrollbar {
  width: 8px;
}

.team-chat-user-list::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.7);
  border-radius: 999px;
}

.team-chat-user-list::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1080px) {
  .team-chat-user-dialog {
    padding: clamp(16px, 5vw, 24px);
  }
  .team-chat-user-dialog-window {
    width: min(520px, 100%);
    max-height: min(500px, 88vh);
  }
}

@media (max-width: 960px) {
  .team-chat-main-actions {
    gap: clamp(8px, 3vw, 16px);
  }
  .team-chat-user-picker {
    padding: 8px 14px;
  }
  .team-chat-user-dialog {
    align-items: center;
    padding: clamp(14px, 6vw, 22px);
  }
  .team-chat-user-dialog-window {
    width: min(500px, 100%);
    max-height: min(480px, 88vh);
  }
  .team-chat-user-list {
    max-height: min(360px, 60vh);
  }
}

.team-chat-panel.team-chat-panel--section {
  position: static;
  bottom: auto;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  max-height: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  transform-origin: center;
  pointer-events: auto;
  box-shadow: var(--shadow-lg);
  transition: none;
}

.assistant-dock {
  position: fixed;
  bottom: clamp(18px, 3.5vw, 32px);
  right: clamp(18px, 3.5vw, 32px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  pointer-events: none;
}

.assistant-dock > * {
  pointer-events: auto;
}

.assistant-dock .ai-assistant-widget {
  position: static;
  bottom: auto;
  right: auto;
  pointer-events: none;
}

.assistant-dock .ai-assistant-widget > * {
  pointer-events: auto;
}

.team-chat-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  pointer-events: none;
}

.team-chat-widget > * {
  pointer-events: auto;
}

.team-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid rgba(167, 139, 250, 0.65);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.92), rgba(147, 51, 234, 0.92));
  color: #dbeafe;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 24px 48px rgba(49, 12, 90, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring), background 0.3s ease;
}

.team-chat-toggle:hover,
.team-chat-toggle:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 32px 72px rgba(49, 12, 90, 0.62), 0 0 0 1px rgba(196, 181, 253, 0.45) inset;
}

.team-chat-toggle:focus-visible {
  outline: 3px solid rgba(196, 181, 253, 0.55);
  outline-offset: 3px;
}

.team-chat-toggle-icon {
  font-size: 1.3rem;
}

.team-chat-toggle-text {
  font-size: 0.95rem;
}

.team-chat-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #0b1220;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(251, 113, 133, 0.35);
}

.team-chat-widget.team-chat-open .team-chat-toggle {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.95), rgba(59, 7, 100, 0.95));
}

.team-chat-panel {
  position: absolute;
  bottom: calc(100% + 16px);
  right: 0;
  width: min(380px, calc(100vw - 36px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--surface-border);
  background: linear-gradient(165deg, rgba(21, 15, 33, 0.94), rgba(24, 23, 42, 0.94));
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 16px, 0) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.28s ease, transform 0.32s var(--ease-spring), visibility 0.28s ease;
  pointer-events: none;
}

.team-chat-open .team-chat-panel {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.team-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.28);
}

.team-chat-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(167, 139, 250, 0.22);
  box-shadow: 0 10px 22px rgba(88, 28, 135, 0.28);
}

.team-chat-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.team-chat-status {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.7);
}

.team-chat-status.error {
  color: #dc2626;
}

.team-chat-close {
  background: none;
  border: none;
  color: rgba(226, 232, 240, 0.65);
  font-size: 1.05rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.team-chat-close:hover,
.team-chat-close:focus-visible {
  color: #fff;
  transform: scale(1.1);
}

.team-chat-recipient-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 20px 0;
}

.team-chat-recipient-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.6);
}

.team-chat-recipient {
  width: 100%;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.team-chat-recipient:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
  background: var(--control-bg-strong);
}

.team-chat-recipient:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.team-chat-recipient-helper {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.62);
}

.team-chat-recipient-summary {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.75);
}

.team-chat-recipient-summary.hidden {
  display: none;
}

.team-chat-recipient-presence {
  margin-top: 4px;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}
.team-chat-recipient-presence.online {
  color: #34d399;
  font-weight: 600;
}

.team-chat-recipient-presence.hidden {
  display: none;
}

.team-chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.45), rgba(15, 23, 42, 0.3));
}

.team-chat-messages.team-chat-clearing {
  opacity: 0.6;
  pointer-events: none;
}

.team-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-chat-day-separator {
  position: relative;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.75);
  padding: 12px 0;
}

.team-chat-day-separator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
}

.team-chat-day-separator span {
  position: relative;
  display: inline-block;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
}

.team-chat-empty {
  margin: 0;
  text-align: center;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9rem;
}

.team-chat-message {
  display: flex;
}

.team-chat-message.from-user {
  justify-content: flex-end;
}

.team-chat-message.from-teammate {
  justify-content: flex-start;
}

.team-chat-message.pending {
  justify-content: flex-end;
  opacity: 0.75;
}

.team-chat-bubble {
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: 0 14px 30px rgba(12, 18, 42, 0.18);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.team-chat-message.from-user .team-chat-bubble {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.95), rgba(67, 56, 202, 0.92));
  border: none;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(67, 56, 202, 0.28);
}

.team-chat-message.pending .team-chat-bubble {
  font-style: italic;
  color: rgba(226, 232, 240, 0.75);
  background: rgba(148, 163, 184, 0.16);
  border-style: dashed;
}

.team-chat-text {
  margin: 0;
}

.team-chat-attachment {
  margin-top: 8px;
}

.team-chat-attachment a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-chat-attachment a:hover,
.team-chat-attachment a:focus-visible {
  text-decoration: underline;
}

.team-chat-attachment-size {
  font-weight: 400;
  font-size: 0.85rem;
  color: inherit;
}

.team-chat-meta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.68);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-chat-meta-time {
  opacity: 0.85;
}

.team-chat-meta-status {
  font-weight: 600;
}

.team-chat-meta-divider {
  color: inherit;
  opacity: 0.55;
}

.team-chat-message.from-user .team-chat-meta {
  color: rgba(255, 255, 255, 0.78);
}

.team-chat-message.from-user .team-chat-meta-status {
  color: rgba(219, 234, 254, 0.95);
}

.team-chat-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px;
  border-top: 1px solid rgba(167, 139, 250, 0.22);
}

.team-chat-input {
  min-height: 68px;
  resize: vertical;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  padding: 12px 14px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.team-chat-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.7);
  background: var(--control-bg-strong);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.28);
}

.team-chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.team-chat-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.team-chat-clear-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.team-chat-clear-button:hover,
.team-chat-clear-button:focus-visible {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.team-chat-clear-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.team-chat-clear-icon {
  font-size: 1rem;
}

.team-chat-attach {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(167, 139, 250, 0.6);
  color: rgba(196, 181, 253, 0.95);
  background: rgba(76, 29, 149, 0.24);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.team-chat-attach.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.team-chat-attach:not(.disabled):hover,
.team-chat-attach:not(.disabled):focus-visible {
  border-color: rgba(196, 181, 253, 0.9);
  background: rgba(76, 29, 149, 0.32);
}

.team-chat-file-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.85);
}

.team-chat-file-display.hidden {
  display: none;
}

.team-chat-file-name {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-chat-file-clear {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
}

.team-chat-file-clear:hover,
.team-chat-file-clear:focus-visible {
  color: #dc2626;
}

.team-chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.team-chat-actions .btn {
  min-width: 120px;
}

.team-chat-char-count {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.8);
}

.team-chat-char-count.warning {
  color: #f59e0b;
}

.team-chat-char-count.inactive {
  opacity: 0.5;
}

.team-chat-send[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.team-chat-keyboard-hint {
  margin: 0;
  text-align: right;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.75);
}

.team-chat-keyboard-hint.hidden {
  display: none;
}

@media (max-width: 720px) {
  .assistant-dock {
    right: clamp(12px, 3vw, 20px);
    bottom: clamp(12px, 3vw, 20px);
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
  }

  .team-chat-panel,
  .ai-assistant-panel {
    width: min(420px, calc(100vw - 24px));
    max-height: min(80vh, 580px);
  }

  .team-chat-panel.team-chat-panel--section {
    width: 100%;
    max-height: none;
  }

  .ai-assistant-widget {
    right: clamp(12px, 3vw, 20px);
    bottom: clamp(12px, 3vw, 20px);
    align-items: flex-end;
  }
  .team-chat-user-dialog {
    align-items: flex-end;
    padding: clamp(10px, 8vw, 20px);
  }
  .team-chat-user-dialog-window {
    width: 100%;
    max-height: min(480px, 86vh);
    border-radius: clamp(18px, 7vw, 32px);
  }
}

@media (max-width: 520px) {
  .team-chat-panel,
  .ai-assistant-panel {
    width: calc(100vw - 24px);
    max-height: min(85vh, 620px);
  }

  .team-chat-panel.team-chat-panel--section {
    width: 100%;
    max-height: none;
  }

  .ai-assistant-actions .btn {
    width: 100%;
  }

  .team-chat-actions .btn {
    width: 100%;
  }

  .team-chat-user {
    padding: 12px 14px;
  }

  .team-chat-user-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 1100px) {
  .settings-page .settings-grid.secondary {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .settings-page { gap: 24px; }
  .settings-page .settings-card { padding: 22px; border-radius: 22px; }
  .settings-page .logo-upload-form .input { min-width: 0; }
  .settings-page .settings-table { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .modal-content,
  .card,
  .content,
  .nav a,
  .nav-toggle,
  .btn,
  .modal-actions {
    transition: none !important;
    animation: none !important;
  }
}

/* Opportunities */
.opportunities-page {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 32px);
}

.opportunities-top {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  align-items: stretch;
}

.opportunities-summary-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
  padding: clamp(16px, 2.4vw, 24px);
  align-items: stretch;
}

.opportunities-summary-header {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 12px);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.opportunities-summary-header h3 {
  margin-bottom: 0;
}

.opportunities-summary-header p {
  font-size: 0.9rem;
}

.opportunities-summary-panel .opportunities-summary-grid {
  flex: 1;
  align-content: start;
}

.opportunities-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.4vw, 22px);
  padding: clamp(16px, 2.6vw, 24px);
}

.opportunities-hero-text h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
}

.opportunities-hero-text p {
  font-size: 0.95rem;
  max-width: 46ch;
}

.opportunities-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.opportunities-hero-actions .btn {
  padding: 10px 18px;
  font-size: 0.92rem;
}

.opportunities-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(12px, 2.2vw, 18px);
  align-items: stretch;
}

.opportunity-kpi {
  padding: clamp(18px, 2.6vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 18px);
  border-radius: clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--surface-border);
  background: linear-gradient(160deg, var(--surface), var(--surface-alt));
  box-shadow: var(--shadow-md);
}

.opportunity-kpi .kpi-top {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 16px);
}

.opportunity-kpi .kpi-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.opportunity-kpi .kpi-value {
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.opportunity-kpi .kpi-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opportunity-kpi .kpi-icon {
  display: grid;
  place-items: center;
  width: clamp(40px, 4.2vw, 50px);
  height: clamp(40px, 4.2vw, 50px);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(6, 182, 212, 0.28));
  color: var(--text);
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  box-shadow: 0 10px 28px rgba(5, 12, 28, 0.35);
}

.opportunity-kpi .kpi-icon::before {
  content: attr(data-icon);
}

.opportunity-kpi[data-kpi='value'] .kpi-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(34, 197, 94, 0.24));
}

.opportunity-kpi[data-kpi='due'] .kpi-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(234, 88, 12, 0.24));
}

.opportunity-kpi .kpi-meta {
  font-size: 0.78rem;
  margin-top: auto;
  color: var(--muted);
}

.opportunities-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 4vw, 36px);
  align-items: start;
}

@media (min-width: 960px) {
  .opportunities-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .opportunities-summary-panel {
    flex-direction: row;
    gap: clamp(20px, 3vw, 28px);
    grid-column: 1 / -1;
  }

  .opportunities-summary-header {
    flex: 0 0 clamp(220px, 24vw, 260px);
    padding-right: clamp(16px, 2.4vw, 24px);
    padding-bottom: 0;
    border-bottom: none;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
  }

  .opportunities-summary-grid {
    padding-left: clamp(10px, 2vw, 20px);
  }
}

@media (min-width: 1280px) {
  .opportunities-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.opportunity-table-wrapper {
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.45);
}

.opportunity-board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.6vw, 24px);
  padding: clamp(18px, 2.8vw, 26px);
}

.opportunity-board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.opportunity-board-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.opportunity-board.is-busy {
  opacity: 0.88;
}

.opportunity-board.is-busy::after {
  content: 'Updating…';
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.72rem;
  color: rgba(191, 219, 254, 0.8);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opportunity-board-timeline {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.38);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.opportunity-board-timeline-header {
  display: flex;
  justify-content: space-between;
  gap: clamp(16px, 2.4vw, 24px);
  padding: clamp(18px, 3vw, 26px) clamp(22px, 3.6vw, 30px);
  align-items: flex-start;
}

.opportunity-board-timeline-strip {
  display: flex;
  gap: clamp(16px, 2.6vw, 24px);
  padding: clamp(18px, 3.2vw, 26px) clamp(22px, 3.6vw, 30px) clamp(22px, 3.8vw, 32px);
  overflow-x: auto;
  scroll-padding-inline: 22px;
}

.opportunity-board-timeline.is-collapsed .opportunity-board-timeline-strip {
  display: none;
}

.opportunity-board-timeline-empty {
  padding: 8px 0;
  color: rgba(148, 163, 184, 0.78);
}

.opportunity-timeline-month {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  align-self: flex-start;
  padding: 4px 0;
}

.opportunity-timeline-item {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-top: 4px solid var(--stage-color, rgba(148, 163, 184, 0.45));
  background: rgba(15, 23, 42, 0.55);
  padding: 12px 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.opportunity-timeline-item:hover,
.opportunity-timeline-item:focus {
  outline: none;
  transform: translateY(-2px);
  border-color: var(--stage-color, rgba(148, 163, 184, 0.6));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.opportunity-timeline-item.is-selected {
  box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.35);
}

.opportunity-timeline-item.is-overdue {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.15);
}

.opportunity-timeline-item.is-soon {
  border-color: rgba(250, 204, 21, 0.45);
}

.opportunity-timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.92);
}

.opportunity-timeline-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.opportunity-timeline-meta {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.78);
}

.opportunity-swimlanes {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 24px);
}

.opportunity-swimlane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.opportunity-swimlane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.opportunity-swimlane-count {
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.45);
}

.opportunity-stage-columns {
  display: grid;
  gap: clamp(20px, 3.2vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.opportunity-stage-column {
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.45);
  padding: clamp(18px, 3.2vw, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
  min-height: 240px;
  border-top: 5px solid var(--stage-color, rgba(148, 163, 184, 0.65));
}

.opportunity-stage-column-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 18px);
  margin-bottom: clamp(12px, 2.2vw, 18px);
}

.opportunity-stage-column-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.opportunity-stage-column-count {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.82);
}

.opportunity-stage-column-list {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
  flex: 1;
  min-height: 120px;
}

.opportunity-stage-column-list.is-drop-target {
  outline: 2px dashed var(--stage-color, rgba(148, 163, 184, 0.6));
  outline-offset: 4px;
}

.opportunity-stage-column-empty {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--border-radius-md);
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.78);
}

.opportunity-board-card {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-left: 4px solid var(--stage-color, rgba(148, 163, 184, 0.75));
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.opportunity-board-card:hover {
  transform: translateY(-2px);
  border-color: var(--stage-color, rgba(148, 163, 184, 0.5));
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.4);
}

.opportunity-board-card:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.38);
}

.opportunity-board-card.is-selected {
  border-color: var(--stage-color, rgba(67, 56, 202, 0.9));
  box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.32);
}

.opportunity-board-card.is-dragging {
  opacity: 0.6;
}

.opportunity-board-card-title {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.opportunity-board-card-meta,
.opportunity-board-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(191, 219, 254, 0.78);
}

.opportunity-board-card-setaside {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.85);
}

.opportunity-board-card-due {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

.opportunity-board-card-due.is-overdue {
  color: #dc2626;
}

.opportunity-board-card-due.is-soon {
  color: #f59e0b;
}

.opportunity-board-card-updated {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.78);
}

.opportunity-secondary {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.8vw, 26px);
  padding: clamp(20px, 3.2vw, 30px);
}

.opportunity-secondary-header h3 {
  margin-bottom: 4px;
}

.opportunity-secondary-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

.opportunity-secondary-panel summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(10px, 1.8vw, 16px);
  padding: clamp(16px, 3vw, 24px) clamp(20px, 3.4vw, 28px);
  font-weight: 600;
}

.opportunity-secondary-panel summary::-webkit-details-marker {
  display: none;
}

.opportunity-secondary-panel summary::after {
  content: '▾';
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.opportunity-secondary-panel:not([open]) summary::after {
  transform: rotate(-90deg);
}

.opportunity-secondary-panel summary span:last-child {
  font-weight: 400;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.78);
}

.opportunity-secondary-panel[open] summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.opportunity-secondary-panel .opportunity-table-wrapper {
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}

.opportunity-board-card,
.opportunity-timeline-item {
  box-shadow: 0 0 0 transparent;
}

@media (max-width: 1100px) {
  .opportunities-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .opportunity-board.is-busy::after {
    top: 12px;
    right: 12px;
  }
}

.opportunity-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.opportunity-table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease;
}

.opportunity-table tbody tr.status-group-header {
  cursor: default;
}

.opportunity-table tbody tr:hover {
  background: rgba(67, 56, 202, 0.14);
}

.opportunity-table tbody tr.status-group-header:hover {
  background: rgba(15, 23, 42, 0.6);
}

.opportunity-table tbody tr.is-selected {
  background: rgba(67, 56, 202, 0.22);
  box-shadow: inset 0 0 0 1px rgba(131, 182, 255, 0.32);
}

.opportunity-table tbody tr.empty {
  cursor: default;
}

.opportunity-table tbody tr.empty:hover {
  background: transparent;
}

.opportunity-table td,
.opportunity-table th {
  white-space: nowrap;
}

.opportunity-table td:last-child,
.opportunity-table th:last-child {
  text-align: right;
}

.opportunity-table .status-group-header td {
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.opportunity-table .status-group-header:first-of-type td {
  border-top: none;
}

.opportunity-table .status-group-header.status-identified td {
  background: rgba(67, 56, 202, 0.18);
  border-top-color: rgba(67, 56, 202, 0.35);
}

.opportunity-table .status-group-header.status-identified .status-group-label {
  color: #dbeafe;
}

.opportunity-table .status-group-header.status-identified .status-group-count {
  color: rgba(191, 219, 254, 0.85);
}

.opportunity-table .status-group-header.status-researching td {
  background: rgba(129, 140, 248, 0.18);
  border-top-color: rgba(129, 140, 248, 0.35);
}

.opportunity-table .status-group-header.status-researching .status-group-label {
  color: #dbeafe;
}

.opportunity-table .status-group-header.status-researching .status-group-count {
  color: rgba(199, 210, 254, 0.85);
}

.opportunity-table .status-group-header.status-development td {
  background: rgba(16, 185, 129, 0.18);
  border-top-color: rgba(16, 185, 129, 0.4);
}

.opportunity-table .status-group-header.status-development .status-group-label {
  color: #16a34a;
}

.opportunity-table .status-group-header.status-development .status-group-count {
  color: rgba(167, 243, 208, 0.82);
}

.opportunity-table .status-group-header.status-submitted td {
  background: rgba(45, 212, 191, 0.18);
  border-top-color: rgba(45, 212, 191, 0.4);
}

.opportunity-table .status-group-header.status-submitted .status-group-label {
  color: #06b6d4;
}

.opportunity-table .status-group-header.status-submitted .status-group-count {
  color: rgba(153, 246, 228, 0.82);
}

.opportunity-table .status-group-header.status-awarded td {
  background: rgba(74, 222, 128, 0.18);
  border-top-color: rgba(74, 222, 128, 0.42);
}

.opportunity-table .status-group-header.status-awarded .status-group-label {
  color: #16a34a;
}

.opportunity-table .status-group-header.status-awarded .status-group-count {
  color: rgba(187, 247, 208, 0.8);
}

.opportunity-table .status-group-header.status-closed td {
  background: rgba(248, 113, 113, 0.18);
  border-top-color: rgba(248, 113, 113, 0.4);
}

.opportunity-table .status-group-header.status-closed .status-group-label {
  color: #f59e0b;
}

.opportunity-table .status-group-header.status-closed .status-group-count {
  color: rgba(254, 202, 202, 0.85);
}

.opportunity-table .status-group-header.status-none td {
  background: rgba(148, 163, 184, 0.18);
  border-top-color: rgba(148, 163, 184, 0.35);
}

.opportunity-table .status-group-header.status-none .status-group-label {
  color: #e2e8f0;
}

.opportunity-table .status-group-header.status-none .status-group-count {
  color: rgba(226, 232, 240, 0.75);
}

.opportunity-table .status-group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.opportunity-table .status-group-label {
  font-weight: 600;
  color: var(--acc1);
}

.opportunity-table .status-group-count {
  font-weight: 500;
}

.opportunity-table .opportunity-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opportunity-table .opportunity-name .small {
  font-size: 0.75rem;
}

.opportunity-table .table-link {
  color: var(--acc2);
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(148, 163, 184, 0.16);
  color: var(--acc1);
  text-transform: capitalize;
}

.status-pill.status-identified {
  background: rgba(67, 56, 202, 0.16);
  border-color: rgba(6, 182, 212, 0.45);
  color: #dbeafe;
}

.status-pill.status-researching {
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
  color: #dbeafe;
}

.status-pill.status-development {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #16a34a;
}

.status-pill.status-submitted {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(45, 212, 191, 0.45);
  color: #06b6d4;
}

.status-pill.status-awarded {
  background: rgba(74, 222, 128, 0.18);
  border-color: rgba(74, 222, 128, 0.5);
  color: #16a34a;
}

.status-pill.status-closed {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
  color: #f59e0b;
}

.opportunity-detail {
  flex: 1 1 360px;
  padding: clamp(20px, 3.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  max-height: 100%;
}

.opportunity-detail-page {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 32px);
}

.opportunity-detail-hero {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(22px, 3.6vw, 32px);
}

.opportunity-detail-hero-header h2 {
  margin-bottom: clamp(6px, 1.4vw, 10px);
}

.opportunity-detail-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.opportunity-detail-page .opportunity-detail {
  flex: 1 1 auto;
  max-height: none;
}

.opportunity-detail-page .opportunity-detail-links {
  flex-wrap: wrap;
}

.opportunity-detail-empty {
  text-align: center;
  padding: 36px 12px;
}

.opportunity-detail-body {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
}

.opportunity-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.opportunity-detail-title h3 {
  margin-bottom: 8px;
}

.opportunity-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opportunity-category {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(129, 140, 248, 0.12);
  color: #dbeafe;
}

.set-aside-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.12);
  color: #06b6d4;
}

.opportunity-detail-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(20px, 3.4vw, 30px);
}

.overview-item {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 10px);
  padding: clamp(16px, 3vw, 24px);
  border-radius: var(--border-radius-sm);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.overview-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.overview-value {
  font-size: 1rem;
  font-weight: 500;
  word-break: break-word;
}

.overview-value.prime {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prime-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prime-partner-link {
  color: var(--accent);
  text-decoration: underline;
  font-size: 0.8rem;
}

.prime-partner-link:hover,
.prime-helper a:hover {
  text-decoration: none;
}

.prime-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.prime-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.opportunity-detail-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 20px);
  flex-wrap: wrap;
}

.opportunity-staffing-section {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.6vw, 24px);
  padding: clamp(20px, 3.4vw, 28px);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

.opportunity-staffing-section.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.opportunity-staffing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(14px, 2.4vw, 20px);
  flex-wrap: wrap;
}

.opportunity-staffing-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.opportunity-staffing-status {
  min-height: 1em;
}

.opportunity-staffing-status.error {
  color: #dc2626;
}

.opportunity-staffing-status.success {
  color: #16a34a;
}

.opportunity-staffing-body {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
}

.opportunity-staffing-empty {
  padding: clamp(20px, 3.4vw, 28px);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: var(--border-radius-sm);
  text-align: center;
  color: var(--muted);
}

.opportunity-staffing-matrix {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opportunity-staffing-group-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 4px 2px;
}

.opportunity-staffing-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(80px, 0.6fr) minmax(140px, 1fr) minmax(160px, 1.1fr) minmax(160px, 1.1fr) minmax(120px, 0.6fr);
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
}

.opportunity-staffing-row.header {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opportunity-staffing-row.recommended {
  border-style: dashed;
}

.opportunity-staffing-row.is-conflict {
  border-color: rgba(248, 113, 113, 0.45);
}

.opportunity-staffing-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.opportunity-staffing-name {
  font-weight: 600;
  word-break: break-word;
}

.opportunity-staffing-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.opportunity-staffing-tags,
.opportunity-staffing-conflicts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.opportunity-staffing-actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.opportunity-staffing-score {
  font-weight: 600;
  font-size: 0.95rem;
}

.opportunity-staffing-score.positive {
  color: #16a34a;
}

.opportunity-staffing-score.neutral {
  color: #e2e8f0;
}

.opportunity-staffing-score.low {
  color: #f59e0b;
}

.opportunity-staffing-score.warn {
  color: #dc2626;
}

.opportunity-staffing-input {
  width: 100%;
  max-width: 120px;
}

.opportunity-staffing-input[type="number"] {
  width: 76px;
}

.opportunity-staffing-input[type="date"] {
  max-width: 140px;
}

.opportunity-staffing-row .btn.tiny {
  font-size: 0.75rem;
  padding: 4px 8px;
}

.opportunity-staffing-row .badge {
  margin-left: 0;
}

.opportunity-detail-section h4 {
  margin-bottom: clamp(12px, 2vw, 18px);
}

.opportunity-detail-section p {
  white-space: pre-wrap;
}

.opportunity-detail-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(18px, 3.2vw, 28px);
}

.contact-card {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--border-radius-sm);
  padding: clamp(16px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vw, 12px);
}

.contact-card .contact-role {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opportunity-detail-attachments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
}

.opportunity-detail-attachments li {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 16px);
  padding: clamp(14px, 2.6vw, 22px);
  border-radius: var(--border-radius-sm);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.opportunity-updates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(14px, 2.4vw, 20px);
}

.opportunity-updates {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.6vw, 22px);
}

.update-bubble {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--border-radius-sm);
  padding: clamp(16px, 2.8vw, 24px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vw, 12px);
}

.update-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.opportunity-update-form {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
}

.opportunity-update-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.opportunity-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.opportunity-form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.opportunity-form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.section-header h4 {
  margin-bottom: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.86rem;
  font-weight: 500;
}

.chip-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--border-radius-sm);
  max-height: 220px;
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chip-checkbox-group::-webkit-scrollbar {
  width: 8px;
}

.chip-checkbox-group::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.chip-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s var(--ease-spring);
}

.chip-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-checkbox span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.chip-checkbox:hover span {
  border-color: rgba(148, 163, 184, 0.5);
  color: #e2e8f0;
}

.chip-checkbox input:checked + span {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.24), rgba(49, 130, 246, 0.5));
  color: #f8fafc;
  border-color: rgba(67, 56, 202, 0.6);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chip-checkbox input:focus-visible + span {
  outline: 2px solid rgba(67, 56, 202, 0.65);
  outline-offset: 2px;
}

.required {
  color: #f59e0b;
  margin-left: 4px;
}

.prime-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.prime-preview {
  margin-top: 8px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: var(--muted);
}

#opportunity_sub_preview {
  min-height: auto;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
}

#opportunity_sub_preview .sub-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

#opportunity_sub_preview .sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
}

#opportunity_sub_preview .sub-chip-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#opportunity_sub_preview .sub-chip-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transition: background 0.2s var(--ease-spring), color 0.2s var(--ease-spring);
}

#opportunity_sub_preview .sub-chip-remove:hover,
#opportunity_sub_preview .sub-chip-remove:focus {
  color: var(--text);
  background: rgba(148, 163, 184, 0.22);
}

#opportunity_sub_preview .sub-chip-helper {
  flex-basis: 100%;
  margin-top: 2px;
  color: var(--muted);
}

.prime-preview img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
}

.prime-helper {
  margin-top: 6px;
}

.prime-helper a {
  color: var(--accent);
  text-decoration: underline;
}

.prime-create {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prime-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prime-logo-preview {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.prime-logo-preview img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.prime-create-footer {
  display: flex;
  gap: 10px;
}

.file-btn {
  position: relative;
  cursor: pointer;
}

.poc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.attachment-preview {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-preview li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--border-radius-sm);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.85rem;
}

.opportunity-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #f59e0b;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
}

.invite-email-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

@media (max-width: 980px) {
  .opportunity-table {
    min-width: 620px;
  }

  .opportunity-detail {
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .opportunities-hero {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .opportunity-table {
    min-width: 560px;
  }
}

/* --- Employees directory --- */
.employees-page {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.5vw, 32px);
  width: min(calc(100% + var(--page-padding-x) * 2), 100vw);
  max-width: 100vw;
  margin-inline: max(calc(50% - 50vw), calc(var(--page-padding-x) * -1));
  padding-inline: clamp(8px, 1.8vw, 24px);
  padding-top: clamp(12px, 2vw, 28px);
  padding-bottom: clamp(28px, 4vw, 48px);
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .employees-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-inline: clamp(6px, 4vw, 16px);
  }
}

.employees-page .card.glassy {
  border-color: var(--surface-border-strong);
  background: var(--surface);
  box-shadow: none;
}

.employees-hero {
  position: relative;
}

.employees-hero .hero-stage {
  position: relative;
  padding: clamp(14px, 1.8vw, 22px);
  border-radius: clamp(18px, 2.2vw, 26px);
  border: 1px solid var(--surface-border-strong);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(200px, 0.85fr);
  gap: clamp(12px, 1.6vw, 18px);
  align-items: stretch;
  isolation: isolate;
}

@media (max-width: 1024px) {
  .employees-hero .hero-stage {
    grid-template-columns: 1fr;
  }
}

.employees-hero .hero-content {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vw, 14px);
  min-width: 0;
}

.employees-hero .hero-tagline {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--muted);
  font-weight: 700;
}

.employees-hero h1 {
  margin: 0;
  font-size: clamp(1.72rem, 2.8vw, 2.2rem);
  letter-spacing: 0.02em;
}

.employees-hero .hero-subcopy {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  line-height: 1.45;
}

.employees-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.employees-hero .hero-actions form {
  margin: 0;
  display: inline-flex;
}

.employees-hero .hero-actions .btn {
  min-width: clamp(140px, 18vw, 190px);
  border-radius: 10px;
  padding-block: 9px;
  padding-inline: clamp(14px, 3vw, 18px);
  font-size: 0.92rem;
}

.employees-hero .hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  align-items: stretch;
}

.employees-hero .hero-metric {
  position: relative;
  padding: clamp(12px, 1.5vw, 16px);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(160deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.82));
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.employees-hero .hero-metric::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(110% 130% at 18% 20%, rgba(59, 130, 246, 0.18), transparent 72%),
    radial-gradient(120% 150% at 82% 60%, rgba(56, 189, 248, 0.16), transparent 74%);
  pointer-events: none;
}

.employees-hero .hero-metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f172a;
  position: relative;
  z-index: 1;
}

.employees-hero .hero-metric-value {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 700;
  color: #0b1120;
  position: relative;
  z-index: 1;
}

.employees-hero .hero-metric-caption {
  font-size: clamp(0.74rem, 0.95vw, 0.86rem);
  color: #111827;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

@media (max-width: 540px) {
  .employees-hero .hero-actions {
    align-items: stretch;
  }

  .employees-hero .hero-actions .btn {
    flex: 1 1 100%;
  }
}

.employees-overview {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 24px);
  background: var(--surface);
  border: 1px solid var(--surface-border-strong);
}

.employees-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.employees-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 3vw, 28px);
  align-items: stretch;
}

.employees-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.mini-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 8px);
  padding: clamp(12px, 1.8vw, 18px);
  border-radius: clamp(14px, 1.8vw, 20px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(160deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.88));
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
  color: #0b1120;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s ease;
  overflow: hidden;
}

.mini-kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(110% 130% at 18% 20%, rgba(59, 130, 246, 0.18), transparent 72%),
    radial-gradient(120% 150% at 82% 60%, rgba(56, 189, 248, 0.16), transparent 74%);
  pointer-events: none;
}

.mini-kpi:hover,
.mini-kpi:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.mini-kpi-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  position: relative;
  z-index: 1;
}

.mini-kpi-value {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  color: #0b1120;
  position: relative;
  z-index: 1;
}

.mini-kpi-rotator {
  font-size: 0.7rem;
  color: #111827;
  text-align: center;
  position: relative;
  z-index: 1;
}

.employees-kpi--interactive {
  cursor: pointer;
  user-select: none;
}

.employees-kpi--interactive:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 4px;
}

.employees-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.employees-toolbar-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: end;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolbar-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.status-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--surface-border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.status-pill:hover,
.status-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.45);
  background: var(--surface-alt);
  color: var(--text);
}

.status-pill.is-active {
  border-color: rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(14, 165, 233, 0.12));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.employees-quicknav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-top: 6px;
  border-top: 1px solid var(--surface-border);
}

.quicknav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quicknav-chip {
  min-width: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.75rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.quicknav-chip:hover,
.quicknav-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.45);
  background: var(--surface-alt);
  color: var(--text);
}

body.light .employees-overview {
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.12);
}

body.light .mini-kpi {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

body.light .status-pill {
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.16);
}

body.light .status-pill.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.14));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}



.employees-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: clamp(20px, 3vw, 28px);
  align-items: flex-start;
}

.employees-layout > * {
  min-width: 0;
}

.employees-directory-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.employees-directory-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 90px;
}

.employees-directory-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--surface-border);
}

.employees-directory-group-header h4 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.employee-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

@media (max-width: 960px) {
  .employees-layout {
    grid-template-columns: 1fr;
  }

  .employees-overview-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .mini-kpi {
    padding: 14px 16px;
  }

  .employees-overview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .employees-quicknav {
    padding-top: 10px;
  }
}

.employee-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--surface-border-strong);
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s ease;
}

.employee-card-main {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 18px;
  align-items: flex-start;
}

.employee-card-avatar {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--surface-border-strong);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  color: var(--text);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.employee-card-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-card-initials {
  font-size: 1.05rem;
}

.employee-card-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

@media (max-width: 768px) {
  .employee-card-main {
    grid-template-columns: 60px 1fr;
    gap: 14px;
  }

  .employee-card-avatar {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 520px) {
  .employee-card-main {
    grid-template-columns: 52px 1fr;
    gap: 12px;
  }

  .employee-card-avatar {
    width: 52px;
    height: 52px;
  }

  .employee-card-initials {
    font-size: 0.95rem;
  }
}

.employee-card:hover,
.employee-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.16);
}

.employee-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.employee-card-name {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.employee-card-role,
.employee-card-contact {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.employees-empty {
  padding: 28px;
  border-radius: var(--border-radius-md);
  border: 1px dashed var(--surface-border-strong);
  background: var(--surface-alt);
  color: var(--muted);
  text-align: center;
}

.employees-docs-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 24px);
}

.employees-docs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.employees-docs-header h3 {
  margin: 0 0 6px;
}

.employees-docs-meta {
  margin-top: -6px;
}

.employees-docs-table .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.employees-docs-table .actions .btn {
  min-width: auto;
}

.employees-docs-table .actions-col {
  width: 180px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll .table {
  min-width: 100%;
}

/* --- Employee detail --- */
.employee-detail-page {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.6vw, 26px);
}

.employee-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(28px, 4vw, 36px);
  border-radius: clamp(26px, 3.6vw, 32px);
  border: 1px solid var(--glass-border-strong);
  background:
    radial-gradient(120% 140% at 16% 18%, rgba(94, 234, 212, 0.2), transparent 62%),
    radial-gradient(130% 140% at 80% 12%, rgba(129, 140, 248, 0.22), transparent 68%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.94), rgba(12, 20, 36, 0.88));
  box-shadow: var(--shadow-lg);
}

.employee-hero-main {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 26px);
}

.employee-avatar {
  width: clamp(66px, 8vw, 88px);
  height: clamp(66px, 8vw, 88px);
  border-radius: clamp(18px, 2.6vw, 26px);
  background:
    radial-gradient(120% 120% at 20% 12%, rgba(6, 182, 212, 0.25), transparent 62%),
    linear-gradient(150deg, rgba(67, 56, 202, 0.32), rgba(6, 182, 212, 0.24));
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: rgba(241, 245, 249, 0.92);
  box-shadow: 0 18px 48px rgba(5, 12, 28, 0.38);
}

.employee-identity h2 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.employee-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.employee-contact a {
  color: var(--acc2);
}

.employee-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.employee-hero-actions .btn {
  min-width: auto;
}

.employee-hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.employee-detail-grid {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
}

.employee-detail-grid.primary {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.employee-detail-grid.secondary {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.employee-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 24px);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.employee-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.employee-section-header > div:first-child {
  flex: 1 1 220px;
}

.employee-section-header h3 {
  margin: 0;
}

.employee-section-header p {
  margin: 4px 0 0;
}

.employee-section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.employee-section-actions .btn {
  min-width: auto;
}

.employee-section.editing {
  border-color: rgba(67, 56, 202, 0.55);
  box-shadow: 0 26px 70px rgba(15, 76, 129, 0.35), 0 0 0 1px rgba(6, 182, 212, 0.25) inset;
}

.employee-section.editing .form-grid {
  background: rgba(67, 56, 202, 0.18);
  border-radius: 18px;
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.24);
}

.employee-section.editing .input,
.employee-section.editing select.input,
.employee-section.editing textarea,
.employee-section.editing .checkbox-inline {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.24);
  background: rgba(13, 148, 136, 0.12);
}

.employee-section.editing .checkbox-inline {
  border-style: solid;
}

body.light .employee-section.editing {
  border-color: rgba(67, 56, 202, 0.48);
  box-shadow: 0 26px 70px rgba(67, 56, 202, 0.22), 0 0 0 1px rgba(67, 56, 202, 0.28) inset;
  background: linear-gradient(160deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.86));
}

body.light .employee-section.editing .form-grid {
  background: rgba(191, 219, 254, 0.55);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.28);
}

body.light .employee-section.editing .input,
body.light .employee-section.editing select.input,
body.light .employee-section.editing textarea,
body.light .employee-section.editing .checkbox-inline {
  border-color: rgba(67, 56, 202, 0.55);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.45);
  background: rgba(191, 219, 254, 0.4);
}

.employee-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.employee-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.employee-benefits-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.employee-form .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.55);
}

.employee-form .checkbox-inline input {
  width: auto;
  accent-color: var(--resume-accent);
}

.employee-form .checkbox-inline span {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.88);
}

.employee-table .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.employee-table .actions .btn {
  min-width: auto;
}

.employee-table .actions-col {
  width: 150px;
}

@media (max-width: 1100px) {
  .employees-layout {
    grid-template-columns: 1fr;
  }

  .employee-hero-actions {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .employee-card {
    padding: 18px;
  }

  .employees-docs-card,
  .employee-section {
    padding: 20px;
  }

  .employee-detail-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .employee-hero-actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }

  .employee-hero-buttons {
    flex-direction: row;
    align-items: center;
  }
}

.employee-card-more {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.75rem;
  margin-left: 4px;
}

.employee-tabs {
  padding: clamp(10px, 1.6vw, 16px) clamp(16px, 2vw, 24px);
  border-radius: clamp(20px, 3vw, 26px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(14px);
}

.employee-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.employee-tab-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.86);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.employee-tab-btn:hover,
.employee-tab-btn:focus-visible {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(94, 234, 212, 0.35);
  color: #f8fafc;
}

.employee-tab-btn.active {
  background: linear-gradient(140deg, rgba(6, 182, 212, 0.28), rgba(129, 140, 248, 0.24));
  border-color: rgba(6, 182, 212, 0.4);
  color: #f8fafc;
  box-shadow: 0 12px 24px rgba(13, 148, 136, 0.18);
}

.employee-tab-panel[hidden] {
  display: none !important;
}

.employee-profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.employee-profile-photo {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.employee-profile-photo-frame {
  position: relative;
  width: clamp(180px, 24vw, 220px);
  aspect-ratio: 1;
  border-radius: clamp(20px, 3vw, 26px);
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.6);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.employee-profile-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-avatar.employee-avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.employee-avatar--inline {
  width: clamp(120px, 18vw, 160px);
  height: clamp(120px, 18vw, 160px);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(6, 182, 212, 0.22), rgba(129, 140, 248, 0.24));
  border: 1px solid rgba(148, 163, 184, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.35);
}

.employee-profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.employee-profile-fields .form-field {
  margin-bottom: 10px;
}

.multi-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.btn.icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: rgba(226, 232, 240, 0.78);
}

.btn.icon-only:hover,
.btn.icon-only:focus-visible {
  background: rgba(6, 182, 212, 0.32);
  border-color: rgba(6, 182, 212, 0.4);
  color: #f8fafc;
}

.employee-address-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 360px);
  align-items: start;
}

.employee-map-preview {
  border-radius: clamp(20px, 2.4vw, 24px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.employee-map-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.employee-form-save-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.employee-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 2vw, 22px);
  margin-bottom: clamp(16px, 3vw, 24px);
}

.employee-kpi-interactive {
  cursor: pointer;
}

.employee-kpi-interactive:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.6);
  outline-offset: 4px;
}

.employee-credential-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.employee-credential-section + .employee-credential-section {
  margin-top: clamp(18px, 3vw, 26px);
}

.employee-credential-section .badge.tiny {
  font-size: 0.68rem;
  padding: 2px 6px;
}

.employee-table tr.is-expiring {
  background: rgba(248, 113, 113, 0.08);
}

.employee-table tr.is-expiring .badge.warn {
  background: rgba(248, 113, 113, 0.2);
  color: #f59e0b;
}

.employee-resource-grid {
  display: grid;
  gap: clamp(18px, 3vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.employee-onboard .employee-tab-panel {
  background: rgba(15, 23, 42, 0.6);
  border-radius: clamp(16px, 2.6vw, 20px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: clamp(18px, 2.6vw, 24px);
}

.employee-onboard .onboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .employee-profile-layout {
    grid-template-columns: 1fr;
  }

  .employee-address-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .employee-tabs {
    padding: 12px;
  }

  .employee-tab-btn {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .employee-profile-photo-frame {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
}

body.light .employees-page .employees-hero {
  color: var(--text);
}

body.light .employees-page .employees-hero .hero-stage {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
}

body.light .employee-card {
  background: var(--surface);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

body.light .employee-card-avatar {
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: none;
  color: var(--text);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.14));
}

body.light .employee-tabs {
  background: rgba(248, 250, 252, 0.88);
  border-color: rgba(148, 163, 184, 0.35);
}

body.light .employee-tab-btn {
  background: rgba(226, 232, 240, 0.6);
  border-color: rgba(148, 163, 184, 0.45);
  color: #111827;
}

body.light .employee-tab-btn.active {
  background: linear-gradient(140deg, rgba(6, 182, 212, 0.22), rgba(129, 140, 248, 0.2));
  border-color: rgba(6, 182, 212, 0.35);
  color: #111827;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.18);
}

body.light .employee-profile-photo-frame {
  background: rgba(226, 232, 240, 0.68);
  border-color: rgba(148, 163, 184, 0.4);
}

body.light .employee-map-preview {
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 40px rgba(148, 163, 184, 0.18);
}

body.light .btn.icon-only {
  background: rgba(226, 232, 240, 0.7);
  border-color: rgba(148, 163, 184, 0.5);
  color: rgba(30, 41, 59, 0.75);
}

body.light .btn.icon-only:hover,
body.light .btn.icon-only:focus-visible {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.35);
  color: #111827;
}

body.light .employees-empty {
  background: rgba(226, 232, 240, 0.65);
  border-color: rgba(148, 163, 184, 0.4);
  color: rgba(30, 41, 59, 0.72);
}

body.light .employees-docs-card,
body.light .employee-section {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #111827;
}

body.light .employee-form .checkbox-inline {
  background: rgba(226, 232, 240, 0.6);
  border-color: rgba(148, 163, 184, 0.4);
}

body.light .employee-form .checkbox-inline span {
  color: rgba(30, 41, 59, 0.82);
}

body.light .employee-detail-hero {
  background:
    radial-gradient(120% 140% at 16% 18%, rgba(6, 182, 212, 0.2), transparent 64%),
    radial-gradient(120% 140% at 82% 16%, rgba(129, 140, 248, 0.22), transparent 72%),
    linear-gradient(160deg, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.92));
  color: #111827;
}

body.light .employee-avatar {
  color: #111827;
  border-color: rgba(148, 163, 184, 0.45);
}

/* Operations */
.operations-page {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.operations-page > section,
.operations-page > .operations-hero {
  min-height: 0;
}

@media (min-width: 1024px) {
  .operations-page {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(180px, 1fr);
    align-content: stretch;
    align-items: stretch;
    grid-auto-flow: dense;
  }

  .operations-page > section,
  .operations-page > .operations-hero {
    min-height: 0;
  }

  .operations-hero {
    grid-column: 1 / -1;
    grid-row: span 1;
    min-height: clamp(220px, 30vh, 320px);
  }

  .operations-brief-card {
    grid-column: span 4;
  }

  .operations-calendar-card {
    grid-column: span 8;
    display: flex;
    flex-direction: column;
    min-height: clamp(240px, 34vh, 360px);
  }

  .operations-calendar-body {
    flex: 1;
    min-height: 0;
    display: grid;
    gap: 24px;
    grid-auto-rows: minmax(0, 1fr);
    align-content: stretch;
  }

  .operations-calendar-body > * {
    min-height: 0;
  }

  .operations-kanban-card,
  .operations-forms-card {
    display: flex;
    flex-direction: column;
  }

  .operations-kanban-card {
    grid-column: span 7;
    min-height: clamp(220px, 36vh, 380px);
  }

  .operations-kanban-columns {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .operations-forms-card {
    grid-column: span 5;
    min-height: clamp(220px, 36vh, 380px);
  }

  .operations-form-grid {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
  }

  .operations-milestones-card,
  .operations-reminders-card {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    min-height: clamp(220px, 32vh, 360px);
  }

  .operations-table-wrapper {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
  }
}

.operations-page.is-busy {
  opacity: 0.88;
  pointer-events: none;
}

.operations-alert {
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.12), rgba(15, 23, 42, 0.3));
  color: var(--text-primary);
  font-size: 0.9rem;
}

.operations-alert[data-type="success"] {
  border-color: rgba(74, 222, 128, 0.45);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(6, 182, 212, 0.18));
}

.operations-alert[data-type="error"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(124, 58, 237, 0.18));
}

.operations-hero {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 24px);
  padding: clamp(20px, 3vw, 28px);
}

.operations-hero-text h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

.operations-hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.operations-metric {
  padding: 16px;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(160deg, rgba(67, 56, 202, 0.12), rgba(15, 23, 42, 0.35));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.operations-metric-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.operations-metric-value {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
}

.operations-brief-card,
.operations-calendar-card,
.operations-kanban-card,
.operations-forms-card,
.operations-milestones-card,
.operations-reminders-card {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 24px);
}

.operations-brief-header,
.operations-calendar-header,
.operations-kanban-header,
.operations-forms-header,
.operations-table-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.operations-brief-actions,
.operations-kanban-header > div + div,
.operations-forms-header > div + div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.operations-brief-text {
  font-size: 1rem;
  line-height: 1.6;
}

.operations-brief-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.operations-brief-origin {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(67, 56, 202, 0.16);
  border: 1px solid rgba(67, 56, 202, 0.35);
  color: #dbeafe;
}

.operations-calendar-body {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .operations-calendar-body {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

.operations-heatmap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.operations-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.operations-heatmap-key {
  display: grid;
  grid-template-columns: repeat(4, 16px);
  gap: 6px;
}

.operations-heatmap-key-item {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.25);
}

.operations-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 4px;
  align-items: stretch;
}

.operations-heatmap-cell {
  width: 100%;
  padding-bottom: 100%;
  border-radius: 5px;
  position: relative;
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.operations-heatmap-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.75;
}

.operations-heatmap-cell.is-empty {
  color: rgba(148, 163, 184, 0.25);
}

.operations-heatmap-cell.is-low {
  color: rgba(6, 182, 212, 0.45);
  border-color: rgba(67, 56, 202, 0.55);
}

.operations-heatmap-cell.is-medium {
  color: rgba(45, 212, 191, 0.6);
  border-color: rgba(13, 148, 136, 0.6);
}

.operations-heatmap-cell.is-high {
  color: rgba(248, 113, 113, 0.65);
  border-color: rgba(239, 68, 68, 0.75);
}

.operations-heatmap-cell:hover,
.operations-heatmap-cell:focus-visible {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.45);
}

.operations-calendar-panel {
  position: relative;
  min-height: 240px;
}

.operations-calendar-empty {
  font-size: 0.88rem;
  color: var(--muted);
}

.operations-kanban-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 3vw, 24px);
}

.operations-kanban-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: var(--border-radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.35);
  min-height: 220px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.operations-kanban-column.is-hovered {
  border-color: rgba(67, 56, 202, 0.6);
  background: rgba(67, 56, 202, 0.18);
}

.operations-kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.operations-kanban-count {
  font-size: 0.8rem;
  color: var(--muted);
}

.operations-kanban-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
}

.operations-task-card {
  padding: 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(150deg, rgba(67, 56, 202, 0.18), rgba(15, 23, 42, 0.45));
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.operations-task-card:active {
  cursor: grabbing;
}

.operations-task-card.is-dragging {
  opacity: 0.7;
  transform: rotate(-2deg) scale(1.02);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.55);
}

.operations-task-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.operations-task-title {
  font-weight: 600;
}

.operations-task-priority {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.operations-task-priority--low {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.9);
}

.operations-task-priority--medium {
  background: rgba(67, 56, 202, 0.22);
  color: #dbeafe;
}

.operations-task-priority--high {
  background: rgba(249, 115, 22, 0.22);
  color: #f59e0b;
}

.operations-task-priority--urgent {
  background: rgba(239, 68, 68, 0.24);
  color: #f59e0b;
}

.operations-task-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.operations-task-assignee {
  font-size: 0.82rem;
}

.operations-task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.operations-kanban-empty,
.operations-heatmap-empty,
.operations-calendar-empty {
  font-size: 0.85rem;
  color: var(--muted);
}

.operations-form-grid {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.operations-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.4);
}

.operations-form-title {
  font-size: 1rem;
  font-weight: 600;
}

.operations-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.operations-form-row span {
  font-size: 0.82rem;
  color: var(--muted);
}

.operations-form-inline {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.operations-form-inline label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.operations-form-inline input,
.operations-form-inline select {
  font-size: 0.95rem;
}

.operations-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.operations-form-actions--split {
  justify-content: space-between;
}

.operations-form-checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.operations-table-wrapper {
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.35);
}

.operations-table {
  width: 100%;
  border-collapse: collapse;
}

.operations-table th,
.operations-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
}

.operations-table tbody tr:hover {
  background: rgba(67, 56, 202, 0.12);
}

.operations-table .empty td {
  text-align: center;
}

.operations-table-primary {
  font-weight: 600;
}

.operations-table-secondary {
  font-size: 0.82rem;
  color: var(--muted);
}

.operations-table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.operations-table-actions .btn.icon-only {
  padding: 6px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
}

.operations-table-actions .btn.icon-only:hover,
.operations-table-actions .btn.icon-only:focus-visible {
  background: rgba(67, 56, 202, 0.25);
}

.badge--muted {
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.85);
}

.team-chat-call {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78));
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.35);
}
.team-chat-call.hidden {
  display: none;
}
.team-chat-call-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.team-chat-call-indicator {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.65);
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.35);
}
.team-chat-call-indicator--active {
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.38);
}
.team-chat-call-indicator--ringing {
  background: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.38);
}
.team-chat-call-indicator--error {
  background: rgba(248, 113, 113, 0.95);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.38);
}
.team-chat-call-status {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.95);
}
.team-chat-call-status.error {
  color: rgba(248, 113, 113, 0.95);
}
.team-chat-call-timer {
  font-variant-numeric: tabular-nums;
  color: rgba(148, 163, 184, 0.9);
}
.team-chat-call-timer.hidden {
  display: none;
}
.team-chat-call-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-chat-call-controls button {
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.88), rgba(37, 99, 235, 0.88));
  color: #f8fafc;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.32);
}
.team-chat-call-controls button:disabled {
  opacity: 0.5;
  cursor: default;
}
.team-chat-call-start {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.88), rgba(37, 99, 235, 0.88));
}
.team-chat-call-start:hover:not(:disabled),
.team-chat-call-start:focus-visible:not(:disabled) {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
  transform: translateY(-1px);
}
.team-chat-call-accept {
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
}
.team-chat-call-accept:hover:not(:disabled),
.team-chat-call-accept:focus-visible:not(:disabled) {
  background: linear-gradient(160deg, rgba(22, 163, 74, 0.95), rgba(21, 128, 61, 0.95));
  transform: translateY(-1px);
}
.team-chat-call-decline,
.team-chat-call-end {
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.9), rgba(220, 38, 38, 0.9));
}
.team-chat-call-decline:hover:not(:disabled),
.team-chat-call-decline:focus-visible:not(:disabled),
.team-chat-call-end:hover:not(:disabled),
.team-chat-call-end:focus-visible:not(:disabled) {
  background: linear-gradient(160deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
  transform: translateY(-1px);
}
.team-chat-call-controls button.hidden {
  display: none;
}
.team-chat-call-audio {
  display: none;
}
