/* ============================================================
   FITNESS CRM — Custom CSS Framework v1.0
   Эстетика: Dark Industrial / Precision Dashboard
   Шрифты: Rajdhani (заголовки) + IBM Plex Sans (тело)
   Концепция: Строгий, функциональный, с неоновыми акцентами.
   Glassmorphism, острые углы, плотная информация.
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── CSS Variables — Design Tokens ────────────────────────── */
:root {
  /* Palette */

  --c-bg:           #0a0c10;
  --c-bg-1:         #0e1117;
  --c-bg-2:         #141820;
  --c-bg-3:         #1a2030;
  --c-surface:      #1c2232;
  --c-surface-2:    #222a3a;
  --c-surface-3:    #2a3347;
  --c-border:       rgba(255,255,255,0.07);
  --c-border-2:     rgba(255,255,255,0.12);

  /* Brand accent — неоново-бирюзовый */
  --c-accent:       #00d4aa;
  --c-accent-dim:   rgba(0, 212, 170, 0.15);
  --c-accent-glow:  rgba(0, 212, 170, 0.4);
  --c-accent-dark:  #00a884;

  /* Secondary accent — электрический синий */
  --c-blue:         #4d9fff;
  --c-blue-dim:     rgba(77, 159, 255, 0.15);

  /* Status colors */
  --c-success:      #22d47a;
  --c-success-dim:  rgba(34, 212, 122, 0.15);
  --c-warning:      #f5a623;
  --c-warning-dim:  rgba(245, 166, 35, 0.15);
  --c-danger:       #ff4d6a;
  --c-danger-dim:   rgba(255, 77, 106, 0.15);
  --c-info:         #4d9fff;
  --c-info-dim:     rgba(77, 159, 255, 0.15);

  /* Text */
  --c-text:         #e8eaf0;
  --c-text-2:       #9aa3b8;
  --c-text-3:       #5c6580;
  --c-text-inv:     #0a0c10;

  /* Typography */
  --font-display:   'Rajdhani', sans-serif;
  --font-body:      'IBM Plex Sans', sans-serif;
  --font-mono:      'IBM Plex Mono', monospace;

  /* Font sizes */
  --fs-xs:    11px;
  --fs-sm:    13px;
  --fs-base:  14px;
  --fs-md:    15px;
  --fs-lg:    17px;
  --fs-xl:    20px;
  --fs-2xl:   24px;
  --fs-3xl:   28px;
  --fs-4xl:   38px;

  /* Spacing */
  --sp-1:  4px;   --sp-2:  8px;   --sp-3:  12px;
  --sp-4:  16px;  --sp-5:  20px;  --sp-6:  24px;
  --sp-7:  28px;  --sp-8:  32px;  --sp-10: 40px;
  --sp-12: 48px;  --sp-16: 64px;

  /* Radii */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 24px;
  --r-pill: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.7);
  --shadow-accent: 0 0 24px var(--c-accent-glow);
  --shadow-danger: 0 0 24px rgba(255,77,106,0.4);

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-base:   0.2s ease;
  --t-slow:   0.35s cubic-bezier(0.4,0,0.2,1);

  /* Layout */
  --sidebar-w:     240px;
  --sidebar-w-col: 64px;
  --header-h:      60px;
  --content-max:   1500px;
  --z-sidebar:     100;
  --z-header:      200;
  --z-dropdown:    300;
  --z-modal:       400;
  --z-toast:       500;
  --z-overlay:     600;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.types-table-body{background: #121212;}
a { color: var(--c-accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-accent-dark); }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Скроллбар */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg-2); }
::-webkit-scrollbar-thumb { background: var(--c-surface-3); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-3); }

/* Выделение текста */
::selection { background: var(--c-accent-dim); color: var(--c-accent); }

