:root {
  --bg: #09111b;
  --bg-strong: #060c14;
  --panel: rgba(15, 24, 38, 0.9);
  --panel-strong: #121d2c;
  --panel-soft: rgba(255, 255, 255, 0.03);
  --border: rgba(135, 156, 182, 0.16);
  --border-strong: rgba(135, 156, 182, 0.28);
  --text: #ebf2f9;
  --text-soft: #c6d4e2;
  --muted: #8ea1b5;
  --accent: #5ed7c9;
  --accent-strong: #2bc6b0;
  --accent-blue: #68b7ff;
  --accent-green: #7ee2a6;
  --accent-amber: #ffbe6b;
  --accent-rose: #ff9595;
  --accent-violet: #a7a8ff;
  --danger: #ff8c8c;
  --ok: #93e8b6;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.18);
  --radius: 24px;
  --radius-medium: 18px;
  --radius-small: 14px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(104, 183, 255, 0.08), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(94, 215, 201, 0.08), transparent 24%),
    linear-gradient(180deg, #08111c 0%, #0c1521 100%);
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

code {
  font-family: "IBM Plex Mono", Consolas, monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 8px;
}

.eyebrow {
  display: inline-block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.22s ease;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 96px minmax(0, 1fr);
}

.app-sidebar-backdrop {
  display: none;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(7, 13, 21, 0.98) 0%, rgba(10, 17, 27, 0.96) 100%);
  backdrop-filter: blur(18px);
  z-index: 20;
  transition: padding 0.22s ease;
}

