:root {
  --bg: #f7f5fb;
  --surface: #ffffff;
  --surface-muted: #f0ecf7;
  --text: #241b42;
  --text-muted: #6c6382;
  --border: #ded6ea;
  --border-strong: #c9bddb;
  --sidebar: #402880;
  --sidebar-active: #e09038;
  --sidebar-text: #ffffff;
  --primary: #402880;
  --primary-strong: #2f1e66;
  --primary-soft: #eee9f8;
  --accent: #e09038;
  --accent-strong: #bf7423;
  --accent-soft: #fff1df;
  --success: #402880;
  --success-soft: #eee9f8;
  --warning: #e09038;
  --warning-soft: #fff1df;
  --danger: #9b3a55;
  --danger-soft: #fae9ee;
  --info: #6b56a6;
  --info-soft: #f0ecfa;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 44px rgba(64, 40, 128, 0.12);
  --shadow-hover: 0 26px 70px rgba(64, 40, 128, 0.18);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(118deg, transparent 0 56%, rgba(224, 144, 56, 0.08) 56% 68%, transparent 68%),
    radial-gradient(circle at 78% 8%, rgba(224, 144, 56, 0.12), transparent 28%),
    linear-gradient(180deg, #fbf9ff 0%, var(--bg) 42%, #f3eef9 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(84deg, rgba(64, 40, 128, 0.04) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(174deg, rgba(64, 40, 128, 0.035) 0 1px, transparent 1px 42px);
  opacity: 0.74;
  pointer-events: none;
}

body.is-locked {
  height: 100vh;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  appearance: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    linear-gradient(118deg, transparent 0 58%, rgba(224, 144, 56, 0.22) 58% 72%, transparent 72%),
    linear-gradient(135deg, rgba(47, 30, 102, 0.98), rgba(64, 40, 128, 0.94) 56%, rgba(64, 40, 128, 0.82)),
    #402880;
  padding: 24px;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(83deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(173deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 44px);
  background-size: 44px 44px;
  opacity: 0.34;
  animation: loginGridDrift 16s linear infinite;
}

.login-screen::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), #ffffff, var(--accent));
}

body.is-authenticated .login-screen {
  display: none;
}

body.is-locked .app-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.login-shell {
  display: grid;
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  align-items: stretch;
  gap: 28px;
}

.login-visual {
  position: relative;
  display: grid;
  min-height: 560px;
  align-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 90px rgba(17, 9, 45, 0.34);
  padding: 28px;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 84px 34px auto 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: 48px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(28deg);
  animation: loginPanelFloat 8s ease-in-out infinite;
}

.login-brand {
  display: flex;
  position: relative;
  z-index: 1;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 26px;
  line-height: 1.05;
}

.login-brand span:not(.brand-mark) {
  color: rgba(255, 255, 255, 0.76);
}

.login-preview {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 460px);
  gap: 18px;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 26px 70px rgba(18, 10, 45, 0.34);
  padding: 22px;
  animation: loginCardRise 620ms ease both;
}

.preview-header,
.preview-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-header span {
  color: var(--text-muted);
  font-weight: 800;
}

.preview-header strong {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 4px 9px;
  font-size: 12px;
}

.preview-score {
  display: flex;
  align-items: end;
  gap: 10px;
}

.preview-score strong {
  color: var(--primary);
  font-size: 70px;
  line-height: 0.9;
}

.preview-score span {
  color: var(--text-muted);
  font-weight: 800;
}

.preview-bars {
  display: grid;
  gap: 10px;
}

.preview-bars span {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.preview-bars span::before {
  content: "";
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform-origin: left;
  animation: loginBarLoad 820ms ease both;
}

.preview-flow {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--text);
  font-weight: 900;
}

.preview-flow i {
  flex: 1;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.preview-flow i::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loginFlow 1.8s ease-in-out infinite;
}

.login-signal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-signal span {
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(224, 144, 56, 0.92), rgba(224, 144, 56, 0.16)),
    rgba(255, 255, 255, 0.08);
  animation: loginSignalPulse 2.4s ease-in-out infinite;
}

.login-signal span:nth-child(2) {
  animation-delay: 180ms;
}