/* ── Layout Shell ──────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--t-slow);
}
.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-w-col) 1fr;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  grid-row: 1 / -1;
  background: var(--c-bg-1);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: var(--z-sidebar);
  transition: width var(--t-slow);
  width: var(--sidebar-w);
}
.app-shell.sidebar-collapsed .sidebar { width: var(--sidebar-w-col); }

.sidebar-logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--c-accent-dim);
  border: 1px solid var(--c-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-accent);
  font-size: 18px;
  box-shadow: var(--shadow-accent);
}
.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--t-base);
}
.app-shell.sidebar-collapsed .sidebar-logo-text { opacity: 0; width: 0; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-3) 0;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-3);
  padding: var(--sp-3) var(--sp-4) var(--sp-2);
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--t-base);
}
.app-shell.sidebar-collapsed .sidebar-section-label { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  margin: 1px var(--sp-2);
  border-radius: var(--r-md);
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  width: calc(100% - var(--sp-4));
  text-align: left;
}
.nav-item:hover {
  background: var(--c-bg-2);
  color: var(--c-text);
}
.nav-item.active {
  background: var(--c-accent-dim);
  color: var(--c-accent);
  border: 1px solid rgba(0,212,170,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--c-accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  box-shadow: 0 0 8px var(--c-accent-glow);
}
.nav-item-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.nav-item-text {
  opacity: 1;
  transition: opacity var(--t-base);
}
.app-shell.sidebar-collapsed .nav-item-text { opacity: 0; width: 0; }
.nav-item-badge {
  margin-left: auto;
  background: var(--c-danger);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  line-height: 1.5;
  flex-shrink: 0;
  transition: opacity var(--t-base);
}
.app-shell.sidebar-collapsed .nav-item-badge { opacity: 0; }

.sidebar-footer {
  border-top: 1px solid var(--c-border);
  padding: var(--sp-3);
  flex-shrink: 0;
}
.user-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: background var(--t-fast);
}
.user-card:hover { background: var(--c-bg-2); }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--c-blue-dim);
  border: 1px solid var(--c-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--c-blue);
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.user-info { overflow: hidden; flex: 1; }
.user-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transition: opacity var(--t-base);
}
.user-role {
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  opacity: 1;
  transition: opacity var(--t-base);
}
.app-shell.sidebar-collapsed .user-name,
.app-shell.sidebar-collapsed .user-role { opacity: 0; }

/* ── Header ────────────────────────────────────────────────── */
.header {
  background: var(--c-bg-1);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-6);
  position: sticky;
  top: 0;
  z-index: var(--z-header);

}

