/* HemenSimdi - Panel tasarim sistemi. Ana renk #ff5a3c */
:root {
  --brand: #ff5a3c;
  --brand-600: #ec4528;
  --brand-700: #c9341b;
  --brand-50: #fff3f0;
  --brand-100: #ffe1da;
  --ink: #16181d;
  --ink-2: #3b3f4a;
  --muted: #6b7080;
  --line: #e8e9ee;
  --bg: #f6f6f9;
  --card: #ffffff;
  --side: #15161b;
  --side-2: #1e2027;
  --ok: #12a150;
  --ok-50: #e7f7ee;
  --warn: #d98a00;
  --warn-50: #fff5e0;
  --err: #e0352b;
  --err-50: #fdecea;
  --info: #2f6fed;
  --info-50: #eaf1fe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 4px 16px rgba(16, 18, 24, .06);
  --shadow-lg: 0 12px 40px rgba(16, 18, 24, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.grow { flex: 1; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: var(--side); color: #c8cad3; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .25s; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; font-size: 16px; box-shadow: 0 6px 18px rgba(255, 90, 60, .45); }
.sidebar .brand small { display: block; font-weight: 500; font-size: 11px; color: #8a8d99; letter-spacing: .04em; text-transform: uppercase; }
.nav { padding: 6px 12px; overflow-y: auto; flex: 1; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6c6f7b; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c8cad3; font-weight: 500; margin-bottom: 2px; }
.nav a i { width: 18px; text-align: center; color: #8a8d99; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: rgba(255, 90, 60, .14); color: #fff; }
.nav a.active i { color: var(--brand); }
.nav a .count { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 99px; }
.side-foot { padding: 14px; border-top: 1px solid #262832; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-weight: 700; flex: none; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { color: #fff; display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 11px; color: #8a8d99; }
.main { flex: 1; margin-left: 252px; min-width: 0; }
.topbar { height: 64px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 18px; margin: 0; }
.topbar .crumb { color: var(--muted); font-size: 12px; }
.content { padding: 24px 28px 48px; max-width: 1480px; }
.menu-btn { display: none; }
.backdrop { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ---------- Components ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h h3 { margin: 0; }
.card-b { padding: 20px; }
.card-b.p0 { padding: 0; }
.grid { display: grid; gap: 16px; }
.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)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 16px; }

.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.stat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--brand-50); color: var(--brand); flex: none; }
.stat .ic.ok { background: var(--ok-50); color: var(--ok); }
.stat .ic.info { background: var(--info-50); color: var(--info); }
.stat .ic.warn { background: var(--warn-50); color: var(--warn); }
.stat .lbl { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat .val { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat.hero { background: linear-gradient(135deg, #ff6a4d 0%, #ff5a3c 45%, #e8401f 100%); color: #fff; border: none; }
.stat.hero .lbl, .stat.hero .sub { color: rgba(255, 255, 255, .85); }
.stat.hero .ic { background: rgba(255, 255, 255, .2); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 13px var(--font); cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #d3d5dd; background: #fafafc; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(255, 90, 60, .28); }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.danger { color: var(--err); }
.btn.danger.solid { background: var(--err); color: #fff; border-color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #f0f1f4; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 30px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: 14px var(--font); color: var(--ink); width: 100%; outline: none; transition: .15s; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 90, 60, .12); }
.input-ic { position: relative; }
.input-ic i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-ic .input { padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 16px; background: #fafafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fcfcfd; }
.tbl .t-main { font-weight: 600; }
.tbl .t-sub { font-size: 12px; color: var(--muted); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty i { font-size: 32px; color: #c9ccd6; display: block; margin-bottom: 10px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #f0f1f4; color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-50); color: var(--ok); }
.badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.err { background: var(--err-50); color: var(--err); }
.badge.info { background: var(--info-50); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand-700); }
.badge.plain::before { display: none; }

.tabs { display: flex; gap: 4px; background: #eef0f3; padding: 4px; border-radius: 12px; width: fit-content; flex-wrap: wrap; }
.tabs button { border: none; background: transparent; padding: 7px 14px; border-radius: 9px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 200px; }

/* ---------- Modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 16, 20, .5); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 6vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.lg { max-width: 860px; }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-h h3 { margin: 0; flex: 1; }
.modal-b { padding: 22px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; min-width: 260px; max-width: 380px; animation: pop .2s; }
.toast.ok i { color: #4ade80; } .toast.err i { color: #ff8a75; } .toast.info i { color: #ffb4a4; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 300; }

/* ---------- Timeline / map ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #d3d5dd; }
.timeline li.done::after { border-color: var(--brand); background: var(--brand); }
.timeline li.current::after { border-color: var(--brand); box-shadow: 0 0 0 5px rgba(255, 90, 60, .18); }
.timeline b { display: block; font-size: 13px; }
.timeline span { font-size: 12px; color: var(--muted); }
.map { height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #eef0f3; }
.map.sm { height: 260px; }
.map.tall { height: 560px; }
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); border: 3px solid #fff; }
.pin i { transform: rotate(45deg); color: #fff; font-size: 13px; }
.pin.brand { background: var(--brand); } .pin.dark { background: var(--ink); } .pin.ok { background: var(--ok); } .pin.info { background: var(--info); } .pin.gray { background: #9aa0ad; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.pill-online { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #c3c6cf; }
.pill-online.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); }
.pill-online.brk { background: var(--warn); }
.pill-online.busy { background: var(--brand); }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 10px; }
.chart-bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bars .bar { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #ff7c63, var(--brand)); min-height: 3px; position: relative; }
.chart-bars .bar:hover::after { content: attr(data-v); position: absolute; top: -26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.chart-bars small { color: var(--muted); font-size: 11px; }
.offer-timer { height: 4px; background: var(--brand-100); border-radius: 4px; overflow: hidden; }
.offer-timer > div { height: 100%; background: var(--brand); transition: width 1s linear; }
.doc-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f4f5f7; cursor: zoom-in; }

/* ---------- Auth page ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at -10% -10%, #ff8a70 0%, transparent 60%), linear-gradient(135deg, #ff5a3c, #d63a1d); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.03em; max-width: 460px; }
.auth-art p { opacity: .9; max-width: 420px; font-size: 15px; }
.auth-art .ring { position: absolute; border: 2px solid rgba(255, 255, 255, .18); border-radius: 50%; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: #fff; }
.auth-form .box { width: 100%; max-width: 380px; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.role-pick button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 6px; font: 600 12px var(--font); color: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.role-pick button i { font-size: 18px; color: var(--muted); }
.role-pick button.active { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.role-pick button.active i { color: var(--brand); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }
