/* Personel Takip — mobil öncelikli arayüz */
:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef1f6;
  --border: #e1e6ee;
  --border-strong: #cbd3df;
  --text: #0f1b2d;
  --text-2: #3d4a5c;
  --muted: #667085;
  --primary: #1e4e8c;
  --primary-hover: #173f73;
  --primary-soft: #e6eef9;
  --primary-ink: #ffffff;
  --success: #157f3b;
  --success-soft: #e5f5ea;
  --warning: #9a5b00;
  --warning-soft: #fff3dc;
  --danger: #c0262d;
  --danger-soft: #fdeaea;
  --info: #1d5fc4;
  --info-soft: #e7f0fd;
  --focus: #2f6fd6;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --radius: 14px;
  --radius-sm: 10px;
  --appbar-h: 56px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121b2c;
    --surface-2: #172236;
    --surface-3: #1d2a40;
    --border: #243349;
    --border-strong: #33445e;
    --text: #e8edf5;
    --text-2: #c3cddb;
    --muted: #93a0b4;
    --primary: #5b9bf0;
    --primary-hover: #7aaef3;
    --primary-soft: #1a2d4a;
    --primary-ink: #0b1220;
    --success: #4cc27a;
    --success-soft: #12301f;
    --warning: #f0b44a;
    --warning-soft: #33270f;
    --danger: #f06a6f;
    --danger-soft: #3a1618;
    --info: #6fa8f5;
    --info-soft: #152a47;
    --focus: #7aaef3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--appbar-h) + var(--safe-top) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 .75em; }
small, .small { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.i { width: 20px; height: 20px; flex: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- İskelet ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.main { min-width: 0; }
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  min-height: calc(var(--appbar-h) + var(--safe-top));
  padding: var(--safe-top) calc(8px + var(--safe-right)) 0 calc(8px + var(--safe-left));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.appbar-title { flex: 1; min-width: 0; }
.appbar-title h1 { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { display: flex; align-items: center; gap: 2px; }
.appbar-mark, .brand-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #1e4e8c, #0f2c52); color: #fff;
  font-weight: 800; font-size: 15px; letter-spacing: -.5px; text-decoration: none !important;
  margin: 0 4px;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--surface-3); text-decoration: none; }
.icon-btn .i { width: 22px; height: 22px; }
.content {
  padding: 16px calc(14px + var(--safe-right)) calc(var(--tabbar-h) + var(--safe-bottom) + 28px) calc(14px + var(--safe-left));
  max-width: 1240px; margin: 0 auto;
}
.offline-bar { display: flex; gap: 8px; align-items: center; background: var(--warning-soft); color: var(--warning); padding: 8px 16px; font-size: 13px; font-weight: 600; }
.desk-only { display: none !important; }

/* Alt sekme çubuğu */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer;
  text-decoration: none !important; min-height: 44px;
}
.tabbar .i { width: 24px; height: 24px; }
.tabbar a.active { color: var(--primary); }
.tabbar a.active .i { stroke-width: 2.4; }

/* Masaüstü */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    background: var(--surface); border-right: 1px solid var(--border); padding: 14px 12px; overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: var(--text); text-decoration: none !important; }
  .brand b { display: block; font-size: 15px; }
  .brand small { display: block; font-size: 12px; }
  .side-nav { flex: 1; }
  .side-user { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none !important; border: 1px solid var(--border); }
  .side-user b { display: block; font-size: 14px; }
  .side-user small { display: block; font-size: 12px; }
  .tabbar, .appbar-mark { display: none; }
  .desk-only { display: inline-grid !important; }
  .content { padding: 24px 28px 48px; }
  .appbar { padding-left: 20px; padding-right: 16px; }
  .appbar-title h1 { font-size: 19px; }
  .back-btn { margin-left: -8px; }
}
.nav-group { margin-bottom: 14px; }
.nav-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 10px; }
.nav-group a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 550; text-decoration: none !important; min-height: 40px;
}
.nav-group a:hover { background: var(--surface-3); }
.nav-group a.active { background: var(--primary-soft); color: var(--primary); }