.header-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.header-toggle:hover { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-border-2); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  flex: 1;
  min-width: 0;
}
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb-current {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

.header-clock {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  letter-spacing: 0.05em;
  padding: var(--sp-1) var(--sp-3);
  background: var(--c-bg-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
}

.shift-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.shift-badge.open {
  background: var(--c-success-dim);
  color: var(--c-success);
  border: 1px solid rgba(34,212,122,0.2);
}
.shift-badge.closed {
  background: var(--c-danger-dim);
  color: var(--c-danger);
  border: 1px solid rgba(255,77,106,0.2);
}
.shift-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.shift-badge.open .shift-badge-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px transparent; }
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--t-fast);
  position: relative;
}
.icon-btn:hover { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-border-2); }
.icon-btn .badge-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-danger);
  border: 2px solid var(--c-bg-1);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  grid-column: 2;
  min-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--c-bg);
  padding: 10px 30px;
}
.page {
 /* max-width: var(--content-max);*/
  margin: 0 auto;
  padding: var(--sp-6);
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text);
  line-height: 1.1;
}
.page-subtitle {
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  margin-top: var(--sp-1);
}
.page-actions { display: flex; gap: var(--sp-2); align-items: center; flex-shrink: 0; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.card:hover { border-color: var(--c-border-2); }
.card-glass {
  background: rgba(28, 34, 50, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--c-text);
}
.card-subtitle { font-size: var(--fs-sm); color: var(--c-text-3); }

/* Stat Cards */
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
  transition: all var(--t-base);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--stat-color, var(--c-accent));
  opacity: 0.6;
}
.stat-card:hover { border-color: var(--c-border-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--stat-color-dim, var(--c-accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: var(--sp-3);
  color: var(--stat-color, var(--c-accent));
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.stat-card-label { font-size: var(--fs-sm); color: var(--c-text-3); }
.stat-card-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-top: var(--sp-2);
}
.stat-card-delta.up { color: var(--c-success); }
.stat-card-delta.down { color: var(--c-danger); }

/* ── Grid System ───────────────────────────────────────────── */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-7 { grid-template-columns: repeat(7, 1fr); }
.grid-8 { grid-template-columns: repeat(8, 1fr); }

.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-full { grid-column: 1 / -1; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  height: 36px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-sm { height: 28px; padding: 0 var(--sp-3); font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { height: 44px; padding: 0 var(--sp-6); font-size: var(--fs-md); }
.btn-xl { height: 52px; padding: 0 var(--sp-8); font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-icon.btn-lg { width: 44px; }

/* Primary */
.btn-primary {
  background: var(--c-accent);
  color: var(--c-text-inv);
  border-color: var(--c-accent);
}
.btn-primary:hover {
  background: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
  box-shadow: 0 0 16px var(--c-accent-glow);
  color: white !important;
}

/* Secondary */
.btn-secondary {
  background: var(--c-surface-3);
  color: var(--c-text);
  border-color: var(--c-border-2);
}
.btn-secondary:hover { background: var(--c-surface-2); border-color: var(--c-text-3); }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--c-text-2);
  border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-border-2); }

/* Danger */
.btn-danger {
  background: var(--c-danger);
  color: #fff;
  border-color: var(--c-danger);
}
.btn-danger:hover { background: #e03358; box-shadow: var(--shadow-danger); }

/* Danger ghost */
.btn-danger-ghost {
  background: transparent;
  color: var(--c-danger);
  border-color: rgba(255,77,106,0.3);
}
.btn-danger-ghost:hover { background: var(--c-danger-dim); border-color: var(--c-danger); }

/* Success */
.btn-success {
  background: var(--c-success);
  color: var(--c-text-inv);
  border-color: var(--c-success);
}
.btn-success:hover { background: #1ab866; box-shadow: 0 0 16px rgba(34,212,122,0.4); }

/* Warning */
.btn-warning {
  background: var(--c-warning);
  color: var(--c-text-inv);
  border-color: var(--c-warning);
}
.btn-warning:hover { background: #e09520; }

/* Info / Blue */
.btn-blue {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
}
.btn-blue:hover { background: #3a8ae8; box-shadow: 0 0 16px rgba(77,159,255,0.4); }

/* Button loading state */
.btn.loading { pointer-events: none; color: transparent; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  color: var(--c-text-inv);
}
.btn-ghost.loading::after { color: var(--c-text-2); }

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

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-4); }
.form-group:last-child { margin-bottom: 0; }
.form-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-2);
  letter-spacing: 0.01em;
}
.label.required::after {
  content: ' *';
  color: var(--c-danger);
}

.input, .select, .textarea {
  width: 100%;
  height: 38px;
  padding: 0 var(--sp-3);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-md);
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-family: var(--font-body);
  transition: all var(--t-fast);
  outline: none;
  -webkit-appearance: none;
}
.input::placeholder { color: var(--c-text-3); }
.input:hover { border-color: var(--c-text-3); }
.input:focus {
  border-color: var(--c-accent);
  background: var(--c-bg-3);
  box-shadow: 0 0 0 3px var(--c-accent-dim);
}
.input.error { border-color: var(--c-danger); }
.input.error:focus { box-shadow: 0 0 0 3px var(--c-danger-dim); }
.input.success { border-color: var(--c-success); }

.textarea {
  height: auto;
  min-height: 90px;
  padding: var(--sp-2) var(--sp-3);
  resize: vertical;
  line-height: 1.6;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235c6580' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-3) center;
  padding-right: var(--sp-8);
  cursor: pointer;
}
.select:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-dim);
}