.login-signal span:nth-child(3) {
  animation-delay: 360ms;
}

.login-card {
  display: grid;
  align-self: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 90px rgba(20, 12, 48, 0.38);
  padding: 30px;
  animation: loginCardRise 720ms ease both;
}

.login-card .form-field {
  gap: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbf9ff;
  padding: 5px;
}

.auth-tab {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 900;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.auth-tab:hover,
.auth-tab.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 10px 22px rgba(64, 40, 128, 0.1);
}

.auth-tab:hover {
  transform: translateY(-1px);
}

.login-card input {
  min-height: 40px;
  background: #fbf9ff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-card input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(224, 144, 56, 0.12);
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  padding: 0;
  transition: background 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(224, 144, 56, 0.14);
  box-shadow: 0 8px 18px rgba(224, 144, 56, 0.14);
  color: var(--accent-strong);
}

.password-toggle:hover {
  transform: translateY(-50%) scale(1.04);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.manager-password-control {
  width: 100%;
}

.login-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}

.login-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: 38px;
  line-height: 1.05;
}

.login-copy p {
  margin: 0;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  box-shadow: 0 12px 24px rgba(224, 144, 56, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(224, 144, 56, 0.34);
}

.login-switch {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  padding: 4px;
}

.login-switch:hover {
  color: var(--accent);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

@keyframes loginGridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 44px 44px, 44px 44px;
  }
}

@keyframes loginPanelFloat {
  0%,
  100% {
    transform: rotate(28deg) translateY(0);
  }
  50% {
    transform: rotate(28deg) translateY(-14px);
  }
}

@keyframes loginCardRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginBarLoad {
  from {
    transform: scaleX(0.18);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes loginFlow {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(250%);
  }
}

@keyframes loginSignalPulse {
  0%,
  100% {
    opacity: 0.58;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-8px);
  }
}

