:root {
  --red: #b3121b;
  --red-dark: #7d0b11;
  --red-soft: #fdecec;
  --brand: #12307a;
  --brand-dark: #0a1f52;
  --brand-soft: #e8f0fc;
  --accent: #17c3d2;
  --accent-soft: #e0f7f9;
  --bg: #f6f5f3;
  --card: #fff;
  --line: #ebe8e4;
  --text: #1d1b1a;
  --muted: #7a7470;
  --green: #16a34a;
  --green-soft: #e7f6ec;
  --amber: #d97706;
  --amber-soft: #fdf3e2;
  --blue: #2563eb;
  --blue-soft: #e8effd;
  --gray-soft: #f1efed;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 10, 5, .04);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
small { font-size: 12px; }
.ico { flex: none; vertical-align: middle; }

/* ---------- Panel layout ---------- */
body.panel { display: flex; min-height: 100vh; }
/* Sol menü: modüller (ikon + ad) ve açılır alt sayfalar */
.side { width: 262px; flex: none; background: linear-gradient(180deg, #102e74 0%, #0a1f52 60%, #071640 100%); color: #d6e2ff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 30; }
body.menu-collapsed .side { display: none; }
.side-logo { display: block; padding: 18px 20px 14px; }
.side-logo img { display: block; width: 100%; max-width: 200px; height: auto; }
.side-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.side-link, .side-mod > summary { display: flex; align-items: center; gap: 11px; padding: 9px 10px; margin: 1px 0; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: #d6e2ff; cursor: pointer; list-style: none; user-select: none; }
.side-mod > summary::-webkit-details-marker { display: none; }
.side-link > span, .side-mod > summary > span:not(.side-chev) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-link .ico, .side-mod > summary .ico { opacity: .85; }
.side-link:hover, .side-mod > summary:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.active { background: #fff; color: var(--brand); }
.side-link.active .ico { opacity: 1; }
.side-mod.active > summary { background: rgba(255,255,255,.10); color: #fff; }
.side-mod.active > summary .ico { color: var(--accent); opacity: 1; }
.side-chev { display: grid; transition: transform .15s; opacity: .6; }
.side-mod[open] > summary .side-chev { transform: rotate(90deg); }
.side-sub { margin: 2px 0 8px 19px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.12); }
.side-group-title { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(214,226,255,.45); padding: 9px 8px 3px; }
.side-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px; font-size: 13px; color: rgba(214,226,255,.78); line-height: 1.3; }
.side-item > span { flex: 1; }
.side-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-item.active { background: #fff; color: var(--brand); font-weight: 700; }
.side-badge { flex: none; background: #ffc107; color: #3b2a00; font-size: 10px; font-weight: 800; border-radius: 8px; padding: 1px 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.1); }
.side-who { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.side-who b { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-who small { color: rgba(214,226,255,.6); font-size: 11px; }

/* İçerikte kullanılan liste öğeleri (Görevler filtresi, form bölüm başlıkları) */
.menu-group-title { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 13px; }
.menu-item:hover { background: var(--gray-soft); }
.menu-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.menu-letter { width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--gray-soft); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.menu-item.active .menu-letter { background: var(--brand); color: #fff; }
.menu-text { flex: 1; }
.menu-badge { background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 1px 6px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.search { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; height: 36px; width: 280px; color: var(--muted); }
.search input { border: 0; outline: 0; flex: 1; font: inherit; background: transparent; min-width: 0; }
.search kbd { font-size: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-family: inherit; }
.search-results { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.08); display: none; max-height: 360px; overflow: auto; color: var(--text); }
.search-results.open { display: block; }
.search-results a { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a.sel { background: var(--brand-soft); }
.search-results small { color: var(--muted); display: block; }
.period { display: flex; gap: 8px; }
.period select { height: 36px; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-user form { margin: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #ffc107; color: #3b2a00; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.who { display: flex; flex-direction: column; line-height: 1.15; }
.who small { color: var(--muted); }
.content { padding: 20px 24px 40px; flex: 1; }
.footer { display: flex; justify-content: space-between; padding: 14px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.crumb-mod { color: var(--brand); font-weight: 700; margin-right: 4px; }

/* ---------- Components ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; flex-wrap: wrap; }
.section-title small { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat.hero { background: #161413; color: #fff; border-color: #161413; }
.stat.hero .stat-label, .stat.hero .stat-sub { color: #bdb6b0; }
.stat.hero .stat-value { font-size: 30px; }
.stat.accent { border-top: 3px solid var(--brand); }

.chg { font-size: 12px; font-weight: 700; white-space: nowrap; }
.chg-up { color: var(--green); }
.chg-down { color: var(--red); }
.chg-none { color: var(--muted); }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }
.badge-dark { background: #161413; color: #fff; }

.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid; display: flex; gap: 8px; }
.alert-success { background: var(--green-soft); border-color: #bfe6cb; color: #12632f; }
.alert-error { background: var(--red-soft); border-color: #f6c5c5; color: #8b0f15; }
.alert-warning { background: var(--amber-soft); border-color: #f4d9a8; color: #7a4504; }
.alert-info { background: var(--blue-soft); border-color: #c8d8fb; color: #1e3f8a; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--gray-soft); }
.btn-dark { background: #161413; border-color: #161413; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 7px; }
.btn-link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.inline { display: inline; margin: 0; }

input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=month], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=datetime-local], select, textarea {
  font: inherit; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; color: var(--text); min-height: 36px; width: 100%;
}
.period select, .filters select, .filters input { width: auto; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(18,48,122,.18); border-color: var(--brand); }
label { font-size: 12px; font-weight: 600; color: #4a4542; display: block; margin-bottom: 4px; }
.req { color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters .grow { flex: 1; min-width: 180px; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; }
.tab.active { background: #161413; color: #fff; border-color: #161413; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfaf9; white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fcfbfa; }
table.t .num, table.t th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 800; background: #fbfaf9; }
table.t td.actions { white-space: nowrap; text-align: right; }
table.t .strong { font-weight: 700; }
table.t input, table.t select { min-height: 30px; padding: 4px 8px; }
.cell-sub { display: block; font-size: 11px; color: var(--muted); }
.rank { width: 28px; color: var(--muted); font-weight: 700; }
.barcell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar { display: inline-block; height: 8px; border-radius: 4px; }
.bar-green { background: var(--green); }
.bar-red { background: var(--red); }
.bar-blue { background: var(--blue); }
.progress { height: 8px; background: var(--gray-soft); border-radius: 4px; overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: var(--green); }
.pager { display: flex; gap: 4px; align-items: center; margin-top: 12px; }
.pager a { min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; }
.pager a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .muted { margin-left: 8px; font-size: 12px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: block; transition: .15s; }
.tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.tile .ico { color: var(--brand); }
.tile h3 { margin: 8px 0 4px; }
.tile p { margin: 0; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr; } }

.chart-wrap { position: relative; width: 100%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-code { font-size: 64px; font-weight: 900; color: var(--brand); }
.empty-state p { color: var(--muted); }
.channel { border-top: 3px solid var(--c, var(--brand)); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); margin-right: 6px; }
.total-row td { background: #fbfaf9; font-weight: 700; }
.split { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px; }
.cal-day { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-height: 96px; padding: 6px; font-size: 12px; }
.cal-day.out { opacity: .4; }
.cal-day.today { border-color: var(--brand); }
.cal-num { font-weight: 800; margin-bottom: 4px; }
.cal-ev { display: block; background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.green { background: var(--green-soft); color: var(--green); }
.cal-ev.blue { background: var(--blue-soft); color: var(--blue); }
.checklist-cell { text-align: center; }
.checklist-cell input { width: 18px; height: 18px; accent-color: var(--green); }
.sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; }
select.sel-green { background: var(--green-soft); color: var(--green); border-color: #bfe6cb; font-weight: 600; }
select.sel-red { background: #fff; color: var(--red); border-color: #f1b5b5; font-weight: 600; }
select.sel-amber { background: var(--amber-soft); color: var(--amber); border-color: #f4d9a8; font-weight: 600; }
.score-row { display: flex; gap: 4px; flex-wrap: wrap; }
.score-row .btn { width: 36px; justify-content: center; padding: 0; }
.msg-card { border-left: 3px solid var(--line); }
.msg-card.pending { border-left-color: #f5b301; }
.mask { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
details.card summary { cursor: pointer; font-weight: 700; }

.harita-lejant { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 12px; color: var(--muted); }
.harita-lejant i { width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #1d4ed8, #17c3d2, #22c55e, #facc15, #f97316, #dc2626); }

/* ---------- Home (module chooser) & login ---------- */
body.home { min-height: 100vh; background: radial-gradient(1400px 900px at 50% 40%, #0d2a6e 0%, #081a48 50%, #040b22 100%) fixed; color: #fff; position: relative; }
.net-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body.home > :not(.net-bg) { position: relative; z-index: 1; }
.home-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 16px; }
.brand-logo { background: #fff; color: var(--brand); font-weight: 900; border-radius: 12px; padding: 10px 16px; letter-spacing: .04em; }
.home-user { display: flex; align-items: center; gap: 12px; }
.home-user .who small { color: rgba(255,255,255,.7); }
.btn-outline-light { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.home-hero { text-align: center; padding: 22px 16px 28px; }
.home-hero h1 { font-size: 38px; font-weight: 900; letter-spacing: -.03em; }
.home-hero p { opacity: .85; margin: 10px 0 0; }
.mod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1080px; margin: 0 auto; padding: 0 16px 60px; }
@media (max-width: 1000px) { .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mod-grid { grid-template-columns: 1fr; } .home-hero h1 { font-size: 30px; } }
.mod-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); transition: .2s; backdrop-filter: blur(4px); }
.mod-card:hover { background: rgba(255,255,255,.13); border-color: rgba(120,220,255,.45); transform: translateY(-2px); }
.mod-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, rgba(26,91,191,.75), rgba(23,195,210,.75)); display: grid; place-items: center; }
.mod-card h2 { font-size: 16px; font-weight: 800; }
.mod-card p { margin: 3px 0 0; font-size: 12.5px; opacity: .75; }
.mod-badge { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800; background: #ffc107; color: #3b2a00; padding: 2px 7px; border-radius: 8px; }

.brand-img { display: block; height: 40px; width: auto; }
@media (max-width: 640px) {
  .home-top { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .brand-img { height: 28px; }
  .home-user { gap: 8px; }
  .home-user .who, .home-user .avatar { display: none; }
}

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 410px; background: rgba(255,255,255,.96); color: var(--text); border-radius: 20px; padding: 34px 32px 30px;
  box-shadow: 0 30px 80px rgba(2,10,40,.55), 0 0 0 1px rgba(120,220,255,.25), 0 0 60px rgba(23,195,210,.18); backdrop-filter: blur(6px); animation: login-in .6s ease-out both; }
.login-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 22px; }
.login-card h1 { margin-bottom: 4px; font-size: 20px; color: var(--brand-dark); }
.login-card form > div { margin-top: 14px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 22px; height: 44px; border: 0; background: linear-gradient(90deg, var(--brand) 0%, #1a5bbf 55%, var(--accent) 100%); box-shadow: 0 8px 20px rgba(18,48,122,.35); }
.login-card .btn:hover { filter: brightness(1.08); }
.login-foot { text-align: center; margin-top: 18px; font-size: 12px; color: rgba(255,255,255,.6); }
.login-side { width: 100%; max-width: 410px; }
.login-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--accent-soft); border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }
@keyframes login-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login-card { animation: none; } }

@media (max-width: 900px) {
  .topbar { padding: 10px 14px; }
  .period { flex-wrap: wrap; width: 100%; }
  .period select { flex: 1 1 28%; min-width: 0; }
  .filters select, .filters input { max-width: 100%; min-width: 0 !important; }
  .side { position: fixed; left: 0; top: 0; box-shadow: 10px 0 40px rgba(0,0,0,.25); transform: translateX(-100%); transition: transform .2s; }
  body.menu-collapsed .side { display: flex; }
  body.menu-open .side { transform: none; }
  .search { width: 100%; order: 5; }
  .content { padding: 16px; }
}
@media print {
  .side, .topbar, .footer, .page-actions, .filters, .btn { display: none !important; }
  .content { padding: 0; }
}