/* Input with icon */
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 36px; }
.input-wrap .input-icon {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  font-size: 15px;
  pointer-events: none;
  display: flex;
}
.input-wrap .input-action {
  position: absolute;
  right: var(--sp-2);
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  font-size: 14px;
  cursor: pointer;
  padding: var(--sp-1);
  border-radius: var(--r-sm);
}
.input-wrap .input-action:hover { color: var(--c-text); }

/* Input group */
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); flex: 1; }
.input-group .btn { border-radius: 0 var(--r-md) var(--r-md) 0; flex-shrink: 0; margin-left: -1px; }

.form-hint { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: var(--sp-1); }
.form-error { font-size: var(--fs-xs); color: var(--c-danger); margin-top: var(--sp-1); display: none; }
.form-error.visible { display: block; }

/* Checkbox / Radio */
.checkbox-wrap, .radio-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.checkbox-wrap input[type="checkbox"],
.radio-wrap input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--c-accent);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-label, .radio-label { font-size: var(--fs-sm); color: var(--c-text-2); }

/* ── Custom Checkboxes (глобальные) ────────────────────────── */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--c-border-2);
  border-radius: 4px;
  background: var(--c-bg-2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all var(--t-fast);
  vertical-align: middle;
}
input[type="checkbox"]:hover {
  border-color: var(--c-accent);
  background: var(--c-bg-3);
}
input[type="checkbox"]:checked {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-dim);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 2px solid var(--c-text-inv);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
input[type="checkbox"]:indeterminate {
  background: var(--c-accent-dim);
  border-color: var(--c-accent);
}
input[type="checkbox"]:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px; top: 6px;
  width: 8px; height: 2px;
  background: var(--c-accent);
  border: none;
  transform: none;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Custom Radio ──────────────────────────────────────────── */
input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--c-border-2);
  border-radius: 50%;
  background: var(--c-bg-2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all var(--t-fast);
  vertical-align: middle;
}
input[type="radio"]:hover {
  border-color: var(--c-accent);
}
input[type="radio"]:checked {
  border-color: var(--c-accent);
  background: var(--c-bg-2);
  box-shadow: 0 0 0 3px var(--c-accent-dim);
}
input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
}
input[type="radio"]:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
input[type="radio"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
}
.toggle-input { display: none; }
.toggle-track {
  width: 40px; height: 22px;
  border-radius: var(--r-pill);
  background: var(--c-surface-3);
  border: 1px solid var(--c-border-2);
  transition: all var(--t-base);
  position: relative;
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c-text-3);
  transition: all var(--t-base);
}
.toggle-input:checked ~ .toggle-track { background: var(--c-accent-dim); border-color: var(--c-accent); }
.toggle-input:checked ~ .toggle-track .toggle-thumb { background: var(--c-accent); transform: translateX(18px); }
.toggle-label { font-size: var(--fs-sm); color: var(--c-text-2); }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
}
table, .table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table thead th {
  background: var(--c-bg-2);
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-text-3);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.table thead th.sortable { cursor: pointer; }
.table thead th.sortable:hover { color: var(--c-text-2); }
.table thead th.sorted-asc::after { content: ' ↑'; color: var(--c-accent); }
.table thead th.sorted-desc::after { content: ' ↓'; color: var(--c-accent); }

.table tbody tr {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--t-fast);
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--c-bg-2); }
.table tbody tr.selected { background: var(--c-accent-dim); }
.table tbody td {
  padding: var(--sp-3) var(--sp-4);
  color: var(--c-text-2);
  vertical-align: middle;
}
.table tbody td.strong { color: var(--c-text); font-weight: 500; }
.table-actions { display: flex; gap: var(--sp-1); align-items: center; }

