/* =====================================================================
   PERROCA — Hastane Yönetim Paneli Teması
   ---------------------------------------------------------------------
   Tasarım ilkeleri (klinik ortam için):
     * Yüksek kontrast — vardiya sonu yorgun gözler için
     * Sakin, klinik renk paleti; kırmızı YALNIZCA gerçek uyarı için
     * Büyük dokunma hedefleri (44px+) — eldivenli el, tablet kullanımı
     * Bakım düzeyi renkleri renk körlüğüne dayanıklı + metin etiketli
     * Yazdırma dostu (vardiya listesi kâğıda basılır)
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. TASARIM BELİRTEÇLERİ
   --------------------------------------------------------------------- */
:root {
  /* Kurumsal — klinik mavi/teal */
  --brand-900: #0B2942;
  --brand-800: #123A5C;
  --brand-700: #1B4F7A;
  --brand-600: #2F6FB2;
  --brand-500: #4A8CCB;
  --brand-100: #E3EEF8;
  --brand-050: #F2F7FC;

  --teal-600: #0F7B7B;
  --teal-100: #DFF1F1;

  /* Bakım düzeyi renkleri (WCAG AA kontrastlı) */
  --level-minimal:   #2E7D57;
  --level-minimal-bg:#E4F3EB;
  --level-inter:     #2F6FB2;
  --level-inter-bg:  #E3EEF8;
  --level-semi:      #B36A00;
  --level-semi-bg:   #FCF0DC;
  --level-intensive: #B32D20;
  --level-intensive-bg:#FBE7E4;

  /* Durum */
  --ok:      #2E7D57;
  --ok-bg:   #E4F3EB;
  --warn:    #B36A00;
  --warn-bg: #FCF0DC;
  --danger:  #B32D20;
  --danger-bg:#FBE7E4;
  --info:    #2F6FB2;
  --info-bg: #E3EEF8;

  /* Nötr */
  --ink-900: #0E1B27;
  --ink-800: #1C2E3E;
  --ink-700: #33475A;
  --ink-600: #4E6377;
  --ink-500: #6C808F;
  --ink-400: #93A4B1;
  --ink-300: #C3CFD8;
  --ink-200: #DFE6EC;
  --ink-100: #EDF1F5;
  --ink-050: #F6F8FA;
  --white:   #FFFFFF;

  /* Ölçüler */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(14,27,39,.06);
  --shadow-sm: 0 2px 6px rgba(14,27,39,.07);
  --shadow:    0 4px 16px rgba(14,27,39,.09);
  --shadow-lg: 0 12px 36px rgba(14,27,39,.14);

  --sidebar-w: 258px;
  --header-h:  62px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --tap: 44px;   /* Asgari dokunma hedefi */
}

/* ---------------------------------------------------------------------
   2. TEMEL
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-800);
  background: var(--ink-050);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 650; color: var(--ink-900); line-height: 1.3; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15.5px; }
h4 { font-size: 14px; }
p  { margin: 0 0 1em; }
a  { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.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;
}

/* İçeriğe atla bağlantısı */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand-700); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------
   3. DÜZEN
   --------------------------------------------------------------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 100%);
  color: #C7D8E8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar__brand {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  display: flex; align-items: center; gap: 11px;
}
.sidebar__logo {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  background: linear-gradient(135deg, var(--brand-500), var(--teal-600));
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #fff; letter-spacing: -.5px;
}
.sidebar__title { font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar__subtitle { font-size: 11px; color: #8FA9C2; margin-top: 2px; }

.sidebar__section {
  padding: 16px 20px 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: #6E8AA6;
}

.sidebar__nav { list-style: none; margin: 0; padding: 0 10px; flex: 1; }
.sidebar__link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: #C7D8E8; text-decoration: none;
  font-size: 14px; font-weight: 500;
  min-height: var(--tap);
  transition: background .13s, color .13s;
}
.sidebar__link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sidebar__link.is-active {
  background: var(--brand-600); color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--teal-600);
}
.sidebar__icon { width: 19px; height: 19px; flex: 0 0 19px; opacity: .92; }
.sidebar__badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
}

.sidebar__footer {
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.10);
  font-size: 11.5px; color: #7994AE;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--ink-200);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
