:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #667085;
  --line: #dfe3ea;
  --primary: #1f4e8c;
  --primary-dark: #163b6b;
  --head: #1f3a5f;
  --accent: #2d6cdf;
  --success: #1f8a4c;
  --danger: #c0392b;
  --amber: #b7791f;
  --me: #fff3c4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primary); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
kbd { background: #eef1f5; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12px; }

/* ---- üst bar ---- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--head); color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; }
.brand img { width: 28px; height: 28px; }
.org { opacity: .75; font-size: 13px; }
#nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
#nav a { color: #dbe6f5; text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
#nav a:hover { background: rgba(255, 255, 255, .1); }
#nav a.active { background: rgba(255, 255, 255, .18); color: #fff; }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-link { color: #fff; text-decoration: none; font-size: 13px; }
.icon-btn { position: relative; background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .12); }
#bell-count { position: absolute; top: -2px; right: -4px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 9px; padding: 1px 5px; }
.bell-panel { position: fixed; top: 52px; right: 12px; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); z-index: 30; }
.bell-panel a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.bell-panel a:hover { background: #f5f7fa; }
.bell-panel a.unread { background: #eef5ff; }
.bell-panel b { display: block; font-size: 13px; }
.bell-panel span { display: block; font-size: 12px; color: var(--muted); }
.bell-panel time { font-size: 11px; color: var(--muted); }

main { padding: 18px 16px 48px; max-width: 1400px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 .sub { font-weight: 400; color: var(--muted); font-size: 16px; margin-left: 6px; }
.page-head .meta { margin-top: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { font-size: 13px; text-decoration: none; display: inline-block; margin-bottom: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.loading { color: var(--muted); padding: 30px 0; text-align: center; }
.error-box { color: var(--danger); }
.empty-state { text-align: center; color: var(--muted); padding: 36px 16px; }

/* ---- butonlar & formlar ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f5f7fa; }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.tiny { padding: 1px 8px; font-size: 12px; border-radius: 6px; }
.danger-text { color: var(--danger) !important; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfd5df; border-radius: 8px; background: #fff; color: var(--text); min-width: 0; }
input[type=color] { padding: 2px; height: 38px; width: 64px; }
input[type=checkbox] { width: 16px; height: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.err { color: var(--danger); min-height: 1em; margin: 8px 0 0; font-size: 13px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input[type=search] { flex: 1; min-width: 180px; }

/* ---- rozetler ---- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.st-draft { background: #eceff3; color: #475467; }
.st-submitted { background: #fdf0d5; color: #8a5a0b; }
.st-approved { background: #dcf3e5; color: #17663a; }
.st-rejected { background: #fbe1df; color: #a1271b; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; border: 1px solid; }
.notice.info { background: #eef5ff; border-color: #cfe0fb; color: #1d4580; }
.notice.warn { background: #fdf0d5; border-color: #f3dca6; color: #7a4f0a; }
.notice.bad { background: #fbe1df; border-color: #f2c2bd; color: #8e2318; }
.notice.good { background: #dcf3e5; border-color: #b9e3c9; color: #17663a; }
.save-state { font-size: 12px; }
.save-state.bad { color: var(--danger); font-weight: 600; }

/* ---- listeler ---- */
.table-wrap { padding: 0; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f8f9fb; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: #f5f8fd; }
table.list tr.inactive td { opacity: .5; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #e8eefc; color: var(--primary); margin-left: 6px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 6px; border: 1px solid rgba(0, 0, 0, .1); }

/* ---- vardiya çipleri ---- */
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 4px 8px; border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .12); font-weight: 700; font-size: 13px; background: #eef1f5; cursor: default; font-family: inherit; }
button.chip { cursor: pointer; }
.chip.clear { background: #fff; font-weight: 500; }
.chip.on { outline: 3px solid var(--accent); outline-offset: 1px; }

/* ---- rota tablosu ---- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.toolbar .tb-label { font-weight: 600; font-size: 13px; }
.brushes { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar .hint { font-size: 12px; color: var(--muted); flex-basis: 100%; }
.grid-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: calc(100vh - 150px); }
.rota-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 13px; }
.rota-grid th, .rota-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; height: 34px; text-align: center; }
.rota-grid thead th { position: sticky; top: 0; background: var(--head); color: #fff; z-index: 3; font-weight: 600; padding: 6px 4px; }
.rota-grid thead th span { display: block; font-size: 11px; font-weight: 400; opacity: .8; }
.rota-grid thead th.today { background: var(--accent); }
.rota-grid .name-col { position: sticky; left: 0; background: #f7f9fc; text-align: left; padding: 0 6px 0 10px; min-width: 180px; z-index: 2;
  font-weight: 600; white-space: nowrap; }
.rota-grid thead .name-col { z-index: 4; background: var(--head); }
.rota-grid .name-col .pname { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.row-menu { float: right; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 4px; margin-top: 4px; }
.row-menu:hover { background: #e7ebf1; color: var(--text); }
.group-row th { background: color-mix(in srgb, var(--gc) 40%, #fff); border-left: 5px solid var(--gc); text-align: left; padding: 6px 10px; height: 30px; }
.group-row .gname { position: sticky; left: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 12px; }
.group-row .gcount { margin: 0 10px 0 6px; font-weight: 400; font-size: 12px; color: var(--muted); }
.empty-row td { color: var(--muted); font-size: 12px; text-align: left; padding-left: 14px; height: 30px; }
.cell { min-width: 60px; font-weight: 700; user-select: none; }
.cell.editable { cursor: pointer; }
.cell.editable.empty { background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f6f7f9 6px, #f6f7f9 12px); }
.cell.editable:hover { box-shadow: inset 0 0 0 2px #9db8e6; }
.cell:focus { outline: none; box-shadow: inset 0 0 0 3px var(--accent) !important; }
.cell.typing { background: #fff !important; color: var(--accent) !important; }
.cell.flash { animation: flash .4s; }
@keyframes flash { 50% { box-shadow: inset 0 0 0 3px var(--danger); } }
.brushing .cell.editable { cursor: crosshair; }
.sum-col { min-width: 96px; font-size: 12px; color: var(--muted); padding: 0 6px !important; }
.sum-col .warn { display: block; color: var(--danger); font-weight: 600; font-size: 11px; }
.rota-grid tfoot th, .rota-grid tfoot td { background: #f2f4f7; font-weight: 600; font-size: 12px; color: #475467; }
.rota-grid tr.me th.name-col { background: var(--me); }
.rota-grid tr.me td { box-shadow: inset 0 2px 0 #e0b400, inset 0 -2px 0 #e0b400; }
.legend { margin-top: 14px; }
.legend-items { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-item small { color: var(--muted); }

/* ---- popover ---- */
.popover { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 8px; max-width: min(420px, calc(100vw - 16px)); }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; width: 380px; max-width: 100%; }
.picker .chip { flex-direction: column; padding: 6px 4px; }
.picker .chip small { font-weight: 400; font-size: 10px; opacity: .85; white-space: nowrap; }
.menu { display: flex; flex-direction: column; min-width: 200px; }
.menu button { text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 6px; font: inherit; cursor: pointer; color: var(--text); }
.menu button:hover:not(:disabled) { background: #f0f3f8; }
.menu button:disabled { opacity: .45; cursor: default; }
.menu .menu-title { font-weight: 700; padding: 4px 10px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .menu-sep { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 8px 10px 2px; }
.add-person { width: 300px; max-width: 100%; }
.add-person input { width: 100%; margin-bottom: 6px; }
.add-person .list { max-height: 280px; overflow: auto; display: flex; flex-direction: column; }
.add-person .list button { display: flex; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0;
  padding: 7px 8px; border-radius: 6px; cursor: pointer; font: inherit; }
.add-person .list button:hover { background: #f0f3f8; }
.add-person .list small { color: var(--muted); }

/* ---- modal ---- */
dialog#modal { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog#modal.wide { width: min(760px, calc(100vw - 24px)); }
dialog#modal::backdrop { background: rgba(15, 23, 42, .45); }
.modal-form { padding: 20px; }
.modal-form h2 { margin-bottom: 14px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---- toast ---- */
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: #1b2430; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-size: 14px; max-width: 90vw; }
#toast div.error { background: var(--danger); }

/* ---- giriş ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(160deg, #1f3a5f, #2d6cdf); }
.login { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.login .brand { color: var(--head); justify-content: center; font-size: 22px; }
.login .brand img { width: 40px; height: 40px; }
.login h1 { font-size: 16px; text-align: center; color: var(--muted); font-weight: 500; }

/* ---- personel ekranı ---- */
.week-nav { display: flex; gap: 6px; align-items: center; }
.week-nav select { padding: 6px 8px; }
.my-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.day-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.day-card.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.day-card.past { opacity: .6; }
.dc-day { font-weight: 700; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 4px; }
.dc-day span { font-weight: 400; color: var(--muted); }
.dc-shift { display: flex; gap: 8px; align-items: center; }
.dc-shift + .dc-shift { margin-top: 6px; }
.dc-shift b { display: block; font-size: 13px; }
.dc-shift small { display: block; color: var(--muted); font-size: 11px; }
.snap h2 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.snap .grid-wrap { box-shadow: none; max-height: none; }

/* ---- departmanlar ---- */
.dept-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dept-head h2 { margin: 0; }
ul.groups { list-style: none; padding: 0; margin: 0 0 12px; }
ul.groups li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.groups .grow { flex: 1; }

/* ---- süper admin ---- */
.acting-bar { position: sticky; top: 48px; z-index: 19; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 8px 16px; background: #fdf0d5; border-bottom: 1px solid #f3dca6; color: #7a4f0a; font-size: 13px; }
.acting-bar[hidden] { display: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
a.stat:hover { border-color: #b8c9e6; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-sub { font-size: 12px; color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px 6px; flex-wrap: wrap; }
.card:not(.table-wrap) .card-head { padding: 0 0 8px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: 13px; text-decoration: none; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
table.list td.wrap { white-space: normal; min-width: 180px; }
table.list.logs td { font-size: 13px; padding: 8px 12px; }
tr.log-warn td { background: #fff6f5; }
dl.details { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.gpill { display: inline-flex; align-items: center; margin: 2px 10px 2px 0; font-size: 13px; }
.gpill small { color: var(--muted); margin-left: 4px; }

/* ---- rota ekranı: filtre, seçim, kontroller ---- */
.rota-filters { align-items: center; }
.rota-filters input[type=search] { max-width: 280px; }
.rota-grid .name-col .eno { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: -2px; }
.rota-grid tr[data-u] th.name-col { line-height: 1.2; padding-top: 3px; padding-bottom: 3px; }
.cell { position: relative; }
.cell.sel { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 999px rgba(45, 108, 223, .22) !important; }
.cell-err::after, .cell-warn::after { content: ''; position: absolute; top: 0; right: 0; border-top: 9px solid var(--danger); border-left: 9px solid transparent; }
.cell-warn::after { border-top-color: var(--amber); }
.checks-panel h3 { margin-top: 0; }
.issue-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.issue-list li { padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.issue-list li:hover { background: #f5f8fd; }
.sel-pill { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; background: var(--head); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); max-width: calc(100vw - 32px); text-align: center; }
.sel-pill[hidden] { display: none; }
.sel-pill kbd { color: var(--text); }
.picker-title { grid-column: 1 / -1; font-weight: 700; font-size: 12px; color: var(--accent); }
.add-person .bulk-add { width: 100%; justify-content: center; margin-bottom: 8px; }

/* ---- şirket yapısı: işletme → departman ---- */
.venue-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.venue { border-left: 5px solid var(--head); }
.venue-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.venue-head h2 { margin: 2px 0 0; font-size: 20px; }
.venue-depts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dept-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fbfcfe; }
.dept-card .dept-title { margin: 0; font-size: 16px; }
.dept-card h4 { margin: 10px 0 4px; font-size: 13px; }
.venue-crumb { font-weight: 400; color: var(--muted); }

/* ---- departman kartları ---- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.inactive-card { opacity: .7; border-style: dashed; }
ul.groups li small { margin-left: 4px; }

/* "Yazdırma" modülü kapalı kuruluşlarda yazdır düğmeleri gizlenir */
.no-print-module [data-print], .no-print-module [data-action="print"] { display: none !important; }

/* ---- onaycılar ---- */
.approvers-box { background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.approvers-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.approvers-head h3 { margin: 0; }
.approver-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.approver { display: inline-flex; gap: 4px; align-items: center; padding: 3px 10px; border-radius: 999px; background: #e8eefc; color: var(--primary); font-size: 13px; font-weight: 500; }
.approver.ok { background: #dcf3e5; color: #17663a; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.check-list { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.check-list label { padding: 6px 0; border-bottom: 1px solid #f0f2f5; }
.check-list label small { margin-left: auto; }

/* ---- SaaS ---- */
.billing-bar { background: #fbe1df; border-color: #f2c2bd; color: #8e2318; }
.billing-bar a { color: inherit; font-weight: 600; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.two-col > .card { margin-bottom: 14px; }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.plan.current { border-color: var(--success); box-shadow: 0 0 0 2px #b9e3c9; }
.plan h3 { margin: 0 0 4px; }
.plan-price { font-size: 22px; font-weight: 700; }
.plan-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 18px; margin: 8px 0 12px; font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.perm-matrix th span { display: block; white-space: normal; width: 110px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.perm-matrix td.perm-cell { text-align: center; }
.perm-list { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.perm-list legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.warn-text { color: var(--amber); }
.module-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.module-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.module-list li.off { opacity: .55; }
.module-list small { display: block; }
.mod-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none;
  background: #dcf3e5; color: #17663a; }
.module-list li.off .mod-icon { background: #eceff3; color: #667085; }
.mod-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f0f2f5; }
.mod-row:last-child { border-bottom: 0; }
.mod-row small { display: block; }
.mod-row select { min-width: 190px; }

/* ---- mobil ---- */
@media (max-width: 760px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  #nav { order: 3; flex-basis: 100%; }
  .org { display: none; }
  .acting-bar { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .mod-row { flex-direction: column; align-items: stretch; }
  .toolbar .hint { display: none; }
  .rota-filters input[type=search] { max-width: none; flex-basis: 100%; }
  dl.details { grid-template-columns: 1fr; }
  dl.details dd { margin-bottom: 6px; }
  main { padding: 14px 12px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .my-days { grid-template-columns: 1fr; }
  .day-card { display: flex; align-items: center; gap: 12px; }
  .dc-day { margin: 0; min-width: 110px; flex-direction: column; }
  .rota-grid .name-col { min-width: 130px; }
  .rota-grid .name-col .pname { max-width: 100px; }
  .bell-panel { top: 92px; }
}

/* ---- yazdırma ---- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 11px; }
  .topbar, .no-print, .toolbar, .bell-panel, #push-banner, .week-nav, .back, .row-menu, .my-days, .save-state, .acting-bar { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .grid-wrap { max-height: none; overflow: visible; border: 0; box-shadow: none; }
  .rota-grid { min-width: 0; font-size: 11px; }
  .rota-grid th, .rota-grid td { height: 22px; }
  .rota-grid thead th, .rota-grid .name-col { position: static; }
  .rota-grid tr.me td { box-shadow: none; }
  .rota-grid tr.me th.name-col { background: #f7f9fc; }
  .snap { break-after: page; }
}

/* ---- V2 Breaklist ---- */
.st-archived { background: #eceff3; color: #475467; }
.bl-grid { min-width: 0; width: max-content; font-size: 12px; }
.bl-grid thead th.bl-col { min-width: 50px; padding: 4px 2px; cursor: pointer; font-size: 12px; }
.bl-grid thead th.bl-col span { font-size: 10px; }
.bl-grid td.bl-cell { min-width: 50px; max-width: 74px; height: 32px; font-size: 11px; font-weight: 700; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; touch-action: manipulation; }
.bl-grid.select-mode td.bl-cell { touch-action: none; }
.bl-grid td.bl-cell.brk, .chip.brk { background: repeating-linear-gradient(135deg, #ffe08a, #ffe08a 6px, #ffd45c 6px, #ffd45c 12px); color: #5a4200; }
.bl-grid td.bl-cell.off-shift { background: #e6e9ee; color: #667085; }
.bl-grid td.bl-cell.off-shift.empty { background: repeating-linear-gradient(45deg, #e9ecf1, #e9ecf1 4px, #dfe3e9 4px, #dfe3e9 8px); }
.bl-grid td.bl-cell.now { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.bl-grid .name-col { min-width: 170px; }
.bl-grid tfoot td { font-size: 11px; }
.bl-toolbar .brushes .chip { min-width: 46px; position: relative; }
.bl-toolbar .brushes .chip sup { position: absolute; top: -6px; left: -4px; background: var(--head); color: #fff; border-radius: 8px; font-size: 9px; padding: 0 4px; line-height: 14px; }
.bl-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-cover-card { margin-top: 12px; }
.bl-cover th:not(.name-col) { font-size: 10px; padding: 3px 1px; min-width: 50px; }
.bl-cover td { font-size: 12px; height: 26px; }
.bl-cover .cov-ok { background: #e7f6ec; color: #1f8a4c; font-weight: 700; }
.bl-cover .cov-over { background: #fde4e1; color: var(--danger); font-weight: 700; }
.bl-cover .cov-under { background: #fff3d6; color: var(--amber); }
@media (max-width: 760px) {
  .bl-grid .name-col { min-width: 120px; }
  .bl-grid td.bl-cell, .bl-grid thead th.bl-col { min-width: 44px; }
}
@media (pointer: coarse) {
  .bl-grid td.bl-cell { height: 40px; }
  .bl-toolbar .brushes .chip { min-height: 38px; }
}
@media print {
  .bl-cover-card { break-before: page; }
  .bl-grid td.bl-cell { height: 20px; min-width: 0; font-size: 9px; }
}
.bl-grid .name-col { padding-right: 28px; white-space: nowrap; }
.bl-grid .name-col .row-menu { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.role-users h3 { margin-bottom: 6px; }
.role-user-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.role-user { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.role-user:last-child { border-bottom: 0; }
.role-user.inactive { opacity: .6; }

/* ---- V3: şirkete özel giriş ekranı ve marka ---- */
.blogin { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); min-height: 100vh; background: var(--bg); }
.blogin-side { position: relative; display: flex; align-items: flex-end; padding: 48px; color: #fff; background-size: cover; background-position: center;
  background-color: var(--head); background-image: linear-gradient(150deg, var(--brand-1, #1f3a5f), var(--brand-2, #2d6cdf)); }
.blogin-brand { max-width: 520px; }
.blogin-brand h1 { font-size: clamp(26px, 3vw, 40px); line-height: 1.15; margin: 18px 0 10px; }
.blogin-brand p { font-size: 17px; opacity: .9; margin: 0; white-space: pre-line; }
.blogin-logo-box { display: inline-flex; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(4px); }
.blogin-logo { display: block; max-width: 220px; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.blogin-icon { width: 56px; height: 56px; }
.blogin-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 20px; }
.blogin-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.blogin-form h2 { font-size: 24px; margin: 0; }
.blogin-form input { font-size: 16px; padding: 11px 12px; }
.blogin-submit { justify-content: center; padding: 12px; font-size: 15px; margin-top: 4px; }
.blogin-mobile-head { display: none; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 18px; }
.blogin-mobile-head .blogin-logo { max-height: 48px; max-width: 160px; }
.blogin-mobile-head .blogin-icon { width: 40px; height: 40px; }
.blogin-support { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.blogin-foot { margin-top: 24px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 72px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--primary); font-size: 13px; cursor: pointer; padding: 6px; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 2px 0; font-size: 14px; align-self: flex-start; text-decoration: underline; }
.center-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.center-card .state-icon { width: 48px; height: 48px; opacity: .8; }
@media (max-width: 860px) {
  .blogin { grid-template-columns: 1fr; }
  .blogin-side { display: none; }
  .blogin-mobile-head { display: flex; }
  .blogin-main { justify-content: flex-start; padding-top: 48px; }
}
.top-logo { display: inline-flex; align-items: center; height: 32px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .92); }
.top-logo img { max-height: 28px; max-width: 120px; width: auto; height: auto; object-fit: contain; }
.color-row { display: flex; align-items: center; gap: 10px; }
.brand-upload { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.brand-upload:last-child { border-bottom: 0; }
.brand-preview { flex: 0 0 140px; height: 72px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.brand-preview.dark { background: #1f3a5f; }
.brand-preview img { max-width: 130px; max-height: 64px; object-fit: contain; }
.loading-box { opacity: .5; pointer-events: none; }
.top-logo.on-dark { background: none; padding: 0; }

/* ---- V4: şirket rolleri ---- */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.role-card { margin: 0; }
.role-card .card-head h2 { font-size: 16px; }
.perm-summary { margin: 0; padding-left: 18px; font-size: 13px; }
.perm-summary li { margin-bottom: 3px; }
.tag-admin { background: #fdecc8; color: #8a5a00; }
.perm-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.perm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.perm-row:last-child { border-bottom: 0; }
.perm-row small { display: block; font-size: 11px; }
input.switch { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: #cfd6df; position: relative; cursor: pointer; flex: 0 0 auto; transition: background .15s; }
input.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
input.switch:checked { background: var(--success); }
input.switch:checked::after { left: 18px; }
.role-editor .role-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.role-editor .role-row:last-child { border-bottom: 0; }
.role-depts { margin: 4px 0 4px 26px; }

/* V5: organizasyon yapısı ve rota grupları */
.org-tree, .plain-list { list-style: none; margin: 0; padding: 0; }
.org-tree li, .plain-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.org-tree li.inactive, .plain-list li.inactive, .grade-box li.inactive { opacity: .55; }
.org-tree .row-actions, .plain-list li > span:last-child { display: flex; gap: 4px; flex-shrink: 0; }
.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.grade-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.grade-box h3 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grade-box ol { margin: 0; padding-left: 20px; }
.grade-box li { padding: 3px 0; }
.grade-box li > span { display: inline-flex; gap: 4px; align-items: center; }
.grade-box li > span:last-child { float: right; }
.btn.tiny { padding: 2px 8px; font-size: 12px; }
.rule-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 16px; max-height: 300px; overflow: auto; }
.rule-cols > div { display: flex; flex-direction: column; gap: 2px; }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.roster-box { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.roster-box h3 { margin: 0 0 6px; font-size: 15px; }
table.list.compact td, table.list.compact th { padding: 4px 6px; }
.warn-text { color: #b26a00; }
.sec-toggle { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 0 6px 0 0; color: inherit; }
.section-row th { background: #f3f5f8; }
@media (max-width: 700px) { .org-tree li, .plain-list li { flex-wrap: wrap; } }
.icon-btn:disabled { opacity: .3; cursor: default; }
.nav-more { background: none; border: 0; color: #dbe6f5; padding: 6px 10px; border-radius: 8px; white-space: nowrap; cursor: pointer; font: inherit; }
.nav-more:hover { background: rgba(255, 255, 255, .1); }
.nav-more.active { background: rgba(255, 255, 255, .18); color: #fff; }
.nav-panel { position: fixed; z-index: 40; width: 240px; max-height: 70vh; overflow: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 6px; }
.nav-panel a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.nav-panel a:hover { background: #f1f3f7; }
.nav-panel a.active { font-weight: 600; background: #eef1f6; }

/* V6: şirket paneli ve personel ihtiyaçları */
.section-h { font-size: 16px; margin: 18px 0 10px; }
.admin-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.admin-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.admin-link:hover { border-color: #b8c9e6; }
.admin-link b { color: var(--head); }
.admin-link span { font-size: 13px; color: var(--muted); }
.empty-state { text-align: center; padding: 28px 16px !important; }

/* V7: işveren başvuru ekranları */
.err-text { color: var(--danger); }
.plain-ul, .plain-ol { margin: 4px 0 8px; padding-left: 18px; }
.plain-ul li, .plain-ol li { margin: 2px 0; }
.app-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.app-detail h3 { font-size: 14px; margin: 14px 0 4px; }
.pre { white-space: pre-wrap; }