/* ── Badges & Tags ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-success { background: var(--c-success-dim); color: var(--c-success); }
.badge-danger  { background: var(--c-danger-dim);  color: var(--c-danger); }
.badge-warning { background: var(--c-warning-dim); color: var(--c-warning); }
.badge-info    { background: var(--c-info-dim);    color: var(--c-info); }
.badge-neutral { background: var(--c-surface-3);   color: var(--c-text-2); }
.badge-accent  { background: var(--c-accent-dim);  color: var(--c-accent); }

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-overlay.open .modal { transform: translateY(0) scale(1); opacity: 1; }

.modal {
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform var(--t-slow), opacity var(--t-slow);
}
.modal-sm  { max-width: 400px; }
.modal-md  { max-width: 700px; }
.modal-lg  { max-width: 860px; }
.modal-xl  { max-width: 960px; }
.modal-full { max-width: 98vw; height: 96vh; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-border-2); }

.modal-body {
  padding: var(--sp-6);
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}

/* Check-in специальная модалка */
.checkin-modal { max-width: 480px; }
.checkin-modal .modal-header {
  background: var(--c-bg-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.checkin-client-photo {
  width: 80px; height: 80px;
  border-radius: var(--r-xl);
  object-fit: cover;
  border: 3px solid var(--c-border-2);
}
.checkin-status-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.checkin-status-icon.ok { background: var(--c-success-dim); border: 2px solid var(--c-success); }
.checkin-status-icon.warn { background: var(--c-warning-dim); border: 2px solid var(--c-warning); }
.checkin-status-icon.deny { background: var(--c-danger-dim); border: 2px solid var(--c-danger); }

/* ── Toasts ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  min-width: 280px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.toast.closing { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in {
  from { transform: translateX(100%) scale(0.9); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0) scale(1); opacity: 1; }
  to   { transform: translateX(100%) scale(0.9); opacity: 0; }
}
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--toast-color, var(--c-accent));
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.toast-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: var(--fs-sm); font-weight: 600; color: var(--c-text); margin-bottom: 2px; }
.toast-message { font-size: var(--fs-xs); color: var(--c-text-2); line-height: 1.5; }
.toast-close {
  background: none; border: none;
  color: var(--c-text-3); font-size: 16px;
  padding: 0; cursor: pointer;
  flex-shrink: 0; margin-top: 1px;
  transition: color var(--t-fast);
}
.toast-close:hover { color: var(--c-text); }
.toast.success { --toast-color: var(--c-success); }
.toast.error   { --toast-color: var(--c-danger); }
.toast.warning { --toast-color: var(--c-warning); }
.toast.info    { --toast-color: var(--c-blue); }

/* ── Dropdown ──────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + var(--sp-1));
  right: 0;
  min-width: 180px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding: var(--sp-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: all var(--t-base);
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--c-bg-2); color: var(--c-text); }
.dropdown-item.danger { color: var(--c-danger); }
.dropdown-item.danger:hover { background: var(--c-danger-dim); }
.dropdown-divider { height: 1px; background: var(--c-border); margin: var(--sp-1) 0; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs { border-bottom: 1px solid var(--c-border); display: flex; gap: 0; margin-bottom: var(--sp-5); }
.tab-btn {
  padding: var(--sp-3) var(--sp-4);
  border: none;
  background: none;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--t-fast);
  display: flex; align-items: center; gap: var(--sp-2);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--c-text-2); }
.tab-btn.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  justify-content: center;
  margin-top: var(--sp-5);
}
.page-btn {
  min-width: 32px; height: 32px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: none;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.page-btn:hover { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-border-2); }
.page-btn.active { background: var(--c-accent); color: var(--c-text-inv); border-color: var(--c-accent); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Search bar ────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.search-bar .input-wrap { flex: 1; max-width: 420px; }

/* ── Loading states ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-3) 50%, var(--c-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: var(--r-md);
}
@keyframes skeleton-shine {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skeleton-text  { height: 14px; margin-bottom: var(--sp-2); }
.skeleton-title { height: 24px; margin-bottom: var(--sp-3); width: 60%; }
.skeleton-row   { height: 48px; margin-bottom: 1px; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--c-border-2);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }

.loading-overlay {
  position: absolute; inset: 0;
  background: rgba(10,12,16,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16) var(--sp-6);
  text-align: center;
}
.empty-state-icon { font-size: 48px; opacity: 0.3; margin-bottom: var(--sp-4); }
.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: var(--sp-2);
}
.empty-state-desc { font-size: var(--fs-sm); color: var(--c-text-3); max-width: 360px; margin-bottom: var(--sp-5); }

/* ── Alerts / Banners ──────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-success { background: var(--c-success-dim); border-color: rgba(34,212,122,0.25); color: var(--c-success); }
.alert-danger  { background: var(--c-danger-dim);  border-color: rgba(255,77,106,0.25); color: var(--c-danger); }
.alert-warning { background: var(--c-warning-dim); border-color: rgba(245,166,35,0.25); color: var(--c-warning); }
.alert-info    { background: var(--c-info-dim);    border-color: rgba(77,159,255,0.25); color: var(--c-info); }

/* ── Progress bars ─────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--c-surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  transition: width 0.5s ease;
}
.progress-bar.danger  { background: var(--c-danger); }
.progress-bar.warning { background: var(--c-warning); }
.progress-bar.success { background: var(--c-success); }
.progress-bar.blue    { background: var(--c-blue); }
.progress-bar.striped {
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 6px, rgba(255,255,255,0.1) 6px, rgba(255,255,255,0.1) 12px
  );
}

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--c-border); margin: var(--sp-5) 0; }
.divider-text {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--c-text-3); font-size: var(--fs-xs);
  margin: var(--sp-5) 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--c-border);
}

/* ── Utility classes ───────────────────────────────────────── */
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center{ justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.flex-1        { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }

.hidden      { display: none !important; }
.visible     { display: block !important; }
.invisible   { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.text-xs    { font-size: var(--fs-xs); }
.text-sm    { font-size: var(--fs-sm); }
.text-base  { font-size: var(--fs-base); }
.text-lg    { font-size: var(--fs-lg); }
.text-xl    { font-size: var(--fs-xl); }
.text-2xl   { font-size: var(--fs-2xl); }
.text-muted { color: var(--c-text-3); }
.text-dim   { color: var(--c-text-2); }
.text-accent{ color: var(--c-accent); }
.text-danger{ color: var(--c-danger); }
.text-success{color: var(--c-success);}
.text-warning{color: var(--c-warning);}
.text-mono  { font-family: var(--font-mono); }

.text-display{font-family: var(--font-display);}
.font-bold  { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium{ font-weight: 500; }
.text-center{ text-align: center; }
.text-right { text-align: right; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itogo-sum{
  padding: 5px 17px !important;
  font-size: 18px !important;
}
.p-0{padding:0;} .p-3{padding:var(--sp-3);} .p-4{padding:var(--sp-4);} .p-5{padding:var(--sp-5);}
.mt-2{margin-top:var(--sp-2);} .mt-3{margin-top:var(--sp-3);} .mt-4{margin-top:var(--sp-4);}
.mt-5{margin-top:var(--sp-5);} .mt-6{margin-top:var(--sp-6);}
.mb-2{margin-bottom:var(--sp-2);} .mb-3{margin-bottom:var(--sp-3);} .mb-4{margin-bottom:var(--sp-4);}
.mb-5{margin-bottom:var(--sp-5);} .mb-6{margin-bottom:var(--sp-6);}
.rounded   { border-radius: var(--r-md); }
.rounded-lg{ border-radius: var(--r-lg); }
.rounded-xl{ border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-pill); }
.overflow-hidden { overflow: hidden; }
.relative   { position: relative; }
.w-full     { width: 100%; }
.cursor-pointer { cursor: pointer; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.anim-fade-in    { animation: fade-in 0.3s ease; }
.anim-slide-up   { animation: slide-up 0.35s ease; }
.anim-scale-in   { animation: scale-in 0.25s ease; }

/* Stagger children */
.stagger > * { animation: slide-up 0.35s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.16s; }
.stagger > *:nth-child(5) { animation-delay: 0.20s; }
.stagger > *:nth-child(6) { animation-delay: 0.24s; }
.stagger > *:nth-child(7) { animation-delay: 0.28s; }
.stagger > *:nth-child(8) { animation-delay: 0.32s; }

/* ── Data list / Info pairs ────────────────────────────────── */
.info-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.info-row  { display: flex; justify-content: space-between; align-items: center; }
.info-row-label { font-size: var(--fs-sm); color: var(--c-text-3); }
.info-row-value { font-size: var(--fs-sm); font-weight: 500; color: var(--c-text); }

/* ── Avatar ────────────────────────────────────────────────── */
.avatar {
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--c-surface-3);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
}
.avatar-sm  { width: 28px; height: 28px; font-size: 12px; }
.avatar-md  { width: 40px; height: 40px; font-size: 16px; }
.avatar-lg  { width: 56px; height: 56px; font-size: 22px; border-radius: var(--r-lg); }
.avatar-xl  { width: 80px; height: 80px; font-size: 32px; border-radius: var(--r-xl); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Tooltip (CSS-only) ────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% - 66px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-bg-3);
  border: 1px solid var(--c-border-2);
  color: var(--c-text);
  font-size: var(--fs-xs);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast);
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Neon glow effect for accented elements ────────────────── */
.glow-accent { box-shadow: var(--shadow-accent); }
.glow-danger  { box-shadow: var(--shadow-danger); }

/* ── Code blocks ───────────────────────────────────────────── */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  color: var(--c-accent);
}
pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  overflow-x: auto;
  line-height: 1.7;
}
.hide-desktop{
  display: none;
}
/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .sidebar, .header, .toast-container, .modal-overlay { display: none !important; }
  .main-content { grid-column: 1; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ddd; }
}


.membership-nav-btn{

}
/* Пульсация и красный цвет для критических элементов */
.shift-critical {
  animation: panic-pulse 1.5s infinite ease-in-out !important;
  color: var(--c-danger) !important;
  border-color: var(--c-danger) !important;
  position: relative;
  z-index: 10;
}
.shift-critical::before {
  background: linear-gradient(to right, rgba(255, 77, 106, 0.15), rgba(10, 12, 16, 0.9)) !important;
}
/* Специфичное переопределение для Hero-блока на странице смен */
.shift-hero.shift-critical {
  background: linear-gradient(135deg, rgba(255, 77, 106, 0.15) 0%, rgba(10, 12, 16, 0.9) 100%) !important;
  border: 2px solid var(--c-danger) !important;
  box-shadow: 0 0 40px rgba(255, 77, 106, 0.25) !important;
}

/* Специфичное переопределение для пункта меню */
.nav-item.shift-critical {
  background: rgba(255, 77, 106, 0.15) !important;
  border: 1px solid var(--c-danger) !important;
}
.nav-item.shift-critical:hover {
  background: rgba(255, 77, 106, 0.25) !important;
}

@keyframes panic-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 106, 0.4);
  }
  50% {
    box-shadow: 0 0 15px 4px rgba(255, 77, 106, 0.6);
    border-color: #ff4d6a;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 106, 0);
  }
}

