/* ── Дизайн-токены (из Gobis OS; цвета — по логотипу клиники) ─────────── */
:root {
  /* Brand — синий и красный с логотипа «ЛОР клиника 1» */
  --brand:          #1E3F8F;
  --brand-dark:     #152D69;
  --brand-mid:      #2A52AE;
  --brand-light:    #E7ECF7;
  --brand-subtle:   #F3F6FB;
  --accent:         #E5352B;

  --red:            #CC2B1D;
  --red-dark:       #a82217;
  --red-light:      #fdf0ef;

  --orange:         #D97706;
  --orange-light:   #fffbeb;

  --blue:           #1D5DB8;
  --blue-light:     #eef3fc;

  /* Sidebar */
  --sidebar-bg:           #111418;
  --sidebar-border:       rgba(255,255,255,.07);
  --sidebar-text:         #8A929E;
  --sidebar-text-active:  #FFFFFF;
  --sidebar-hover:        rgba(255,255,255,.055);
  --sidebar-active-bg:    rgba(30,63,143,.22);
  --sidebar-active-dot:   #1E3F8F;
  --sidebar-width:        224px;
  --sidebar-width-sm:     56px;

  /* Surface */
  --bg-app:       #F3F5F7;
  --bg-card:      #FFFFFF;
  --bg-hover:     #F5F7FA;
  --bg-stripe:    #FAFBFC;
  --border:       #E4E7EC;
  --border-focus: #1E3F8F;

  /* Text */
  --text-primary:   #0F1117;
  --text-secondary: #4B5161;
  --text-muted:     #8A929E;

  /* Semantic */
  --color-primary:       var(--brand);
  --color-primary-dark:  var(--brand-dark);
  --color-primary-light: var(--brand-light);
  --color-danger:        var(--red);
  --color-danger-dark:   var(--red-dark);
  --color-success:       #127001;
  --color-warning:       var(--orange);
  --color-info:          var(--blue);

  /* Shape */
  --radius-sm:  4px;
  --radius:     6px;
  --radius-lg:  10px;
  --radius-xl:  14px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);

  /* Motion */
  --t-fast: 100ms ease;
  --t-med:  180ms ease;
  --t-slow: 280ms ease;
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; display: block; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--text-muted);
  font-size: 14px;
  gap: 8px;
}
.access-denied { color: var(--color-danger); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2px;
}
.badge--green  { background: var(--brand-light);  color: var(--brand-dark); }
.badge--red    { background: var(--red-light);    color: var(--red-dark); }
.badge--orange { background: var(--orange-light); color: #92400e; }
.badge--blue   { background: var(--blue-light);   color: var(--blue); }
.badge--gray   { background: var(--bg-hover);     color: var(--text-muted); border: 1px solid var(--border); }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