.header__title { font-size: 17px; font-weight: 650; color: var(--ink-900); margin: 0; }
.header__spacer { flex: 1; }
.header__meta { font-size: 12.5px; color: var(--ink-500); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--ink-050); border: 1px solid var(--ink-200);
  min-height: var(--tap);
}
.user-chip__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-600); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.user-chip__name { font-size: 13px; font-weight: 600; color: var(--ink-800); line-height: 1.2; }
.user-chip__role { font-size: 11px; color: var(--ink-500); }

.content { padding: 22px 24px 48px; flex: 1; }
.content--narrow { max-width: 760px; }

/* ---------------------------------------------------------------------
   4. KARTLAR
   --------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  margin-bottom: 18px;
  overflow: hidden;
}
.card__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-100);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card__title { font-size: 15px; font-weight: 650; margin: 0; color: var(--ink-900); }
.card__subtitle { font-size: 12.5px; color: var(--ink-500); margin: 2px 0 0; }
.card__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot {
  padding: 12px 18px; border-top: 1px solid var(--ink-100);
  background: var(--ink-050); font-size: 12.5px; color: var(--ink-600);
}

/* İstatistik kutuları */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.stat {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand-600);
}
.stat--ok::before        { background: var(--ok); }
.stat--warn::before      { background: var(--warn); }
.stat--danger::before    { background: var(--danger); }
.stat--minimal::before   { background: var(--level-minimal); }
.stat--inter::before     { background: var(--level-inter); }
.stat--semi::before      { background: var(--level-semi); }
.stat--intensive::before { background: var(--level-intensive); }

.stat__label {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-500); margin-bottom: 6px;
}
.stat__value {
  font-size: 28px; font-weight: 700; color: var(--ink-900);
  line-height: 1.05; font-variant-numeric: tabular-nums;
}
.stat__unit { font-size: 14px; font-weight: 600; color: var(--ink-500); margin-left: 3px; }
.stat__hint { font-size: 12px; color: var(--ink-500); margin-top: 5px; }

/* ---------------------------------------------------------------------
   5. TABLOLAR
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
table.data th {
  text-align: left; padding: 10px 14px;
  background: var(--ink-050);
  border-bottom: 2px solid var(--ink-200);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-600); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.data td {
  padding: 11px 14px; border-bottom: 1px solid var(--ink-100);
  vertical-align: middle;
}
table.data tbody tr:hover { background: var(--brand-050); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
table.data .center { text-align: center; }
table.data .nowrap { white-space: nowrap; }

.empty {
  padding: 48px 24px; text-align: center; color: var(--ink-500);
}
.empty__icon { font-size: 36px; opacity: .35; margin-bottom: 10px; }
.empty__title { font-weight: 650; color: var(--ink-700); margin-bottom: 5px; }

/* ---------------------------------------------------------------------
   6. ROZETLER / ETİKETLER
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent;
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }

.level-minimal    { background: var(--level-minimal-bg);   color: var(--level-minimal);   border-color: rgba(46,125,87,.25); }
.level-intermediate{ background: var(--level-inter-bg);    color: var(--level-inter);     border-color: rgba(47,111,178,.25); }
.level-semi       { background: var(--level-semi-bg);      color: var(--level-semi);      border-color: rgba(179,106,0,.25); }
.level-intensive  { background: var(--level-intensive-bg); color: var(--level-intensive); border-color: rgba(179,45,32,.25); }
.level-none       { background: var(--ink-100);            color: var(--ink-500);         border-color: var(--ink-200); }

.badge--ok     { background: var(--ok-bg);     color: var(--ok);     border-color: rgba(46,125,87,.25); }
.badge--warn   { background: var(--warn-bg);   color: var(--warn);   border-color: rgba(179,106,0,.25); }
.badge--danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(179,45,32,.25); }
.badge--info   { background: var(--info-bg);   color: var(--info);   border-color: rgba(47,111,178,.25); }
.badge--muted  { background: var(--ink-100);   color: var(--ink-600); border-color: var(--ink-200); }

/* Puan göstergesi */
.score {
  display: inline-flex; align-items: baseline; gap: 3px;
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.score__max { font-size: 11px; color: var(--ink-400); font-weight: 500; }

/* Yatak etiketi */
.bed-tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  background: var(--brand-100); color: var(--brand-800);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
}

/* Uyarı simgeleri */
.flag {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700;
}
.flag--isolation { background: var(--warn-bg);   color: var(--warn); }
.flag--vent      { background: var(--info-bg);   color: var(--info); }
.flag--fall      { background: var(--danger-bg); color: var(--danger); }

