/* HRPort - temel stil. Harici kaynak (CDN) kullanılmaz. */
:root {
  /* QualityPort (KYS) ile ortak tasarım: sıcak koyu zemin, mercan vurgu, serif başlıklar */
  --bg: #1d1c1a;
  --surface: #262523;
  --text: #f0eee6;
  --muted: #8f8c82;
  --line: #3a3935;
  --input-line: #4a4843;
  --primary: #e08a68;
  --primary-dark: #eb9d7e;
  --primary-text: #1d1c1a;
  --link: #eb9d7e;
  --primary-soft: #33281f;
  --danger: #ff8a80;
  --success: #6fd39a;
  --warning: #e3b341;
  --input-bg: #262523;
  --head-bg: #2b2a27;
  --radius: 10px;
  --sidebar: 248px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  color-scheme: dark;
  font-size: 15px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; margin: 0 0 1rem; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin: 1.5rem 0 .75rem; }
small, .muted { color: var(--muted); }

/* ---------- yerleşim ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); background: var(--surface); color: var(--text); flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.sidebar .brand { padding: 1.1rem 1.2rem; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; color: var(--text); border-bottom: 1px solid var(--line); font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.sidebar .brand small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); letter-spacing: 0; margin-top: .1rem; }
.sidebar nav { padding: .5rem 0; flex: 1; }
.sidebar .nav-title { padding: .9rem 1.2rem .3rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sidebar a { display: block; padding: .45rem 1.2rem; color: var(--text); border-left: 3px solid transparent; }
.sidebar a:hover { background: var(--primary-soft); text-decoration: none; }
.sidebar a.active { background: var(--primary-soft); color: var(--link); border-left-color: var(--primary); font-weight: 500; text-decoration: none; }
.sidebar .version { padding: .8rem 1.2rem; font-size: .75rem; color: var(--muted); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .6rem 1.25rem; display: flex; align-items: center; gap: 1rem;
}
.topbar .spacer { flex: 1; }
.topbar form { margin: 0; }
.menu-toggle { display: none; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem; font-size: 1.1rem; cursor: pointer; }
.content { padding: 1.5rem; max-width: 1200px; width: 100%; }

@media (max-width: 860px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s; z-index: 20; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-toggle { display: inline-block; }
  .content { padding: 1rem; }
  .topbar .uname { display: none; }
}

/* ---------- bileşenler ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card h2:first-child { margin-top: 0; }
.page-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; flex: 1; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.btn {
  display: inline-block; border: 1px solid var(--primary); background: var(--primary); color: var(--primary-text);
  padding: .5rem .95rem; border-radius: 6px; font-size: .95rem; cursor: pointer; line-height: 1.4;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--link); }
.btn.secondary:hover { background: var(--primary-soft); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: .2rem .6rem; font-size: .85rem; }
.btn.link { background: none; border: none; color: var(--link); padding: 0; }

table.data { width: 100%; border-collapse: collapse; background: var(--surface); }
table.data th, table.data td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--head-bg); }
table.data tr:hover td { background: var(--primary-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; border: 1px solid var(--line); color: var(--muted); margin: 0 .2rem .2rem 0; }
.badge.ok { border-color: var(--success); color: var(--success); }
.badge.off { color: var(--muted); }
.badge.warn { border-color: var(--warning); color: var(--warning); }
.badge.danger { border-color: var(--danger); color: var(--danger); }

/* ---------- formlar ---------- */
form .field { margin-bottom: 1rem; }
label { display: block; font-weight: 500; margin-bottom: .25rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--input-line); border-radius: 8px; font: inherit; background: var(--input-bg); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.check input { width: auto; }
.help { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.errorlist { list-style: none; padding: 0; margin: .25rem 0 0; color: var(--danger); font-size: .88rem; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.filters > div { min-width: 150px; }
.filters label { font-size: .8rem; color: var(--muted); font-weight: 400; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li { padding: .6rem .9rem; border-radius: 6px; margin-bottom: .5rem; background: var(--surface); border: 1px solid var(--line); }
.messages li.success { border-color: var(--success); }
.messages li.error { border-color: var(--danger); color: var(--danger); }
.messages li.warning { border-color: var(--warning); }

.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.4rem; letter-spacing: .08em; background: var(--bg); border: 1px dashed var(--muted); padding: .8rem 1rem; border-radius: 6px; display: inline-block; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

.pagination { display: flex; gap: .5rem; align-items: center; margin-top: 1rem; }

/* ---------- giriş ekranı ---------- */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1rem;
  /* KYS renkleriyle aşağıdan yukarıya geçiş: altta sıcak mercan tonu, üstte koyu zemin */
  background: linear-gradient(to top, #4a2f24 0%, #33261f 30%, #241f1c 65%, #1d1c1a 100%);
  background-attachment: fixed;
}
.auth-brand { text-align: center; margin: .5rem 0 1.5rem; }
.auth-brand .name { font-family: var(--serif); font-size: 1.6rem; color: var(--text); }
.auth-brand .tag { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.auth-foot { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 1.5rem; max-width: 560px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 560px; }
.auth-card h1 { margin: 0 0 .2rem; font-size: 2rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.4rem; font-size: 1rem; }
.auth-card .btn { padding: .6rem 1rem; }

/* ---------- yetki matrisi ---------- */
.perm-group { margin-bottom: 1.25rem; }
.perm-row { display: grid; grid-template-columns: 1fr 180px; gap: .75rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.perm-row.locked { opacity: .6; }
.perm-row .code { font-size: .78rem; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
@media (max-width: 600px) { .perm-row { grid-template-columns: 1fr; } }

.formset-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: .6rem; align-items: end; padding: .5rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .formset-row { grid-template-columns: 1fr; } }

.card.narrow { max-width: 560px; }
.inline-form { display: inline-flex; gap: .3rem; align-items: center; margin: .2rem 0 0; }
.inline-form input[type=date] { width: auto; padding: .2rem .4rem; }
.tree-indent { display: inline-block; color: var(--muted); }
.tree-indent[data-level="1"] { padding-left: 1.2rem; }
.tree-indent[data-level="2"] { padding-left: 2.4rem; }
.tree-indent[data-level="3"] { padding-left: 3.6rem; }
.tree-indent[data-level="4"] { padding-left: 4.8rem; }
.tree-indent[data-level="5"] { padding-left: 6rem; }

/* ---------- organizasyon şeması ---------- */
.org-tree { overflow-x: auto; padding-bottom: 1rem; }
.org-tree ul { list-style: none; margin: 0; padding-left: 1.6rem; position: relative; }
.org-tree > ul { padding-left: 0; }
.org-tree li { position: relative; padding: .4rem 0 .4rem 1rem; }
.org-tree ul ul li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.org-tree ul ul li:last-child::before { bottom: auto; height: 1.6rem; }
.org-tree ul ul li::after { content: ""; position: absolute; left: 0; top: 1.6rem; width: 1rem; border-top: 2px solid var(--line); }
.org-node { display: inline-block; min-width: 260px; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: var(--radius); padding: .6rem .8rem; vertical-align: top; }
.org-head { margin-bottom: .4rem; }
.org-pos { padding: .3rem 0; border-top: 1px dashed var(--line); }
.org-pos.manager .org-pos-name { font-weight: 600; color: var(--link); }
.org-pos-name { font-size: .9rem; }
.org-person { font-size: .9rem; padding-left: .6rem; }

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #111; --muted: #555; --line: #ccc; --link: #111; color-scheme: light; }
  .sidebar, .topbar, .page-head form, .help { display: none !important; }
  .content { padding: 0; max-width: none; }
  .org-node { break-inside: avoid; }
}
.page-head .actions select, .page-head .actions input { width: auto; }

/* ---------- personel kartı ---------- */
.profile-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin: 0; }
.profile-main { flex: 1; min-width: 220px; display: grid; gap: .25rem; }
.avatar { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; background: var(--primary-soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar span { font-family: var(--serif); font-size: 2.4rem; color: var(--link); }
.avatar.sm { width: 36px; height: 36px; }
.avatar.sm span { font-size: .9rem; font-family: inherit; }
.avatar-cell { width: 44px; }
.photo-current { display: flex; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.photo-current img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); padding: .55rem .9rem; font: inherit; cursor: pointer; }
.tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.js .tab-panel { display: none; }
.js .tab-panel.active { display: block; }
.fs-row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.fs-row label { font-size: .85rem; }
.stats .card { text-align: center; padding: .9rem; }
.stat { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.stat.bad, .text-danger { color: var(--danger); }
.text-warn { color: var(--warning); }
.text-ok { color: var(--success); }

/* ---------- bildirim ---------- */
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.inline-row { display: flex; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.inline-row input { flex: 1; min-width: 200px; }
.chip { background: var(--primary-soft); color: var(--link); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; margin: 0 .3rem .3rem 0; font: inherit; font-size: .85rem; cursor: pointer; }
.chip:hover { border-color: var(--primary); }
.preview { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; white-space: normal; word-break: break-word; }
.counter { margin: .6rem 0 0; }
.stat-text { font-family: var(--serif); font-size: 1.2rem; }
.nowrap { white-space: nowrap; }
details.card summary { cursor: pointer; color: var(--link); }
.inline-form input[type=text] { width: 140px; padding: .25rem .4rem; }
.sidebar .count { background: var(--primary); color: var(--primary-text); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; font-weight: 600; margin-left: .3rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; border-left: 2px solid var(--line); margin-left: .5rem; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .25rem; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.timeline li.ok::before { background: var(--success); }
.timeline li.bad::before { background: var(--danger); }
.timeline li.wait::before { background: var(--warning); }
.timeline .who { font-weight: 500; }
.decision { display: grid; gap: .6rem; }
.decision textarea { min-height: 4rem; }
.step-row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; padding: .6rem 0; border-bottom: 1px solid var(--line); }
ul.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
ul.checks label { font-weight: 400; display: flex; gap: .35rem; align-items: center; }
ul.checks input { width: auto; }
.checklist > div { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.checklist label { font-weight: 400; display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.checklist input { width: auto; }

/* ---------- imza ---------- */
.sign-card h2 { margin-top: 1.2rem; }
.pad-wrap { background: #f7f5ef; border: 1px dashed var(--muted); border-radius: 8px; max-width: 640px; }
.sign-pad { width: 100%; height: 220px; display: block; touch-action: none; cursor: crosshair; }
.otp-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; max-width: 240px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.hidden-form { display: none; }

/* ---------- gruplu menü ---------- */
.sidebar .nav-group { border-top: 1px solid var(--line); }
.sidebar .nav-group:first-of-type { margin-top: .5rem; }
.sidebar .nav-group summary { list-style: none; cursor: pointer; padding: .65rem 1.2rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; user-select: none; }
.sidebar .nav-group summary::-webkit-details-marker { display: none; }
.sidebar .nav-group summary::after { content: "›"; font-size: 1.1rem; transition: transform .15s; }
.sidebar .nav-group[open] summary::after { transform: rotate(90deg); }
.sidebar .nav-group summary:hover { color: var(--text); }
.sidebar .nav-group[open] { padding-bottom: .4rem; }
.sidebar .nav-group a { padding-left: 1.6rem; font-size: .95rem; }
.sidebar .nav-soon { display: block; padding: .4rem 1.6rem; color: var(--muted); font-size: .9rem; }
.sidebar .nav-soon small { font-size: .7rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem; margin-left: .2rem; }

/* ---------- bildirim ---------- */
.topbar .bell { position: relative; display: inline-flex; align-items: center; color: var(--muted); padding: .2rem; }
.topbar .bell:hover, .topbar .bell.has { color: var(--text); text-decoration: none; }
.topbar .bell .count { position: absolute; top: -.35rem; right: -.55rem; background: var(--primary); color: var(--primary-text); border-radius: 999px; padding: 0 .38rem; font-size: .7rem; font-weight: 600; line-height: 1.25rem; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { border-bottom: 1px solid var(--line); }
.notif-list a { display: block; padding: .8rem 1rem; color: var(--text); }
.notif-list a:hover { background: var(--primary-soft); text-decoration: none; }
.notif-list li.unread a { border-left: 3px solid var(--primary); }
.notif-list li.unread .t { font-weight: 600; }
.notif-list .b { color: var(--muted); font-size: .9rem; margin-top: .15rem; white-space: pre-line; }
.notif-list .d { color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.notice-important { background: rgba(224,138,104,.12); border: 1px solid var(--primary); border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; }
.pref-table td, .pref-table th { text-align: center; }
.pref-table td:first-child, .pref-table th:first-child { text-align: left; }
.card.flush { padding: 0; }
.pad { padding: 1rem; }
.pre-line { white-space: pre-line; }

/* ---------- izin ---------- */
.grid.stats3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat small { font-size: .9rem; color: var(--muted); }
.stat.small { font-size: 1.2rem; }
.calc-box { background: var(--primary-soft); border-radius: 8px; padding: .7rem .9rem; margin: .5rem 0 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters input, .filters select { width: auto; }
.leave-cal { border-collapse: collapse; font-size: .8rem; }
.leave-cal th, .leave-cal td { border: 1px solid var(--line); min-width: 1.7rem; text-align: center; padding: .2rem; }
.leave-cal th small { color: var(--muted); font-weight: 400; }
.leave-cal .name { text-align: left; min-width: 11rem; white-space: nowrap; padding: .25rem .5rem; position: sticky; left: 0; background: var(--surface); }
.leave-cal .off, .legend.off { background: rgba(143,140,130,.15); }
.leave-cal .hol, .legend.hol { background: rgba(235,157,126,.18); }
.leave-cal td.on, .legend.on { background: #3c7a55; }
.leave-cal td.pend, .legend.pend { background: #8a6a2a; }
.leave-cal td a { color: #fff; font-weight: 600; text-decoration: none; display: block; }
.legend { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: middle; margin: 0 .2rem 0 .6rem; }
.hr-ot .field { margin-bottom: .3rem; }
.hr-ot input { max-width: 12rem; }
form.inline { display: inline; }
.small-text { font-size: .8rem; }
.inline-row { display: inline-flex; gap: .3rem; align-items: center; }
.inline-row select { max-width: 14rem; }
.tabs-lite { margin: .5rem 0 1rem; }
.plain-list { list-style: none; padding: 0; } .plain-list li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.w-6 { width: 6rem; }

/* ---------- anket ---------- */
.question { border: 0; border-bottom: 1px solid var(--line); padding: .8rem 0; margin: 0; }
.question legend { font-weight: 500; margin-bottom: .4rem; }
.question .req { color: var(--primary); }
.scale { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.scale label { display: inline-flex; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: inline-block; width: 2.4rem; height: 2.4rem; line-height: 2.4rem; text-align: center; border: 1px solid var(--input-line); border-radius: 8px; cursor: pointer; }
.scale input:checked + span { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.scale input:focus-visible + span { outline: 2px solid var(--link); }
.bar-row { display: grid; grid-template-columns: 10rem 1fr 6rem; gap: .6rem; align-items: center; margin: .25rem 0; }
.bar { background: var(--head-bg); height: .8rem; border-radius: 999px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--primary); }
.q-table input, .q-table select, .q-table textarea { min-width: 6rem; }
.bar .fill.w0 { width: 0%; }
.bar .fill.w1 { width: 1%; }
.bar .fill.w2 { width: 2%; }
.bar .fill.w3 { width: 3%; }
.bar .fill.w4 { width: 4%; }
.bar .fill.w5 { width: 5%; }
.bar .fill.w6 { width: 6%; }
.bar .fill.w7 { width: 7%; }
.bar .fill.w8 { width: 8%; }
.bar .fill.w9 { width: 9%; }
.bar .fill.w10 { width: 10%; }
.bar .fill.w11 { width: 11%; }
.bar .fill.w12 { width: 12%; }
.bar .fill.w13 { width: 13%; }
.bar .fill.w14 { width: 14%; }
.bar .fill.w15 { width: 15%; }
.bar .fill.w16 { width: 16%; }
.bar .fill.w17 { width: 17%; }
.bar .fill.w18 { width: 18%; }
.bar .fill.w19 { width: 19%; }
.bar .fill.w20 { width: 20%; }
.bar .fill.w21 { width: 21%; }
.bar .fill.w22 { width: 22%; }
.bar .fill.w23 { width: 23%; }
.bar .fill.w24 { width: 24%; }
.bar .fill.w25 { width: 25%; }
.bar .fill.w26 { width: 26%; }
.bar .fill.w27 { width: 27%; }
.bar .fill.w28 { width: 28%; }
.bar .fill.w29 { width: 29%; }
.bar .fill.w30 { width: 30%; }
.bar .fill.w31 { width: 31%; }
.bar .fill.w32 { width: 32%; }
.bar .fill.w33 { width: 33%; }
.bar .fill.w34 { width: 34%; }
.bar .fill.w35 { width: 35%; }
.bar .fill.w36 { width: 36%; }
.bar .fill.w37 { width: 37%; }
.bar .fill.w38 { width: 38%; }
.bar .fill.w39 { width: 39%; }
.bar .fill.w40 { width: 40%; }
.bar .fill.w41 { width: 41%; }
.bar .fill.w42 { width: 42%; }
.bar .fill.w43 { width: 43%; }
.bar .fill.w44 { width: 44%; }
.bar .fill.w45 { width: 45%; }
.bar .fill.w46 { width: 46%; }
.bar .fill.w47 { width: 47%; }
.bar .fill.w48 { width: 48%; }
.bar .fill.w49 { width: 49%; }
.bar .fill.w50 { width: 50%; }
.bar .fill.w51 { width: 51%; }
.bar .fill.w52 { width: 52%; }
.bar .fill.w53 { width: 53%; }
.bar .fill.w54 { width: 54%; }
.bar .fill.w55 { width: 55%; }
.bar .fill.w56 { width: 56%; }
.bar .fill.w57 { width: 57%; }
.bar .fill.w58 { width: 58%; }
.bar .fill.w59 { width: 59%; }
.bar .fill.w60 { width: 60%; }
.bar .fill.w61 { width: 61%; }
.bar .fill.w62 { width: 62%; }
.bar .fill.w63 { width: 63%; }
.bar .fill.w64 { width: 64%; }
.bar .fill.w65 { width: 65%; }
.bar .fill.w66 { width: 66%; }
.bar .fill.w67 { width: 67%; }
.bar .fill.w68 { width: 68%; }
.bar .fill.w69 { width: 69%; }
.bar .fill.w70 { width: 70%; }
.bar .fill.w71 { width: 71%; }
.bar .fill.w72 { width: 72%; }
.bar .fill.w73 { width: 73%; }
.bar .fill.w74 { width: 74%; }
.bar .fill.w75 { width: 75%; }
.bar .fill.w76 { width: 76%; }
.bar .fill.w77 { width: 77%; }
.bar .fill.w78 { width: 78%; }
.bar .fill.w79 { width: 79%; }
.bar .fill.w80 { width: 80%; }
.bar .fill.w81 { width: 81%; }
.bar .fill.w82 { width: 82%; }
.bar .fill.w83 { width: 83%; }
.bar .fill.w84 { width: 84%; }
.bar .fill.w85 { width: 85%; }
.bar .fill.w86 { width: 86%; }
.bar .fill.w87 { width: 87%; }
.bar .fill.w88 { width: 88%; }
.bar .fill.w89 { width: 89%; }
.bar .fill.w90 { width: 90%; }
.bar .fill.w91 { width: 91%; }
.bar .fill.w92 { width: 92%; }
.bar .fill.w93 { width: 93%; }
.bar .fill.w94 { width: 94%; }
.bar .fill.w95 { width: 95%; }
.bar .fill.w96 { width: 96%; }
.bar .fill.w97 { width: 97%; }
.bar .fill.w98 { width: 98%; }
.bar .fill.w99 { width: 99%; }
.bar .fill.w100 { width: 100%; }
.grid.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
a.link-card { color: var(--text); text-decoration: none; }
a.link-card:hover { border-color: var(--primary); }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- aday portalı ---------- */
.auth-page.portal .portal-card { max-width: 820px; width: 100%; }
.portal-form .form-grid { margin-bottom: .5rem; }
.field.wide { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error-text { color: var(--danger); font-size: .85rem; margin-top: .2rem; }
.notice-text { background: var(--head-bg); border-radius: 8px; padding: .7rem 1rem; margin: .8rem 0; font-size: .9rem; }
.notice-text summary { cursor: pointer; font-weight: 500; }
.track-status { margin: 1rem 0; }
.btn.link { background: none; border: 0; color: var(--link); padding: 0; text-decoration: underline; cursor: pointer; }
.req { color: var(--primary); }
.auth-page.portal { min-height: 100vh; height: auto; padding-bottom: 2rem; }
body:has(.auth-page.portal) { background-attachment: fixed; }
.inline-row .check { display: inline-flex; align-items: center; gap: .35rem; margin: 0 1rem 0 0; }
.vs-card { border-left: 3px solid var(--primary); background: var(--head-bg); padding: .6rem .9rem; border-radius: 6px; margin: .8rem 0; }
.consent-list { display: grid; gap: .6rem; margin: .6rem 0; }
.consent-item { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; padding: .6rem; border: 1px solid var(--line); border-radius: 8px; }
.consent-item .check { margin-top: .3rem; }
.consent-item input:disabled + * , .consent-item input:disabled { opacity: .5; }
.kvkk-req { border-bottom: 1px solid var(--line); padding: .5rem 0; }
[hidden] { display: none !important; }

/* Portal açılış mesajı */
.portal-popup { position: fixed; inset: 0; z-index: 1000; background: rgba(10,9,8,.72); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.portal-popup-box { background: var(--surface, #24221f); border: 1px solid var(--primary); border-radius: 12px; max-width: 620px; width: 100%; max-height: 85vh; overflow: auto; padding: 1.4rem 1.6rem; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.portal-popup-box h2 { margin: .4rem 0 .8rem; }
.portal-popup .pp-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.portal-popup .pp-body { font-size: 1.02rem; line-height: 1.55; margin-bottom: 1rem; }
.blood-value { font-family: var(--serif, Georgia, serif); font-size: 2rem; margin: .2rem 0 .4rem; color: var(--primary); }
.blood-card .inline-form input[type=text] { width: 320px; max-width: 100%; }
.ask label { font-weight: 500; display: block; margin-bottom: .4rem; }
.ask .inline-row input { flex: 1; min-width: 260px; }
.designer details { margin: .6rem 0; }
.designer summary { cursor: pointer; font-weight: 500; padding: .3rem 0; }
.col-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .2rem 1rem; padding: .4rem 0; }
.filter-row { margin: .25rem 0; }
.filter-row input { max-width: 16rem; }
.danger-zone { border-color: var(--danger); }
.danger-zone label, .card form label { display: block; margin: .4rem 0; }
.demo-banner { background: repeating-linear-gradient(45deg, rgba(224,138,104,.18), rgba(224,138,104,.18) 10px, rgba(224,138,104,.08) 10px, rgba(224,138,104,.08) 20px); border-bottom: 1px solid var(--primary); padding: .35rem 1rem; font-size: .85rem; text-align: center; }
.ask .inline-row, .designer .inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.designer .inline-row input[type=checkbox] { flex: 0 0 auto; min-width: 0; }
.designer .inline-row label { margin: 0; }
.designer .filter-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) minmax(160px, 1.2fr); gap: .5rem; max-width: 760px; }
.designer .filter-row input { max-width: none; min-width: 0; }
.db-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.db-card.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.db-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.db-card details { margin-top: .8rem; }
.spinner { display: inline-block; width: .9em; height: .9em; border: 2px solid var(--muted); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- PDKS */
.tabs a { color: var(--muted); padding: .55rem .9rem; border-bottom: 2px solid transparent; text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--primary); }
.grid.stats3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat.small { font-size: 1.25rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
tr.strike td:first-child { text-decoration: line-through; }
.week-plan { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.day-chip { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; display: flex; flex-direction: column; min-width: 88px; }
.swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: middle; border: 1px solid var(--line); }
.timesheet table.compact td, .timesheet table.compact th { padding: .25rem .35rem; text-align: center; font-size: .82rem; }
.timesheet td.sticky, .timesheet th.sticky { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 1; white-space: nowrap; }
.timesheet th.we, .plan-grid th.we { color: var(--warning); }
.ts-gec, .ts-erken_cikis, .ts-gec_erken, .ts-eksik { color: var(--warning); font-weight: 600; }
.ts-devamsiz { color: var(--danger); font-weight: 700; }
.ts-izinli { color: var(--link); }
.ts-tatil, .ts-resmi_tatil { color: var(--muted); }
.ts-tatil_calisma, .ts-plansiz { color: var(--success); font-weight: 600; }
.plan-grid td { min-width: 120px; }
.plan-grid td.changed { background: var(--primary-soft); }
.plan-grid select { width: 100%; font-size: .8rem; }
.pattern-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.pattern-days label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; }
.scan-card { text-align: center; margin: 1rem auto; }
.scan-card .clock { font-family: var(--serif); font-size: 3rem; margin: .3rem 0 1rem; }
.scan-buttons { display: flex; gap: .8rem; justify-content: center; }
.btn.big { font-size: 1.3rem; padding: 1rem 2rem; min-width: 140px; }
.btn.primary-choice { background: var(--primary); color: var(--primary-text); }
.big-check { font-size: 4rem; color: var(--success); line-height: 1; }
.qr-box svg, .kiosk-qr svg { display: block; margin: 0 auto; width: 100%; height: auto; max-width: 360px; background: #fff; border-radius: 10px; }
body.kiosk-body { background: var(--bg); color: var(--text); min-height: 100vh; margin: 0; }
.kiosk-wrap { max-width: 720px; margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.kiosk-head { display: flex; justify-content: space-between; align-items: baseline; }
.kiosk-clock { font-family: var(--serif); font-size: 2.6rem; }
.kiosk-qr svg { max-width: 520px; }
.kiosk-help { font-size: 1.2rem; color: var(--muted); }
.kiosk-video { width: 100%; max-width: 560px; border-radius: 12px; background: #000; }
.kiosk-result { font-size: 1.6rem; margin-top: 1rem; min-height: 2.5rem; }
.kiosk-result.ok { color: var(--success); }
.kiosk-result.err { color: var(--danger); }

/* ---------------------------------------------------------------- avans */
.advance-hint { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.advance-hint .stat { margin: .2rem 0; }
.bulk-bar { flex-wrap: wrap; gap: .5rem; align-items: center; }
.bulk-bar label { display: inline-flex; gap: .3rem; align-items: center; }