@keyframes appViewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressReveal {
  from {
    transform: scaleX(0.16);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

.is-hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, var(--sidebar), #2f1e66);
  color: var(--sidebar-text);
  padding: 22px 14px;
  overflow-x: hidden;
  box-shadow: 18px 0 48px rgba(47, 30, 102, 0.2);
  transition: padding 180ms ease, box-shadow 180ms ease;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(82deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(172deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 38px);
  pointer-events: none;
}

.brand {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 180ms ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(224, 144, 56, 0.56);
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: 0 10px 24px rgba(224, 144, 56, 0.2);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.login-brand .brand-mark {
  display: inline-flex;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.brand:hover .brand-mark {
  box-shadow: 0 14px 32px rgba(224, 144, 56, 0.34);
  transform: rotate(-2deg) scale(1.04);
}

.brand-copy {
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 17px;
}

.brand span:not(.brand-mark) {
  display: block;
  color: rgba(238, 243, 247, 0.72);
  font-size: 12px;
}

.sidebar-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 243, 247, 0.86);
  padding: 0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.sidebar-toggle svg {
  transition: transform 180ms ease;
}

.app-shell.is-sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.app-shell.is-sidebar-collapsed .brand {
  justify-content: center;
  padding-inline: 0;
}

.app-shell.is-sidebar-collapsed .brand-main,
.app-shell.is-sidebar-collapsed .sidebar-footer {
  display: none;
}

.app-shell.is-sidebar-collapsed .sidebar-toggle svg {
  transform: scaleX(-1);
}

.app-shell.is-sidebar-collapsed .nav-item {
  justify-content: center;
  padding-inline: 10px;
}

.app-shell.is-sidebar-collapsed .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  position: relative;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(238, 243, 247, 0.78);
  padding: 10px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav-item:hover,
.nav-item.is-active {
  background: linear-gradient(135deg, var(--sidebar-active), #efaa57);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(224, 144, 56, 0.22);
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-icon,
.button-icon,
.mini-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.nav-icon svg,
.button-icon svg,
.mini-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  color: rgba(238, 243, 247, 0.72);
}

.sidebar-footer strong {
  color: #ffffff;
}

.sidebar-footer small {
  color: rgba(238, 243, 247, 0.62);
}

.sidebar-logout {
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 8px 10px;
  font-weight: 800;
  text-align: left;
}

.sidebar-logout:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(222, 214, 234, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 42px rgba(64, 40, 128, 0.08);
  padding: 16px;
}

.topbar-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 15px;
  line-height: 1.25;
}

.topbar-copy p:last-child {
  margin-top: 8px;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions .date-control,
.topbar-actions .button {
  width: 156px;
}

.topbar-actions .button {
  min-height: 56px;
  justify-content: center;
}

.date-control {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

input,
select {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 8px 10px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 11px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
  font-weight: 800;
  padding-right: 34px;
}

select:hover {
  border-color: rgba(224, 144, 56, 0.48);
  background-color: #ffffff;
}

select option {
  background: #ffffff;
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
}

.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.native-date-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-date {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 8px 10px;
  font-weight: 750;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.custom-date:hover,
.custom-date:focus-visible,
.custom-date.is-picker-open {
  border-color: rgba(224, 144, 56, 0.52);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(224, 144, 56, 0.1);
}

.custom-date:hover,
.custom-date.is-picker-open {
  transform: translateY(-1px);
}

.custom-date-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  border-radius: 8px;
  color: var(--primary);
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease, color 150ms ease;
}

.custom-date:hover .custom-date-icon,
.custom-date:focus-visible .custom-date-icon,
.custom-date.is-picker-open .custom-date-icon {
  background: rgba(224, 144, 56, 0.16);
  box-shadow: 0 8px 18px rgba(224, 144, 56, 0.16);
  color: var(--accent-strong);
  transform: scale(1.06);
}

.custom-date-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.custom-select {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.custom-select.is-open {
  z-index: 220;
}

.custom-select-trigger {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 8px 34px 8px 10px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 13px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.custom-select.is-open .custom-select-trigger::after {
  transform: translateY(3px) rotate(225deg);
}

.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: rgba(224, 144, 56, 0.52);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(224, 144, 56, 0.1);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 300;
  display: none;
  width: max-content;
  min-width: max(100%, 210px);
  max-width: min(300px, calc(100vw - 36px));
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(201, 189, 219, 0.95);
  border-radius: 8px;
  background: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(64, 40, 128, 0.24);
  padding: 6px;
}

.custom-select.is-open .custom-select-menu {
  display: grid;
  gap: 4px;
  animation: picker-reveal 150ms ease both;
}

.custom-select-option {
  display: block;
  width: 100%;
  min-height: 36px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.custom-select-option:hover,
.custom-select-option[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateX(2px);
}

input[type="date"] {
  color-scheme: light;
  accent-color: var(--accent);
  font-weight: 750;
  caret-color: transparent;
  user-select: none;
}

input[type="date"]:focus {
  color: transparent;
  text-shadow: 0 0 0 var(--text);
}

input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
  border-radius: 4px;
  background: transparent;
  color: var(--text);
}

input[type="date"]::selection {
  background: rgba(224, 144, 56, 0.16);
  color: var(--text);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  border-radius: 6px;
  cursor: pointer;
  padding: 4px;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background: rgba(224, 144, 56, 0.16);
  box-shadow: 0 8px 18px rgba(224, 144, 56, 0.16);
  transform: scale(1.08);
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(224, 144, 56, 0.12);
  outline: none;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover {
  border-color: var(--border-strong);
  background: #fbf8ff;
  box-shadow: 0 10px 24px rgba(64, 40, 128, 0.1);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.985);
}

.button-primary {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), #ef9f3b);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(224, 144, 56, 0.24);
}

.button-primary:hover,
.button-primary:focus,
.button-primary:focus-visible,
.button-primary:active,
.button-primary:disabled {
  border-color: var(--accent-strong);
  background: linear-gradient(135deg, var(--accent-strong), #ef9f3b);
  color: #ffffff;
}

.button-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.button-danger:hover {
  border-color: #7d2f46;
  background: #7d2f46;
}

.button-ghost {
  border-color: transparent;
  background: transparent;
}

.data-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(222, 214, 234, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(16px);
  padding: 12px 14px;
  color: var(--text-muted);
  box-shadow: 0 12px 30px rgba(64, 40, 128, 0.08);
}

.data-notice strong {
  color: var(--text);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: appViewIn 360ms ease both;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-two {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.import-dropzone {
  display: grid;
  gap: 14px;
}

.file-drop {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  gap: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(251, 248, 255, 0.84)),
    var(--surface);
  color: var(--text-muted);
  padding: 22px;
  text-align: center;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.file-drop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(84deg, rgba(64, 40, 128, 0.035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(174deg, rgba(64, 40, 128, 0.03) 0 1px, transparent 1px 34px);
  pointer-events: none;
}

.file-drop:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.file-drop strong {
  color: var(--text);
  font-size: 18px;
}

.file-drop .mini-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.file-drop .mini-icon svg {
  width: 22px;
  height: 22px;
}

.file-drop input {
  width: 100%;
  max-width: 420px;
  margin-top: 8px;
}

.import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.import-status {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbf8ff;
  padding: 16px;
}

.clients-panel .import-layout {
  grid-template-columns: 1fr;
}

.clients-panel .import-status {
  grid-template-columns: minmax(180px, 0.85fr) minmax(240px, 1.2fr) minmax(200px, 0.9fr) auto;
  align-items: end;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(251, 248, 255, 0.72)),
    #ffffff;
}

.clients-panel .import-status h3,
.clients-panel .import-status p {
  grid-column: 1 / -1;
}

.clients-panel .import-status h3 {
  margin-bottom: -4px;
}

.clients-panel .import-status .button-primary {
  min-height: 42px;
  align-self: end;
}

.import-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.import-message {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.import-message ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.import-message-success {
  border-color: rgba(64, 40, 128, 0.22);
  background: var(--primary-soft);
}

.import-message-error {
  border-color: rgba(155, 58, 85, 0.28);
  background: var(--danger-soft);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.template-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.template-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.template-card code {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.dashboard-overview > .panel {
  min-height: 100%;
}

.dashboard-side {
  display: grid;
  gap: 16px;
  min-height: 100%;
}

.dashboard-side > .panel {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.dashboard-summary {
  margin-top: 16px;
}

.dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-status-grid .detail-stat {
  min-height: 86px;
}

.chart-embedded-status {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.chart-embedded-status h3 {
  font-size: 18px;
}

.chart-embedded-status p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.card,
.panel {
  position: relative;
  border: 1px solid rgba(222, 214, 234, 0.78);
  border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.card {
  overflow: hidden;
}

.panel {
  overflow: visible;
}

.card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(118deg, transparent 0 70%, rgba(224, 144, 56, 0.07) 70% 82%, transparent 82%);
  opacity: 0.78;
  pointer-events: none;
}

.card > *,
.panel > * {
  position: relative;
  z-index: 1;
}

.card:hover,
.panel:hover {
  border-color: rgba(201, 189, 219, 0.96);
  background: var(--glass-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card {
  padding: 16px;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-header p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.kpi {
  display: grid;
  gap: 10px;
  min-height: 140px;
}

.kpi::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(64, 40, 128, 0.08);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(64, 40, 128, 0.08), rgba(224, 144, 56, 0.08));
  pointer-events: none;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.kpi-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.kpi-note {
  color: var(--text-muted);
  font-size: 13px;
}

.status-dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--info);
  box-shadow: 0 0 0 5px rgba(107, 86, 166, 0.1);
}

.dot-success {
  background: var(--success);
}

.dot-warning {
  background: var(--warning);
}

.dot-danger {
  background: var(--danger);
}

.progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  animation: progressReveal 740ms ease both;
}

.stacked-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-muted);
}

.stacked-part {
  min-width: 2px;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-success {
  background: var(--success-soft);
  color: var(--primary);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--accent-strong);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-info {
  background: var(--info-soft);
  color: var(--info);
}

.badge-neutral {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.priority-list {
  display: grid;
  gap: 10px;
}

.priority-list.compact {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.priority-list.compact .priority-item {
  padding: 10px;
}

.priority-list.compact .priority-item span {
  font-size: 12px;
}

.priority-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  border: 1px solid rgba(222, 214, 234, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.priority-item:hover {
  border-color: rgba(224, 144, 56, 0.48);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(64, 40, 128, 0.1);
  transform: translateY(-2px);
}

.priority-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.priority-item span {
  color: var(--text-muted);
  font-size: 13px;
}

.priority-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.manager-summary {
  display: grid;
  gap: 10px;
  color: var(--text-muted);
}

.manager-summary strong {
  color: var(--text);
}

.ssl-readiness-panel {
  margin-top: 16px;
}

.ssl-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ssl-summary-metric {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(64, 40, 128, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(64, 40, 128, 0.07);
}

.ssl-summary-metric strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}

.ssl-summary-metric span {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-weight: 700;
}

.ssl-readiness-message {
  margin: 2px 0 14px;
  color: var(--text-muted);
}

.ssl-gap-list {
  display: grid;
  gap: 10px;
}

.ssl-gap-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.34fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(64, 40, 128, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(250, 246, 255, 0.8));
  box-shadow: 0 14px 32px rgba(64, 40, 128, 0.08);
}

.ssl-gap-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ssl-gap-heading strong {
  color: var(--text);
}

.ssl-gap-item p {
  margin: 0;
  color: var(--text-muted);
}

.ssl-gap-action {
  display: block;
  margin-top: 7px;
  color: var(--infinea-purple);
  font-weight: 700;
}

.ssl-gap-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  min-width: 0;
  color: var(--text-muted);
  text-align: right;
}

.ssl-gap-side strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssl-severity {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.ssl-severity-critical,
.ssl-severity-high {
  color: #8f143b;
  background: rgba(183, 44, 83, 0.13);
}

.ssl-severity-medium,
.ssl-severity-to_verify {
  color: #a65f00;
  background: rgba(233, 148, 48, 0.16);
}

.ssl-severity-low {
  color: #2c7a56;
  background: rgba(26, 150, 108, 0.13);
}

.ssl-empty-state {
  padding: 16px;
  border: 1px dashed rgba(64, 40, 128, 0.22);
  border-radius: 18px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.58);
}

.ssl-empty-state.positive {
  color: #147854;
  border-color: rgba(26, 150, 108, 0.24);
  background: rgba(26, 150, 108, 0.08);
}

@media (max-width: 980px) {
  .ssl-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ssl-gap-item {
    grid-template-columns: 1fr;
  }

  .ssl-gap-side {
    justify-items: start;
    text-align: left;
  }
}
.filters {
  display: grid;
  position: relative;
  z-index: 30;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.filters:focus-within {
  z-index: 220;
}

.filters.compact {
  grid-template-columns: 2fr 1fr 1fr;
}

.department-chart {
  display: grid;
  gap: 10px;
}

.department-chart svg {
  width: 100%;
  min-height: 300px;
}

.chart-group {
  cursor: default;
}

.chart-group:focus {
  outline: none;
}

.chart-hover-band {
  fill: rgba(64, 40, 128, 0);
  pointer-events: all;
  stroke: transparent;
  transition: fill 180ms ease, stroke 180ms ease;
}

.chart-grid {
  stroke: #e8e0f3;
  stroke-dasharray: 4 4;
}

.chart-axis {
  stroke: #d7cae8;
}

.chart-axis-label,
.chart-x-label {
  fill: var(--text-muted);
  font-size: 13px;
}

.chart-bar {
  shape-rendering: geometricPrecision;
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.chart-group:hover .chart-hover-band,
.chart-group:focus-visible .chart-hover-band {
  fill: rgba(64, 40, 128, 0.055);
  stroke: rgba(64, 40, 128, 0.14);
}

.chart-group:hover .chart-bar,
.chart-group:focus-visible .chart-bar {
  filter: drop-shadow(0 10px 10px rgba(64, 40, 128, 0.18));
  transform: translateY(-2px);
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.chart-tooltip > * {
  transform: translateY(7px) scale(0.98);
  transform-box: fill-box;
  transform-origin: top center;
  transition: transform 180ms ease;
}

.chart-group:hover .chart-tooltip,
.chart-group:focus-visible .chart-tooltip {
  opacity: 1;
}

.chart-group:hover .chart-tooltip > *,
.chart-group:focus-visible .chart-tooltip > * {
  transform: translateY(0) scale(1);
}

.chart-tooltip rect {
  fill: #ffffff;
  stroke: #d7cae8;
  filter: drop-shadow(0 16px 22px rgba(64, 40, 128, 0.18));
}

.chart-tooltip-title {
  fill: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.chart-tooltip-line {
  font-size: 15px;
  font-weight: 750;
}

.tooltip-success {
  fill: var(--success);
}

.tooltip-warning {
  fill: var(--warning);
}

.tooltip-danger {
  fill: var(--danger);
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.employees-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.employees-table table {
  min-width: 760px;
}

.employee-detail-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.employee-obligation-table {
  margin-top: 16px;
}

.employee-obligation-table table {
  min-width: 620px;
}

tr.is-selected-row {
  background: var(--primary-soft);
}

tr.is-selected-row td:first-child {
  box-shadow: inset 4px 0 0 var(--primary);
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
  position: relative;
}

.upload-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.form-field input,
.form-field select {
  width: 100%;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.person-search {
  --picker-top: 48px;
  position: relative;
  display: block;
  min-height: 76px;
  z-index: 4;
}

.person-search.is-open {
  min-height: 54px;
}

.person-search input {
  display: block;
  height: 46px;
}

.selected-person-summary {
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  border: 1px solid rgba(222, 214, 234, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(64, 40, 128, 0.06);
  color: var(--text-muted);
  padding: 12px 14px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.selected-person-trigger {
  cursor: pointer;
}

.selected-person-trigger:hover,
.selected-person-trigger:focus-visible {
  border-color: rgba(224, 144, 56, 0.52);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 34px rgba(64, 40, 128, 0.12);
  transform: translateY(-1px);
}

.selected-person-summary strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.selected-person-summary small {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
}

.selected-person-summary em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 5px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.person-picker {
  position: absolute;
  top: var(--picker-top);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
  border: 1px solid rgba(222, 214, 234, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  padding: 8px;
  box-shadow: 0 18px 38px rgba(64, 40, 128, 0.16);
  animation: picker-reveal 150ms ease both;
}

@keyframes picker-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.person-option {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.person-option:hover,
.person-option.is-selected {
  border-color: rgba(224, 144, 56, 0.55);
  background: #fff8ef;
  box-shadow: 0 10px 24px rgba(64, 40, 128, 0.08);
  transform: translateY(-1px);
}

.person-option strong,
.person-option small {
  display: block;
}

.person-option small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.person-picker-empty {
  min-height: 48px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-preview {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(222, 214, 234, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(251, 248, 255, 0.72)),
    var(--surface);
  box-shadow: 0 12px 30px rgba(64, 40, 128, 0.07);
  padding: 16px;
}

.upload-preview-card {
  display: grid;
  gap: 10px;
}

.table-wrap {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  border: 1px solid rgba(222, 214, 234, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(64, 40, 128, 0.07);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.clients-panel table {
  min-width: 0;
  table-layout: fixed;
}

.clients-panel th:nth-child(1),
.clients-panel td:nth-child(1) {
  width: 24%;
}

.clients-panel th:nth-child(2),
.clients-panel td:nth-child(2) {
  width: 31%;
}

.clients-panel th:nth-child(3),
.clients-panel td:nth-child(3) {
  width: 80px;
}

.clients-panel th:nth-child(4),
.clients-panel td:nth-child(4) {
  width: 108px;
}

.clients-panel th:nth-child(5),
.clients-panel td:nth-child(5) {
  width: 128px;
}

.clients-panel th:nth-child(6),
.clients-panel td:nth-child(6) {
  width: 126px;
}

th,
td {
  border-bottom: 1px solid rgba(222, 214, 234, 0.72);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.clients-panel th,
.clients-panel td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(251, 248, 255, 0.96);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(255, 248, 239, 0.78);
}

.row-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-weight: 800;
  text-align: left;
  transition: color 150ms ease, transform 150ms ease;
}

.row-button:hover {
  color: var(--accent-strong);
  transform: translateX(2px);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.row-button-danger {
  color: var(--danger);
}

.row-button-danger:hover {
  color: #7d2f46;
}

.muted {
  color: var(--text-muted);
}

.nowrap {
  white-space: nowrap;
}

.detail-panel {
  margin-top: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-stat {
  border: 1px solid rgba(222, 214, 234, 0.82);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.detail-stat:hover {
  border-color: rgba(224, 144, 56, 0.42);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(64, 40, 128, 0.08);
  transform: translateY(-1px);
}

.detail-stat strong {
  display: block;
  font-size: 24px;
}

.detail-stat span {
  color: var(--text-muted);
  font-size: 13px;
}

.empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-sheet {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.report-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.report-title h2 {
  margin-bottom: 6px;
}

.report-section {
  display: grid;
  gap: 10px;
}

.report-section ul {
  margin: 0;
  padding-left: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  background: rgba(36, 27, 66, 0.42);
  backdrop-filter: blur(14px);
  padding: 18px;
  animation: modalFadeIn 160ms ease both;
}

.confirm-modal {
  display: grid;
  width: min(100%, 460px);
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(251, 248, 255, 0.9)),
    #ffffff;
  box-shadow: 0 30px 90px rgba(20, 12, 48, 0.34);
  padding: 24px;
  animation: modalRise 180ms ease both;
}

.confirm-modal-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(224, 144, 56, 0.48);
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 12px 26px rgba(224, 144, 56, 0.18);
  font-weight: 900;
}

.confirm-modal-copy {
  display: grid;
  gap: 7px;
}

.confirm-modal-copy h2 {
  font-size: 24px;
}

.confirm-modal-copy p:last-child {
  color: var(--text-muted);
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mini-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 48px;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.bar-row strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 360px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  padding: 11px 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  }

  .login-visual {
    min-height: 520px;
  }

  .grid-kpis,
  .grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .import-layout,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-overview {
    grid-template-columns: 1fr;
  }

  .employees-layout {
    grid-template-columns: 1fr;
  }

  .employee-detail-panel {
    position: static;
    max-height: none;
  }

  .clients-panel .import-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-panel .import-status .button-primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 940px) {
  .login-screen {
    align-items: start;
    padding: 18px;
  }

  .login-shell {
    width: min(100%, 520px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .login-visual {
    min-height: 300px;
    padding: 20px;
  }

  .login-preview {
    width: 100%;
    padding: 18px;
  }

  .preview-score strong {
    font-size: 52px;
  }

  .login-signal {
    display: none;
  }
}

@media (max-width: 840px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar {
    padding: 22px 14px;
  }

  .app-shell.is-sidebar-collapsed .brand {
    justify-content: space-between;
    padding: 0 8px 14px;
  }

  .app-shell.is-sidebar-collapsed .brand-main {
    display: flex;
  }

  .app-shell.is-sidebar-collapsed .sidebar-footer {
    display: grid;
  }

  .app-shell.is-sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 10px;
  }

  .app-shell.is-sidebar-collapsed .nav-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 18px;
  }

  .topbar {
    display: grid;
    position: static;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .filters,
  .filters.compact {
    grid-template-columns: 1fr;
  }

  .upload-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .clients-panel .import-status {
    grid-template-columns: 1fr;
  }

  .clients-panel .table-wrap {
    overflow-x: auto;
  }

  .clients-panel table {
    min-width: 760px;
  }

  .dashboard-status-grid {
    grid-template-columns: 1fr;
  }

  .department-chart svg {
    min-height: 260px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .login-screen {
    padding: 12px;
  }

  .login-visual {
    min-height: 150px;
  }

  .login-preview {
    display: none;
  }

  .login-card {
    padding: 22px;
  }

  .login-copy h1 {
    font-size: 32px;
  }

  .grid-kpis,
  .grid-three,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .priority-item,
  .report-title {
    grid-template-columns: 1fr;
  }

  .priority-meta {
    justify-content: flex-start;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .data-notice,
  .report-actions,
  .toast {
    display: none;
  }

  .app-shell,
  .main {
    display: block;
    padding: 0;
  }

  .view {
    display: none !important;
  }

  #reportView {
    display: block !important;
  }

  .report-sheet {
    border: 0;
    padding: 0;
  }
}