/* ---------------------------------------------------------------------
   7. DÜĞMELER
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap); padding: 0 18px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .13s, border-color .13s, box-shadow .13s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.btn--primary   { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--secondary { background: var(--white); color: var(--ink-700); border-color: var(--ink-300); }
.btn--secondary:hover { background: var(--ink-050); border-color: var(--ink-400); }
.btn--success   { background: var(--ok); color: #fff; }
.btn--success:hover { background: #266847; }
.btn--danger    { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #96251A; }
.btn--ghost     { background: transparent; color: var(--brand-600); }
.btn--ghost:hover { background: var(--brand-050); }

.btn--sm { min-height: 34px; padding: 0 13px; font-size: 13px; border-radius: var(--radius-sm); }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 15.5px; }
.btn--block { width: 100%; }

.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   8. FORMLAR
   --------------------------------------------------------------------- */
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.field { margin-bottom: 16px; }
.field--full { grid-column: 1 / -1; }

.label {
  display: block; font-size: 13px; font-weight: 620;
  color: var(--ink-700); margin-bottom: 6px;
}
.label__req { color: var(--danger); margin-left: 2px; }
.label__hint { font-weight: 400; color: var(--ink-500); font-size: 12px; }

.input, .select, .textarea {
  width: 100%; min-height: var(--tap);
  padding: 10px 13px;
  border: 1.5px solid var(--ink-300); border-radius: var(--radius);
  font-family: inherit; font-size: 14.5px; color: var(--ink-900);
  background: var(--white);
  transition: border-color .13s, box-shadow .13s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(47,111,178,.16);
}
.input:disabled, .select:disabled { background: var(--ink-050); color: var(--ink-500); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
  border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179,45,32,.12);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  background-image: 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='%234E6377' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}

.field__error { font-size: 12.5px; color: var(--danger); margin-top: 5px; font-weight: 500; }
.field__help  { font-size: 12.5px; color: var(--ink-500); margin-top: 5px; }

.checkbox, .radio {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; cursor: pointer; min-height: var(--tap);
}
.checkbox input, .radio input {
  width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 20px;
  accent-color: var(--brand-600); cursor: pointer;
}
.checkbox__text { font-size: 14px; color: var(--ink-800); }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--ink-100);
}
.switch-row:last-child { border-bottom: none; }

/* ---------------------------------------------------------------------
   9. PERROCA DEĞERLENDİRME FORMU
   --------------------------------------------------------------------- */
.perroca-item {
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-lg);
  margin-bottom: 14px; overflow: hidden; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.perroca-item.is-answered { border-color: var(--brand-500); box-shadow: var(--shadow-xs); }

.perroca-item__head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; background: var(--ink-050);
  border-bottom: 1px solid var(--ink-200);
}
.perroca-item__num {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
  background: var(--brand-600); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.perroca-item__name {
  font-size: 14px; font-weight: 650; color: var(--ink-900); line-height: 1.35;
}
.perroca-item__score {
  margin-left: auto; font-family: var(--mono); font-weight: 700; font-size: 17px;
  color: var(--brand-700); min-width: 26px; text-align: right;
}

.perroca-options { padding: 6px 10px 10px; }

.perroca-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 12px; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent;
  transition: background .12s, border-color .12s;
}
.perroca-option:hover { background: var(--brand-050); }
.perroca-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.perroca-option:has(input:checked) {
  background: var(--brand-050); border-color: var(--brand-500);
}
.perroca-option:has(input:focus-visible) { outline: 3px solid var(--brand-500); outline-offset: 1px; }

.perroca-option__score {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  background: var(--ink-100); color: var(--ink-600);
  border: 1.5px solid var(--ink-200);
  transition: background .12s, color .12s, border-color .12s;
}
.perroca-option:has(input:checked) .perroca-option__score {
  background: var(--brand-600); color: #fff; border-color: var(--brand-700);
}
.perroca-option__text { font-size: 13.5px; line-height: 1.55; color: var(--ink-700); padding-top: 3px; }