/* ---------- Diyaloglar ve alt paneller ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(8, 15, 28, .5); }
.sheet { width: 100%; margin: auto 0 0; }
.sheet[open] { animation: sheetUp .22s ease-out; }
.sheet-body {
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding: 8px 16px calc(20px + var(--safe-bottom)); max-height: 88vh; max-height: 88dvh; overflow-y: auto;
}
.sheet-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 4px auto 12px; }
.sheet h2 { font-size: 18px; margin-bottom: 4px; }
@keyframes sheetUp { from { transform: translateY(30%); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) {
  .sheet { width: min(560px, 94vw); margin: auto; }
  .sheet-body { border-radius: 20px; max-height: 84vh; }
  .sheet-handle { display: none; }
}
.menu-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); color: var(--text); margin-bottom: 14px; text-decoration: none !important; }
.menu-user > span:nth-child(2) { flex: 1; }
.menu-user b { display: block; }
.menu-user small { display: block; }
.menu-grid .nav-group a { min-height: 46px; font-size: 15px; }
.menu-foot { display: grid; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.menu-foot form { margin: 0; }
.menu-foot .btn { width: 100%; justify-content: flex-start; }
.modal { width: min(440px, 92vw); margin: auto; }
.modal-body { background: var(--surface); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-lg); }
.modal-body h2 { font-size: 18px; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.search-form { display: flex; align-items: center; gap: 10px; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface-2); }
.search-form input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 0 !important; }
.search-results { margin-top: 12px; min-height: 40px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 90;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  background: #152033; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; gap: 12px; align-items: center; max-width: min(92vw, 520px); font-weight: 550;
}
.toast button { background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.toast.error { background: #9c1c22; }
@media (min-width: 1024px) { .toast { bottom: 24px; } }

/* ---------- Kartlar ve düzen ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; min-width: 0; }
.card > h2, .card-head h2 { font-size: 16px; font-weight: 700; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 16px 0; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 4px 10px; }
.grid { display: grid; gap: 14px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.page-intro { margin: 0 2px 14px; color: var(--muted); font-size: 14px; }

/* İstatistik kutuları */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); min-width: 0; }
.stat span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat strong { display: block; font-size: 28px; line-height: 1.15; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.danger strong { color: var(--danger); }
.stat.warning strong { color: var(--warning); }
.stat.success strong { color: var(--success); }
a.stat:hover { border-color: var(--border-strong); }

/* ---------- Formlar ---------- */
label, .label { display: block; font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.field { margin-bottom: 14px; min-width: 0; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; gap: 0 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=month], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  appearance: none; -webkit-appearance: none;
}
input[type=date], input[type=month] { min-width: 0; }
input::-webkit-date-and-time-value { text-align: left; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
input[readonly], textarea[readonly], select:disabled, input:disabled { background: var(--surface-2); color: var(--text-2); }
input[type=color] { width: 52px; height: 46px; padding: 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
input[type=file] { width: 100%; font: inherit; font-size: 14px; padding: 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 500; color: var(--text); margin: 0 0 10px; cursor: pointer; min-height: 30px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
.check small { display: block; }
.checks-grid { display: grid; gap: 4px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .checks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }
.input-group { display: flex; gap: 8px; }
.input-group > input, .input-group > select { flex: 1; min-width: 0; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 50px; }
.pass-wrap .icon-btn { position: absolute; right: 2px; top: 1px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sticky-actions {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px); z-index: 20;
  display: flex; gap: 10px; align-items: center; padding: 10px; margin: 14px -4px 0;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.sticky-actions .btn { flex: 1; }
@media (min-width: 1024px) { .sticky-actions { bottom: 12px; } .sticky-actions .btn { flex: none; } }
.error-list { margin: 0; padding-left: 18px; }

/* ---------- Düğmeler ---------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent;
  background: var(--primary); color: var(--primary-ink); font: inherit; font-weight: 650; font-size: 15px;
  cursor: pointer; text-decoration: none !important; white-space: nowrap; user-select: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn.danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn.success { background: var(--success); color: #fff; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn .i { width: 18px; height: 18px; }
.danger-text { color: var(--danger) !important; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0; }

/* ---------- Uyarılar ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert > div { flex: 1; min-width: 0; }
.alert .i { margin-top: 1px; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error, .alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; opacity: .7; }
.alert a { color: inherit; font-weight: 700; text-decoration: underline; }

/* ---------- Listeler ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px;
  border-top: 1px solid var(--border); color: var(--text); text-decoration: none !important; background: var(--surface);
}
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-end { display: flex; align-items: center; gap: 6px; flex: none; color: var(--muted); font-size: 13px; }
.list-item.archived { opacity: .7; }
.card > .list { margin: 0 -16px -16px; border-top: 1px solid var(--border); }
.card.flush > .list { margin: 0; }

.avatar {
  --h: 215;
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: hsl(var(--h) 55% 90%); color: hsl(var(--h) 55% 28%); font-weight: 750; font-size: 17px; object-fit: cover;
}
@media (prefers-color-scheme: dark) { .avatar { background: hsl(var(--h) 35% 26%); color: hsl(var(--h) 70% 86%); } }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.avatar.lg { width: 84px; height: 84px; font-size: 32px; }

.chip {
  --c: #e5e7eb;
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px;
  border-radius: 8px; background: var(--c); color: #111827; font-weight: 750; font-size: 13px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.chip.lg { height: 32px; min-width: 38px; font-size: 15px; border-radius: 10px; }
.chip-empty { background: var(--surface-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Sekmeler (yatay kaydırılabilir) */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 14px; padding: 2px 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none !important; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; }
.tabs a.active { background: var(--text); color: var(--surface); border-color: var(--text); }
@media (min-width: 1024px) { .tabs { margin: 0 0 16px; padding: 2px 0; } }

/* Araç çubuğu / filtreler */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.toolbar > * { flex: 1 1 150px; min-width: 0; }
.toolbar > .btn, .toolbar > button { flex: 0 0 auto; }
.toolbar .field { margin: 0; }
.date-nav { display: flex; align-items: center; gap: 6px; }
.date-nav input { flex: 1; }
.date-nav .icon-btn { border: 1px solid var(--border-strong); background: var(--surface); width: 46px; height: 46px; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
@media (max-width: 719px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 10px 16px; border-bottom: 1px solid var(--border); }
  .table.stack td { border: 0; padding: 3px 0; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  .table.stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  .table.stack td.actions { justify-content: flex-end; padding-top: 8px; }
  .table.stack td.actions::before { display: none; }
  .table.stack td[data-label=""]::before { display: none; }
}

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty > .i { width: 36px; height: 36px; color: var(--border-strong); margin-bottom: 8px; }
.empty b { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 14px; }

/* ---------- Grafikler (sunucu tarafında çizilen çubuklar) ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.bar-label { font-size: 14px; font-weight: 600; min-width: 0; display: flex; align-items: center; gap: 8px; }
.bar-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; display: flex; gap: 2px; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--c, var(--primary)); min-width: 3px; }
.bar-fill.absent { background: var(--danger); }
.bar-fill.missing { background: var(--border-strong); }
.bar-fill.present { background: var(--success); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.trend { display: flex; align-items: flex-end; gap: 2px; height: 90px; padding-top: 6px; }
.trend-col { flex: 1; min-width: 0; display: flex; flex-direction: column-reverse; gap: 1px; height: 100%; position: relative; }
.trend-col i { display: block; background: var(--danger); border-radius: 3px 3px 0 0; min-height: 1px; }
.trend-col.off i { background: var(--border-strong); }
.trend-col:hover i { filter: brightness(1.15); }
.trend-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.meter { height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.meter.warn > i { background: var(--warning); }
.meter.bad > i { background: var(--danger); }

/* ---------- Bildirimler ---------- */
.notes { display: flex; flex-direction: column; }
.note { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.note:first-child { border-top: 0; padding-top: 0; }
.note-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--info); }
.note.danger .note-dot { background: var(--danger); }
.note.warning .note-dot { background: var(--warning); }
.note.success .note-dot { background: var(--success); }
.note a.note-text { flex: 1; color: var(--text); font-size: 14px; min-width: 0; }
.note form { margin: 0; }

/* ---------- Personel ---------- */
.person-head { display: flex; gap: 16px; align-items: center; }
.person-head h2 { font-size: 20px; }
.person-head .tags { margin-top: 8px; }
.quick-contact { display: flex; gap: 8px; margin-top: 14px; }
.quick-contact .btn { flex: 1; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.kv > div:first-child { border-top: 0; }
.kv dt, .kv .k { color: var(--muted); font-weight: 600; }
.kv dd, .kv .v { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 720px) { .kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } .kv.two > div:nth-child(2) { border-top: 0; } }
.photo-edit { display: flex; gap: 14px; align-items: center; }
.course-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.course-item .check { margin-bottom: 6px; font-weight: 650; }
.course-item .field-row { margin-top: 8px; }
.course-item.off .field-row, .course-item.off .cert { display: none; }

/* ---------- Çizelge: günlük ---------- */
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.day-head h2 { font-size: 20px; }
.day-list .list-item { flex-wrap: wrap; }
.day-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.day-row:first-child { border-top: 0; }
.day-row.changed { background: var(--primary-soft); }
.day-row .dr-name { min-width: 0; }
.day-row .dr-name a { color: var(--text); font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-row .dr-name small { display: block; }
.day-row .dr-controls { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; }
.day-row select { font-weight: 650; border-left: 6px solid var(--c, var(--border-strong)); }
.day-row .dr-check { display: flex; align-items: center; }
@media (min-width: 900px) {
  .day-row { grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1.1fr) minmax(160px, 1fr); }
  .day-row .dr-controls { grid-column: auto / span 2; }
}
.team-sep { padding: 8px 16px; background: var(--surface-2); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; }

/* ---------- Çizelge: aylık ---------- */
.month-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); border-top: 1px solid var(--border); }
table.month { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.month th, .month td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; padding: 0; }
.month thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-weight: 700; min-width: 34px; height: 44px; }
.month thead th a { display: block; color: var(--text); padding: 4px 2px; text-decoration: none !important; }
.month thead th small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; }
.month .name { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; min-width: 132px; max-width: 150px; padding: 6px 8px; font-weight: 600; }
.month thead .name { z-index: 4; background: var(--surface-2); }
.month .name a { color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.month .name small { display: block; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month .name label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; }
.month td.cell { height: 40px; min-width: 34px; cursor: pointer; font-weight: 750; font-size: 11.5px; color: #111827; background: var(--c, transparent); }
.month td.cell:hover { box-shadow: inset 0 0 0 2px var(--focus); }
.month .off { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--muted) 14%, transparent) 5px 6px); }
.month thead th.off { color: var(--danger); }
.month th.today, .month td.today { box-shadow: inset 2px 0 0 var(--primary), inset -2px 0 0 var(--primary); }
.month td.cell.today:hover { box-shadow: inset 0 0 0 2px var(--focus); }
.month tr.conflict-row td.conflict { outline: 2px solid var(--danger); outline-offset: -2px; }
.month .sep td { background: var(--surface-2); text-align: left; padding: 6px 8px; font-weight: 750; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); position: sticky; left: 0; }
.month thead th.conflict { background: var(--danger-soft); }
.cell-sheet-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.cell-sheet-types button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); min-height: 64px; }
.cell-sheet-types button.current { border-color: var(--primary); background: var(--primary-soft); }
.cell-sheet-types button span { font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; }