/* Оранжевое предупреждение за 10 минут */
.shift-warning {
  animation: warning-pulse 2s infinite ease-in-out !important;
  color: var(--c-warning) !important;
  border-color: var(--c-warning) !important;
}
.shift-warning::before {
  background: linear-gradient(to right, rgba(245,166,35,0.6), rgba(10, 12, 16, 0.9)) !important;
}
@keyframes warning-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245,166,35,0.4); }
  50% { box-shadow: 0 0 15px 4px rgba(245,166,35,0.6); border-color: #f5a623; }
  100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); }
}
.global-warning-bar {
  background: rgba(245,166,35,0.1);
  color: var(--c-warning);
  border: 1px solid rgba(245,166,35,0.3);
  text-align: center;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
  position: sticky;
  z-index: 999;
  animation: slide-down 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 20px rgba(245,166,35,0.2);
}

/* Глобальный баннер тревоги */
.global-alert-bar {
  background: var(--c-danger);
  color: #fff;
  text-align: center;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
  position: sticky;
  z-index: 999; 
  animation: slide-down 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 20px rgba(255, 77, 106, 0.5);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  height: 33px;
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}


.clients-stagger .stat-card{
  max-height: 88px !important;
}
.clients-stagger .stat-card .stat-card-icon{
  position: absolute !important;
  bottom: -7px !important;
  right: 5px !important;
  width: 30px !important;
  height: 30px !important;
}