/* Canlı toplam paneli */
.perroca-summary {
  position: sticky; bottom: 0; z-index: 20;
  background: var(--white); border: 1.5px solid var(--brand-500);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 16px 20px; margin-top: 18px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.perroca-summary__total { display: flex; align-items: baseline; gap: 7px; }
.perroca-summary__value {
  font-family: var(--mono); font-size: 34px; font-weight: 800;
  color: var(--brand-700); line-height: 1; font-variant-numeric: tabular-nums;
}
.perroca-summary__max { font-size: 15px; color: var(--ink-400); font-weight: 600; }
.perroca-summary__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-500); font-weight: 700; margin-bottom: 3px; }
.perroca-summary__level { padding: 7px 15px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.perroca-summary__spacer { flex: 1; }
.perroca-summary__progress {
  flex: 1 1 180px; min-width: 140px; height: 9px;
  background: var(--ink-100); border-radius: 999px; overflow: hidden;
}
.perroca-summary__bar { height: 100%; border-radius: 999px; transition: width .25s, background .25s; }

/* ---------------------------------------------------------------------
   10. DAĞITIM GÖRÜNÜMÜ
   --------------------------------------------------------------------- */
.dist-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px;
}
.nurse-card {
  background: var(--white); border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs);
}
.nurse-card__head {
  padding: 13px 16px; background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  color: #fff; display: flex; align-items: center; gap: 11px;
}
.nurse-card__avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: rgba(255,255,255,.22); display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px;
}
.nurse-card__name { font-weight: 650; font-size: 14px; line-height: 1.25; }
.nurse-card__role { font-size: 11.5px; opacity: .85; }
.nurse-card__load {
  margin-left: auto; text-align: right; font-family: var(--mono);
}
.nurse-card__load-value { font-size: 19px; font-weight: 800; line-height: 1; }
.nurse-card__load-label { font-size: 10px; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }

.nurse-card__meter { height: 5px; background: rgba(0,0,0,.08); }
.nurse-card__meter-bar { height: 100%; background: var(--brand-500); transition: width .3s; }
.nurse-card__meter-bar.is-over { background: var(--warn); }
.nurse-card__meter-bar.is-under { background: var(--teal-600); }

.nurse-card__patients { list-style: none; margin: 0; padding: 0; }
.nurse-card__patient {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--ink-100);
  font-size: 13px;
}
.nurse-card__patient:last-child { border-bottom: none; }
.nurse-card__patient-info { flex: 1; min-width: 0; }
.nurse-card__patient-name { font-weight: 600; color: var(--ink-800); }
.nurse-card__patient-meta { font-size: 11.5px; color: var(--ink-500); }

.nurse-card__foot {
  padding: 10px 16px; background: var(--ink-050); border-top: 1px solid var(--ink-100);
  display: flex; gap: 14px; font-size: 12px; color: var(--ink-600);
}
.nurse-card__stat strong { color: var(--ink-900); font-family: var(--mono); }

/* Denge göstergesi */
.balance-meter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.balance-meter__gauge {
  flex: 1 1 220px; min-width: 180px; height: 12px;
  background: linear-gradient(90deg, var(--danger) 0%, var(--warn) 45%, var(--ok) 82%, var(--ok) 100%);
  border-radius: 999px; position: relative;
}
.balance-meter__needle {
  position: absolute; top: -4px; width: 4px; height: 20px;
  background: var(--ink-900); border-radius: 2px;
  box-shadow: 0 0 0 2px #fff;
  transform: translateX(-2px);
}
.balance-meter__value { font-family: var(--mono); font-size: 20px; font-weight: 800; }