body.sidebar-collapsed .app-sidebar {
  padding: 24px 12px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  transition: gap 0.22s ease;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(94, 215, 201, 0.2);
  background: linear-gradient(145deg, rgba(17, 29, 43, 0.96), rgba(10, 18, 29, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.brand-icon img {
  width: 94px;
  height: 30px;
  object-fit: cover;
  object-position: left center;
  transform: translateX(-4px);
  opacity: 0.95;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.brand-copy strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

body.sidebar-collapsed .brand {
  gap: 0;
}

body.sidebar-collapsed .brand-copy {
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  width: 0;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar-head {
  justify-content: center;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 14px 11px 17px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.side-nav a::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(94, 215, 201, 0.94), rgba(104, 183, 255, 0.92));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.side-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.04);
  transform: translateX(2px);
}

.side-nav a.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(104, 183, 255, 0.08), rgba(94, 215, 201, 0.06));
  border-color: rgba(104, 183, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.side-nav a.active::before {
  opacity: 1;
}

.nav-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-icon svg,
.title-mark-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-label {
  min-width: 0;
}

.nav-tone-blue .nav-icon {
  color: var(--accent-blue);
}

.nav-tone-green .nav-icon {
  color: var(--accent-green);
}

.nav-tone-teal .nav-icon {
  color: var(--accent);
}

.nav-tone-amber .nav-icon {
  color: var(--accent-amber);
}

.nav-tone-rose .nav-icon {
  color: var(--accent-rose);
}

.nav-tone-violet .nav-icon {
  color: var(--accent-violet);
}

.side-nav a.active .nav-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

body.sidebar-collapsed .side-nav a {
  justify-content: center;
  padding: 11px 0;
}

body.sidebar-collapsed .side-nav a::before {
  left: 4px;
}

body.sidebar-collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-main {
  padding: 30px 30px 36px;
}

.sidebar-pin,
.sidebar-reopen {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.sidebar-pin:hover,
.sidebar-reopen:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-pin span,
.sidebar-reopen span {
  display: block;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  position: absolute;
}

.sidebar-pin,
.sidebar-reopen {
  position: relative;
}

.sidebar-pin span:first-child,
.sidebar-reopen span:first-child {
  transform: translateX(-1px) rotate(45deg);
}

.sidebar-pin span:last-child,
.sidebar-reopen span:last-child {
  transform: translateX(-1px) rotate(-45deg);
}

body.sidebar-collapsed .sidebar-pin span:first-child,
body.sidebar-collapsed .sidebar-reopen span:first-child {
  transform: translateX(1px) rotate(-45deg);
}

body.sidebar-collapsed .sidebar-pin span:last-child,
body.sidebar-collapsed .sidebar-reopen span:last-child {
  transform: translateX(1px) rotate(45deg);
}

.sidebar-reopen {
  display: none;
  margin-bottom: 18px;
}

body.sidebar-collapsed .sidebar-pin {
  display: none;
}

body.sidebar-collapsed .sidebar-reopen {
  display: inline-flex;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}

.topbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-copy {
  display: grid;
  gap: 2px;
}

.topbar-copy h1 {
  display: block;
  margin: 6px 0 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.title-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.title-mark-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.title-tone-blue {
  color: var(--accent-blue);
}

.title-tone-green {
  color: var(--accent-green);
}

.title-tone-teal {
  color: var(--accent);
}

.title-tone-amber {
  color: var(--accent-amber);
}

.title-tone-rose {
  color: var(--accent-rose);
}

.title-tone-violet {
  color: var(--accent-violet);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: grid;
  gap: 2px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 138px;
}

.user-badge strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.15;
}

.user-badge small {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
}

.panel,
.kpi-card,
.login-card,
.tip-card,
.error-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 6px 0 0;
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.panel-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.panel-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.dashboard-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.92fr);
}

.panel-span-two {
  grid-column: span 1;
}

.kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-card {
  position: relative;
  min-height: 158px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -26px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
}

.kpi-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.kpi-card small {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.kpi-card .pozitiv {
  color: var(--ok);
}

.kpi-card .negativ {
  color: var(--danger);
}

.kpi-card .semleges {
  color: var(--text);
}

.pozitiv {
  color: var(--ok);
}

.negativ {
  color: var(--danger);
}

.semleges {
  color: var(--text);
}

.metric-good {
  color: var(--accent-green);
  font-weight: 700;
}

.metric-bad {
  color: var(--accent-rose);
  font-weight: 700;
}

.metric-cash {
  color: var(--accent);
  font-weight: 700;
}

.metric-info {
  color: var(--accent-blue);
  font-weight: 700;
}

.kpi-tone-blue::after {
  background: radial-gradient(circle, rgba(104, 183, 255, 1) 0%, rgba(104, 183, 255, 0) 72%);
}

.kpi-tone-green::after {
  background: radial-gradient(circle, rgba(126, 226, 166, 1) 0%, rgba(126, 226, 166, 0) 72%);
}

.kpi-tone-teal::after {
  background: radial-gradient(circle, rgba(94, 215, 201, 1) 0%, rgba(94, 215, 201, 0) 72%);
}

.kpi-tone-amber::after {
  background: radial-gradient(circle, rgba(255, 190, 107, 1) 0%, rgba(255, 190, 107, 0) 72%);
}

.kpi-tone-rose::after {
  background: radial-gradient(circle, rgba(255, 149, 149, 1) 0%, rgba(255, 149, 149, 0) 72%);
}

.kpi-tone-violet::after {
  background: radial-gradient(circle, rgba(167, 168, 255, 1) 0%, rgba(167, 168, 255, 0) 72%);
}

.toolbar-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.toolbar-grid--overview {
  grid-template-columns: minmax(240px, 320px) minmax(280px, 1fr);
}

.toolbar-item {
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.025);
}

.toolbar-item span:first-child {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.toolbar-item .field {
  margin-top: 6px;
}

.toolbar-meta {
  display: grid;
  gap: 6px;
  align-content: center;
}

.toolbar-meta-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.toolbar-meta strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
}

.toolbar-meta small,
.toolbar-meta-file {
  color: var(--muted);
  line-height: 1.45;
}

.toolbar-meta-file {
  font-size: 0.83rem;
}

.stacked-form,
.stack {
  display: grid;
  gap: 8px;
}

.stack span {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.field,
.ghost-button,
.primary-button {
  min-height: 48px;
  border-radius: 14px;
}

.field {
  width: 100%;
  border: 1px solid rgba(135, 156, 182, 0.22);
  background: rgba(8, 16, 26, 0.72);
  color: var(--text);
  padding: 0 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field:hover {
  border-color: rgba(94, 215, 201, 0.34);
  background: rgba(10, 18, 28, 0.82);
}

.field:focus,
.field:focus-visible {
  outline: none;
  border-color: rgba(94, 215, 201, 0.72);
  box-shadow: 0 0 0 4px rgba(94, 215, 201, 0.12);
  background: rgba(10, 18, 28, 0.92);
}

.field option {
  color: var(--text);
  background: #0f1826;
}

.field-file {
  padding: 10px 12px;
}

.field-file::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.help-dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.help-dialog::backdrop {
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(6px);
}

.help-dialog-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 24, 38, 0.96);
  box-shadow: var(--shadow);
}

.help-content {
  display: grid;
  gap: 14px;
  line-height: 1.65;
  color: var(--text-soft);
}

.help-content p {
  margin: 0;
}

.help-note {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(104, 183, 255, 0.16);
  background: rgba(104, 183, 255, 0.06);
}

.help-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.primary-button,
.ghost-button,
.text-link,
.sidebar-close,
.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-button {
  width: 100%;
  padding: 0 18px;
  border: 0;
  color: #062b26;
  font-weight: 800;
  background: linear-gradient(135deg, #91f2e5 0%, #39c8b8 100%);
  box-shadow: 0 12px 28px rgba(57, 200, 184, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(57, 200, 184, 0.28);
  filter: brightness(1.02);
}

.primary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(94, 215, 201, 0.14), 0 16px 32px rgba(57, 200, 184, 0.28);
}

.ghost-button {
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.ghost-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.text-link {
  color: var(--accent);
  padding: 0;
  min-height: auto;
  border: 0;
  background: none;
  font-weight: 700;
}

.text-link-danger {
  color: var(--danger);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button-row form {
  margin: 0;
}

.button-row .primary-button,
.button-row .ghost-button {
  width: auto;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.flash-ok {
  background: rgba(147, 232, 182, 0.08);
}

.flash-error {
  background: rgba(255, 140, 140, 0.08);
}

.warning-panel {
  border-color: rgba(255, 190, 107, 0.26);
  background: linear-gradient(180deg, rgba(255, 190, 107, 0.08), rgba(15, 24, 38, 0.9));
}

.company-delete-panel {
  margin-bottom: 18px;
}

.warning-summary {
  margin-bottom: 18px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 40px;
  align-items: center;
  padding: 36px 40px;
}

.login-copy {
  display: grid;
  gap: 14px;
}

.hero-visual {
  position: relative;
  width: min(380px, 100%);
  margin-bottom: 10px;
}

.hero-visual-glow {
  position: absolute;
  inset: auto 14% -14% 14%;
  height: 92px;
  background: radial-gradient(circle, rgba(94, 215, 201, 0.22) 0%, rgba(94, 215, 201, 0) 72%);
  filter: blur(14px);
  pointer-events: none;
}

.hero-logo-card {
  position: relative;
  padding: 12px 14px;
  border-radius: 28px;
  border: 1px solid rgba(147, 243, 229, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(10, 18, 29, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.hero-logo-card img {
  width: 100%;
  max-width: 334px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.2));
}

.login-copy h1 {
  max-width: 11ch;
  font-size: clamp(2.45rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  margin: 0;
}

.login-copy p {
  max-width: 58ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.login-tips {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tip-card,
.login-card {
  padding: 24px;
}

.tip-card {
  min-height: 126px;
  box-shadow: var(--shadow-soft);
}

.tip-card strong {
  display: block;
  margin-bottom: 10px;
}

.tip-card p {
  margin: 0 0 8px;
  font-size: 0.94rem;
}

.login-card {
  max-width: 440px;
  width: 100%;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.login-card h2 {
  margin: 8px 0 8px;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.login-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.login-card .stacked-form {
  gap: 16px;
}

.simple-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
}

.simple-table th,
.simple-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.simple-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.simple-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-subtext {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.overview-table td {
  white-space: nowrap;
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-picker {
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.company-picker legend {
  padding: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.company-picker-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.company-picker-toolbar {
  display: grid;
  gap: 12px;
}

.company-picker-search {
  min-height: 46px;
}

.company-picker-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.company-picker-action-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(104, 183, 255, 0.16);
  background: rgba(104, 183, 255, 0.08);
  color: var(--accent-blue);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.company-picker-action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(104, 183, 255, 0.28);
  background: rgba(104, 183, 255, 0.14);
  color: var(--text);
}

.company-picker-summary {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
}

.company-picker-count {
  display: block;
  font-size: 0.96rem;
  line-height: 1.35;
}

.company-picker-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.company-picker-tag {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(104, 183, 255, 0.16);
  background: rgba(104, 183, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.company-picker-tag:hover {
  border-color: rgba(104, 183, 255, 0.3);
  background: rgba(104, 183, 255, 0.12);
}

.company-picker-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 16, 26, 0.42);
  overflow-y: auto;
}

.company-picker-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.company-picker-option:hover {
  border-color: rgba(94, 215, 201, 0.16);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.company-picker-option input {
  margin-top: 3px;
  accent-color: var(--accent-strong);
}

.company-picker-option:has(input:checked) {
  border-color: rgba(94, 215, 201, 0.26);
  background: linear-gradient(180deg, rgba(94, 215, 201, 0.08), rgba(104, 183, 255, 0.06));
}

.company-picker-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.company-picker-copy strong {
  display: block;
  line-height: 1.3;
}

.company-picker-copy small {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}

.company-picker-copy small span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.company-picker-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chart-host {
  min-height: 360px;
  width: 100%;
}

.summary-stack {
  display: grid;
  gap: 2px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-row span {
  color: var(--muted);
}

.meta-list {
  display: grid;
  gap: 14px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
}

.status-success {
  color: var(--ok);
}

.status-error {
  color: var(--danger);
}

.status-processing {
  color: #ffd58f;
}

.tabulator-shell .tabulator {
  background: rgba(10, 17, 27, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.tabulator-shell .tabulator .tabulator-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tabulator-shell .tabulator .tabulator-header .tabulator-col,
.tabulator-shell .tabulator .tabulator-tableholder,
.tabulator-shell .tabulator .tabulator-tableholder .tabulator-table,
.tabulator-shell .tabulator .tabulator-tableholder .tabulator-table .tabulator-row {
  background: transparent;
}

.tabulator-shell .tabulator .tabulator-header .tabulator-col {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.tabulator-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tabulator-shell .tabulator-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tabulator-shell .tabulator-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.tabulator-shell .tabulator-row:hover {
  background: rgba(104, 183, 255, 0.06);
}

.tabulator-shell .tabulator-cell {
  color: var(--text);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.tabulator-shell .tabulator .tabulator-footer {
  background: rgba(9, 17, 27, 0.96);
  color: var(--text-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tabulator-shell .tabulator .tabulator-footer .tabulator-page,
.tabulator-shell .tabulator .tabulator-footer .tabulator-pages button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.tabulator-shell .tabulator .tabulator-footer .tabulator-page.active {
  background: rgba(104, 183, 255, 0.14);
  border-color: rgba(104, 183, 255, 0.28);
  color: var(--text);
}

.tabulator-shell .tabulator .tabulator-footer .tabulator-page:disabled,
.tabulator-shell .tabulator .tabulator-footer button:disabled {
  opacity: 0.45;
}

.tabulator-shell .tabulator .tabulator-footer .tabulator-paginator {
  gap: 8px;
}

.tabulator-shell .tabulator .tabulator-col .tabulator-arrow {
  border-top-color: rgba(255, 255, 255, 0.72);
}

.tabulator-shell .tabulator .tabulator-col.tabulator-sortable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tabulator-shell .tabulator .tabulator-placeholder {
  color: var(--muted);
  padding: 22px;
}

.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}

.error-card {
  max-width: 780px;
  padding: 28px;
}

.error-card pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
  color: #d8e5ef;
}

.mobile-nav-toggle,
.sidebar-close {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.mobile-nav-toggle span,
.sidebar-close span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav-toggle {
  flex-direction: column;
  gap: 4px;
}

.sidebar-close {
  position: relative;
}

.sidebar-close span:first-child {
  transform: rotate(45deg);
  position: absolute;
}

.sidebar-close span:last-child {
  transform: rotate(-45deg);
  position: absolute;
}

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-layout,
  .panel-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(4, 8, 14, 0.64);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 30;
  }

  body.nav-open .app-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 86vw);
    height: auto;
    transform: translateX(-104%);
    transition: transform 0.2s ease;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    z-index: 40;
  }

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

  .sidebar-close,
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .sidebar-pin,
  .sidebar-reopen {
    display: none !important;
  }

  .app-main {
    padding: 22px 18px 28px;
  }

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

  .topbar-main,
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .login-shell {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }

  .login-card {
    max-width: none;
  }

  .toolbar-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-grid--overview {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    width: min(320px, 100%);
  }
}

@media (max-width: 720px) {
  .kpi-grid,
  .login-tips,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .company-picker-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .company-picker-copy small {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-badge {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .app-main {
    padding: 18px 14px 24px;
  }

  .topbar-copy h1 {
    font-size: 1.72rem;
  }

  .title-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .chart-host {
    min-height: 280px;
  }

  .hero-logo-card {
    padding: 10px 12px;
  }

  .login-copy h1 {
    max-width: 12ch;
    font-size: clamp(2rem, 11vw, 2.8rem);
  }
}
