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