/* ---------------------------------------------------------------------
   11. UYARILAR
   --------------------------------------------------------------------- */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius);
  border: 1px solid transparent; margin-bottom: 14px;
  font-size: 13.8px; line-height: 1.55;
}
.alert__icon { flex: 0 0 20px; font-size: 17px; line-height: 1.3; }
.alert__body { flex: 1; }
.alert__title { font-weight: 650; margin-bottom: 2px; }
.alert--success { background: var(--ok-bg);     color: #1E5C3E; border-color: rgba(46,125,87,.3); }
.alert--error   { background: var(--danger-bg); color: #8C231A; border-color: rgba(179,45,32,.3); }
.alert--warning { background: var(--warn-bg);   color: #7D4A00; border-color: rgba(179,106,0,.3); }
.alert--info    { background: var(--info-bg);   color: #1B4F7A; border-color: rgba(47,111,178,.3); }

.alert ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------------------------------------------------------------------
   12. GİRİŞ SAYFASI
   --------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(47,111,178,.16), transparent 62%),
    radial-gradient(900px 520px at 88% 108%, rgba(15,123,123,.14), transparent 62%),
    var(--ink-050);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--white);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  overflow: hidden; border: 1px solid var(--ink-200);
}
.auth-card__head {
  padding: 30px 32px 22px; text-align: center;
  background: linear-gradient(160deg, var(--brand-900), var(--brand-700));
  color: #fff;
}
.auth-card__logo {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 15px;
  background: linear-gradient(135deg, var(--brand-500), var(--teal-600));
  display: grid; place-items: center; font-size: 23px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.24);
}
.auth-card__title { font-size: 19px; font-weight: 700; color: #fff; margin: 0 0 5px; }
.auth-card__subtitle { font-size: 13px; color: #A9C3DA; margin: 0; }
.auth-card__body { padding: 26px 32px 30px; }
.auth-card__foot {
  padding: 15px 32px; background: var(--ink-050);
  border-top: 1px solid var(--ink-200);
  font-size: 11.5px; color: var(--ink-500); text-align: center; line-height: 1.6;
}

.otp-input {
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  letter-spacing: .38em; text-align: center; padding-left: .38em;
  min-height: 58px;
}

/* ---------------------------------------------------------------------
   13. YARDIMCI SINIFLAR
   --------------------------------------------------------------------- */
.row       { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--tight{ gap: 7px; }
.row--end  { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.spacer    { flex: 1; }

.mt-0{margin-top:0}.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:26px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:26px}

.text-sm  { font-size: 12.5px; }
.text-xs  { font-size: 11.5px; }
.text-muted { color: var(--ink-500); }
.text-danger{ color: var(--danger); }
.text-ok    { color: var(--ok); }
.text-warn  { color: var(--warn); }
.text-right { text-align: right; }
.text-center{ text-align: center; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.strong { font-weight: 650; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.divider { height: 1px; background: var(--ink-200); margin: 18px 0; border: none; }

.pagination { display: flex; gap: 5px; align-items: center; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; min-height: 40px; padding: 0 12px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--ink-300); border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--ink-700); text-decoration: none; background: var(--white);
}
.pagination a:hover { background: var(--brand-050); border-color: var(--brand-500); text-decoration: none; }
.pagination .is-current { background: var(--brand-600); color: #fff; border-color: var(--brand-600); font-weight: 650; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

.filters {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  padding: 14px 18px; background: var(--white);
  border: 1px solid var(--ink-200); border-radius: var(--radius-lg); margin-bottom: 16px;
}
.filters .field { margin-bottom: 0; min-width: 150px; }

/* ---------------------------------------------------------------------
   14. DUYARLI TASARIM
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 100;
             transform: translateX(-100%); transition: transform .22s; }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(14,27,39,.5); z-index: 99;
  }
  .sidebar-backdrop.is-visible { display: block; }
  .menu-toggle { display: inline-flex !important; }
}
@media (min-width: 1025px) { .menu-toggle { display: none !important; } }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .content { padding: 16px 14px 40px; }
  .header { padding: 0 14px; gap: 10px; }
  .header__title { font-size: 15.5px; }
  .user-chip__name, .user-chip__role { display: none; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat__value { font-size: 23px; }
  .card__body { padding: 14px; }
  .auth-card__body { padding: 22px 20px 26px; }
  .auth-card__head { padding: 26px 20px 20px; }
  .perroca-summary { padding: 13px 15px; gap: 14px; }
  .perroca-summary__value { font-size: 28px; }
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 9px 10px; }
}

/* ---------------------------------------------------------------------
   15. YAZDIRMA (vardiya listesi kâğıda basılır)
   --------------------------------------------------------------------- */
@media print {
  .sidebar, .header, .card__actions, .btn, .filters, .pagination,
  .sidebar-backdrop, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; color: #000; }
  .layout { display: block; }
  .content { padding: 0; }
  .card { border: 1px solid #999; box-shadow: none; page-break-inside: avoid; margin-bottom: 12pt; }
  .nurse-card { page-break-inside: avoid; border: 1px solid #666; }
  .nurse-card__head { background: #eee !important; color: #000 !important;
                      -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.data th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { border: 1px solid #666 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: ""; }
  .print-header { display: block !important; margin-bottom: 12pt; padding-bottom: 8pt;
                  border-bottom: 2px solid #000; }
}
.print-header { display: none; }

/* ---------------------------------------------------------------------
   16. HAREKET AZALTMA / ERİŞİLEBİLİRLİK
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  .input, .select, .textarea { border-width: 2px; }
  .badge { border-width: 1.5px; }
  table.data td { border-bottom-color: var(--ink-300); }
}
