:root {
  --bg: #070B16;
  --bg-elevated: #0B1020;
  --bg-panel: #0E172A;
  --card: rgba(15, 23, 42, 0.85);
  --card-solid: #0f172a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #F8FAFC;
  --muted: #94A3B8;
  --muted-dim: #64748B;
  --blue: #2563EB;
  --blue-bright: #3B82F6;
  --blue-light: #60a5fa;
  --green: #22C55E;
  --violet: #8B5CF6;
  --orange: #F97316;
  --red: #EF4444;
  --teal: #14B8A6;
  --mod-bms: var(--blue-bright);
  --mod-bms-soft: rgba(59, 130, 246, 0.22);
  --mod-bms-text: #93c5fd;
  --mod-bms-border: rgba(59, 130, 246, 0.4);
  --mod-mes: var(--green);
  --mod-mes-soft: rgba(34, 197, 94, 0.22);
  --mod-mes-text: #86efac;
  --mod-mes-border: rgba(34, 197, 94, 0.35);
  --mod-hrm: var(--violet);
  --mod-hrm-soft: rgba(139, 92, 246, 0.22);
  --mod-hrm-text: #c4b5fd;
  --mod-hrm-border: rgba(139, 92, 246, 0.35);
  --login-font: "Inter", "Manrope", system-ui, sans-serif;
  --cabinet-sidebar: 280px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--login-font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.screen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.screen[hidden] { display: none; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.brand-logo {
  display: block;
  max-width: min(300px, 92vw);
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  image-rendering: auto;
}

.schedule-field { grid-column: 1 / -1; }

.schedule-times {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.schedule-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 8rem;
}

.schedule-time__lbl {
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 1.5rem;
}

.schedule-time input {
  flex: 1;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.work-days {
  margin-top: 0.75rem;
}

.work-days__title {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.work-days__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

.work-day {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.work-day input {
  accent-color: var(--blue);
}

.attendance-entry__pick {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0.75rem;
}
@media (max-width: 720px) {
  .attendance-entry__pick { grid-template-columns: 1fr; }
}
.attendance-entry__meta { margin: 0 0 1rem; }
.attendance-entry__hint { margin: 0 0 1rem; }

/* —— Attendance entry (employee timesheet) —— */
.att-entry-page { display: flex; flex-direction: column; gap: 1rem; overflow: visible; }
.att-entry-page:has(#attEntryBody:not([hidden])) { gap: 0.35rem; }
.att-entry-toolbar {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #101c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
  overflow: visible;
}
#panelAttendanceEntry .att-entry-page:has(.att-entry-combobox--open) .att-entry-toolbar {
  z-index: 500;
}
#panelAttendanceEntry .att-entry-toolbar {
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
}
#panelAttendanceEntry .att-entry-page:has(#attEntryBody:not([hidden])) .att-entry-toolbar {
  padding: 0.3rem 0.65rem;
}
#panelAttendanceEntry .att-entry-toolbar__hint {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
}
#panelAttendanceEntry .att-entry-page:has(#attEntryBody:not([hidden])) .att-entry-toolbar__hint {
  display: none;
}
#panelAttendanceEntry .attendance-entry__pick {
  margin-bottom: 0;
}
#panelAttendanceEntry .att-entry-combobox {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
}
#panelAttendanceEntry .att-entry-combobox__control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0 0.45rem 0 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b1528;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
#panelAttendanceEntry .att-entry-combobox--open .att-entry-combobox__control {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
#panelAttendanceEntry .att-entry-combobox__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f1f5f9;
  font-size: 0.88rem;
  font-family: inherit;
  padding: 0.35rem 0;
  outline: none;
}
#panelAttendanceEntry .att-entry-combobox__input::placeholder {
  color: #64748b;
}
#panelAttendanceEntry .att-entry-combobox__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}
#panelAttendanceEntry .att-entry-combobox__toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
#panelAttendanceEntry .att-entry-combobox--open .att-entry-combobox__toggle svg {
  transform: rotate(180deg);
}
#panelAttendanceEntry .att-entry-combobox__list {
  position: absolute;
  z-index: 501;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #101c2e;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
}
#panelAttendanceEntry .att-entry-combobox__list::-webkit-scrollbar { width: 6px; }
#panelAttendanceEntry .att-entry-combobox__list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
#panelAttendanceEntry .att-entry-combobox__empty {
  margin: 0;
  padding: 0.85rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
}
#panelAttendanceEntry .att-entry-combobox__option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
#panelAttendanceEntry .att-entry-combobox__option:last-child { border-bottom: none; }
#panelAttendanceEntry .att-entry-combobox__option:hover,
#panelAttendanceEntry .att-entry-combobox__option--highlight {
  background: rgba(37, 99, 235, 0.15);
}
#panelAttendanceEntry .att-entry-combobox__option--selected {
  background: rgba(37, 99, 235, 0.08);
}
#panelAttendanceEntry .att-entry-combobox__avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
}
#panelAttendanceEntry .att-entry-combobox__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
#panelAttendanceEntry .att-entry-combobox__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
}
#panelAttendanceEntry .att-entry-combobox__meta {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-entry-toolbar__hint { margin: 0 0 0.85rem; font-size: 0.88rem; }

.att-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
  position: relative;
  z-index: 0;
}
.att-entry-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.att-entry-aside {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: sticky;
  top: 0.5rem;
  align-self: start;
  max-height: calc(100dvh - 3.25rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  z-index: 2;
}
.att-entry-aside::-webkit-scrollbar { width: 5px; }
.att-entry-aside::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
#attEntryBody[hidden] { display: none !important; }

.att-entry-layout--placeholder .att-metric__value,
.att-entry-layout--placeholder .att-entry-hero__name--placeholder {
  color: #64748b;
}
.att-entry-hero__name--placeholder {
  font-size: 1.15rem;
  font-weight: 600;
}
.att-sidebar__initials--placeholder {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}
.att-sidebar__name--placeholder,
.att-sidebar__row--placeholder strong {
  color: #64748b;
  font-weight: 600;
}
.att-entry-correction--disabled {
  opacity: 0.72;
  pointer-events: none;
}
.att-entry-correction--disabled input,
.att-entry-correction--disabled button {
  cursor: not-allowed;
}

.att-entry-hero {
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #101c2e 0%, #111827 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.att-entry-hero__row { display: flex; flex-direction: column; gap: 0.5rem; }
.att-entry-hero__title-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.att-entry-hero__name { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
.att-entry-hero__meta { margin: 0; font-size: 0.9rem; }

.att-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.att-badge--active { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.35); }
.att-badge--inactive { background: rgba(148, 163, 184, 0.12); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.25); }

.att-entry-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.att-metric {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #101c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.att-metric__label { display: block; font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.35rem; }
.att-metric__value { font-size: 1.15rem; font-weight: 700; color: #f1f5f9; }
.att-metric--blue .att-metric__value { color: #60a5fa; }
.att-metric--indigo .att-metric__value { color: #818cf8; }
.att-metric--red .att-metric__value { color: #ef4444; }

.att-entry-filters {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #101c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.att-entry-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}
.att-entry-filters__presets { margin-top: 0.75rem; }
.att-entry-filters input[type="date"] {
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}

.att-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.att-entry-chart {
  padding: 1rem 1.15rem 1.15rem;
  border-radius: 16px;
  background: #101c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.att-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.att-chart-head .att-section-title { margin: 0; }
.att-chart-scale { font-size: 0.75rem; white-space: nowrap; }
.att-chart-empty { margin: 1.5rem 0 0.5rem; text-align: center; }
.att-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 132px;
  padding-top: 0.25rem;
  overflow-x: auto;
}
.att-chart-bar {
  flex: 1 0 28px;
  max-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  height: 120px;
}
.att-chart-bar--compact {
  flex-basis: 22px;
  max-width: 36px;
}
.att-chart-bar__track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}
.att-chart-bar__fill {
  display: block;
  width: 100%;
  max-width: 32px;
  border-radius: 6px 6px 2px 2px;
  background: #334155;
  transition: height 0.2s ease;
}
.att-chart-bar__fill--zero {
  height: 0 !important;
  min-height: 0;
  opacity: 0;
}
.att-chart-bar__fill--norm { background: linear-gradient(180deg, #4ade80, #22c55e); }
.att-chart-bar__fill--over { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.att-chart-bar__fill--under { background: linear-gradient(180deg, #fcd34d, #f59e0b); }
.att-chart-bar__fill--late { background: linear-gradient(180deg, #f87171, #ef4444); }
.att-chart-bar__fill--weekend { background: #475569; opacity: 0.65; }
.att-chart-bar__fill--empty { background: #334155; opacity: 0.35; }
.att-chart-bar__day { font-size: 0.65rem; color: #94a3b8; text-transform: lowercase; }

.att-entry-table-wrap {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #101c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}
.att-table { min-width: 860px; }
.att-table th { font-size: 0.75rem; color: #94a3b8; white-space: nowrap; }
.att-table td { vertical-align: middle; }
.att-row--empty td { opacity: 0.85; }

.att-status {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.att-status--norm { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.att-status--under { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.att-status--over { background: rgba(37, 99, 235, 0.15); color: #60a5fa; }
.att-status--late { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.att-status--weekend { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }
.att-status--empty { background: rgba(148, 163, 184, 0.08); color: #64748b; }
.att-status--review { background: rgba(249, 115, 22, 0.14); color: #f97316; }
.att-late { color: #ef4444; font-size: 0.82rem; font-weight: 600; }

.att-entry-sidebar {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #101c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.att-sidebar__head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.att-sidebar__photo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.att-sidebar__initials {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
}
.att-sidebar__name { display: block; font-size: 1rem; }
.att-sidebar__pos { margin: 0.15rem 0 0; font-size: 0.82rem; }
.att-sidebar__details { display: flex; flex-direction: column; gap: 0.5rem; }
.att-sidebar__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}
.att-sidebar__row strong { text-align: right; font-weight: 600; }

.att-entry-correction {
  padding: 0.85rem 0.95rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #111827 0%, #101c2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}
.att-entry-correction__head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.att-entry-correction__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
}
.att-entry-correction__icon svg { width: 18px; height: 18px; }
.att-entry-correction__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
}
.att-entry-correction__hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.att-entry-correction__fields {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.att-entry-correction__times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.field--stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field--stack span {
  font-size: 0.75rem;
  color: #94a3b8;
}
.field--stack input {
  width: 100%;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 17, 31, 0.65);
  color: #f1f5f9;
}
.field--stack input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.att-entry-correction__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.att-entry-correction__actions .btn {
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  min-height: 36px;
}

@media (max-width: 1100px) {
  .att-entry-layout { grid-template-columns: 1fr; }
  .att-entry-aside {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .att-entry-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .att-entry-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-entry-filters__row { flex-direction: column; align-items: stretch; }
  .att-entry-filters__row .btn { width: 100%; }
}

@media (max-width: 480px) {
  .att-entry-metrics { grid-template-columns: 1fr; }
}

.manual-shift {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.manual-shift-hint { margin: 0 0 0.65rem; font-size: 0.85rem; }

.manual-shift-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0.75rem;
}

@media (min-width: 640px) {
  .manual-shift-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.field--compact span { font-size: 0.75rem; }
.field--compact input { padding: 0.45rem 0.55rem; }
.field--wide { grid-column: 1 / -1; }

.manual-shift-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.shifts-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.shifts-table th,
.shifts-table td {
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.shifts-table th { color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.shifts-table .shift-actions { white-space: nowrap; }
.shifts-table__empty-day td {
  color: var(--muted, #9eb8e8);
}
.shifts-table__empty-day td:not(:first-child) {
  opacity: 0.35;
}

.schedule-deviations {
  grid-column: 1 / -1;
  padding: 0.85rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.schedule-deviations > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.live-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  50% { opacity: 0.45; }
}

.deviation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.deviation-item {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
}

.deviation-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.deviation-value {
  font-size: 1.15rem;
}

.deviation-item--under .deviation-value { color: #f87171; }
.deviation-item--over .deviation-value { color: #4ade80; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.panel-toolbar {
  margin-bottom: 0.75rem;
}
.panel-toolbar--employees {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.panel-toolbar--employees .panel-toolbar__search {
  flex: 1 1 260px;
  max-width: 480px;
  margin: 0;
}
.panel-toolbar--employees .employees-search-input {
  max-width: none;
  margin-top: 0.25rem;
}
.employees-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: filter 0.15s ease, transform 0.12s ease;
  flex-shrink: 0;
}
.employees-add-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.employees-add-btn:active {
  transform: translateY(0);
}
.emp-face-missing-banner {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.88rem;
}
.emp-face-ok {
  color: #86efac;
}
.emp-face-miss {
  color: #fca5a5;
  font-weight: 600;
}
.employees-add-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}
.panel-toolbar--departments {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.85rem;
}
.departments-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: filter 0.15s ease, transform 0.12s ease;
  flex-shrink: 0;
}
.departments-add-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.departments-add-btn:active {
  transform: translateY(0);
}
.departments-add-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}

.payroll-hub-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
.payroll-hub-action-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(37, 99, 235, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.payroll-hub-action-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.payroll-hub-action-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}
.payroll-hub-action-btn__icon svg {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
}
.payroll-hub-action-btn--issue {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}
.payroll-hub-action-btn--issue:hover {
  box-shadow:
    0 6px 18px rgba(37, 99, 235, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
body.workspace-hrm .payroll-hub-action-btn--issue {
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  border-color: rgba(196, 181, 253, 0.35);
}
body.workspace-hrm .payroll-hub-action-btn--issue:hover {
  box-shadow:
    0 6px 20px rgba(124, 58, 237, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.payroll-hub-action-btn--fine {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border-color: rgba(254, 202, 202, 0.28);
}
.payroll-hub-action-btn--fine:hover {
  box-shadow:
    0 6px 18px rgba(220, 38, 38, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
body.workspace-hrm .payroll-hub-action-btn--fine {
  background: linear-gradient(180deg, #f87171 0%, #e11d48 100%);
  border-color: rgba(254, 205, 211, 0.35);
}
body.workspace-hrm .payroll-hub-action-btn--fine:hover {
  box-shadow:
    0 6px 20px rgba(225, 29, 72, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.payroll-hub-action-btn--bonus {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  border-color: rgba(187, 247, 208, 0.28);
}
.payroll-hub-action-btn--bonus:hover {
  box-shadow:
    0 6px 18px rgba(22, 163, 74, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
body.workspace-hrm .payroll-hub-action-btn--bonus {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  border-color: rgba(167, 243, 208, 0.35);
}
body.workspace-hrm .payroll-hub-action-btn--bonus:hover {
  box-shadow:
    0 6px 20px rgba(5, 150, 105, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.shifts-add-btn {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border: 1px solid rgba(147, 197, 253, 0.32);
  box-shadow:
    0 4px 18px rgba(37, 99, 235, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.shifts-add-btn:hover {
  filter: brightness(1.07);
  box-shadow:
    0 6px 24px rgba(124, 58, 237, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.panel-toolbar--departments .btn-chip {
  padding: 0.46rem 0.82rem;
  border-radius: 10px;
}

.reg-emp-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 720px) {
  .reg-emp-grid {
    grid-template-columns: 1fr minmax(220px, 280px);
    align-items: start;
  }
}

.reg-emp-face__title {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.reg-face-camera {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  aspect-ratio: 4 / 3;
  max-height: 220px;
}

.reg-face-video,
.reg-face-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reg-face-video {
  transform: scaleX(-1);
}

.reg-face-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
}

.reg-face-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.reg-emp-face > .btn {
  margin-top: 0.35rem;
  width: 100%;
}

.register-success-dl {
  margin: 0.75rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
}

.register-success-dl dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.register-success-dl dd {
  margin: 0;
  font-weight: 600;
}

.register-success-hint {
  font-size: 0.85rem;
}

.register-success-hint a {
  color: var(--blue-light);
}

tr.row-highlight {
  animation: row-highlight 2.5s ease-out;
}

@keyframes row-highlight {
  0% { background: rgba(59, 130, 246, 0.35); }
  100% { background: transparent; }
}


.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.header h1 { margin: 0; font-size: 1.5rem; }

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

.field { display: block; margin-bottom: 0.75rem; }
.field span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
.field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.field textarea,
.field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.searchable-select {
  position: relative;
  width: 100%;
}
.searchable-select__control {
  position: relative;
  display: flex;
  align-items: center;
}
.searchable-select__input {
  width: 100%;
  padding: 0.6rem 2.25rem 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.searchable-select__input:hover {
  border-color: rgba(96, 165, 250, 0.45);
}
.searchable-select__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.searchable-select.is-open .searchable-select__input {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
body.workspace-hrm .searchable-select__input:focus,
body.workspace-hrm .searchable-select.is-open .searchable-select__input {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22);
}
.searchable-select__toggle {
  position: absolute;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.searchable-select__toggle:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}
.searchable-select__list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 14rem;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.12));
  background: var(--card-solid, #0f172a);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
.searchable-select__list--floating {
  right: auto;
  top: auto;
  margin: 0;
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong, rgba(148, 163, 184, 0.22));
  background: var(--card-solid, #0f172a);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(14px);
}
body.workspace-hrm .searchable-select__list--floating {
  border-color: var(--mod-hrm-border, rgba(167, 139, 250, 0.28));
  background: var(--card-solid, #0f172a);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(196, 181, 253, 0.08) inset;
}
.searchable-select__list::-webkit-scrollbar {
  width: 8px;
}
.searchable-select__list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
.searchable-select__list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}
.searchable-select__option,
.searchable-select__empty {
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  font-size: 0.95rem;
  cursor: default;
}
.searchable-select__option {
  cursor: pointer;
  color: var(--text);
}
.searchable-select__option:hover,
.searchable-select__option.is-highlighted {
  background: rgba(59, 130, 246, 0.14);
  color: var(--text);
}
body.workspace-hrm .searchable-select__option:hover,
body.workspace-hrm .searchable-select__option.is-highlighted {
  background: rgba(139, 92, 246, 0.16);
}
.searchable-select__option.is-selected {
  font-weight: 600;
}
.searchable-select__empty {
  color: var(--muted);
  text-align: center;
}

.field--inline input { min-width: 10rem; }

.filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.btn {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { filter: brightness(1.08); }

.archive-hint { margin: 0 0 1rem; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.dismiss-warn {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.75rem 0 1rem;
  line-height: 1.45;
}
.btn-chip { background: var(--bg); color: var(--text); border: 1px solid var(--border); padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.btn-chip:hover, .btn-primary:hover { filter: brightness(1.1); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.85rem; }

.btn-repay { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }

.payroll-summary strong { display: block; margin-top: 0.25rem; font-size: 1.1rem; }
.payroll-balance { color: #fbbf24; }
.payroll-balance--bonus { color: var(--green); }
.payroll-balance--fine { color: var(--red, #dc2626); }
.pay-breakdown { display: grid; gap: 8px; margin: 12px 0; }
.pay-breakdown > div { display: flex; justify-content: space-between; gap: 12px; }
.pay-breakdown dt { margin: 0; color: var(--muted); font-weight: 500; }
.pay-breakdown dd { margin: 0; font-weight: 700; }
.payroll-table__actions { white-space: nowrap; }
.payroll-paid { font-size: 12px; }
.payroll-period { font-size: 12px; white-space: nowrap; }
.payroll-period--paid { color: var(--violet-300, #c4b5fd); }
.field--check { display: flex; align-items: center; gap: 8px; }
.payroll-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; grid-column: 1 / -1; }

.payment-history-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 0.5rem 0 0.75rem;
}
.payment-history-totals p { margin: 0; }

.payroll-table-wrap { max-height: none; overflow: visible; margin: 0.75rem 0; }
/* Таблица зарплаты: высота с запасом под фильтры/KPI, скролл внутри таблицы.
   Нельзя ставить ~100dvh — блок уезжает за край экрана. Нельзя flex на .main-admin —
   ломает раскладку HRM (пустая середина, фильтры снизу). */
#panelPayroll .payroll-table-wrap--sticky,
#payrollContent .payroll-table-wrap--sticky {
  max-height: min(62vh, calc(100dvh - 20rem));
  overflow: auto !important;
  overscroll-behavior: contain;
  margin-top: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
#panelPayroll .payroll-table-wrap--sticky .report-table,
#payrollContent .payroll-table-wrap--sticky .report-table {
  border-collapse: separate;
  border-spacing: 0;
}
#panelPayroll .payroll-table-wrap--sticky .report-table thead th,
#payrollContent .payroll-table-wrap--sticky .report-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 0.42rem 0.65rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #9eb8e8;
  background: linear-gradient(180deg, #142a5a 0%, #0f1f42 100%);
  box-shadow: inset 0 -1px 0 rgba(124, 58, 237, 0.35), 0 1px 0 rgba(15, 23, 42, 0.25);
}
#panelPayroll .payroll-table-wrap--sticky .report-table tbody td,
#payrollContent .payroll-table-wrap--sticky .report-table tbody td {
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
  font-size: 0.84rem;
}

/* Compact payroll KPI strip */
#payrollContent .report-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
#payrollContent .report-summary-card {
  flex: 1 1 7.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  padding: 0.38rem 0.62rem;
  border-radius: 8px;
  border: 1px solid #2a4a82;
  background: rgba(10, 26, 58, 0.9);
}
#payrollContent .report-summary-card__label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8eabd8;
  line-height: 1.2;
}
#payrollContent .report-summary-card__value {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: #eef4ff;
}

.payroll-table__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; white-space: nowrap; }
.payroll-hub .reports-hub__intro { margin: 0; }

/* Compact period filters + payroll search */
.main-admin.main-admin--hrm > .hrm-main-column > .filters.card {
  padding: 0.6rem 0.85rem 0.55rem;
  margin-bottom: 0.65rem;
}
.main-admin.main-admin--hrm .filters__row {
  gap: 0.45rem 0.7rem;
  align-items: flex-end;
}
.main-admin.main-admin--hrm .filters .field {
  margin-bottom: 0;
}
.main-admin.main-admin--hrm .filters .field span {
  font-size: 0.7rem;
  margin-bottom: 0.12rem;
  line-height: 1.2;
}
.main-admin.main-admin--hrm .filters .field input {
  padding: 0.38rem 0.55rem;
  font-size: 0.84rem;
  min-height: 2rem;
  border-radius: 7px;
}
.main-admin.main-admin--hrm .filters .field--inline input {
  min-width: 8.5rem;
}
.main-admin.main-admin--hrm .filters .btn {
  padding: 0.38rem 0.8rem;
  font-size: 0.84rem;
  min-height: 2rem;
}
.main-admin.main-admin--hrm .filters .presets {
  margin-top: 0.4rem;
  gap: 0.3rem;
}
.main-admin.main-admin--hrm .filters .btn-chip {
  padding: 0.26rem 0.55rem;
  font-size: 0.76rem;
  border-radius: 7px;
}

.filters__payroll-search {
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: 28rem;
  margin-left: auto;
}
.filters__payroll-accrued {
  min-width: 10rem;
  gap: 0.15rem;
}
.filters__payroll-accrued strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--text, #0f172a);
  line-height: 1.2;
}
.filters__payroll-accrued-range {
  font-size: 0.75rem;
  display: block;
}
.filters__payroll-search .payroll-search-input {
  width: 100%;
  max-width: none;
  margin-top: 0.1rem;
  padding: 0.38rem 0.65rem 0.38rem 1.85rem;
  font-size: 0.84rem;
  min-height: 2rem;
  border-radius: 7px;
  background-size: 14px 14px;
  background-position: 0.5rem center;
}

#panelPayroll .payroll-hub {
  padding: 0.8rem 0.95rem;
}
#panelPayroll .reports-hub__head {
  margin-bottom: 0.4rem;
}
#panelPayroll .reports-hub__intro {
  font-size: 0.8rem;
  line-height: 1.35;
}

.payroll-search-input {
  width: 100%;
  max-width: 420px;
  margin-top: 0.25rem;
  padding: 0.55rem 0.75rem 0.55rem 2.15rem;
  border-radius: 10px;
  border: 1px solid #2d4f88;
  background-color: #0f2753;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8c4f0' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.65rem center;
  background-size: 16px 16px;
  color: #e8f0ff;
  font-size: 0.88rem;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.payroll-search-input::placeholder { color: #7a9fd4; }
.payroll-search-input:hover { border-color: #4d7fd0; }
.payroll-search-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.25);
}
.payroll-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8c4f0' stroke-width='2'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/contain no-repeat;
  cursor: pointer;
}
.payroll-form { margin: 0.75rem 0; padding: 0.75rem; background: var(--bg); border-radius: 8px; }
.payroll-form__label { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
.payroll-form__row { display: grid; grid-template-columns: 1fr 1.5fr; gap: 0.5rem; }
.payroll-form__row input {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}
.payroll-form__actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

.tx-issue { color: #f87171; }
.tx-repay { color: var(--green); }

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat__label { display: block; font-size: 0.8rem; color: var(--muted); }
.stat__value { font-size: 1.75rem; font-weight: 700; color: var(--green); }
.stat--clickable {
  padding: 0;
}
.stat__btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: block;
  border: 0;
  background: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: none;
  outline: none;
  font: inherit;
}
.stat--clickable:hover {
  border-color: var(--blue);
}
.stat__btn:focus-visible {
  box-shadow: inset 0 0 0 1px var(--blue);
}

.stats-list {
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--bg);
}
.stats-list ul {
  margin: 0;
  padding-left: 1.1rem;
}
.stats-list li {
  margin: 0.35rem 0;
}

.table-wrap { overflow-x: auto; }
.departments-wrap { padding: 0.9rem; overflow: hidden; }
.departments-board {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  min-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.55) rgba(6, 15, 38, 0.45);
}
.departments-board::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.departments-board::-webkit-scrollbar-track {
  background: rgba(6, 15, 38, 0.55);
  border-radius: 999px;
}
.departments-board::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.65), rgba(124, 58, 237, 0.55));
  border-radius: 999px;
  border: 2px solid rgba(6, 15, 38, 0.55);
  background-clip: padding-box;
}
.departments-board::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.85), rgba(124, 58, 237, 0.75));
  border-color: rgba(6, 15, 38, 0.45);
}
.departments-board::-webkit-scrollbar-corner {
  background: transparent;
}
.department-column {
  flex: 0 0 min(280px, 88vw);
  max-height: calc(100vh - 12rem);
  display: flex;
  flex-direction: column;
  border: 1px solid #2a4f8f;
  border-radius: 12px;
  background: rgba(6, 15, 38, 0.5);
}
.department-column__head {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid #213d71;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.5rem;
  align-items: center;
}
.department-column__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  grid-column: 1;
  grid-row: 1;
}
.department-column__count {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.78rem;
  color: var(--muted);
}
.department-column__time {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.78rem;
  color: #9ec5ff;
}
.department-column--shift .department-column__count {
  grid-row: 3;
}
.department-column--shift .department-column__head {
  grid-template-rows: auto auto auto;
}
.department-column__head .btn,
.department-column__edit {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 0.38rem 0.72rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--mod-hrm-text);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.22), rgba(109, 40, 217, 0.14));
  border: 1px solid var(--mod-hrm-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.department-column__head .btn:hover,
.department-column__edit:hover {
  color: #ede9fe;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.38), rgba(109, 40, 217, 0.26));
  border-color: rgba(196, 181, 253, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 18px rgba(124, 58, 237, 0.28);
  filter: none;
}
.department-column__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.5) rgba(6, 15, 38, 0.35);
}
.department-column__body::-webkit-scrollbar {
  width: 6px;
}
.department-column__body::-webkit-scrollbar-track {
  background: rgba(6, 15, 38, 0.35);
  border-radius: 999px;
}
.department-column__body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.55), rgba(124, 58, 237, 0.45));
  border-radius: 999px;
  border: 1px solid rgba(6, 15, 38, 0.35);
  background-clip: padding-box;
}
.department-column__body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.75), rgba(124, 58, 237, 0.65));
}
.department-column__empty {
  margin: 0.5rem 0.25rem;
  font-size: 0.82rem;
}
.department-employee {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #213d71;
  background: rgba(10, 29, 66, 0.85);
  color: #e8f2ff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.department-employee:hover {
  border-color: #4d7fd4;
  background: rgba(20, 45, 95, 0.95);
}
.department-employee--work {
  border-color: #57d073;
  box-shadow: 0 0 0 1px rgba(87, 208, 115, 0.25);
}
.department-employee__id {
  font-size: 0.72rem;
  color: #9eb8e8;
}
.department-employee__name {
  font-size: 0.88rem;
  font-weight: 600;
}
.department-employee__pos {
  font-size: 0.76rem;
  color: #a8bee8;
}
.department-card {
  border: 1px solid #213d71;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: rgba(6, 15, 38, 0.35);
}
.department-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}
.department-name {
  font-size: 1rem;
  font-weight: 700;
}
.department-count {
  color: var(--muted);
  font-size: 0.82rem;
}
.department-employees {
  margin: 0;
  padding-left: 1rem;
}
.department-employees li {
  margin: 0.2rem 0;
  color: #d8e7ff;
}

.shift-time-badge {
  color: #9ec5ff;
  font-size: 0.86rem;
  margin-top: 0.15rem;
}

.field--shift-employees {
  margin-bottom: 0;
}

.field--shift-employees > span {
  margin-bottom: 0.4rem;
}

.shift-employees-picker {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #213d71;
  border-radius: 10px;
  padding: 0.35rem 0;
  background: rgba(6, 15, 38, 0.35);
  display: flex;
  flex-direction: column;
}

.shift-employee-option {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: start;
  column-gap: 0.65rem;
  row-gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  color: #d8e7ff;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid rgba(33, 61, 113, 0.55);
  background: transparent;
  box-sizing: border-box;
}

.shift-employee-option:last-child {
  border-bottom: none;
}

.shift-employee-option:hover {
  background: rgba(58, 110, 194, 0.14);
}

.shift-employee-option input[type="checkbox"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
  min-width: 1.05rem !important;
  max-width: 1.05rem !important;
  margin: 0.15rem 0 0;
  padding: 0 !important;
  grid-column: 1;
  grid-row: 1 / span 2;
  accent-color: #3a6ec2;
  cursor: pointer;
}

.field--shift-employees .field input[type="checkbox"] {
  width: 1.05rem !important;
  max-width: 1.05rem !important;
}

.shift-employee-option__text {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  display: block;
}

.shift-employee-option__name {
  display: block;
  font-weight: 600;
  color: #e8f2ff;
}

.shift-employee-option__meta {
  display: block;
  font-size: 0.78rem;
  color: #9eb8e8;
  margin-top: 0.1rem;
}

.table--operations td:first-child {
  white-space: nowrap;
  width: 11rem;
  color: #9ec5ff;
}

.table--operations td:nth-child(2) {
  color: #e8f1ff;
}

.op-history-row--cancelled td {
  opacity: 0.55;
  text-decoration: line-through;
}

.op-history-row--cancelled td:last-child {
  text-decoration: none;
  opacity: 1;
}

.op-history-card {
  padding-top: 1rem;
}

.op-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.op-history-row--clickable {
  cursor: pointer;
}

.op-history-row--clickable:hover td {
  background: rgba(58, 110, 194, 0.12);
}

.op-history-posting {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.op-history-posting--posted {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.op-history-posting--cancelled {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.op-history-modal__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: #e8f1ff;
}

.op-history-modal__meta {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.op-history-modal__meta div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.op-history-modal__meta dt {
  margin: 0;
  color: #8faee8;
  font-size: 0.82rem;
}

.op-history-modal__meta dd {
  margin: 0;
  color: #e8f1ff;
  font-size: 0.92rem;
}

.chat-messenger {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  min-height: calc(100vh - 9.5rem);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(58, 110, 194, 0.28);
  background:
    linear-gradient(165deg, rgba(8, 18, 44, 0.96), rgba(4, 10, 28, 0.92));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.chat-messenger__sidebar {
  border-right: 1px solid rgba(58, 110, 194, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(10, 24, 56, 0.55), rgba(6, 14, 34, 0.35));
}

.chat-messenger__sidebar-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 1rem 1rem 0.65rem;
}

.chat-messenger__sidebar-head h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f0f6ff;
}

.chat-messenger__title-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
  flex-shrink: 0;
}

.chat-messenger__search {
  padding: 0 1rem 0.75rem;
  margin: 0;
}

.chat-messenger__search input {
  width: 100%;
  padding: 0.62rem 0.85rem 0.62rem 2.35rem;
  border-radius: 12px;
  border: 1px solid rgba(58, 110, 194, 0.32);
  background:
    rgba(4, 10, 26, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238fa8d8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E")
    no-repeat 0.75rem center;
  color: #eef4ff;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-messenger__search input:focus {
  outline: none;
  border-color: rgba(106, 158, 240, 0.65);
  box-shadow: 0 0 0 3px rgba(58, 110, 194, 0.2);
}

.chat-conversations {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.65rem 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(106, 158, 240, 0.45) transparent;
}

.chat-conversations__empty {
  padding: 1.25rem 0.65rem;
  margin: 0;
  text-align: center;
  font-size: 0.86rem;
}

.chat-messenger__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(99, 102, 241, 0.08), transparent 42%),
    radial-gradient(circle at 10% 100%, rgba(37, 99, 235, 0.07), transparent 38%),
    rgba(4, 10, 28, 0.35);
}

.chat-messenger__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.75rem;
  gap: 0.55rem;
}

.chat-messenger__empty-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 0.35rem;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.18));
  border: 1px solid rgba(106, 158, 240, 0.28);
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.16);
  position: relative;
}

.chat-messenger__empty-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.65rem;
  height: 1.35rem;
  border-radius: 0.55rem;
  border: 2px solid rgba(191, 219, 254, 0.85);
  box-shadow: inset 0 -0.35rem 0 rgba(191, 219, 254, 0.15);
}

.chat-messenger__empty-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.15rem;
  width: 0;
  height: 0;
  transform: translateX(-35%);
  border-left: 0.45rem solid transparent;
  border-right: 0.45rem solid transparent;
  border-top: 0.55rem solid rgba(191, 219, 254, 0.75);
}

.chat-messenger__empty h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #eef4ff;
}

.chat-messenger__empty p {
  max-width: 22rem;
  line-height: 1.5;
}

.chat-messenger__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-messenger__unread-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.chat-messenger__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.65rem;
}

.chat-filter {
  border: 1px solid rgba(58, 110, 194, 0.28);
  background: rgba(6, 15, 38, 0.55);
  color: #a8bee8;
  border-radius: 999px;
  padding: 0.32rem 0.78rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.chat-filter:hover {
  border-color: rgba(106, 158, 240, 0.45);
  color: #e8f1ff;
}

.chat-filter--active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(124, 58, 237, 0.45));
  color: #fff;
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.22);
}

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.48rem 0.82rem;
  border-radius: 10px;
  border: 1px solid rgba(58, 110, 194, 0.32);
  background: rgba(6, 15, 38, 0.72);
  color: #dbeafe;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-action-btn:hover {
  filter: brightness(1.08);
  border-color: rgba(106, 158, 240, 0.48);
  transform: translateY(-1px);
}

.chat-action-btn--accent {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-color: rgba(147, 197, 253, 0.35);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28);
}

.chat-action-btn--wide {
  margin: 0 1rem 0.65rem;
  width: calc(100% - 2rem);
  padding: 0.55rem 0.9rem;
  border-style: dashed;
  border-color: rgba(106, 158, 240, 0.35);
  background: rgba(8, 20, 48, 0.45);
  color: #c8daf8;
}

.chat-action-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
}

.chat-filter--todo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-thread__back {
  display: none;
  border: none;
  background: rgba(58, 110, 194, 0.2);
  color: #c8dcff;
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem;
  cursor: pointer;
  margin-right: 0.15rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .chat-messenger {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    min-height: 28rem;
  }
  .chat-messenger__sidebar {
    border-right: none;
    border-bottom: none;
    max-height: none;
  }
  .chat-messenger--thread .chat-messenger__sidebar {
    display: none;
  }
  .chat-messenger--thread .chat-messenger__main {
    grid-row: 1 / -1;
  }
  .chat-messenger:not(.chat-messenger--thread) .chat-messenger__main {
    display: none;
  }
  .chat-thread__back {
    display: inline-flex;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }

.table__total td { font-weight: 700; border-top: 2px solid var(--border); }

.hours { font-weight: 700; color: var(--green); white-space: nowrap; }

.row-detail td {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.5rem 0.75rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.row-detail ul { margin: 0; padding-left: 1.1rem; }
.row-detail li { margin: 0.2rem 0; }

.btn-toggle {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.85rem;
}

.err { color: #f87171; font-size: 0.9rem; }

.err--banner {
  display: block;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #f87171;
  border-radius: 8px;
}
.err--banner[hidden] {
  display: none !important;
}
.footer-links { text-align: center; margin-top: 2rem; font-size: 0.85rem; }
.footer-links a { color: var(--blue); }

.card--narrow { max-width: 360px; margin: 4rem auto; }

/* ——— Premium login ——— */
.login-screen {
  position: relative;
  z-index: 50;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  /* Opaque base so any non-hidden siblings never bleed through the glass login UI */
  background: var(--bg, #030712);
}

.login-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.14), transparent),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(6, 182, 212, 0.1), transparent),
    var(--bg);
}

.login-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: login-orb-drift 18s ease-in-out infinite alternate;
}

.login-orb--a {
  width: 420px;
  height: 420px;
  left: -8%;
  top: 10%;
  background: rgba(59, 130, 246, 0.35);
}

.login-orb--b {
  width: 360px;
  height: 360px;
  right: -5%;
  bottom: 15%;
  background: rgba(139, 92, 246, 0.28);
  animation-delay: -6s;
}

.login-orb--c {
  width: 280px;
  height: 280px;
  left: 40%;
  bottom: -5%;
  background: rgba(34, 211, 238, 0.18);
  animation-delay: -12s;
}

@keyframes login-orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -16px) scale(1.06); }
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 420px);
  gap: clamp(2rem, 5vw, 4rem);
  width: min(1080px, 100%);
  margin: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.login-brand {
  padding: 0.5rem 0;
  animation: login-fade-up 0.7s ease-out both;
}

.login-brand__logo-link {
  display: block;
  margin-bottom: 2rem;
  padding: 1.1rem 1.35rem;
  text-decoration: none;
  max-width: min(440px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(59, 130, 246, 0.06) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 56px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(59, 130, 246, 0.12);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.login-brand__logo-link:hover {
  border-color: rgba(147, 197, 253, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 28px 64px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(96, 165, 250, 0.2);
  transform: translateY(-2px);
}

.login-brand__logo {
  display: block;
  width: 100%;
  height: auto;
  min-height: 72px;
  max-height: clamp(120px, 15vw, 168px);
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 6px 28px rgba(59, 130, 246, 0.55))
    drop-shadow(0 0 48px rgba(139, 92, 246, 0.28))
    contrast(1.12)
    saturate(1.15);
}

.login-card__logo {
  display: none;
  width: 100%;
  max-width: 280px;
  height: auto;
  min-height: 56px;
  max-height: 80px;
  margin: 0 auto 1.35rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  object-fit: contain;
  filter:
    drop-shadow(0 4px 20px rgba(59, 130, 246, 0.45))
    contrast(1.1)
    saturate(1.12);
}

.login-brand__tagline {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #f8fafc;
}

.login-brand__lead {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.login-brand__features {
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-brand__features li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.login-brand__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

.login-brand__copy {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.login-card {
  position: relative;
  padding: 2rem 2rem 1.75rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(59, 130, 246, 0.08);
  animation: login-fade-up 0.7s ease-out 0.1s both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 40%, rgba(139, 92, 246, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-card__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.login-card__top .lang-switch--inline {
  justify-content: flex-end;
}

.login-card__top .lang-btn {
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.login-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.login-card__subtitle {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.login-field {
  display: block;
}

.login-field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.login-field__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 7, 18, 0.65);
  color: #f8fafc;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-field__input::placeholder {
  color: #64748b;
}

.login-field__input:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.login-field__input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(3, 7, 18, 0.85);
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  background-size: 200% 200%;
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, background-position 0.35s;
}

.login-submit:hover {
  background-position: 100% 0;
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
}

.login-reset {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
}

.login-reset:hover {
  color: #94a3b8;
}

.login-err {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.login-err[hidden] {
  display: none !important;
}

.login-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-card__footer-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.login-register {
  font-size: 0.88rem;
  font-weight: 600;
  color: #93c5fd;
  text-decoration: none;
  transition: color 0.2s;
}

.login-register:hover {
  color: #c4b5fd;
}

.login-lang {
  margin: 0;
}

@keyframes login-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .login-brand {
    text-align: center;
  }

  .login-brand__logo-link {
    margin-left: auto;
    margin-right: auto;
  }

  .login-brand__logo-link {
    padding: 1rem 1.15rem;
  }

  .login-brand__logo {
    object-position: center;
    max-height: 120px;
    min-height: 64px;
  }

  .login-card__logo {
    display: block;
    max-height: 72px;
  }

  .login-brand__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .login-brand__features {
    align-items: center;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .login-brand__copy {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1.25rem 1.35rem;
    border-radius: 20px;
  }

  .login-brand__logo-link {
    max-width: 100%;
  }

  .login-brand__logo {
    max-height: 100px;
    min-height: 56px;
  }

  .login-card__logo {
    max-height: 64px;
    min-height: 48px;
  }
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nav-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.nav-tab--active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.panel[hidden] { display: none; }

.link-name {
  display: inline-block;
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  text-wrap: pretty;
  max-width: 100%;
  vertical-align: baseline;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--green { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.badge--ok { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.badge--off { background: rgba(148, 163, 184, 0.15); color: var(--muted); }
.badge--rating { background: rgba(251, 191, 36, 0.18); color: #fcd34d; }

.row-inactive { opacity: 0.55; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal__box {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal__box:has(.searchable-select.is-open) {
  overflow: visible;
}

.modal__box--wide {
  max-width: 580px;
}

.modal__box--employee {
  display: flex;
  flex-direction: column;
  max-width: min(1180px, calc(100vw - 1.5rem));
  width: 100%;
  max-height: min(92vh, 960px);
  overflow: hidden;
  padding: 1.15rem 1.35rem 0.9rem;
}

.modal__box--employee.is-pay {
  height: min(92vh, 960px);
}

.modal__box--employee .field > span {
  font-size: 0.94rem;
}

.modal__box--employee .field input,
.modal__box--employee .field select {
  padding: 0.54rem 0.66rem;
  font-size: 1.08rem;
}

.emp-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem 1.2rem;
}

.emp-card-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  align-content: start;
}

.emp-card-col .field--span2,
.emp-card-col .schedule-field,
.emp-card-col .schedule-deviations,
.emp-card-col .emp-card-metrics {
  grid-column: 1 / -1;
}

.emp-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.emp-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.78rem 1.02rem;
  align-items: center;
  margin-bottom: 0.78rem;
  padding-bottom: 0.78rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.emp-card-head__main h2 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.25;
}

.emp-card-head__active {
  margin: 0.3rem 0 0;
  grid-column: unset;
}

.emp-card-head__photo-btn {
  align-self: start;
  margin-top: 0;
}

.emp-card-head__create-face {
  min-width: 140px;
  max-width: 200px;
}

.reg-face-camera--head {
  max-height: 160px;
  aspect-ratio: 1;
}

.emp-create-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 42rem;
}

.emp-card-head--create {
  grid-template-columns: minmax(140px, 200px) 1fr;
}

.emp-card-head--create .emp-card-head__photo-btn {
  display: none;
}

.modal__box--employee .err {
  flex-shrink: 0;
}

.emp-card-actions {
  margin-top: 0.78rem;
  padding-top: 0.78rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.emp-card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal__box--employee.is-pay .emp-card-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.emp-card-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.78rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.emp-card-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.98rem;
  padding: 0.45rem 0.75rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.emp-card-tab:hover {
  color: var(--text);
}

.emp-card-tab--active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

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

.emp-card-panel[data-emp-panel="pay"]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.emp-pay-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.35fr);
  gap: 1rem 1.2rem;
  min-height: 0;
  flex: 1 1 auto;
}

.emp-pay-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.emp-pay-lead {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.emp-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.emp-pay-title {
  margin: 0.35rem 0 0.45rem;
  font-size: 1rem;
}

.emp-pay-title--first {
  margin-top: 0;
}

.emp-pay-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.emp-pay-add select {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.emp-pay-add input {
  width: 5.5rem;
}

.emp-pay-period {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.7rem;
  margin-bottom: 0.45rem;
}

.emp-pay-period .field {
  margin: 0;
}

.emp-pay-period .field--inline input {
  min-width: 9.5rem;
}

.emp-pay-rates-wrap,
.emp-pay-items-wrap {
  flex: 1 1 auto;
  min-height: 140px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.emp-pay-items-wrap table {
  font-size: 0.92rem;
}

.emp-pay-totals {
  flex-shrink: 0;
  display: grid;
  gap: 0.25rem 1rem;
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
}

.emp-pay-totals__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
}

.emp-pay-totals__row strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
}

.emp-pay-totals__row--commission {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

.emp-pay-totals__row--commission strong {
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .emp-pay-layout {
    grid-template-columns: 1fr;
  }

  .emp-pay-grid {
    grid-template-columns: 1fr;
  }

  .emp-pay-col--rates {
    max-height: none;
  }

  .emp-pay-rates-wrap {
    max-height: 220px;
    flex: 0 0 auto;
  }

  .emp-pay-items-wrap {
    min-height: 240px;
  }
}

.emp-docs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.emp-docs-toolbar__type {
  flex: 1 1 220px;
  min-width: 180px;
  margin: 0;
}

.emp-docs-toolbar__file {
  margin: 0;
}

.emp-docs-toolbar__picked {
  flex: 1 1 160px;
  font-size: 0.92rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
}

.emp-docs-table-wrap {
  max-height: 320px;
  overflow: auto;
}

.table--emp-docs td:last-child,
.table--emp-docs th:last-child {
  width: 1%;
  white-space: nowrap;
}

.emp-doc-actions {
  display: flex;
  gap: 0.35rem;
}

.payroll-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.schedule-deviations--compact {
  padding: 0.66rem 0.78rem;
}

.schedule-deviations--compact > span {
  margin-bottom: 0.54rem;
}

.deviation-grid--row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.54rem;
}

.deviation-grid--row .deviation-item {
  padding: 0.48rem 0.6rem;
}

.deviation-grid--row .deviation-value {
  font-size: 1.1rem;
}

@media (max-width: 1032px) {
  .emp-card-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .emp-card-col,
  .emp-card-metrics,
  .deviation-grid--row {
    grid-template-columns: 1fr 1fr;
  }

  .emp-card-head {
    grid-template-columns: auto 1fr;
  }

  .emp-card-head__photo-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.modal__box--employee .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .modal__box--employee .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .modal__box--employee .form-grid {
    grid-template-columns: 1fr;
  }
}

.emp-photo {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  cursor: zoom-in;
}

.emp-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  background: var(--bg);
  object-fit: unset;
}

.emp-photo--empty[hidden] {
  display: none;
}

.btn-upload {
  display: inline-block;
  margin-top: 0.5rem;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field--check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.field--check input { width: auto; }

.readonly { opacity: 0.85; }

.shifts-list {
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.9rem;
}

.shifts-list ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.shifts-title { margin: 0 0 0.5rem; font-size: 0.95rem; }

.modal__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.photo-thumb-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.employee-thumb-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: block;
}

.photo-viewer {
  max-width: min(92vw, 980px);
}

.photo-viewer__img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1018;
  margin-bottom: 0.75rem;
}

.btn-block { width: 100%; }

.save-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 0.85rem 1.25rem;
  background: #166534;
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

@media (max-width: 600px) {
  .filters__row { flex-direction: column; align-items: stretch; }
  .field--inline input { width: 100%; }
}

/* Admin approved shell */
.workspace-admin.screen {
  max-width: none;
  margin: 0;
  padding: var(--platform-topnav-h, 62px) 0 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(37, 99, 235, 0.22), transparent 60%),
    radial-gradient(700px 420px at 12% 100%, rgba(139, 92, 246, 0.12), transparent 55%),
    linear-gradient(180deg, #070B16 0%, #0B1020 45%, #0E172A 100%);
}

/* Top navigation — shared layout: /shared/platform-topnav.css */

.workspace-admin.screen[hidden] {
  display: none !important;
}

.sidebar-admin {
  background: linear-gradient(180deg, rgba(7, 11, 22, 0.98), rgba(11, 16, 32, 0.98));
  border-right: 1px solid var(--border);
  padding: 1rem 0.85rem 1.2rem;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-admin__brand--text .sidebar-admin__logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.sidebar-admin__mark {
  flex-shrink: 0;
  display: inline-flex;
  filter: drop-shadow(0 4px 14px rgba(59, 130, 246, 0.35));
}

.sidebar-admin__wordmark {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.sidebar-admin__name {
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}

.sidebar-admin__tag {
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.25;
}

.sidebar-admin__nav {
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-admin__brand {
  margin-bottom: 1.15rem;
  padding: 0.55rem 0.5rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(122, 160, 230, 0.18);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.sidebar-admin__logo-link {
  display: block;
  text-decoration: none;
}

.sidebar-admin__logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 36px;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 2px 12px rgba(59, 130, 246, 0.4))
    contrast(1.1)
    saturate(1.1);
}

.sidebar-admin__nav {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-size: 0.92rem;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding-right: 0.35rem;
}

.sidebar-admin__nav > .sidebar-sub-card {
  margin-top: auto;
  flex-shrink: 0;
}

.nav-section-title {
  color: var(--muted-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.55rem 0.15rem;
  margin: 0.15rem 0 0;
}

.nav-group {
  display: grid;
  gap: 0.28rem;
}

.nav-group-toggle {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #d5e3ff;
  font-size: inherit;
  font-weight: 600;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.46rem;
  line-height: 1.15;
  opacity: 0.95;
}

.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(58, 110, 194, 0.35);
}

.nav-group-chevron {
  width: 14px;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.72rem;
  opacity: 0.9;
  transition: transform 0.18s ease;
}

.nav-group.nav-group--open .nav-group-chevron {
  transform: rotate(90deg);
}

.nav-group-items {
  display: grid;
  gap: 0.28rem;
  padding-left: 0.15rem;
}

.nav-group-items[hidden] {
  display: none !important;
}

.nav-tab.nav-sub {
  margin-left: 0.35rem;
  padding-left: 1.15rem;
  font-size: inherit;
  font-weight: inherit;
}

.hrm-sidebar .hrm-nav__btn.nav-tab,
.hrm-sidebar__back.nav-tab {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #d5e3ff;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
  display: flex;
  align-items: center;
  gap: 0.46rem;
  line-height: 1.15;
}

.hrm-sidebar .nav-ico {
  width: 16px;
  text-align: center;
  opacity: 0.95;
  font-size: 0.82rem;
}

.nav-tab--soon { opacity: 0.78; }
.nav-tab--soon:hover { filter: none; }

.main-admin {
  padding: 1rem 1.1rem 1.6rem;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
}

.main-admin .header {
  margin-bottom: 0.9rem;
}

.main-admin .card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border-color: var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}
.card-btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.card-btn:hover {
  border-color: #3d67aa;
}
.requests-mini {
  padding: 0.72rem 0.82rem;
}
.requests-mini .section-title {
  margin-bottom: 0.1rem;
  font-size: 0.98rem;
}
.requests-mini__item {
  margin-top: 0.42rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.42rem 0.52rem;
  border-radius: 9px;
  border: 1px solid #24457f;
  background: #0a1d42;
}
.requests-mini__item strong { font-size: 0.92rem; }
.requests-mini__item .muted { margin-top: 0.12rem; font-size: 0.78rem; }
.requests-mini__pct { color: #d2e0ff; font-size: 0.82rem; font-weight: 600; }
.requests-mini__bar {
  margin-top: 0.26rem;
  height: 4px;
  border-radius: 8px;
  background: #182f5b;
  overflow: hidden;
}
.requests-mini__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4a8fff, #73bbff);
}
.requests-mini__link {
  margin-top: 0.56rem;
  border: 0;
  background: transparent;
  color: #8eb2ff;
  font-weight: 650;
  padding: 0;
  cursor: pointer;
  font-size: 0.9rem;
}
.shifts-mini {
  padding: 0.72rem 0.82rem;
}
.shifts-mini .section-title {
  margin-bottom: 0.1rem;
  font-size: 0.98rem;
}
.shifts-mini__item {
  margin-top: 0.42rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 0.55rem;
  padding: 0.42rem 0.52rem;
  border-radius: 9px;
  border: 1px solid #24457f;
  background: #0a1d42;
}
.shifts-mini__item strong { font-size: 0.92rem; }
.shifts-mini__item .muted { margin-top: 0.12rem; font-size: 0.78rem; }
.shifts-mini__meta { color: #a8bee8; font-size: 0.8rem; }
.shifts-mini__pct { color: #d2e0ff; font-size: 0.82rem; font-weight: 600; }
.shifts-mini__bar {
  margin-top: 0.26rem;
  height: 4px;
  border-radius: 8px;
  background: #182f5b;
  overflow: hidden;
}
.shifts-mini__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4a8fff, #73bbff);
}
.shifts-mini__link {
  margin-top: 0.56rem;
  border: 0;
  background: transparent;
  color: #8eb2ff;
  font-weight: 650;
  padding: 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.main-admin .filters .field input {
  background: linear-gradient(180deg, #0f2753, #0b1f45);
  border-color: #2d4f88;
  color: #e8f0ff;
}

.main-admin .filters .field input:focus {
  outline: none;
  border-color: #4d7fd0;
  box-shadow: 0 0 0 1px rgba(77, 127, 208, 0.25);
}

.main-admin .filters .btn-chip {
  background: linear-gradient(180deg, #12305f, #0d2348);
  border-color: #2b4f88;
  color: #e7f0ff;
}

.main-admin .filters .btn-chip:hover {
  filter: brightness(1.08);
}

.main-admin .table th,
.main-admin .table td {
  border-bottom-color: #213d71;
  padding-top: 0.68rem;
  padding-bottom: 0.68rem;
}

.main-admin .table th {
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.main-admin .table td {
  font-size: 0.88rem;
}

.main-admin .table .btn-sm {
  background: linear-gradient(180deg, #12305f, #0d2348);
  border: 1px solid #2e538f;
  color: #e7f0ff;
  border-radius: 8px;
}

.main-admin .table .btn-sm:hover {
  filter: brightness(1.08);
}

.main-admin .stat__value { font-size: 1.8rem; }
.main-admin .summary .card {
  min-height: 132px;
}
.main-admin .summary .stat__sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
  display: block;
}

.kpi-ico {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.28rem;
  font-size: 0.66rem;
  vertical-align: middle;
}
.kpi-ico--g { background: rgba(87, 208, 115, 0.18); color: #57d073; }
.kpi-ico--b { background: rgba(76, 163, 255, 0.18); color: #7ebbff; }
.kpi-ico--r { background: rgba(255, 95, 122, 0.18); color: #ff8298; }
.kpi-ico--o { background: rgba(243, 169, 83, 0.18); color: #f3a953; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-grid-2, .dash-grid-3, .dash-grid-4 {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dash-grid-2 { grid-template-columns: 1.2fr 1fr; }
.dash-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-grid-4 { grid-template-columns: repeat(4, 1fr); }
.dash-grid-2 > .card { min-height: 250px; }
.dash-grid-4 > .card { min-height: 150px; }
.dash-grid-3 > .card { min-height: 164px; }
.mini-lower-card {
  padding: 0.78rem 0.86rem;
}
.mini-lower-card .section-title {
  font-size: 0.98rem;
  margin-bottom: 0.34rem;
}
.mini-lower-card .muted {
  font-size: 0.81rem;
}

.bars-chart__row {
  height: 120px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  align-items: end;
}
.bars-chart__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2.5rem 0;
  text-align: center;
}
.bars-chart__legend {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.28rem;
}
.bar-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 100%;
  min-height: 104px;
}
.bar-g,
.bar-b {
  width: 14px;
  border-radius: 6px 6px 0 0;
  display: block;
  min-height: 0;
}
.bar-g { background: linear-gradient(180deg, #57d073, #3ca95d); }
.bar-b { background: linear-gradient(180deg, #76b4ff, #4f8fff); }
.bars-chart__row > span {
  min-height: 8px;
}
.bars-chart__labels {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.donut-wrap { display: flex; align-items: center; gap: 1rem; }
.donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(#57d073 0 45%, #ff5f7a 45% 66%, #f3a953 66% 86%, #7ea3ff 86% 100%);
  position: relative;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: #0e2044;
}
.donut-legend { display: grid; gap: 0.25rem; font-size: 0.82rem; }
.donut-legend div { display: grid; grid-template-columns: 12px 1fr auto; gap: 0.35rem; align-items: center; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg--g { background:#57d073; } .lg--r { background:#ff5f7a; } .lg--o { background:#f3a953; } .lg--b { background:#7ea3ff; }

.kpi-money { font-size: 1.7rem; font-weight: 700; color: #57d073; margin: 0.2rem 0 0; }
.kpi-money--violet { color: #c18bff; }
.kpi-money--red { color: #ff8d9b; }
.kpi-delta {
  margin-top: 0.22rem;
  font-size: 0.82rem;
}
.kpi-delta--up { color: #57d073; }
.kpi-delta--down { color: #ff8d9b; }

@media (max-width: 1200px) {
  .dash-grid-4 { grid-template-columns: 1fr 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
}

.ai-hrm-card {
  padding: 0;
  overflow: hidden;
  min-height: calc(100vh - 9rem);
}

.ai-hrm-hint {
  padding: 0.65rem 1rem 1rem;
  text-align: center;
  margin: 0;
}

.ai-hrm-scene {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.25rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(58, 110, 194, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(6, 15, 38, 0.2), rgba(4, 12, 32, 0.55));
  overflow: hidden;
}

.ai-hrm-col {
  min-width: 0;
  max-height: calc(100vh - 12rem);
  display: flex;
  flex-direction: column;
}

.ai-hrm-col--left,
.ai-hrm-col--right {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.ai-hrm-scene--results .ai-hrm-col--left,
.ai-hrm-scene--results .ai-hrm-col--right {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ai-hrm-col--center {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.ai-hrm-col__heading {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #c5d9ff;
}

.ai-hrm-col--left .ai-hrm-col__heading {
  text-align: left;
  color: #f0a8b0;
}

.ai-hrm-col--right .ai-hrm-col__heading {
  text-align: right;
  color: #9ee0b0;
}

.ai-hrm-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  max-height: calc(100vh - 14rem);
  scrollbar-width: thin;
}

.ai-hrm-item {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  border: 1px solid #3a6ec2;
  background: rgba(10, 29, 66, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.ai-hrm-item--left {
  text-align: left;
  color: #e8f2ff;
  animation: ai-item-from-left 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.ai-hrm-item--right {
  text-align: right;
  color: #d4e6ff;
  animation: ai-item-from-right 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.ai-hrm-item--high {
  border-color: #e85d6a;
  box-shadow: 0 0 0 1px rgba(232, 93, 106, 0.2), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.ai-hrm-item--low {
  border-color: #57d073;
}

.ai-hrm-hub {
  position: relative;
  z-index: 3;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid #4d7fd4;
  background: radial-gradient(circle at 35% 30%, #2a5cb5, #0f2558 70%);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0 0 0 rgba(77, 127, 212, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-hrm-hub:hover {
  transform: scale(1.03);
}

.ai-hrm-hub--active {
  animation: ai-hub-pulse 1.4s ease-in-out infinite;
}

.ai-hrm-hub__ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(125, 175, 255, 0.35);
  opacity: 0;
}

.ai-hrm-hub--active .ai-hrm-hub__ring {
  animation: ai-ring-pulse 1.4s ease-out infinite;
}

.ai-hrm-hub__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.ai-hrm-hub__subtitle {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.92;
}

.ai-hrm-hub__status {
  margin-top: 0.35rem;
  min-height: 2.4em;
  max-width: 170px;
  font-size: 0.68rem;
  line-height: 1.25;
  color: #c5d9ff;
  opacity: 0.95;
}

@keyframes ai-hub-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(77, 127, 212, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(77, 127, 212, 0);
    transform: scale(1.04);
  }
}

@keyframes ai-ring-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes ai-item-from-left {
  0% {
    opacity: 0;
    transform: translateX(28px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes ai-item-from-right {
  0% {
    opacity: 0;
    transform: translateX(-28px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 900px) {
  .ai-hrm-scene {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem;
    padding: 1rem;
  }
  .ai-hrm-col--center {
    order: -1;
  }
  .ai-hrm-col--right .ai-hrm-col__heading,
  .ai-hrm-item--right {
    text-align: left;
  }
  .ai-hrm-col__list {
    max-height: 220px;
  }
}

@media (max-width: 700px) {
  .ai-hrm-scene {
    min-height: 420px;
  }
  .ai-hrm-hub {
    width: 180px;
    height: 180px;
  }
}

.emp-ai-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-chip--ai {
  border-color: #6b9fff;
  color: #d4e6ff;
}

.emp-ai-notes {
  grid-column: 1 / -1;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 93, 106, 0.45);
  background: rgba(232, 93, 106, 0.08);
}

.emp-ai-notes__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #f0a8b0;
}

.emp-ai-notes__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dossier-modal__hint {
  margin-top: 0;
}

.dossier-list {
  max-height: 55vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}

.dossier-entry {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #2f4f8a;
  background: rgba(8, 22, 52, 0.65);
}

.dossier-entry__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.dossier-entry__type {
  font-weight: 700;
  color: #9ec5ff;
}

.dossier-entry h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.dossier-entry p {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.ai-analysis-result {
  margin: 1rem 0 0;
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(8, 22, 52, 0.75);
  border: 1px solid #3a6ec2;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 50vh;
  overflow-y: auto;
}

.chat-messenger__thread-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(58, 110, 194, 0.22);
  background: rgba(8, 20, 48, 0.55);
  backdrop-filter: blur(8px);
}

.chat-thread__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(90, 157, 255, 0.45);
  flex-shrink: 0;
}

.chat-thread__avatar--ph {
  display: grid;
  place-items: center;
  background: rgba(12, 32, 72, 0.95);
  color: #9eb8e8;
  font-weight: 700;
  font-size: 1rem;
}

.chat-thread__info {
  min-width: 0;
}

.chat-messenger__thread-head h3 {
  margin: 0;
  font-size: 1rem;
}

.chat-thread__id {
  display: block;
  font-size: 0.8rem;
  color: #9eb8e8;
  margin-top: 0.1rem;
}

.chat-messenger__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(58, 110, 194, 0.08), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(90, 157, 255, 0.06), transparent 40%);
}

.chat-messages__empty {
  margin: auto;
  text-align: center;
}

.chat-conv {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  padding: 0.62rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.chat-conv:hover {
  background: rgba(58, 110, 194, 0.12);
  border-color: rgba(58, 110, 194, 0.18);
}

.chat-conv--active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(124, 58, 237, 0.12));
  border-color: rgba(106, 158, 240, 0.35);
  box-shadow: inset 3px 0 0 #60a5fa;
}

.chat-conv__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.chat-conv__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(90, 157, 255, 0.25);
  flex-shrink: 0;
}

.chat-conv__avatar--ph {
  display: grid;
  place-items: center;
  background: rgba(12, 32, 72, 0.95);
  color: #9eb8e8;
  font-weight: 700;
  font-size: 0.95rem;
}

.chat-conv__online,
.chat-conv__offline {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(6, 15, 38, 0.9);
}

.chat-conv__online {
  background: #3dd68c;
}

.chat-conv__offline {
  background: #6b7f9e;
}

.chat-conv__main {
  flex: 1;
  min-width: 0;
}

.chat-conv__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-conv strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv__role {
  display: block;
  font-size: 0.72rem;
  color: #8fa7d0;
  margin-top: 0.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.chat-conv__preview {
  font-size: 0.78rem;
  color: #a8bee8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.chat-conv__time {
  font-size: 0.7rem;
  color: #7a94c4;
  flex-shrink: 0;
}

.chat-conv__badge {
  flex-shrink: 0;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #3d8cff;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-date-sep {
  display: flex;
  justify-content: center;
  margin: 0.55rem 0;
}

.chat-date-sep span {
  font-size: 0.72rem;
  color: #9eb8e8;
  background: rgba(12, 32, 72, 0.75);
  border: 1px solid rgba(58, 110, 194, 0.25);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
}

.chat-bubble-row {
  display: flex;
  width: 100%;
}

.chat-bubble-row--out {
  justify-content: flex-end;
}

.chat-bubble-row--in {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(78%, 28rem);
  padding: 0.38rem 0.55rem 0.3rem;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.35;
  position: relative;
}

.chat-bubble--out {
  background: linear-gradient(135deg, rgba(45, 95, 180, 0.95), rgba(58, 110, 194, 0.85));
  border-bottom-right-radius: 4px;
  color: #f0f6ff;
}

.chat-bubble--in {
  background: rgba(12, 32, 72, 0.92);
  border: 1px solid rgba(47, 79, 138, 0.65);
  border-bottom-left-radius: 4px;
  color: #e8f1ff;
}

.chat-bubble__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.chat-bubble__footer time {
  font-size: 0.66rem;
  opacity: 0.75;
}

.chat-bubble__ticks {
  font-size: 0.68rem;
  opacity: 0.8;
  letter-spacing: -0.12em;
}

.chat-bubble__ticks--read {
  color: #7ec8ff;
  opacity: 1;
}

.chat-typing {
  padding: 0.15rem 1rem 0.35rem;
  font-size: 0.78rem;
  color: #8fa7d0;
  font-style: italic;
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid rgba(58, 110, 194, 0.22);
  background: rgba(6, 15, 38, 0.78);
  backdrop-filter: blur(10px);
}

.chat-composer__attach-wrap {
  position: relative;
  flex-shrink: 0;
}

.chat-composer__btn {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(58, 110, 194, 0.22);
  border-radius: 50%;
  background: rgba(8, 20, 48, 0.85);
  color: #c8dcff;
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.chat-composer__btn:hover:not(:disabled) {
  background: rgba(58, 110, 194, 0.28);
  border-color: rgba(106, 158, 240, 0.45);
  transform: translateY(-1px);
}

.chat-composer__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.chat-composer__send {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-color: rgba(147, 197, 253, 0.35);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.chat-composer__send:hover:not(:disabled) {
  filter: brightness(1.06);
}

.chat-composer__mic {
  font-size: 0.9rem;
}

.chat-composer__emoji-wrap {
  position: relative;
  flex-shrink: 0;
}

.chat-composer__emoji {
  font-size: 1.1rem;
}

.chat-emoji-picker {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  width: min(18.5rem, calc(100vw - 2rem));
  padding: 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(58, 110, 194, 0.45);
  background: #0a1f47;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.chat-emoji-picker__grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.15rem;
  max-height: 11rem;
  overflow-y: auto;
}

.chat-emoji-picker__item {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.3rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.chat-emoji-picker__item:hover {
  background: rgba(58, 110, 194, 0.28);
}

.chat-composer__input {
  flex: 1;
  min-height: 2.35rem;
  max-height: 7.5rem;
  resize: none;
  border: 1px solid rgba(58, 110, 194, 0.32);
  border-radius: 1.15rem;
  padding: 0.58rem 0.95rem;
  background: rgba(4, 10, 26, 0.72);
  color: inherit;
  font: inherit;
  line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-composer__input:focus {
  outline: none;
  border-color: rgba(106, 158, 240, 0.6);
  box-shadow: 0 0 0 3px rgba(58, 110, 194, 0.18);
}

.chat-attach-menu {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 0;
  min-width: 9rem;
  background: rgba(10, 24, 56, 0.98);
  border: 1px solid rgba(58, 110, 194, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 5;
}

.chat-attach-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.84rem;
}

.chat-attach-menu button:hover {
  background: rgba(58, 110, 194, 0.22);
}

.chat-messenger__sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

@media (min-width: 1100px) {
  .chat-messenger__sidebar-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .chat-messenger__sidebar-actions {
    grid-template-columns: auto auto;
    flex-shrink: 0;
  }
}

.chat-messenger__standard-groups {
  margin: 0 1rem 0.65rem;
  width: calc(100% - 2rem);
}

.chat-conv__avatar--group {
  display: grid;
  place-items: center;
  background: rgba(58, 110, 194, 0.25);
  font-size: 1.25rem;
}

.chat-thread__group-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(58, 110, 194, 0.25);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.chat-thread__member-avatars {
  display: flex;
  gap: 0.2rem;
  margin-top: 0.25rem;
}

.chat-thread__member-avatars img,
.chat-thread__member-avatars span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 0.65rem;
  display: grid;
  place-items: center;
  background: rgba(12, 32, 72, 0.9);
  border: 1px solid rgba(90, 157, 255, 0.35);
}

.chat-thread__actions {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chat-system-msg {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0;
}

.chat-system-msg span {
  font-size: 0.72rem;
  color: #8fa7d0;
  background: rgba(12, 32, 72, 0.55);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  text-align: center;
}

.chat-bubble-row--group {
  align-items: flex-end;
  gap: 0.35rem;
}

.chat-bubble__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-bubble__avatar--ph {
  display: grid;
  place-items: center;
  background: rgba(12, 32, 72, 0.9);
  font-size: 0.7rem;
  color: #9eb8e8;
}

.chat-bubble__sender {
  font-size: 0.72rem;
  color: #7ec8ff;
  margin-bottom: 0.1rem;
}

.chat-group-modal__head,
.chat-group-info__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-group-modal__steps {
  display: flex;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.chat-group-modal__step {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  background: rgba(58, 110, 194, 0.2);
  color: #9eb8e8;
}

.chat-group-modal__step--active {
  background: #3d8cff;
  color: #fff;
}

.chat-group-modal__foot,
.chat-group-info__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.chat-group-member-pick {
  max-height: 16rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-group-member-pick__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
}

.chat-group-info__icon {
  font-size: 2rem;
  text-align: center;
  margin: 0 0 0.5rem;
}

.chat-group-info__members {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-group-info__members li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.reports-hub__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reports-hub__intro {
  margin: 0;
  flex: 1;
}

.reports-hub__print,
.reports-hub__export {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

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

.reports-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  align-items: flex-end;
}

.reports-toolbar__field {
  min-width: min(100%, 280px);
  flex: 1 1 220px;
}

.reports-toolbar .field select,
.reports-employee-select {
  width: 100%;
  max-width: 420px;
  margin-top: 0.25rem;
  padding: 0.55rem 2.1rem 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #2d4f88;
  background-color: #0f2753;
  background-image: linear-gradient(180deg, #12305f 0%, #0d2348 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8c4f0' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 0, right 0.65rem center;
  background-size: auto, 12px 8px;
  color: #e8f0ff;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reports-toolbar .field select:hover,
.reports-employee-select:hover {
  border-color: #4d7fd0;
}

.reports-toolbar .field select:focus,
.reports-employee-select:focus {
  outline: none;
  border-color: #4d7fd0;
  box-shadow: 0 0 0 1px rgba(77, 127, 208, 0.25);
}

.reports-toolbar .field select option,
.reports-employee-select option {
  background: #0f2753;
  color: #e8f0ff;
}

.reports-employee-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #3d6bb8;
  background: rgba(58, 110, 194, 0.15);
}

.reports-employee-banner__meta {
  display: block;
  font-size: 0.8rem;
  color: #9eb8e8;
  margin-top: 0.15rem;
}

.reports-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.reports-tab {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #2f4f8a;
  background: rgba(12, 32, 72, 0.65);
  color: #c8daf8;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.reports-tab:hover {
  border-color: #4d7fd4;
  background: rgba(58, 110, 194, 0.2);
}

.reports-tab--active {
  background: rgba(58, 110, 194, 0.35);
  border-color: #6a9ef0;
  color: #fff;
}

.reports-content {
  width: 100%;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
  width: 100%;
}

.report-summary-card {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #2f4f8a;
  background: rgba(8, 24, 56, 0.85);
}

.report-summary-card__label {
  display: block;
  font-size: 0.72rem;
  color: #9eb8e8;
  margin-bottom: 0.25rem;
}

.report-summary-card__value {
  font-size: 1.05rem;
  color: #eef4ff;
}

.report-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.report-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

.report-table th,
.report-table td {
  white-space: nowrap;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.report-table th:first-child,
.report-table td:first-child {
  width: 18%;
  min-width: 10rem;
  white-space: normal;
}

.report-table th:not(:first-child),
.report-table td:not(:first-child) {
  text-align: right;
}

.report-table th:first-child,
.report-table td:first-child {
  text-align: left;
}

.report-table__actions {
  width: 7.5rem;
  text-align: center !important;
  white-space: nowrap;
}

/* —— AI собеседование (макет) —— */
#panelAiInterview .ai-iv-shell {
  background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 1rem 1.1rem 1.25rem;
  color: #e2e8f0;
}

.ai-iv-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-iv-tab {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
}

.ai-iv-tab--active {
  background: rgba(37, 99, 235, 0.35);
  border-color: #3b82f6;
  color: #fff;
}

.ai-iv-setup {
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #1e293b;
  border-radius: 12px;
}

.ai-iv-setup__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.ai-iv-setup__hint {
  margin: 0 0 1rem;
}

.ai-iv-setup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.ai-iv-field {
  flex: 1 1 220px;
  margin: 0;
}

.ai-iv-field select {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  appearance: none;
}

.ai-iv-setup__start {
  width: 100%;
  max-width: 320px;
}

.ai-iv-status-line {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.ai-iv-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ai-iv-topbar__title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ai-iv-topbar__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
}

.ai-iv-topbar__sub {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.ai-iv-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.ai-iv-badge--progress {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}

.ai-iv-badge--ai {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.ai-iv-btn-end {
  border: 1px solid #f87171;
  color: #fca5a5;
  background: transparent;
  white-space: nowrap;
}

.ai-iv-btn-end:hover {
  background: rgba(248, 113, 113, 0.12);
}

.ai-iv-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .ai-iv-grid {
    grid-template-columns: 1fr;
  }
}

.ai-iv-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
}

.ai-iv-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

.ai-iv-panel__title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
}

.ai-iv-online {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #6ee7b7;
  font-weight: 500;
}

.ai-iv-online__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.ai-iv-face-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
  margin-bottom: 0.75rem;
}

.ai-iv-face {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.12s ease;
}

.ai-iv-face.ai-iv-face--speaking {
  animation: aiIvSpeak 0.45s ease-in-out infinite alternate;
}

@keyframes aiIvSpeak {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.012) translateY(-1px);
  }
}

.ai-iv-pip-camera {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 32%;
  max-width: 120px;
  border-radius: 8px;
  border: 2px solid #3b82f6;
  object-fit: cover;
  z-index: 2;
}

.ai-iv-speech {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid #1e293b;
  color: #f1f5f9;
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 3.2rem;
}

.ai-iv-recording {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid #14532d;
}

.ai-iv-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 36px;
  margin-bottom: 0.5rem;
}

.ai-iv-wave span {
  width: 4px;
  border-radius: 2px;
  background: #22c55e;
  animation: aiIvWave 0.7s ease-in-out infinite;
}

.ai-iv-wave span:nth-child(odd) {
  animation-delay: 0.1s;
}
.ai-iv-wave span:nth-child(3n) {
  animation-delay: 0.2s;
}

@keyframes aiIvWave {
  0%,
  100% {
    height: 8px;
  }
  50% {
    height: 28px;
  }
}

.ai-iv-recording__label {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #86efac;
  text-align: center;
}

.btn-block {
  width: 100%;
}

.ai-iv-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.ai-iv-ctrl {
  flex: 1 1 calc(33% - 0.4rem);
  min-width: 7.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.72rem;
  cursor: pointer;
  text-align: center;
}

.ai-iv-ctrl--on {
  border-color: #166534;
  color: #86efac;
}

.ai-iv-ctrl--danger {
  border-color: #991b1b;
  color: #fca5a5;
}

.ai-iv-ctrl--off {
  opacity: 0.55;
  border-color: #475569;
}

.ai-iv-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-iv-steps li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0;
  font-size: 0.82rem;
  color: #64748b;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

.ai-iv-steps li:last-child {
  border-bottom: none;
}

.ai-iv-steps__icon {
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.ai-iv-steps li.ai-iv-steps__item--done {
  color: #86efac;
}

.ai-iv-steps li.ai-iv-steps__item--current {
  color: #93c5fd;
  font-weight: 600;
}

.ai-iv-fields {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 0.4rem 0.75rem;
  font-size: 0.84rem;
}

.ai-iv-fields dt {
  color: #64748b;
  margin: 0;
}

.ai-iv-fields dd {
  margin: 0;
  color: #f1f5f9;
}

.ai-iv-rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0 0.5rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.ai-iv-stars {
  color: #fbbf24;
  letter-spacing: 1px;
}

.ai-iv-rating-num {
  color: #e2e8f0;
  font-weight: 600;
}

.ai-iv-recommendation {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 0.82rem;
  color: #6ee7b7;
}

.ai-iv-recommendation__icon {
  font-weight: 700;
}

.ai-iv-video-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.ai-iv-video-thumb__img,
.ai-iv-video-thumb__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-iv-video-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.ai-iv-video-thumb__time {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.75rem;
}

.ai-iv-save-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ai-iv-save-row .btn-primary {
  flex: 1;
}

.ai-iv-report-wrap {
  padding: 0.25rem 0;
}

.ai-interview-report-hint {
  margin: 0 0 0.75rem;
  color: #94a3b8;
}

.ai-interview-report-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 60vh;
  overflow-y: auto;
}

.ai-interview-report-entry {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #2f4f8a;
  background: rgba(8, 24, 56, 0.85);
}

.ai-interview-report-entry header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.ai-interview-report-entry h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.ai-interview-report-entry pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.84rem;
  color: #c8daf8;
}

.ai-interview-camera {
  position: absolute;
  right: 0.65rem;
  bottom: 2.2rem;
  width: 38%;
  max-width: 200px;
  border-radius: 10px;
  border: 2px solid rgba(106, 158, 240, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  object-fit: cover;
  z-index: 2;
}

.ai-interview-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.ai-interview-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #2f4f8a;
  background: rgba(12, 32, 72, 0.75);
  color: #e8f0ff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.ai-interview-card:hover {
  border-color: #6a9ef0;
  background: rgba(58, 110, 194, 0.22);
}

.ai-interview-card__name {
  font-size: 1rem;
}

.ai-interview-card__position {
  font-size: 0.8rem;
  color: #9eb8e8;
}

.ai-interview-card__badge {
  font-size: 0.72rem;
  color: #7ee8a0;
  margin-top: 0.2rem;
}

.ai-interview-report-detail__name {
  margin: 0.5rem 0 0.15rem;
}

.ai-interview-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.ai-interview-detail-btn--active {
  background: rgba(58, 110, 194, 0.35) !important;
  border-color: #6a9ef0 !important;
}

.ai-interview-detail-content {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #2f4f8a;
  background: rgba(8, 24, 56, 0.85);
  max-height: 50vh;
  overflow-y: auto;
}

.ai-interview-form-dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(140px, 38%) 1fr;
  gap: 0.45rem 0.75rem;
}

.ai-interview-form-dl dt {
  color: #9eb8e8;
  font-size: 0.82rem;
}

.ai-interview-form-dl dd {
  margin: 0;
  color: #eef4ff;
  font-size: 0.88rem;
}

.ai-interview-playback {
  width: 100%;
  max-height: 420px;
  border-radius: 10px;
  background: #000;
}

.ai-interview-recommendations {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  color: #d8e8ff;
  line-height: 1.5;
}

.settings-hub__lead {
  margin: 0 0 1.25rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.settings-card {
  padding: 1rem 1.1rem;
}

.settings-card__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.settings-dl {
  margin: 0;
}

.settings-dl__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(58, 110, 194, 0.2);
  font-size: 0.9rem;
}

.settings-dl__row:last-child {
  border-bottom: none;
}

.settings-dl dt {
  color: #9eb8e8;
  font-weight: 500;
}

.settings-dl dd {
  margin: 0;
  text-align: right;
  color: #eef3ff;
}

.settings-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.settings-links a {
  color: #8ec0ff;
  text-decoration: none;
}

.settings-links a:hover {
  text-decoration: underline;
}

.settings-links__btn {
  padding: 0;
  border: 0;
  background: none;
  color: #8ec0ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.settings-links__btn:hover {
  text-decoration: underline;
}

.tablet-activation-code {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tablet-setup-qr-wrap {
  text-align: center;
  margin: 0.75rem 0 1rem;
}

.tablet-setup-qr-img {
  display: inline-block;
  width: 220px;
  height: 220px;
  padding: 0.5rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

/* ─── Tablets settings hub ─── */
.tablet-hub {
  display: grid;
  gap: 1rem;
  max-width: 960px;
}

.tablet-hub__lead {
  margin-bottom: 0.25rem;
}

.tablet-hub__loading {
  padding: 1rem 0;
}

.tablet-hub__card {
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(58, 110, 194, 0.28);
  background: linear-gradient(165deg, rgba(10, 22, 52, 0.92), rgba(6, 14, 34, 0.88));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.tablet-hub__card--table {
  padding-bottom: 0.65rem;
}

.tablet-hub__card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.tablet-hub__card-icon {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(58, 110, 194, 0.18);
  border: 1px solid rgba(106, 158, 240, 0.28);
  font-size: 1.05rem;
  line-height: 1;
}

.tablet-hub__card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  color: #eef4ff;
}

.tablet-hub__card-desc {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.tablet-hub__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(58, 110, 194, 0.22);
  background: rgba(6, 15, 38, 0.55);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tablet-hub__toggle:hover {
  border-color: rgba(106, 158, 240, 0.42);
  background: rgba(8, 20, 48, 0.72);
}

.tablet-hub__toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tablet-hub__toggle-box {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: rgba(30, 58, 110, 0.85);
  border: 1px solid rgba(58, 110, 194, 0.45);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tablet-hub__toggle-box::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #c8daf8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.tablet-hub__toggle input:checked + .tablet-hub__toggle-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(124, 58, 237, 0.75));
  border-color: rgba(129, 178, 255, 0.65);
}

.tablet-hub__toggle input:checked + .tablet-hub__toggle-box::after {
  transform: translateX(1.2rem);
  background: #fff;
}

.tablet-hub__toggle-text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.tablet-hub__toggle-text strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: #eef4ff;
}

.tablet-hub__toggle-text small {
  font-size: 0.8rem;
  line-height: 1.4;
}

.tablet-hub__pin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.tablet-hub__field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.tablet-hub__field--grow {
  flex: 1;
}

.tablet-hub__field-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #c8daf8;
}

.tablet-hub__field-hint {
  font-size: 0.78rem;
  line-height: 1.45;
}

.tablet-hub__input {
  width: 100%;
  max-width: 280px;
  padding: 0.62rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(58, 110, 194, 0.38);
  background: rgba(4, 10, 26, 0.75);
  color: #eef4ff;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tablet-hub__input:focus {
  outline: none;
  border-color: rgba(106, 158, 240, 0.75);
  box-shadow: 0 0 0 3px rgba(58, 110, 194, 0.22);
}

.tablet-hub__pin-btn {
  white-space: nowrap;
  align-self: end;
}

.tablet-hub__links {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.tablet-hub__links a {
  color: #8ec0ff;
  text-decoration: none;
}

.tablet-hub__links a:hover {
  text-decoration: underline;
}

.tablet-hub__links-label {
  margin-right: 0.35rem;
  color: #9eb8e8;
}

.tablet-hub__links-sep {
  margin: 0 0.35rem;
  opacity: 0.55;
}

.tablet-hub__add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.tablet-hub__add-btn {
  flex: 0 0 auto;
  min-height: 2.65rem;
  padding-inline: 1.15rem;
}

.tablet-hub__table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.75rem;
}

.tablet-hub__table-wrap {
  margin: 0 -0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(58, 110, 194, 0.18);
  background: rgba(4, 10, 26, 0.45);
}

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

.tablet-devices-table th,
.tablet-devices-table td {
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid rgba(58, 110, 194, 0.14);
  vertical-align: middle;
}

.tablet-devices-table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8fa8d8;
  background: rgba(8, 20, 48, 0.55);
}

.tablet-devices-table tbody tr:hover {
  background: rgba(58, 110, 194, 0.08);
}

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

.tablet-devices-table__name strong {
  font-weight: 600;
  color: #eef4ff;
}

.tablet-devices-table__date {
  font-size: 0.84rem;
  white-space: nowrap;
}

.tablet-devices-table__actions-col {
  width: 11rem;
  text-align: right;
}

.tablet-devices-table__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.tablet-devices-table__empty {
  text-align: center;
  padding: 1.5rem 0.9rem !important;
}

.tablet-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.tablet-status--active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
}

.tablet-status--pending {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
}

.tablet-status--off {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.24);
}

.tablet-status--muted {
  color: #9eb8e8;
  background: rgba(58, 110, 194, 0.12);
  border-color: rgba(58, 110, 194, 0.22);
}

.tablet-activation-modal {
  max-width: 480px;
}

.tablet-activation-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.tablet-activation-modal__hint {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.tablet-activation-modal__actions {
  margin-top: 0.5rem;
}

@media (max-width: 720px) {
  .tablet-hub__pin {
    grid-template-columns: 1fr;
  }

  .tablet-hub__pin-btn,
  .tablet-hub__add-btn {
    width: 100%;
  }

  .tablet-hub__input {
    max-width: none;
  }

  .tablet-devices-table__date {
    white-space: normal;
  }

  .tablet-devices-table__actions-col {
    width: auto;
  }
}

.settings-shell {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 0.35rem;
}

.settings-shell__main {
  flex: 1;
  min-width: 0;
}

.settings-nav {
  flex: 0 0 11.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  margin: 0;
  padding: 0 0.85rem 0 0;
  border-right: 1px solid rgba(58, 110, 194, 0.35);
  position: sticky;
  top: 0.5rem;
}

.settings-tab {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(58, 110, 194, 0.35);
  background: rgba(8, 20, 48, 0.6);
  color: #c8daf8;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
}

.settings-tab:hover {
  background: rgba(58, 110, 194, 0.2);
}

.settings-tab--active {
  background: rgba(58, 110, 194, 0.38);
  border-color: #6a9ef0;
  color: #fff;
}

.settings-view[hidden] {
  display: none;
}

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

  .settings-nav {
    flex: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(58, 110, 194, 0.35);
    padding: 0 0 0.75rem;
    position: static;
  }

  .settings-nav .settings-tab {
    width: auto;
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 7rem;
  }
}

.settings-roles-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.settings-role-card {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(58, 110, 194, 0.28);
  background: rgba(6, 15, 38, 0.45);
}

.settings-role-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.settings-role-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.settings-access-table-wrap {
  margin-top: 0.25rem;
}

.settings-access-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.settings-access-user__photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(90, 157, 255, 0.35);
}

.settings-access-user__ph {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(12, 32, 72, 0.95);
  color: #9eb8e8;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.settings-access-role {
  min-width: 10rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(58, 110, 194, 0.45);
  background: #071939;
  color: #eef3ff;
  font-size: 0.88rem;
}

.settings-access-role:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.settings-db-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.settings-grid--db {
  margin-bottom: 1rem;
}

.settings-backup-card {
  margin-bottom: 1rem;
}

.settings-backup-lead {
  margin: 0 0 1rem;
  max-width: 52rem;
}

.settings-backup-form {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 1rem;
}

.settings-backup-form .field--wide {
  grid-column: 1 / -1;
}

.settings-backup-check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.settings-backup-meta {
  margin: 0;
  font-size: 0.88rem;
  word-break: break-word;
}

@media (max-width: 640px) {
  .settings-backup-form {
    grid-template-columns: 1fr;
  }
}

.settings-card--wide {
  margin-top: 0;
}

.settings-db-status {
  margin: 0 0 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.settings-db-status--ok {
  color: #7ee8a0;
}

.settings-db-status--err {
  color: #ff9eb8;
}

.settings-db-status--pending {
  color: #9eb8e8;
}

.table--compact {
  font-size: 0.88rem;
}

.table--compact code {
  font-size: 0.82rem;
  color: #b8d4ff;
}

.modules-hub__lead {
  margin: 0 0 1.25rem;
  max-width: 40rem;
}

.modules-card__price {
  display: block;
  margin: 0.2rem 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #93c5fd;
}

.modules-card__price-period {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 0.15rem;
}

.subscription-pricing-card {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 50%, transparent 100%),
    rgba(12, 18, 30, 0.72);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.subscription-pricing__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.subscription-pricing__head-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22);
  flex-shrink: 0;
}

.subscription-pricing__head-ico svg {
  width: 1.15rem;
  height: 1.15rem;
}

.subscription-pricing__title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
}

.subscription-pricing__lead {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.subscription-pricing__includes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.subscription-pricing__chip {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.subscription-pricing__modules {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.subscription-pricing__module {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.subscription-pricing__module-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.subscription-pricing__module-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.subscription-pricing__module-price span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.1rem;
}

.subscription-pricing__module-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  white-space: nowrap;
}

.subscription-pricing__module--blue { border-color: rgba(59, 130, 246, 0.2); }
.subscription-pricing__module--blue .subscription-pricing__module-price { color: #93c5fd; }

.subscription-pricing__module--green { border-color: rgba(34, 197, 94, 0.2); }
.subscription-pricing__module--green .subscription-pricing__module-price { color: #86efac; }

.subscription-pricing__module--violet { border-color: rgba(139, 92, 246, 0.2); }
.subscription-pricing__module--violet .subscription-pricing__module-price { color: #c4b5fd; }

.subscription-pricing__addons-title {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.subscription-pricing__addon-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.subscription-pricing__field {
  display: grid;
  gap: 0.35rem;
}

.subscription-pricing__field span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.subscription-pricing__field input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.subscription-pricing__field input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.subscription-pricing__save {
  margin-bottom: 1rem;
}

.subscription-pricing__total-box {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.22), transparent 45%),
    linear-gradient(135deg, rgba(30, 58, 138, 0.45), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.subscription-pricing__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.9);
}

.subscription-pricing__total strong {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.subscription-pricing__total strong span {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.75);
  margin-left: 0.15rem;
}

.subscription-pricing__breakdown {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.modules-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.modules-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%),
    rgba(12, 18, 30, 0.72);
  padding: 1.1rem 1.15rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.modules-card__glow {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 55%;
  height: 70%;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.22;
  pointer-events: none;
}

.modules-card--tone-blue .modules-card__glow { background: #3b82f6; }
.modules-card--tone-green .modules-card__glow { background: #22c55e; }
.modules-card--tone-violet .modules-card__glow { background: #8b5cf6; }

.modules-card.is-on {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.modules-card:hover {
  transform: translateY(-1px);
}

.modules-card--blue.is-on {
  border-color: rgba(59, 130, 246, 0.4);
}

.modules-card--purple.is-on {
  border-color: var(--mod-hrm-border);
}

.modules-card--violet.is-on {
  border-color: var(--mod-hrm-border);
}

.modules-card--green.is-on {
  border-color: var(--mod-mes-border);
}

.modules-card--emerald.is-on {
  border-color: var(--mod-hrm-border);
}

.modules-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 1;
}

.modules-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.modules-card__badge {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}

.modules-card__badge--blue { background: var(--mod-bms-soft); color: var(--mod-bms-text); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22); }
.modules-card__badge--green { background: var(--mod-mes-soft); color: var(--mod-mes-text); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.22); }
.modules-card__badge--violet { background: var(--mod-hrm-soft); color: var(--mod-hrm-text); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.22); }

.modules-toggle--modern {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

.modules-toggle--modern input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.modules-toggle__track {
  width: 2.5rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.modules-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s ease;
}

.modules-toggle--modern input:checked + .modules-toggle__track {
  background: rgba(59, 130, 246, 0.55);
  border-color: rgba(96, 165, 250, 0.45);
}

.modules-toggle--modern input:checked + .modules-toggle__track::after {
  transform: translateX(1rem);
}

.modules-toggle__label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.modules-card__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.modules-card__desc {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.modules-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
}

.modules-toggle input {
  width: 1.1rem;
  height: 1.1rem;
}

.modules-card__link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #93c5fd;
  text-decoration: none;
}

.modules-card__link:hover {
  text-decoration: underline;
}

.modules-card__soon {
  font-size: 0.82rem;
}

.modules-card__err {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.access-mod-check input {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.access-mod-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: #64748b;
}

.access-mod-pill.is-on {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.settings-access-table-wrap {
  overflow-x: auto;
}

.access-summary {
  font-size: 0.88rem;
  color: #94a3b8;
}

.access-role-label {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.access-editor__templates {
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.access-editor__templates-label {
  width: 100%;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.15rem;
}
.access-editor__template-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.access-editor__template-btn:hover:not(:disabled) {
  border-color: var(--blue);
  color: #fff;
}
.access-editor__template-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.access-editor__template-btn--active {
  border-color: var(--blue);
  background: rgba(47, 119, 255, 0.18);
}

.access-editor-modal .modal__box {
  max-width: 36rem;
  width: min(96vw, 36rem);
  max-height: min(90vh, 720px);
  overflow: auto;
}

.access-editor__title {
  margin: 0 0 0.35rem;
}

.access-editor__user {
  margin: 0 0 1rem;
}

.access-editor__role-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.access-editor__role-field select {
  max-width: 16rem;
}

.access-editor__modules {
  display: grid;
  gap: 0.85rem;
}

.access-editor__module {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.access-editor__module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.access-editor__module-all {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.access-editor__module-hint {
  font-size: 0.78rem;
}

.access-editor__features {
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.access-editor__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.access-editor__feature input {
  margin-top: 0.15rem;
}

.sidebar-modules {
  display: grid;
  gap: 0.42rem;
  margin: 0.15rem 0 0.25rem;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(52vh, 400px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
}

.sidebar-modules__title {
  margin: 0.35rem 0 0.1rem;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.module-sidebar {
  display: grid;
  gap: 0.28rem;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.module-sidebar__head {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 14px 1.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.42rem;
  row-gap: 0.22rem;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #64748b;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  cursor: not-allowed;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.module-sidebar__head:disabled {
  opacity: 1;
  color: #64748b;
  background: rgba(255, 255, 255, 0.03);
}

.module-sidebar--enabled .module-sidebar__head:disabled {
  color: #94a3b8;
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.06);
}

.module-sidebar--live .module-sidebar__head {
  color: #d5e3ff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.module-sidebar--live .module-sidebar__head:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(58, 110, 194, 0.35);
}

.module-sidebar--live.module-sidebar--expanded .module-sidebar__chevron,
.module-sidebar--live.module-sidebar--expanded .module-sidebar__ico {
  opacity: 1;
}

.module-sidebar--bms.module-sidebar--live.module-sidebar--expanded .module-sidebar__head {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  border-color: var(--mod-bms);
  color: #fff;
}

.module-sidebar--mes.module-sidebar--live.module-sidebar--expanded .module-sidebar__head {
  background: linear-gradient(180deg, #16a34a, #15803d);
  border-color: var(--mod-mes);
  color: #fff;
}

.module-sidebar--hrm.module-sidebar--live.module-sidebar--expanded .module-sidebar__head {
  background: linear-gradient(180deg, #7c3aed, #6d28d9);
  border-color: var(--mod-hrm);
  color: #fff;
}

.module-sidebar__chevron {
  width: 14px;
  grid-row: 1 / -1;
  grid-column: 1;
  align-self: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  text-align: center;
  color: #94a3b8;
  transition: transform 0.18s ease, color 0.15s ease;
}

.module-sidebar--live .module-sidebar__chevron {
  color: #cbd5e1;
}

.module-sidebar--expanded .module-sidebar__chevron {
  transform: rotate(90deg);
  color: #fff;
}

.module-sidebar__ico {
  width: 1.5rem;
  height: 1.5rem;
  grid-row: 1;
  grid-column: 2;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.55;
}

.module-sidebar--live .module-sidebar__ico {
  opacity: 1;
}

.module-sidebar__ico--hrm {
  background: var(--mod-hrm-soft);
  color: var(--mod-hrm-text);
}

.module-sidebar__ico--bms {
  background: var(--mod-bms-soft);
  color: var(--mod-bms-text);
}

.module-sidebar__ico--mes {
  background: var(--mod-mes-soft);
  color: var(--mod-mes-text);
}

.module-sidebar__label {
  grid-row: 1;
  grid-column: 3;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-sidebar__state {
  grid-row: 2;
  grid-column: 2 / 4;
  justify-self: start;
  max-width: 100%;
  margin: 0;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  color: #64748b;
  background: rgba(0, 0, 0, 0.2);
}

.module-sidebar--enabled .module-sidebar__state {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
}

.module-sidebar__state.is-active {
  color: var(--mod-bms-text);
  background: rgba(59, 130, 246, 0.18);
}

.module-sidebar--mes .module-sidebar__state.is-active {
  color: var(--mod-mes-text);
  background: rgba(34, 197, 94, 0.18);
}

.module-sidebar--hrm .module-sidebar__state.is-active {
  color: var(--mod-hrm-text);
  background: var(--mod-hrm-soft);
}

.module-sidebar--live.module-sidebar--expanded .module-sidebar__state.is-active {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.15);
}

.module-sidebar__body {
  display: grid;
  gap: 0.28rem;
  padding: 0 0 0.15rem 0.35rem;
  border: none;
}

.module-sidebar__body[hidden],
.module-sidebar:not(.module-sidebar--expanded) .module-sidebar__body {
  display: none !important;
}

.module-sidebar__body .nav-tab {
  font-size: 0.88rem;
  padding: 0.52rem 0.65rem;
}

.module-sidebar__hint {
  margin: 0.15rem 0.55rem 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-tab--module-link {
  text-decoration: none;
  color: inherit;
}

.nav-tab--company .nav-company-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

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

.api-integ__card-wide {
  grid-column: 1 / -1;
}

.api-integ__lead {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.api-integ__row {
  display: grid;
  grid-template-columns: minmax(6rem, auto) 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.api-integ__label {
  font-size: 0.82rem;
  color: var(--muted);
}

.api-integ__value {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  word-break: break-all;
  color: #e2e8f0;
}

.api-integ__pre {
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-x: auto;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.api-integ__tokens-card {
  margin-bottom: 1rem;
}

.api-integ__gen-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.api-integ__gen-form .field {
  flex: 1 1 12rem;
  margin: 0;
}

.api-integ__new-token {
  margin-bottom: 1rem;
  border-color: rgba(16, 185, 129, 0.35);
}

.api-integ__value--full {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  word-break: break-all;
}

.btn-danger-soft {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.btn-danger-soft:hover {
  background: rgba(248, 113, 113, 0.12);
}

.api-integ__subheading {
  margin: 1rem 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #cbd5e1;
}

.api-integ__hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.btn-sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
}

.subscription-hub {
  display: grid;
  gap: 1.25rem;
}

.subscription-hub__hero {
  position: relative;
  overflow: hidden;
  padding: 1.2rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.25), transparent 42%),
    linear-gradient(135deg, rgba(30, 58, 138, 0.55), rgba(15, 23, 42, 0.92));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.subscription-hub__hero--ok {
  border-color: rgba(34, 197, 94, 0.22);
  background:
    radial-gradient(circle at 85% 15%, rgba(34, 197, 94, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(22, 101, 52, 0.45), rgba(15, 23, 42, 0.92));
}

.subscription-hub__hero--warn {
  border-color: rgba(249, 115, 22, 0.25);
  background:
    radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(154, 52, 18, 0.4), rgba(15, 23, 42, 0.92));
}

.subscription-hub__hero--trial {
  border-color: rgba(251, 191, 36, 0.25);
  background:
    radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(146, 64, 14, 0.35), rgba(15, 23, 42, 0.92));
}

.subscription-hub__hero-glow {
  position: absolute;
  top: -40%;
  right: -5%;
  width: 50%;
  height: 120%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(50px);
  pointer-events: none;
}

.subscription-hub__hero-content {
  position: relative;
  z-index: 1;
}

.subscription-hub__hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.subscription-hub__plan-badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.subscription-hub__status {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.subscription-hub__status--ok { background: rgba(34, 197, 94, 0.16); color: #86efac; }
.subscription-hub__status--warn { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.subscription-hub__status--trial { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }

.subscription-hub__org {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.subscription-hub__meta {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.78);
}

.subscription-hub__modules-head {
  display: grid;
  gap: 0.25rem;
}

.subscription-hub__subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}

.subscription-hub__modules-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.subscription-payme {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.4rem;
  justify-items: start;
}

.subscription-payme__hint {
  margin: 0;
  font-size: 0.85rem;
}

.subscription-summary__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.subscription-stat {
  position: relative;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.15rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%),
    rgba(12, 18, 30, 0.65);
  overflow: hidden;
}

.subscription-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.subscription-stat--ok::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.subscription-stat--warn::before { background: linear-gradient(90deg, #ea580c, #fb923c); }
.subscription-stat--blue::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.subscription-stat--teal::before { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.subscription-stat--violet::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.subscription-stat__ico {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.subscription-stat__ico svg {
  width: 1rem;
  height: 1rem;
}

.subscription-stat__label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.subscription-stat__value {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.subscription-stat__sub {
  font-size: 0.72rem;
  color: var(--muted-dim);
}

.subscription-summary__trial {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.84rem;
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
}

.subscription-summary__alert {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.84rem;
}

.subscription-summary__alert--err {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.subscription-summary__alert--warn {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.org-hub__header {
  margin-bottom: 1.25rem;
}

.org-hub__meta {
  margin: 0.35rem 0 1rem;
  font-size: 0.9rem;
}

.org-hub__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.org-hub__tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.org-hub__tab--active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.45);
  color: #e2e8f0;
}

.org-hub__lead {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.module-status-pill {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.module-status-pill.is-active {
  background: rgba(59, 130, 246, 0.2);
  color: var(--mod-bms-text);
}

.modules-card--mes .module-status-pill.is-active,
.module-sidebar--mes .module-status-pill.is-active {
  background: rgba(34, 197, 94, 0.2);
  color: var(--mod-mes-text);
}

.modules-card--hrm .module-status-pill.is-active,
.module-sidebar--hrm .module-status-pill.is-active {
  background: var(--mod-hrm-soft);
  color: var(--mod-hrm-text);
}

.module-status-pill.is-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.modules-card--bms.is-on {
  border-color: var(--mod-bms-border);
}

.modules-card--mes.is-on {
  border-color: var(--mod-mes-border);
}

.modules-card--hrm.is-on {
  border-color: var(--mod-hrm-border);
}


/* MES styles live in web/mes/mes.css (standalone /mes/ build). */

.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;
}

.sidebar-module-links {
  display: grid;
  gap: 0.28rem;
}

.sidebar-zones {
  display: grid;
  gap: 0.2rem;
}

.nav-zone[hidden] {
  display: none !important;
}

.nav-zone__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem;
  align-items: center;
}

.nav-zone__chevron {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: transform 0.18s ease, background 0.18s ease;
}

.nav-zone__chevron:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.nav-zone--open .nav-zone__chevron span {
  transform: rotate(90deg);
  display: inline-block;
}

.nav-tab--zone {
  min-width: 0;
}

.nav-ico--svg {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-ico--svg svg {
  width: 18px;
  height: 18px;
}

.nav-ico--dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.nav-ico--bms { background: var(--blue-bright); box-shadow: 0 0 10px rgba(59, 130, 246, 0.45); }
.nav-ico--mes { background: var(--green); box-shadow: 0 0 10px rgba(34, 197, 94, 0.35); }
.nav-ico--hrm { background: var(--violet); box-shadow: 0 0 10px rgba(139, 92, 246, 0.35); }

.nav-tab--module-link[hidden] {
  display: none !important;
}

.sidebar-sub-card {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-sub-card__inner {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 55%, transparent 100%),
    rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.95rem 1rem 1rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.sidebar-sub-card__inner--ok { border-color: rgba(34, 197, 94, 0.18); }
.sidebar-sub-card__inner--trial { border-color: rgba(251, 191, 36, 0.2); }
.sidebar-sub-card__inner--warn { border-color: rgba(249, 115, 22, 0.22); }

.sidebar-sub-card__glow {
  position: absolute;
  top: -35%;
  right: -15%;
  width: 70%;
  height: 90%;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.35);
  filter: blur(38px);
  opacity: 0.35;
  pointer-events: none;
}

.sidebar-sub-card__inner--ok .sidebar-sub-card__glow { background: rgba(34, 197, 94, 0.35); }
.sidebar-sub-card__inner--trial .sidebar-sub-card__glow { background: rgba(251, 191, 36, 0.3); }
.sidebar-sub-card__inner--warn .sidebar-sub-card__glow { background: rgba(249, 115, 22, 0.28); }

.sidebar-sub-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.sidebar-sub-card__plan-badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.sidebar-sub-card__status {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.sidebar-sub-card__status--ok { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.sidebar-sub-card__status--trial { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.sidebar-sub-card__status--warn { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

.sidebar-sub-card__label {
  position: relative;
  z-index: 1;
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.sidebar-sub-card__org {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 0.4rem;
  color: var(--text);
  line-height: 1.25;
}

.sidebar-sub-card__exp {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.sidebar-sub-card__btn {
  position: relative;
  z-index: 1;
  width: 100%;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.sidebar-sub-card__btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.workspace-admin.workspace-admin--home .main-admin > .header,
.workspace-admin.workspace-admin--home .hrm-main-column > .header {
  display: none !important;
}

.panel-home {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.home-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.15rem;
}

.home-topbar__title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-topbar__sub {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.home-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.home-split-btn {
  display: inline-flex;
  align-items: stretch;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.home-split-btn__main {
  border-radius: 0;
  white-space: nowrap;
  font-weight: 600;
}

.home-split-btn__drop {
  position: relative;
}

.home-split-btn__caret {
  list-style: none;
  height: 100%;
  min-width: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1D4ED8;
  color: #fff;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.home-split-btn__caret::-webkit-details-marker {
  display: none;
}

.home-split-btn__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 210px;
  background: var(--card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  z-index: 40;
}

.home-split-btn__menu button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.home-split-btn__menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

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

.home-topbar__user-menu .home-profile-menu {
  position: relative;
}


.home-profile-menu > summary {
  list-style: none;
  cursor: pointer;
}

.home-profile-menu > summary::-webkit-details-marker {
  display: none;
}

.home-profile-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 200px;
  background: var(--card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0.45rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  z-index: 40;
}

.home-profile-menu__item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.home-profile-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.home-profile-menu__lang {
  padding: 0.35rem 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.home-profile__caret {
  color: var(--muted);
  font-size: 0.72rem;
  margin-left: 0.15rem;
}

.home-icon-btn {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  border: 1px solid rgba(58, 110, 194, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.home-icon-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-profile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(58, 110, 194, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.home-profile__avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.home-profile__meta {
  display: grid;
  line-height: 1.2;
  font-size: 0.82rem;
  text-align: left;
}

.home-profile__meta strong {
  font-size: 0.9rem;
}

.home-profile__meta span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
}

.home-quick-menu {
  position: relative;
}

.home-quick-menu__toggle {
  list-style: none;
  cursor: pointer;
}

.home-quick-menu__toggle::-webkit-details-marker {
  display: none;
}

.home-quick-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 220px;
  background: #0d2148;
  border: 1px solid #1f3767;
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.home-quick-menu__item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.home-quick-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.home-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  padding: 1rem 1.05rem 0.95rem;
  min-height: 8.25rem;
  text-align: left;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 48%, transparent 100%),
    var(--card);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
  cursor: default;
  color: var(--text);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}

.home-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 18px 18px 0 0;
  opacity: 0.95;
}

.home-kpi__glow {
  position: absolute;
  top: -35%;
  right: -15%;
  width: 72%;
  height: 85%;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.28;
  pointer-events: none;
}

.home-kpi--blue::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.home-kpi--blue .home-kpi__glow { background: #3b82f6; }

.home-kpi--violet::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.home-kpi--violet .home-kpi__glow { background: #8b5cf6; }

.home-kpi--green::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.home-kpi--green .home-kpi__glow { background: #22c55e; }

.home-kpi--orange::before { background: linear-gradient(90deg, #ea580c, #fb923c); }
.home-kpi--orange .home-kpi__glow { background: #f97316; }

.home-kpi--teal::before { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.home-kpi--teal .home-kpi__glow { background: #14b8a6; }

button.home-kpi {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-kpi--click {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-kpi--click:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.home-kpi--click:hover .home-kpi__chevron {
  opacity: 1;
  transform: translateX(2px);
}

.home-kpi--blue.home-kpi--click:hover { border-color: rgba(59, 130, 246, 0.35); }
.home-kpi--violet.home-kpi--click:hover { border-color: rgba(139, 92, 246, 0.35); }
.home-kpi--green.home-kpi--click:hover { border-color: rgba(34, 197, 94, 0.35); }
.home-kpi--orange.home-kpi--click:hover { border-color: rgba(249, 115, 22, 0.35); }
.home-kpi--teal.home-kpi--click:hover { border-color: rgba(20, 184, 166, 0.35); }

.home-kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  position: relative;
  z-index: 1;
}

.home-kpi__ico {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.home-kpi__ico svg {
  width: 1.2rem;
  height: 1.2rem;
}

.home-kpi__ico--blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.28); }
.home-kpi__ico--violet { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.28); }
.home-kpi__ico--green { background: rgba(34, 197, 94, 0.18); color: #86efac; box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.28); }
.home-kpi__ico--orange { background: rgba(249, 115, 22, 0.18); color: #fdba74; box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.28); }
.home-kpi__ico--teal { background: rgba(20, 184, 166, 0.18); color: #5eead4; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.28); }

.home-kpi__chevron {
  font-size: 0.85rem;
  color: var(--muted-dim);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
  margin-top: 0.35rem;
}

.home-kpi__label {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
  min-height: 2.05rem;
}

.home-kpi__value {
  position: relative;
  z-index: 1;
  display: block;
  font-size: clamp(1.65rem, 2.1vw, 2.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0.1rem 0 0.35rem;
}

.home-kpi__foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  align-items: center;
}

.home-kpi__sub {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-kpi__sub--up {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.18);
}

.home-kpi__sub--down {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.18);
}

.home-kpi__sub--warn {
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.18);
}

.home-kpi__sub--neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.home-grid {
  display: grid;
  gap: 0.85rem;
}

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

.home-grid--modules {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-grid--bottom {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

/* —— Bottom widgets: quick access, calendar, weather —— */
.home-widget {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 55%, transparent 100%),
    var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 1.1rem 1.15rem 1.15rem;
}

.home-widget::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.home-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.home-widget__head--compact {
  margin-bottom: 0.75rem;
}

.home-widget__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.home-widget__ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-widget__ico svg {
  width: 1.05rem;
  height: 1.05rem;
}

.home-widget__ico--quick {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.home-widget__ico--calendar {
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.25);
}

.home-widget__ico--weather {
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.25);
}

.home-widget__ico--subscription {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
  color: #a5b4fc;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.25);
}

.home-subscription-card {
  display: flex;
  flex-direction: column;
}

.home-sub-widget__status {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.home-sub-widget__status--ok { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.home-sub-widget__status--trial { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.home-sub-widget__status--warn { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

.home-sub-widget__inner {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  padding: 0.85rem 0.95rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 55%, transparent 100%),
    rgba(15, 23, 42, 0.55);
}

.home-sub-widget__inner--ok { border-color: rgba(34, 197, 94, 0.16); }
.home-sub-widget__inner--trial { border-color: rgba(251, 191, 36, 0.18); }
.home-sub-widget__inner--warn { border-color: rgba(249, 115, 22, 0.2); }

.home-sub-widget__glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 75%;
  height: 95%;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.35);
  filter: blur(38px);
  opacity: 0.3;
  pointer-events: none;
}

.home-sub-widget__inner--ok .home-sub-widget__glow { background: rgba(34, 197, 94, 0.35); }
.home-sub-widget__inner--trial .home-sub-widget__glow { background: rgba(251, 191, 36, 0.3); }
.home-sub-widget__inner--warn .home-sub-widget__glow { background: rgba(249, 115, 22, 0.28); }

.home-sub-widget__top {
  position: relative;
  z-index: 1;
  margin-bottom: 0.45rem;
}

.home-sub-widget__plan {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.home-sub-widget__label {
  position: relative;
  z-index: 1;
  margin: 0 0 0.15rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.home-sub-widget__org {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  color: var(--text);
  line-height: 1.25;
}

.home-sub-widget__exp {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.home-sub-widget__btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.home-sub-widget__btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.home-sub-widget__body {
  padding: 0.5rem 0;
}

.home-widget__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-widget__empty {
  margin: 0.5rem 0 0;
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.home-quick-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.home-quick-tile:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.home-quick-tile__icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.home-quick-tile__label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.home-quick-tile__arrow {
  color: var(--muted-dim);
  font-size: 0.9rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

.home-quick-tile:hover .home-quick-tile__arrow {
  transform: translateX(2px);
  color: var(--text);
}

.home-quick-tile--blue { border-color: rgba(59, 130, 246, 0.22); }
.home-quick-tile--blue .home-quick-tile__icon { background: rgba(59, 130, 246, 0.18); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22); }
.home-quick-tile--blue:hover { border-color: rgba(59, 130, 246, 0.45); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12); }

.home-quick-tile--green { border-color: rgba(34, 197, 94, 0.2); }
.home-quick-tile--green .home-quick-tile__icon { background: rgba(34, 197, 94, 0.16); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.22); }
.home-quick-tile--green:hover { border-color: rgba(34, 197, 94, 0.42); box-shadow: 0 8px 24px rgba(22, 163, 74, 0.1); }

.home-quick-tile--violet { border-color: rgba(139, 92, 246, 0.22); }
.home-quick-tile--violet .home-quick-tile__icon { background: rgba(139, 92, 246, 0.16); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.22); }
.home-quick-tile--violet:hover { border-color: rgba(139, 92, 246, 0.42); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12); }

.home-quick-tile--teal { border-color: rgba(20, 184, 166, 0.22); }
.home-quick-tile--teal .home-quick-tile__icon { background: rgba(20, 184, 166, 0.14); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.22); }
.home-quick-tile--teal:hover { border-color: rgba(20, 184, 166, 0.42); box-shadow: 0 8px 24px rgba(13, 148, 136, 0.1); }

.home-calendar-card__head {
  flex-wrap: wrap;
}

.home-calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-calendar-nav__btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.home-calendar-nav__btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.home-calendar-nav__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  min-width: 4.5rem;
  text-align: center;
  padding: 0 0.15rem;
}

.home-calendar-nav__date {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  margin-left: 0.15rem;
}

.home-calendar-body {
  min-height: 9rem;
}

.home-calendar-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.home-calendar-event {
  display: grid;
  grid-template-columns: 3.1rem 1.1rem 1fr;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.home-calendar-event:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.06);
}

.home-calendar-event__time {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 700;
  align-self: center;
}

.home-calendar-event__rail {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-calendar-event__rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.home-calendar-event__dot {
  position: relative;
  z-index: 1;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.home-calendar-event__body {
  min-width: 0;
  align-self: center;
}

.home-calendar-event__title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}

.home-calendar-event--blue { border-color: rgba(59, 130, 246, 0.18); }
.home-calendar-event--blue .home-calendar-event__time { color: #93c5fd; }
.home-calendar-event--blue .home-calendar-event__dot { background: #60a5fa; }
.home-calendar-event--blue:hover { border-color: rgba(59, 130, 246, 0.35); }

.home-calendar-event--green { border-color: rgba(34, 197, 94, 0.18); }
.home-calendar-event--green .home-calendar-event__time { color: #86efac; }
.home-calendar-event--green .home-calendar-event__dot { background: #4ade80; }
.home-calendar-event--green:hover { border-color: rgba(34, 197, 94, 0.35); }

.home-calendar-event--violet { border-color: rgba(139, 92, 246, 0.18); }
.home-calendar-event--violet .home-calendar-event__time { color: #c4b5fd; }
.home-calendar-event--violet .home-calendar-event__dot { background: #a78bfa; }
.home-calendar-event--violet:hover { border-color: rgba(139, 92, 246, 0.35); }

.home-calendar-event--slate { border-color: rgba(148, 163, 184, 0.15); }
.home-calendar-event--slate .home-calendar-event__time { color: var(--muted); }
.home-calendar-event--slate .home-calendar-event__dot { background: #94a3b8; }

.home-calendar-empty {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  list-style: none;
}

.home-calendar-empty__icon {
  font-size: 1.5rem;
  opacity: 0.85;
}

.home-calendar-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.home-weather-card {
  padding: 0;
  overflow: hidden;
}

.home-weather {
  padding: 1.1rem 1.15rem 1.15rem;
}

.home-weather__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.28), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(59, 130, 246, 0.22), transparent 48%),
    linear-gradient(135deg, rgba(30, 58, 138, 0.55), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(96, 165, 250, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-weather__main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.home-weather__temp {
  margin: 0;
  font-size: clamp(2.2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}

.home-weather__place {
  min-width: 0;
}

.home-weather__city {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.home-weather__cond {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.82);
}

.home-weather__visual {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(251, 191, 36, 0.25));
}

.home-weather__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.home-weather__stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.home-weather__stat-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.home-weather__stat-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.home-weather--loading {
  min-height: 10rem;
  display: grid;
  align-content: center;
}

.home-weather__loading {
  margin: 0;
  text-align: center;
}

.home-line-chart__svg {
  width: 100%;
  height: auto;
  display: block;
}

.home-line-chart__labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.home-notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-height: 320px;
  overflow-y: auto;
}

.home-notif-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.home-notif-card__all {
  border: none;
  background: transparent;
  color: var(--blue-bright);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.home-notif-card__all:hover {
  text-decoration: underline;
}

.home-notif {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.home-notif:last-child {
  border-bottom: none;
}

.home-notif:hover {
  background: rgba(255, 255, 255, 0.03);
}

.home-notif--empty {
  cursor: default;
  color: var(--muted);
  padding: 1rem 0;
}

.home-notif__ico {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.home-notif__ico--danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.home-notif__ico--warning { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.home-notif__ico--info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.home-notif__ico--success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }

.home-notif__body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.home-notif__body strong {
  font-size: 0.88rem;
}

.home-notif__sub {
  color: var(--muted);
  font-size: 0.78rem;
}

.home-notif__time {
  color: var(--muted-dim);
  font-size: 0.72rem;
  white-space: nowrap;
}

.home-chart-tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 0.15rem;
  font-size: 0.82rem;
}

.home-chart-tooltip strong {
  font-size: 0.88rem;
}

.home-chart-grid {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.home-chart-axis {
  fill: var(--muted-dim);
  font-size: 10px;
}

.home-chart-dot {
  cursor: pointer;
}

.home-line-chart__wrap {
  position: relative;
}

.home-module__desc {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}

.home-module__stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.home-module__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.home-module__btn:hover {
  border-color: var(--blue-bright);
  background: rgba(37, 99, 235, 0.12);
}

.home-module--bms { border-top: 3px solid var(--blue-bright); }
.home-module--mes { border-top: 3px solid var(--green); }
.home-module--hrm { border-top: 3px solid var(--violet); }

.home-chart-card__period {
  font-size: 0.82rem;
}

.home-module__head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.home-module__head h3 {
  margin: 0;
  font-size: 1rem;
}

.home-module__head p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.home-module__badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
}

.home-module--bms .home-module__badge { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.home-module--mes .home-module__badge { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.home-module--hrm .home-module__badge { background: rgba(139, 92, 246, 0.22); color: #c4b5fd; }

.home-module__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.home-module__stats div {
  display: grid;
  gap: 0.15rem;
  font-size: 0.78rem;
}

.home-module__stats strong {
  font-size: 1.15rem;
}

.home-module__btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1200px) {
  .home-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-grid--modules { grid-template-columns: 1fr; }
  .home-grid--bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .home-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid--main,
  .home-grid--bottom { grid-template-columns: 1fr; }
  .home-quick-grid { grid-template-columns: 1fr; }
  .home-topbar__actions { width: 100%; }
}

.panel-access-denied {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem 1rem;
}

.access-denied-card {
  max-width: 420px;
  text-align: center;
  padding: 2rem 1.75rem;
}

.access-denied-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.sidebar-admin__toggle {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-sub--muted {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.onboarding-wizard {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
}

.onboarding-wizard[hidden] {
  display: none !important;
}

.onboarding-wizard__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
}

.onboarding-wizard__card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 2rem));
  padding: 1.5rem;
}

.onboarding-wizard__steps {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.onboarding-wizard__step {
  font-size: 0.85rem;
  color: var(--muted);
}

.onboarding-wizard__step.is-active {
  color: #93c5fd;
  font-weight: 600;
}

.onboarding-wizard__step.is-done {
  color: #86efac;
}

.onboarding-wizard__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.onboarding-wizard--busy .onboarding-wizard__card {
  opacity: 0.85;
  pointer-events: none;
}

.onboarding-wizard--busy .btn {
  cursor: wait;
}

/* —— HRM module sidebar (inside /dashboard/) —— */
:root {
  --hrm-sidebar: 248px;
}

.hrm-main-column {
  display: contents;
}

.hrm-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.65rem 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(15, 10, 28, 0.98) 0%, rgba(11, 16, 32, 0.98) 100%);
  border-right: 1px solid rgba(167, 139, 250, 0.14);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.hrm-sidebar[hidden] {
  display: none !important;
}

.hrm-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.45rem 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hrm-sidebar__mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #ede9fe;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  flex-shrink: 0;
}

.hrm-sidebar__titles {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.hrm-sidebar__name {
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hrm-sidebar__tag {
  font-size: 0.68rem;
  color: #c4b5fd;
  letter-spacing: 0.04em;
}

.hrm-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
}

.hrm-nav__btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hrm-nav__btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  border-color: rgba(167, 139, 250, 0.15);
}

.hrm-nav__unread {
  margin-left: auto;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}

.hrm-nav__btn--active {
  background: rgba(124, 58, 237, 0.2);
  color: #ddd6fe;
  border-color: rgba(167, 139, 250, 0.28);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.15);
}

.hrm-nav__icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.hrm-nav__icon svg {
  width: 16px;
  height: 16px;
}

.hrm-nav-group {
  display: grid;
  gap: 0.1rem;
}

.hrm-nav-group__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.hrm-nav-group__toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.hrm-nav-group__chevron {
  width: 12px;
  font-size: 0.65rem;
  transition: transform 0.18s ease;
}

.hrm-nav-group--open .hrm-nav-group__chevron {
  transform: rotate(90deg);
}

.hrm-nav-group__items {
  display: grid;
  gap: 0.1rem;
  padding-left: 0.35rem;
}

.hrm-nav-group__items .hrm-nav__btn {
  padding-left: 1.35rem;
  font-size: 0.8rem;
}

.hrm-nav-group__items[hidden] {
  display: none !important;
}

.hrm-sidebar__foot {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hrm-sidebar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
}

.hrm-sidebar__back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.hrm-sidebar__empty {
  padding: 0.75rem 0.5rem;
  font-size: 0.82rem;
}

.main-admin.main-admin--hrm {
  display: grid;
  grid-template-columns: var(--hrm-sidebar) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  column-gap: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.main-admin.main-admin--hrm > .hrm-sidebar {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  top: auto;
  align-self: stretch;
  max-height: none;
  overflow-y: auto;
}

.main-admin.main-admin--hrm > .hrm-main-column {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 1rem 1rem;
}

.workspace-admin--hrm-module .hrm-main-column > .header {
  display: none;
}

.workspace-admin--hrm-module #panelHome {
  display: none !important;
}

@media (max-width: 900px) {
  .main-admin.main-admin--hrm {
    grid-template-columns: 1fr;
  }

  .main-admin.main-admin--hrm > .hrm-sidebar {
    grid-column: 1;
    grid-row: auto;
    position: static;
    max-height: none;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid rgba(167, 139, 250, 0.14);
  }

  .main-admin.main-admin--hrm > .hrm-main-column {
    grid-column: 1;
    grid-row: auto;
  }

  .hrm-sidebar__nav {
    max-height: 220px;
  }
}

/* Standalone HRM (/hrm/) — та же модульная палитра, что BMS/MES на главной */
body.workspace-hrm {
  --accent: var(--mod-hrm);
  --accent-soft: var(--mod-hrm-soft);
  --accent-text: var(--mod-hrm-text);
  --accent-border: var(--mod-hrm-border);
}

body.workspace-hrm .btn-primary,
body.workspace-hrm .nav-tab--active {
  background: var(--accent);
  border-color: var(--accent);
}

body.workspace-hrm .btn.payroll-hub-action-btn--issue {
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  border-color: rgba(196, 181, 253, 0.35);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
body.workspace-hrm .btn.payroll-hub-action-btn--issue:hover {
  box-shadow:
    0 6px 20px rgba(124, 58, 237, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
body.workspace-hrm .btn.payroll-hub-action-btn--fine {
  background: linear-gradient(180deg, #f87171 0%, #e11d48 100%);
  border-color: rgba(254, 205, 211, 0.35);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
body.workspace-hrm .btn.payroll-hub-action-btn--fine:hover {
  box-shadow:
    0 6px 20px rgba(225, 29, 72, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
body.workspace-hrm .btn.payroll-hub-action-btn--bonus {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  border-color: rgba(167, 243, 208, 0.35);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
body.workspace-hrm .btn.payroll-hub-action-btn--bonus:hover {
  box-shadow:
    0 6px 20px rgba(5, 150, 105, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body.workspace-hrm .workspace-admin .nav-tab--active {
  background: linear-gradient(180deg, #7c3aed, #6d28d9);
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
}

body.workspace-hrm .link-name,
body.workspace-hrm .footer-links a {
  color: var(--accent-text);
}

body.workspace-hrm .module-sidebar--live .module-sidebar__head:hover:not(:disabled) {
  border-color: var(--mod-hrm-border);
}

body.workspace-hrm .login-stat-card--accent-up .login-stat-card__value {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* —— Payroll calculation wizard —— */
.payroll-wizard {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.payroll-wizard[hidden] {
  display: none !important;
}

.payroll-wizard__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
}

.payroll-wizard__card {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 2rem));
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.payroll-wizard__head {
  padding: 1rem 1.15rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.payroll-wizard__head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.payroll-wizard__head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.payroll-wizard__steps {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
}

.payroll-wizard__step {
  font-size: 0.82rem;
  color: var(--muted);
}

.payroll-wizard__step.is-active {
  color: #93c5fd;
  font-weight: 600;
}

.payroll-wizard__step.is-done {
  color: #86efac;
}

.payroll-wizard__checklist {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 4.5rem;
  overflow: auto;
}

.payroll-wizard__check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.payroll-wizard__check.is-active {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.payroll-wizard__check.is-done {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.payroll-wizard__check-mark {
  font-size: 0.72rem;
}

.payroll-wizard__body {
  padding: 0.9rem 1.15rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.payroll-wizard__lead {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.payroll-wizard__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.payroll-wizard__toolbar .payroll-search-input {
  flex: 1 1 220px;
  min-width: 160px;
}

.payroll-wizard__emp-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 48vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.payroll-wizard__emp {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.payroll-wizard__emp:hover {
  border-color: rgba(147, 197, 253, 0.45);
}

.payroll-wizard__emp input {
  margin-top: 0.2rem;
}

.payroll-wizard__emp-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.payroll-wizard__emp-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.payroll-wizard__emp-head p {
  margin: 0.2rem 0 0.7rem;
}

.payroll-wizard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.payroll-wizard__stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.payroll-wizard__stat span {
  font-size: 0.78rem;
  color: var(--muted);
}

.payroll-wizard__stat strong {
  font-size: 1.05rem;
}

.payroll-wizard__shift-form {
  margin-top: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.payroll-wizard__shift-form h4 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.payroll-wizard__shift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.payroll-wizard__shift-grid .field input[type="date"],
.payroll-wizard__shift-grid .field input[type="time"],
.payroll-wizard__shift-grid .field input[type="text"] {
  width: 100%;
}

.payroll-wizard__shift-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.payroll-wizard__breakdown {
  margin-bottom: 0.85rem;
}

.payroll-wizard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.payroll-wizard__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.payroll-wizard--busy .payroll-wizard__card {
  opacity: 0.85;
  pointer-events: none;
}

.payroll-wizard--busy .btn {
  cursor: wait;
}

.payroll-wizard .shifts-table tr.is-review {
  background: rgba(251, 191, 36, 0.08);
}

@media (max-width: 720px) {
  .payroll-wizard__stats,
  .payroll-wizard__shift-grid {
    grid-template-columns: 1fr;
  }
}

body.payroll-wizard-open .modal {
  z-index: 1400;
}

/* —— Attendance entry: employee KPI —— */
.att-entry-kpi {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.att-entry-kpi[hidden] {
  display: none !important;
}

.att-kpi__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.att-kpi__title {
  margin: 0;
  font-size: 1rem;
}

.att-kpi__hint {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.att-kpi__score {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.att-kpi__score strong {
  font-size: 1.5rem;
  line-height: 1;
}

.att-kpi__score--good {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
}

.att-kpi__score--good strong {
  color: #4ade80;
}

.att-kpi__score--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

.att-kpi__score--warn strong {
  color: #fbbf24;
}

.att-kpi__score--bad {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
}

.att-kpi__score--bad strong {
  color: #f87171;
}

.att-kpi__bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.att-kpi-bar {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.att-kpi-bar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.83rem;
}

.att-kpi-bar__head strong {
  font-size: 0.95rem;
}

.att-kpi-bar__track {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.att-kpi-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.att-kpi-bar__fill--good {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.att-kpi-bar__fill--warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.att-kpi-bar__fill--bad {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.att-kpi-bar__fill--muted {
  background: rgba(148, 163, 184, 0.35);
}

.att-kpi-bar__note {
  font-size: 0.76rem;
}

.att-kpi__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.att-kpi-chip {
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.att-kpi-chip--up {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.att-kpi-chip--down {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

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