/* ---------- İşlem kartları ---------- */
.req { padding: 14px 16px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.req:first-child { border-top: 0; }
.req-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.req-top b { display: block; }
.req-meta { font-size: 13px; color: var(--muted); }
.req form { margin: 0; }

/* ---------- Diff / denetim ---------- */
.diff { font-size: 13px; margin: 6px 0 0; border-collapse: collapse; width: 100%; }
.diff td { padding: 4px 6px; border-top: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.diff .old { color: var(--danger); text-decoration: line-through; }
.diff .new { color: var(--success); font-weight: 600; }
details.more > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 13px; list-style: none; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.panel { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
details.panel > summary { cursor: pointer; padding: 14px 16px; font-weight: 650; display: flex; align-items: center; gap: 10px; list-style: none; min-height: 52px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.panel[open] > summary::after { transform: rotate(-135deg); }
details.panel > .panel-body { padding: 0 16px 16px; }

/* ---------- Giriş / merkez sayfaları ---------- */
body.plain, body.login { min-height: 100vh; min-height: 100dvh; background: radial-gradient(1200px 600px at 10% -10%, #2a5ea5 0%, transparent 60%), linear-gradient(160deg, #0f2c52, #0b1a30); }
.center-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom)); }
.center-card { width: min(440px, 100%); background: var(--surface); border-radius: 22px; padding: 28px 22px; box-shadow: var(--shadow-lg); }
.center-card h1 { font-size: 22px; margin: 10px 0 8px; }
.center-card > p { color: var(--text-2); overflow-wrap: anywhere; }
.center-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.center-icon .i { width: 28px; height: 28px; }
.center-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.login-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; font-weight: 850; color: #fff; background: linear-gradient(135deg, #1e4e8c, #0f2c52); box-shadow: 0 8px 20px rgba(15, 44, 82, .35); letter-spacing: -1px; }
.login-title { margin: 16px 0 4px; font-size: 22px; }
.login-sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.otp-input { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.qr-box { display: grid; place-items: center; background: #fff; border-radius: 14px; padding: 14px; width: 220px; height: 220px; margin: 0 auto 12px; }
.qr-box canvas, .qr-box img, .qr-box svg { width: 190px; height: 190px; image-rendering: pixelated; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; font-size: 14px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; }

/* Sayfalama */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; font-size: 14px; color: var(--muted); }

/* Arama sonuçları */
.sr-group { font-size: 12px; font-weight: 750; text-transform: uppercase; color: var(--muted); margin: 12px 4px 6px; letter-spacing: .05em; }

/* Kayıtlı filtreler */
.saved-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.saved-filters form { display: inline; margin: 0; }
.saved-filters .badge { padding: 6px 10px; font-size: 13px; }

/* ---------- Yazdırma ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000; font-size: 11px; }
  .appbar, .tabbar, .sidebar, .no-print, .btn, .toolbar, .tabs, dialog, .toast, .alert-x, .offline-bar, .sticky-actions { display: none !important; }
  .print-only { display: block !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; padding: 10px; }
  .month-wrap { max-height: none; overflow: visible; }
  .month .name, .month thead th { position: static; }
  table.month { font-size: 9px; }
  .month td.cell { height: 22px; min-width: 20px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .chip, .bar-fill, .legend i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table.stack thead { display: table-header-group !important; }
  a { color: #000; }
}