/* ── Gift cert modal items ─────────────────────────────────────── */
.gift-cert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.gift-cert-item:hover {
  background: rgba(0,212,170,.07);
  border-color: var(--c-accent);
}
.gift-cert-item.selected {
  background: rgba(0,212,170,.15);
  border-color: var(--c-accent);
}
.gift-cert-item__code {
  font-weight: 700;
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 1px;
  color: var(--c-text);
  flex-shrink: 0;
}
.gift-cert-item__badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0,212,170,.12);
  color: var(--c-accent);
  font-weight: 600;
  flex-shrink: 0;
}
.gift-cert-item__info {
  font-size: 12px;
  color: var(--c-text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gift-cert-item__notes {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 1px;
}

/* ── Chat chips ────────────────────────────────────────────────── */
.chat-chips {
  padding: 8px 16px 0;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chat-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.chat-chip:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ (Кроссбраузерные)
   ========================================= */
.nav-item-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  min-width: 20px; /* Чтобы не сплющило в Flexbox */

  /* Гарантия отображения фона */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;

  /* Прозрачность для обычного состояния */
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* При наведении */
.nav-item:hover .nav-item-icon,
.dropdown-item:hover .nav-item-icon {
  opacity: 1;
  transform: scale(1.1); /* Легкий зум для красоты */
}

.dashb_hihi{
  display:flex;align-items:flex-start;justify-content:space-between;
  flex-wrap:wrap;gap:var(--sp-3);margin-bottom:var(--sp-4);
}

.tiles-tr{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-bottom:16px;
}

/* ── Responsive breakpoints ────────────────────────────────── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .header {
    width: 100vw;
  }
  .main-content{
    padding: unset !important;
    margin-top: 69px !important;
  }
  .app-shell {
    grid-template-columns: 0 1fr;
  }
  .app-shell.sidebar-open {
    grid-template-columns: var(--sidebar-w) 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--t-slow);
    z-index: var(--z-overlay);
    width: var(--sidebar-w) !important;
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 600px) {
  .broadcast-fab{
    bottom: unset !important;
    left: unset !important;
    top: 3px;
    right: 5px;
    width: 50px !important;
    height: 50px !important;
  }
  .chat-layout{
    flex-direction: column;
    height: unset !important;
  }
  .chat-rooms{
    width: unset !important;
    min-width: unset !important;
    max-height: 400px !important;
   /* height: 400px !important;*/
  }
  .rooms-list{
    height: 400px !important;
  }
  .page-header{
    flex-direction: column !important;
  }
  .tiles-tr{
    grid-template-columns:repeat(2,1fr) !important;
  }
  #sidebar-toggle, #header-clock, #header-accrual-btn, .breadcrumb-current{
    display: none;
  }
  .main-content{
    padding: 0px !important;
    margin-top: 60px;
  }
  .header{
    height: 55px;
  }
  .page { padding: var(--sp-4); }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .toast-container { left: var(--sp-4); right: var(--sp-4); }
  .toast { min-width: auto; max-width: 100%; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
  .hide-sm { display: none !important; }
  .hide-desktop{  display: block;}
}

