:root {
    --navy: #0a3044;
    --teal: #0f766e;
    --teal-soft: #e7f5f2;
    --ink: #14232e;
    --muted: #5c6b76;
    --line: #e3ebe8;
    --bg: #f3f6f5;
    --card: #ffffff;
    --pink: #f8d6de;
    --pink-text: #7a2438;
    --warn: #b45309;
    --ok: #157a45;
    --danger: #be123c;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(10, 48, 68, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.app-body {
    font-family: Inter, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--teal); display: grid; place-items: center; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-title { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-weight: 700; font-size: 15px; }
.nav-main { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; align-items: center; }
.nav-main > a {
    color: #d7e4ea; padding: 7px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-main > a.is-active, .nav-main > a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    color: #d7e4ea; padding: 7px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 0; cursor: pointer;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.is-open > .nav-dropdown-toggle,
.nav-dropdown.is-active > .nav-dropdown-toggle { background: rgba(255,255,255,.12); color: #fff; }
.nav-dropdown-chevron { font-size: 11px; transition: transform .15s ease; }
.nav-dropdown.is-open .nav-dropdown-chevron { transform: rotate(180deg); }
.nav-dropdown-panel {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
    min-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; box-shadow: 0 12px 32px rgba(10, 48, 68, .16);
}
.nav-dropdown.is-open .nav-dropdown-panel { display: flex; flex-direction: column; }
.nav-dropdown-panel a {
    color: var(--ink); padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.nav-dropdown-panel a:hover, .nav-dropdown-panel a.is-active { background: var(--teal-soft); color: var(--teal); }
.nav-toggle {
    display: none; margin-left: auto; background: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 6px 10px;
}
.main-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 16px 48px; }
.page-head { margin: 0 0 16px; }
.page-head h1 { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); }
.alert-ok { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.alert-error { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.alert-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px 18px;
}
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.mt { margin-top: 14px; }

.hero-card {
    background: linear-gradient(135deg, #0a3044 0%, #14586a 60%, #0f766e 100%);
    color: #fff; border: 0;
}
.hero-card .muted, .hero-kicker { color: rgba(255,255,255,.78); }
.hero-card h2 { margin: 6px 0 4px; font-size: 1.6rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
    background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600;
}
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal); margin: 0 0 6px; }
.muted { color: var(--muted); }
h2.section { margin: 0 0 10px; font-size: 1.05rem; }
dl.info { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; }
dl.info dt { color: var(--muted); font-size: 13px; }
dl.info dd { margin: 0; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    position: relative; padding: 0 0 14px 16px; border-left: 2px solid var(--line); margin-left: 6px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--teal);
}
.timeline .when { color: var(--muted); font-size: 12px; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.badge-ok { background: #dcfce7; color: var(--ok); }
.badge-warn { background: #fef3c7; color: var(--warn); }
.badge-danger { background: #ffe4e6; color: var(--danger); }
.badge-muted { background: #eef2f4; color: var(--muted); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 10px; border: 1px solid transparent; padding: 9px 14px;
    font-weight: 650; cursor: pointer; background: var(--teal); color: #fff;
}
.btn:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-line { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecdd3; }
button.btn.btn-danger {
    background: #fff !important;
    background-color: #fff !important;
    color: var(--danger) !important;
    border-color: #fecdd3 !important;
}
button.btn.btn-danger:hover { background: #fff1f2 !important; background-color: #fff1f2 !important; filter: none; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.span-2 { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: #314651; }
input, select, textarea {
    width: 100%; border: 1px solid #d5e0dc; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.gorev-sekme { margin: 12px 0 14px; }
.login-wrap { max-width: 440px; margin: 28px auto; }
.login-wrap h1 { margin-top: 0; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; }
table.data th, table.data td { border: 1px solid #d9e3df; padding: 8px 10px; text-align: left; font-size: 14px; vertical-align: top; }
table.data th { background: #e7f0ea; color: var(--navy); font-size: 12px; letter-spacing: .03em; }
table.data tr.is-izin td, table.data tr.is-rapor td { background: var(--pink); color: var(--pink-text); }
table.data tr.eslesme-yedek td { background: #fff3d6; }
table.data tr.eslesme-yedek td:first-child { box-shadow: inset 4px 0 0 #d4880f; }
table.data tr.eslesme-dagitim td { background: #e5f6ea; }
table.data tr.eslesme-dagitim td:first-child { box-shadow: inset 4px 0 0 #157a45; }
table.data tr.eslesme-sk td { background: #f3e8ff; }
table.data tr.eslesme-sk td:first-child { box-shadow: inset 4px 0 0 #7c3aed; }
table.data tr.eslesme-bosta td { background: #e7eef5; }
table.data tr.eslesme-bosta td:first-child { box-shadow: inset 4px 0 0 #3b6f99; }
table.data tr.group td { background: #f7fbfa; font-weight: 700; color: var(--navy); }
table.data tr.brans-soft td { background: #e5f3ec; }
.gorev-baslik { margin: 18px 0 8px; font-size: 1.05rem; color: var(--navy); }
.gorev-baslik:first-of-type { margin-top: 10px; }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.filters .form-row { min-width: 180px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pager a { border: 1px solid #d5e0dc; border-radius: 8px; padding: 6px 10px; background: #fff; color: var(--navy); text-decoration: none; }
.pager a.is-current { background: var(--teal); color: #fff; border-color: var(--teal); }
.stat {
    background: var(--teal-soft); border-radius: 12px; padding: 10px 12px;
}
.stat b { display: block; font-size: 1.15rem; }
.empty { padding: 18px; color: var(--muted); }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hekim-kutu { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.plan-aksiyon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
dialog.plan-modal {
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    margin: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0;
    color: var(--ink);
    box-shadow: 0 24px 60px rgba(10, 48, 68, .2);
}
dialog.plan-modal::backdrop { background: rgba(10, 48, 68, .45); }
.plan-modal-bas {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.plan-modal-bas h2 { margin: 0; font-size: 1.05rem; }
.plan-modal-icerik { padding: 16px; overflow: auto; max-height: calc(100vh - 140px); }
.plan-modal-kapat {
    border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.hekim-ara { margin-bottom: 8px; }
.hekim-suz { margin-bottom: 8px; }
table.data tr.gorev-satir,
table.data tr.sekreter-plansiz { cursor: pointer; }
table.data tr.gorev-satir:hover td,
table.data tr.sekreter-plansiz:hover td { filter: brightness(.97); }
table.data tr.gorev-satir:focus-visible td,
table.data tr.sekreter-plansiz:focus-visible td { outline: 2px solid var(--teal); outline-offset: -2px; }
table.data tr.banko-bos td { background: #f4f7fb; color: #3d5160; }
table.data tr.banko-dolu td:first-child { box-shadow: inset 4px 0 0 var(--teal); }
table.data tr.sirket-karsilar td { background: #e5f6ea; color: #14532d; font-weight: 650; }
.renk-ornek { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #fff3d6; border: 1px solid #d4880f; vertical-align: -1px; margin-right: 4px; }
.renk-ornek.dagitim { background: #e5f6ea; border-color: #157a45; }
.renk-ornek.sk { background: #f3e8ff; border-color: #7c3aed; }
.note .renk-ornek ~ .renk-ornek { margin-left: 12px; }
[hidden] { display: none !important; }
.checks { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.checks label { font-weight: 500; display: flex; gap: 8px; align-items: flex-start; justify-content: flex-start; width: auto; margin: 0; cursor: pointer; }
.checks label.hekim-gizli,
.checks strong.hekim-gizli { display: none !important; }
.aksiyon-yazi { color: #0f4c5c; font-size: .92em; font-weight: 600; margin-top: 2px; }
.checks label span { flex: 1; min-width: 0; }
.checks label input[type="checkbox"],
.checks label input[type="radio"] {
    width: 16px; min-width: 16px; max-width: 16px; height: 16px;
    flex: none; margin: 2px 0 0; padding: 0; border-radius: 4px;
}
.checks label input[type="radio"] { border-radius: 50%; }
.checks strong { margin-top: 8px; color: var(--navy); }
.secim-kartlari {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.secim-kart {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.secim-kart:hover { border-color: #b7d0c8; background: #f7fbfa; }
.secim-kart:has(input:checked) {
    border-color: var(--teal);
    background: var(--teal-soft);
    box-shadow: inset 0 0 0 1px var(--teal);
}
.secim-kart input[type="radio"] {
    width: 16px; min-width: 16px; max-width: 16px; height: 16px;
    margin: 0; padding: 0; flex: none; border-radius: 50%;
    accent-color: var(--teal);
}
.secim-kart span { flex: 1; min-width: 0; line-height: 1.25; }
@media (max-width: 560px) {
    .secim-kartlari { grid-template-columns: 1fr; }
}
.badge-info { background: #e0f2fe; color: #075985; }
.main-wide { max-width: none; }
body:has(.main-wide) .topbar-inner { max-width: none; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.check-line input { width: auto; }
.puantaj-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; margin: 0 0 8px; padding: 0; }
.puantaj-legend li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.puantaj-ornek {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; padding: 2px 6px; border: 1px solid #d5e0dc; border-radius: 6px; font-weight: 700; background: #fff;
}
select.puantaj-kod { width: 52px; min-width: 52px; padding: 4px 0; border-radius: 6px; font-weight: 700; text-align: center; text-align-last: center; }
.puantaj-ornek.k-24, select.puantaj-kod.k-24 { background: #dcfce7; color: #166534; border-color: #86efac; }
.puantaj-ornek.k-16, select.puantaj-kod.k-16 { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.puantaj-ornek.k-7, select.puantaj-kod.k-7 { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
.puantaj-ornek.k-X, select.puantaj-kod.k-X { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
.puantaj-ornek.k-YI, .puantaj-ornek.k-RR, select.puantaj-kod.k-YI, select.puantaj-kod.k-RR { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
table.puantaj { min-width: 0; border-collapse: separate; border-spacing: 0; }
table.puantaj th, table.puantaj td { padding: 3px; text-align: center; font-size: 12px; background: #fff; }
table.puantaj th.ad, table.puantaj td.ad {
    position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; min-width: 220px;
}
table.puantaj th.ad { z-index: 2; background: #e7f0ea; }
table.puantaj th.hafta, table.puantaj td.hafta { background: #f3f4f6; }
table.puantaj .gun-no { display: block; font-size: 12px; }
table.puantaj .gun-ad { display: block; font-size: 10px; font-weight: 600; color: var(--muted); }
table.puantaj th.hafta .gun-ad { color: #9f1239; }
table.puantaj td.ozet { font-weight: 700; }
.puantaj-kisi { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Hekim cetveli (webReport slot matrisi) */
body.cetvel-embed { background: #f4f7f6; margin: 0; }
.cetvel-embed-wrap { padding: 12px 14px 24px; max-width: 100%; }
.cetvel-embed .section { margin: 0 0 4px; font-size: 1.25rem; }
.cetvel-ust-satir { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.cetvel-yukle input[type="file"] { display: none; }
.cetvel-filtre { padding: 12px 14px; position: relative; z-index: 5; }
.cetvel-filtre-satir { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cetvel-secim { position: relative; min-width: 200px; flex: 1 1 200px; max-width: 320px; }
.cetvel-secim-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border: 1px solid #cfd8d4; border-radius: 8px; background: #fff; padding: 10px 12px;
    color: var(--ink); font-size: 14px; cursor: pointer; text-align: left;
}
.cetvel-secim-btn:disabled { opacity: .55; cursor: not-allowed; }
.cetvel-secim-btn[aria-expanded="true"] { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.cetvel-secim-panel {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
    background: #fff; border: 1px solid #d5e0dc; border-radius: 10px;
    box-shadow: 0 12px 28px rgba(10,48,68,.14); padding: 8px; max-height: 320px;
    display: flex; flex-direction: column; gap: 6px;
}
.cetvel-secim-panel[hidden] { display: none !important; }
.cetvel-secim-panel input[type="search"] {
    border: 1px solid #d5e0dc; border-radius: 8px; padding: 8px 10px; font-size: 13px;
}
.cetvel-secim-panel ul { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 250px; }
.cetvel-secim-panel li button,
.cetvel-secim-panel li a {
    display: block; width: 100%; border: 0; background: transparent; text-align: left;
    padding: 8px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; cursor: pointer; text-decoration: none;
}
.cetvel-secim-panel li button:hover,
.cetvel-secim-panel li a:hover,
.cetvel-secim-panel li button.is-active { background: #2563eb; color: #fff; }
.cetvel-tarih { max-width: 260px; flex: 0 1 240px; }
.cetvel-tarih-panel { min-width: 220px; }
.cetvel-tarih-ozel { display: grid; gap: 8px; padding: 6px 4px 2px; border-top: 1px solid #e5ece9; }
.cetvel-tarih-ozel label { font-size: 12px; display: grid; gap: 4px; }
.cetvel-yazdir {
    border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8;
    width: 42px; height: 42px; border-radius: 8px; cursor: pointer; font-size: 18px;
}
.cetvel-yazdir:hover { background: #dbeafe; }
.cetvel-tablo-wrap { margin-top: 12px; }
table.cetvel-tablo { min-width: 1100px; font-size: 13px; }
table.cetvel-tablo th, table.cetvel-tablo td { white-space: nowrap; vertical-align: middle; }
table.cetvel-tablo th:nth-child(1), table.cetvel-tablo td:nth-child(1) { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 180px; }
table.cetvel-tablo th:nth-child(1) { background: #e7f0ea; z-index: 2; }
table.cetvel-tablo td.cetvel-muayene { background: #ecfdf5; color: #065f46; }
table.cetvel-tablo td.cetvel-izin { background: #fff1f2; color: #9f1239; font-weight: 600; }
table.cetvel-tablo td.cetvel-oglen { background: #fff7ed; color: #9a3412; }
table.cetvel-tablo td.cetvel-servis { background: #eff6ff; color: #1e3a8a; }
table.cetvel-tablo td.cetvel-diger { background: #f8fafc; }

button.hemsire-sayi {
    border: 0; background: var(--teal-soft); color: var(--navy); font-weight: 700;
    border-radius: 999px; min-width: 2.5rem; padding: 4px 12px; cursor: pointer;
}
button.hemsire-izin {
    display: flex; flex-wrap: wrap; gap: 4px; border: 0; background: transparent;
    padding: 0; cursor: pointer; text-align: left;
}
button.hemsire-sayi:hover { filter: brightness(.97); }
button.hemsire-sayi:focus-visible,
button.hemsire-izin:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@media print {
    .topbar, .no-print, .nav-toggle, .flash { display: none !important; }
    .cetvel-tablo-wrap { margin: 0; }
    table.cetvel-tablo { min-width: 0; font-size: 11px; }
    table.cetvel-tablo th:nth-child(1), table.cetvel-tablo td:nth-child(1) { position: static; }
}

@media (max-width: 860px) {
    .grid-2, .grid-3, .form-grid, .plan-grid { grid-template-columns: 1fr; }
    .form-row.span-2 { grid-column: auto; }
    dl.info { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-flex; }
    .nav-main { display: none; width: 100%; flex-direction: column; margin-left: 0; }
    .nav-main.is-open { display: flex; }
    .nav-dropdown { width: 100%; }
    .nav-dropdown-toggle { width: 100%; justify-content: space-between; }
    .nav-dropdown-panel { position: static; width: 100%; min-width: 0; margin-top: 4px; box-shadow: none; }
    .topbar-inner { flex-wrap: wrap; }
    .btn-ghost { margin-left: auto; }
    .main-wrap { padding: 14px 12px 32px; }
    table.data { min-width: 520px; }
}
