/* SahaNabız arayüzü. Dış kaynak (yazı tipi, simge dosyası) kullanılmaz; tek exe içinde ve internetsiz çalışır. */
:root {
  color-scheme: light;
  --bg: #eef2f7; --card: #ffffff; --card-2: #f5f8fc; --text: #0b1b33; --muted: #5b6b82; --line: #dde4ee; --line-strong: #c5d0de;
  --accent: #1d4ed8; --accent-hover: #1e40af; --accent-ink: #1d4ed8; --accent-weak: #e6eefc;
  --ok: #15803d; --ok-weak: #dcfce7; --warn: #b45309; --warn-weak: #fef3c7; --bad: #dc2626; --bad-weak: #fee2e2;
  --side: #0c1e3e; --side-2: #18305a; --side-hover: #24406f; --side-text: #cdd8ec; --side-muted: #7d91b3;
  --shadow: 0 1px 2px rgba(11, 27, 51, .06), 0 2px 8px rgba(11, 27, 51, .04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .22);
  --r: 10px; --r-sm: 7px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070f1f; --card: #0e1a31; --card-2: #13223e; --text: #e3ebf8; --muted: #8798b6; --line: #1c2c4a; --line-strong: #2a3d61;
  --accent: #3b82f6; --accent-hover: #60a5fa; --accent-ink: #93c5fd; --accent-weak: #13264a;
  --ok: #4ade80; --ok-weak: #12301f; --warn: #fbbf24; --warn-weak: #3a2c0c; --bad: #f87171; --bad-weak: #421c1c;
  --side: #050c1a; --side-2: #122243; --side-hover: #1b3059; --side-text: #c3d0e8; --side-muted: #677c9f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070f1f; --card: #0e1a31; --card-2: #13223e; --text: #e3ebf8; --muted: #8798b6; --line: #1c2c4a; --line-strong: #2a3d61;
    --accent: #3b82f6; --accent-hover: #60a5fa; --accent-ink: #93c5fd; --accent-weak: #13264a;
    --ok: #4ade80; --ok-weak: #12301f; --warn: #fbbf24; --warn-weak: #3a2c0c; --bad: #f87171; --bad-weak: #421c1c;
    --side: #050c1a; --side-2: #122243; --side-hover: #1b3059; --side-text: #c3d0e8; --side-muted: #677c9f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.ic { flex: none; vertical-align: -3px; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-weak); }

/* ---------- İskelet: yan menü + içerik ---------- */
body.in { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; }
body.in .content { grid-column: 2; grid-row: 1; }
.side { grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--side) 0%, color-mix(in srgb, var(--side) 85%, var(--accent)) 100%); color: var(--side-text); padding: 16px 12px 12px; z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #2dd4bf, #0d9488 55%, #065f46); box-shadow: 0 6px 16px rgba(13, 148, 136, .35); }
.side-brand b { display: block; color: #fff; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 168px; }
.side-brand span { font-size: 12px; color: var(--side-muted); }
.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.side-nav .grp { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: 14px 10px 6px; }
.side-nav button { display: flex; align-items: center; justify-content: flex-start; gap: 11px; width: 100%; min-height: 40px; text-align: left; white-space: nowrap; background: none; border: 0; color: var(--side-text); padding: 9px 10px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; }
.side-nav button:hover { background: var(--side-2); color: #fff; }
.side-nav button.on { background: var(--accent); color: #fff; box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 40%, #fff), 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.side-nav button .ic { opacity: .85; }
.side-nav button.on .ic { opacity: 1; }
.side-foot { border-top: 1px solid rgba(148, 163, 184, .16); margin-top: 10px; padding-top: 12px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--side-muted); padding: 0 8px 10px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #f87171; }
.live.on i { background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.usercard { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; min-width: 0; }
.usercard div { min-width: 0; }
.usercard b { display: block; color: #fff; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usercard span:not(.avatar) { font-size: 12px; color: var(--side-muted); }
.side-actions { display: flex; gap: 6px; }
.side-actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--side-2); border: 0; color: var(--side-text); padding: 8px 6px; border-radius: 9px; font-size: 13px; cursor: pointer; }
.side-actions button:hover { color: #fff; background: var(--side-hover); }
.topbar { display: none; }
main { padding: 26px 30px 48px; max-width: 1360px; width: 100%; margin: 0 auto; min-width: 0; }
body:not(.in) main { padding: 0; max-width: none; }
.bottomnav { display: none; }
.scrim { display: none; }
.avatar { --h: 220; width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: hsl(var(--h) 60% 28%); background: hsl(var(--h) 75% 88%); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
:root[data-theme="dark"] .avatar { color: hsl(var(--h) 80% 86%); background: hsl(var(--h) 40% 28%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h) 80% 86%); background: hsl(var(--h) 40% 28%); } }

/* ---------- Sayfa başlığı ---------- */
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pagehead h2 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.pagehead p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.pagehead .row { gap: 8px; }
h2 { font-size: 20px; margin: 4px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
.sect { margin: 22px 0 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- Genel parçalar ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.wide { grid-column: span 2; }
.card + .card { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big { font-size: 34px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.warntext { color: var(--warn); } .oktext { color: var(--ok); } .badtext { color: var(--bad); }
code { background: var(--card-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; word-break: break-all; }
details > summary { cursor: pointer; color: var(--accent-ink); margin-top: 10px; }

button, .btn { font: inherit; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 7px 14px; min-height: 36px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; white-space: nowrap; }
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:active { transform: translateY(1px); }
button.ghost { background: var(--card); color: var(--text); border-color: var(--line-strong); font-weight: 500; }
button.ghost:hover { background: var(--card-2); border-color: var(--muted); }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.danger:hover { filter: brightness(.93); }
button.danger-text, button.ghost.danger-text { color: var(--bad); border-color: transparent; background: transparent; }
button.danger-text:hover { background: var(--bad-weak); }
button:disabled { opacity: .5; cursor: default; }
button.sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }

input, select, textarea { font: inherit; padding: 7px 10px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card); color: var(--text); min-width: 0; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input:disabled, select:disabled { background: var(--card-2); color: var(--muted); border-color: var(--line); }
input[type=checkbox] { min-height: 0; width: 17px; height: 17px; accent-color: var(--accent); padding: 0; }
input[type=date] { min-width: 150px; }
form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; cursor: pointer; }
label.check input { margin-top: 3px; flex: none; }
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select { font-weight: 400; color: var(--text); width: 100%; }
.field small { font-weight: 400; }

.tablewrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; padding-top: 8px; padding-bottom: 8px; background: color-mix(in srgb, var(--accent) 7%, var(--card)); color: color-mix(in srgb, var(--accent) 45%, var(--muted)); }
tr:first-child th:first-child { border-radius: 8px 0 0 8px; } tr:first-child th:last-child { border-radius: 0 8px 8px 0; }
tr:first-child th { border-bottom-color: transparent; }
tr:last-child td { border-bottom: 0; }
table.clean .num, .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.clean tr:not(:first-child):not(.total):hover td { background: color-mix(in srgb, var(--accent-weak) 55%, transparent); }
tr.total td { border-top: 2px solid var(--line-strong); border-bottom: 0; background: var(--card-2); font-weight: 600; }
tr.total td:first-child { border-radius: 0 0 0 8px; } tr.total td:last-child { border-radius: 0 0 8px 0; }
table.kv th, table.kv td { background: none; }
table.kv td:first-child { width: 38%; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-weak); color: var(--accent-ink); white-space: nowrap; }
.pill.ok { background: var(--ok-weak); color: var(--ok); }
.pill.warn { background: var(--warn-weak); color: var(--warn); }
.pill.bad { background: var(--bad-weak); color: var(--bad); }
.pill.dotted::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.auto { margin-top: 5px; white-space: normal; border-radius: 8px; font-weight: 500; }
.bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #38bdf8); border-radius: 6px; }
.bar.ok > i { background: var(--ok); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .ic { opacity: .55; margin-bottom: 4px; }
.empty b { color: var(--text); font-weight: 600; }
.empty span { font-size: 13px; max-width: 420px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-weak); color: var(--text); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }
.note .ic { color: var(--accent-ink); margin-top: 2px; }
.note.warn { background: var(--warn-weak); } .note.warn .ic { color: var(--warn); }
.note.ok { background: var(--ok-weak); } .note.ok .ic { color: var(--ok); }

/* ---------- Bildirim, alarm, pencere ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; max-width: calc(100% - 40px); }
.toast { display: flex; align-items: flex-start; gap: 9px; background: #0f172a; color: #f1f5f9; padding: 11px 14px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 440px; animation: tin .18s ease-out; border-left: 4px solid #4ade80; }
.toast .ic { margin-top: 3px; color: #4ade80; }
.toast.bad { border-left-color: #f87171; } .toast.bad .ic { color: #f87171; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .22s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.alarm { position: sticky; top: 0; z-index: 18; background: var(--bad); color: #fff; padding: 12px 20px; font-weight: 650; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; animation: flash 1.2s infinite alternate; }
@keyframes flash { to { background: #991b1b; } }
.alarm button { background: #fff; color: #b91c1c; border-color: #fff; }
.alarm button:hover { background: #fee2e2; border-color: #fee2e2; }
.alarm span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(8, 13, 25, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(440px, 100%); padding: 22px; animation: tin .16s ease-out; }
.modal h3 { font-size: 18px; margin: 0 0 6px; }
.modal p { margin: 0 0 4px; font-size: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------- Giriş ekranı ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-hero { position: relative; overflow: hidden; color: #e2e8f0; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(900px 500px at 15% 0%, #2563eb 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #1e3a8a 0%, transparent 55%), #071229; }
.auth-hero::after { content: ""; position: absolute; right: -180px; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 150px rgba(255, 255, 255, .02), 0 0 0 240px rgba(255, 255, 255, .015); pointer-events: none; }
.auth-hero .brandline { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; color: #fff; position: relative; z-index: 1; }
.auth-hero h1 { font-size: 38px; line-height: 1.15; margin: 0 0 14px; color: #fff; letter-spacing: -.02em; max-width: 520px; position: relative; z-index: 1; }
.auth-hero p { margin: 0; max-width: 460px; color: #b6c2d9; font-size: 16px; position: relative; z-index: 1; }
.auth-hero ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-hero li { display: flex; gap: 12px; align-items: center; color: #dbe4f3; }
.auth-hero li span { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex: none; }
.auth-hero small { color: #7f8fad; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login { width: min(400px, 100%); }
.login.card { padding: 30px; border-radius: 18px; box-shadow: var(--shadow-lg); }
.login h2 { font-size: 24px; margin: 2px 0 4px; }
.login .sub { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.login .field input { min-height: 44px; font-size: 16px; }
.login button.main { width: 100%; min-height: 46px; font-size: 16px; margin-top: 18px; }
.login .demo { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px dashed var(--line-strong); font-size: 13px; color: var(--muted); }
.login .err { display: flex; gap: 8px; align-items: flex-start; background: var(--bad-weak); color: var(--bad); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-top: 10px; }
.auth-theme { position: fixed; top: 14px; right: 14px; }
.pwwrap { position: relative; }
.pwwrap input { padding-right: 44px; }
.pwwrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); min-height: 34px; padding: 0 9px; }
.pwwrap button:hover { background: none; color: var(--text); }

/* ---------- Gösterge kutuları ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.kpi > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi > b { font-size: 32px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi > i { font-style: normal; color: var(--muted); font-size: 12.5px; }
.kpi .kico { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent-ink); }
.kpi.okk { border-top-color: var(--ok); }
.kpi.okk .kico { background: var(--ok-weak); color: var(--ok); }
.kpi.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); border-top-color: var(--warn); }
.kpi.warn .kico { background: var(--warn-weak); color: var(--warn); }
.kpi.warn > b { color: var(--warn); }
.kpi.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); border-top-color: var(--bad); }
.kpi.bad .kico { background: var(--bad-weak); color: var(--bad); } .kpi.bad > b { color: var(--bad); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
/* 7 günlük sütun grafik */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 150px; margin: 6px 0 16px; }
.bars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; min-width: 0; }
.bars i { display: block; width: min(46px, 100%); border-radius: 7px 7px 3px 3px; background: color-mix(in srgb, var(--accent) 55%, var(--card-2)); min-height: 3px; }
.bars .today i { background: linear-gradient(180deg, #38bdf8, var(--accent)); }
.bars b { font-size: 12px; font-variant-numeric: tabular-nums; }
.bars span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.share { display: block; height: 4px; border-radius: 3px; background: var(--line); margin-top: 5px; overflow: hidden; min-width: 70px; }
.share i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- Personel ekranı ---------- */
.hero { border-radius: 18px; padding: 22px; color: #fff; display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #16a34a, #0f766e); box-shadow: var(--shadow); }
.hero.down { background: linear-gradient(135deg, #d97706, #b45309); }
.hero.count { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); }
.hero .hico { width: 58px; height: 58px; border-radius: 16px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.hero small { display: block; opacity: .85; font-size: 13px; }
.hero b { display: block; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; }
.hero span { opacity: .9; font-size: 14px; }
.press { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.press button { flex-direction: column; gap: 6px; padding: 16px 10px; min-height: 104px; font-weight: 650; font-size: 15px; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 14px; white-space: normal; box-shadow: var(--shadow); }
.press button:hover { border-color: var(--accent); background: var(--accent-weak); }
.press button .ic { color: var(--accent-ink); }
.press button small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.press button.sos { background: var(--bad); border-color: var(--bad); color: #fff; }
.press button.sos .ic, .press button.sos small { color: #fff; }
.press button.sos:hover { filter: brightness(.93); background: var(--bad); }
.listrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.listrow:last-child { border-bottom: 0; padding-bottom: 0; } .listrow:first-child { padding-top: 0; }

/* ---------- Hat panosu ---------- */
.station { border-style: solid; padding: 14px; }
.station h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.station h3 small { font-weight: 500; color: var(--muted); font-size: 12px; }
.person { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; }
.person > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.avatar-wrap { position: relative; display: inline-flex; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.avatar-wrap .dot { position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--card); width: 12px; height: 12px; }
.dot.on { background: #22c55e; }

/* ---------- Saatlik form ve üretim panosu ---------- */
.sheet-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sheet-head > div, .sheet-head > label { display: flex; flex-direction: column; gap: 4px; }
.sheet-head > div b { min-height: 36px; display: flex; align-items: center; }
.sheet-head .span2 { grid-column: span 2; }
.fillbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.fillbar .bar { flex: 1; margin: 0; max-width: 320px; }
/* Saatlik form tablosu: sabit sütun genişlikleri (değer değişince sütunlar kaymaz) */
.sheet-head .tgt .hint { font-size: 11.5px; color: var(--muted); }
.sheet-head .tgt input { font-weight: 650; }
.dkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 4px 0 16px; }
.dk { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card-2); }
.dk > span { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk > b { font-size: 22px; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.dk > i { font-style: normal; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.dk.ok > b { color: var(--ok); } .dk.warn > b { color: var(--warn); } .dk.bad > b { color: var(--bad); }
.dk.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); } .dk.bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); } .dk.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
table.sheet { table-layout: fixed; min-width: 920px; }
table.sheet col.c-t { width: 118px; } table.sheet col.c-n { width: 118px; } table.sheet col.c-d { width: 92px; }
table.sheet col.c-p { width: 128px; } table.sheet col.c-c { width: 132px; } table.sheet col.c-b { width: 58px; }
table.sheet th { white-space: normal; line-height: 1.25; }
table.sheet td { padding: 7px 8px; height: 54px; }
table.sheet td.t b { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.sheet .nowpill { display: table; margin-top: 3px; padding: 0 8px; font-size: 11px; }
table.sheet input:not([type=checkbox]) { width: 100%; min-width: 0; }
table.sheet input.qty, table.sheet input.tq { font-size: 17px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
table.sheet input.tq { font-weight: 500; color: var(--muted); }
table.sheet input.tq:not(:placeholder-shown) { color: var(--text); font-weight: 650; }
table.sheet input.tq::placeholder { color: var(--muted); opacity: .8; }
table.sheet .tv { font-size: 16px; font-variant-numeric: tabular-nums; color: var(--muted); }
table.sheet td.mola { text-align: center; }
table.sheet .molab { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
table.sheet .m-only { display: none; }
table.sheet tfoot td { height: auto; padding-top: 10px; padding-bottom: 10px; vertical-align: top; }
table.sheet tfoot .big { font-size: 22px; }
.diff { font-variant-numeric: tabular-nums; } .diff.up { color: var(--ok); } .diff.down { color: var(--bad); }
.pctcell { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.pctcell .bar { margin: 0; height: 6px; display: block; }
.pctcell .bar > i { display: block; }
.pctcell.ok b { color: var(--ok); } .pctcell.ok .bar > i { background: var(--ok); }
.pctcell.warn b { color: var(--warn); } .pctcell.warn .bar > i { background: var(--warn); }
.pctcell.bad b { color: var(--bad); } .pctcell.bad .bar > i { background: var(--bad); }
.cum { font-variant-numeric: tabular-nums; white-space: nowrap; } .cum i { font-style: normal; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  /* Telefonda her satır bir kart: yatay kaydırma ve kesilen sütun olmaz */
  .sheetwrap { overflow: visible; margin: 0; padding: 0; }
  table.sheet { min-width: 0; table-layout: auto; }
  table.sheet colgroup, table.sheet thead { display: none; }
  table.sheet, table.sheet tbody, table.sheet tfoot { display: block; }
  table.sheet tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
  table.sheet tr.brk { background: var(--card-2); }
  table.sheet tr.now { box-shadow: inset 3px 0 0 var(--accent); }
  table.sheet td { display: block; height: auto; padding: 0; border: 0 !important; background: none !important; box-shadow: none !important; min-width: 0; text-align: left; }
  table.sheet td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  table.sheet td.t { grid-column: 1 / 3; } table.sheet td.t::before { display: none; }
  table.sheet td.t b { font-size: 16px; } table.sheet .nowpill { display: inline-flex; margin: 0 0 0 6px; }
  table.sheet td.mola { grid-column: 3; grid-row: 1; text-align: right; } table.sheet td.mola::before { display: none; }
  table.sheet .m-only { display: inline; font-size: 13px; color: var(--muted); }
  table.sheet td.note-c { grid-column: 1 / -1; }
  table.sheet .hide-m { display: none; }
  table.sheet tfoot tr { border-width: 2px; border-color: var(--line-strong); background: var(--card-2); }
  table.sheet tfoot td:first-child { grid-column: 1 / -1; } table.sheet tfoot td:first-child::before { display: none; }
  table.sheet tfoot td:nth-last-child(2) { grid-column: 1 / -1; }
  .dkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dkpis .dk:last-child { grid-column: 1 / -1; }
}
table.sheet tr.brk td { background: var(--card-2); }
table.sheet tr.now td { background: color-mix(in srgb, var(--accent-weak) 70%, transparent); }
table.sheet tr.now td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.future td, td.future { opacity: .55; }
table.plant-t { font-size: 13px; border-collapse: separate; border-spacing: 0; }
table.plant-t th, table.plant-t td { border-left: 1px solid var(--line); min-width: 132px; vertical-align: top; }
table.plant-t th { text-transform: none; letter-spacing: 0; font-size: 13px; white-space: normal; position: sticky; top: 0; z-index: 2; border-radius: 0 !important; }
table.plant-t th a { font-size: 14px; font-weight: 700; }
table.plant-t .t { min-width: 64px; position: sticky; left: 0; background: var(--card-2); z-index: 1; border-left: 0; }
table.plant-t th.t { z-index: 3; }
table.plant-t td b { font-size: 15px; font-variant-numeric: tabular-nums; }
table.plant-t td.brk { background: var(--card-2); }
table.plant-t td.na { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--line) 6px 7px); }
table.plant-t tr.total td { border-radius: 0; }

/* ---------- Ayarlar ---------- */
.subnav { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.subnav button { background: none; color: var(--muted); border: 0; border-radius: 9px; padding: 6px 14px; font-weight: 500; }
.subnav button:hover { background: var(--card-2); color: var(--text); }
.subnav button.on { background: var(--accent); color: #fff; font-weight: 600; }
.lineedit { padding: 10px 0; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 4px 0 10px; margin: 2px 4px 2px 0; background: var(--card-2); }
.chip input { border: 0; padding: 3px 0; min-height: 26px; background: none; font-size: 13px; box-shadow: none !important; }
.chip .x { background: none; border: 0; color: var(--muted); padding: 0 6px; min-height: 0; font-size: 16px; line-height: 1; }
.chip .x:hover { color: var(--bad); background: none; }
.steps { margin: 8px 0 14px; padding-left: 20px; } .steps li { margin: 8px 0; }
.usercell { display: flex; align-items: center; gap: 9px; }
.usercell input { flex: 1; }
.printhead { display: none; margin-bottom: 8px; }

/* ---------- Tam ekran (pano) ---------- */
body.tv { display: block; }
body.tv .side, body.tv .topbar, body.tv .bottomnav, body.tv .noprint { display: none !important; }
body.tv .content { grid-column: auto; }
body.tv main { max-width: none; padding: 16px; }
body.tv table.plant-t { font-size: 16px; }

/* ---------- Telefon ve tablet ---------- */
@media (max-width: 900px) {
  body.in { display: block; padding-bottom: 68px; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); padding: 9px 14px; }
  .topbar .logo { width: 32px; height: 32px; border-radius: 9px; }
  .topbar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar button { background: none; border: 0; color: var(--text); padding: 6px; min-height: 36px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 276px; height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.menu .side { transform: none; }
  body.menu .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 13, 25, .5); z-index: 25; }
  main { padding: 16px 14px 28px; }
  .alarm { top: 55px; padding: 10px 14px; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bottomnav button { flex-direction: column; gap: 2px; background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 500; padding: 6px 2px; min-height: 52px; border-radius: 10px; white-space: nowrap; overflow: hidden; }
  .bottomnav button:hover { background: none; }
  .bottomnav button.on { color: var(--accent-ink); font-weight: 700; }
  .pagehead h2 { font-size: 21px; }
  .card { padding: 14px; }
  .tablewrap { margin: 0 -14px; padding: 0 14px; }
  .card.wide, .sheet-head .span2 { grid-column: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi > b { font-size: 26px; } .kpi .kico { width: 30px; height: 30px; right: 10px; top: 10px; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .toasts { right: 12px; left: 12px; bottom: 78px; align-items: stretch; }
  .hero b { font-size: 26px; }
  input, select { font-size: 16px; }
}

@media print {
  .side, .topbar, .bottomnav, .noprint, .alarm, .toasts { display: none !important; }
  body, body.in { display: block; background: #fff; color: #000; padding: 0; }
  main { max-width: none; padding: 0; }
  .card, .kpi { border: 0; padding: 0; box-shadow: none; }
  .kpi { border: 1px solid #000; padding: 8px; } .kpi .kico { display: none; }
  input { border: 0; padding: 0; background: none; color: #000; min-height: 0; }
  th, td { border: 1px solid #000 !important; background: none !important; border-radius: 0 !important; }
  .printhead { display: block; }
  table.clean input { width: auto; }
  .bars { display: none; }
  .dkpis { grid-template-columns: repeat(7, 1fr); gap: 4px; } .dk { padding: 4px 6px; border: 1px solid #000; background: none; } .dk > b { font-size: 15px; color: #000 !important; }
  table.sheet { min-width: 0; font-size: 11px; } table.sheet td { height: auto; padding: 3px 4px; } table.sheet input.qty, table.sheet input.tq { font-size: 12px; color: #000; }
  .pctcell .bar { display: none !important; }
}

/* Hatta olanlar (bileklik konumu) */
.present { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.present > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.present .ghost.sm { margin-left: auto; }
.plant-t th .onl { margin-top: 3px; font-weight: 400; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; }

/* ---------- v1.3: SahaNabız — gateway, çevredeki cihazlar, saha haritası ---------- */
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; letter-spacing: .01em; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }
.pill.mute { background: var(--card-2); color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.linkbtn:hover { color: var(--accent-ink); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 10px; background: var(--card); color: var(--muted); }
.search input { border: 0; outline: 0; background: none; padding: 8px 0; min-width: 190px; color: var(--text); font: inherit; }
.small-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.small-kpis .kpi { padding: 12px 16px; }
.small-kpis .kpi > b { font-size: 26px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; background: var(--line-strong); }
.dot.on { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); animation: pulse 2s infinite; }
.dot.off { background: var(--bad); }
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.sig i { width: 4px; border-radius: 1px; background: var(--line-strong); }
.sig i:nth-child(1) { height: 25%; } .sig i:nth-child(2) { height: 50%; } .sig i:nth-child(3) { height: 75%; } .sig i:nth-child(4) { height: 100%; }
.sig.s1 i:nth-child(-n+1), .sig.s2 i:nth-child(-n+2) { background: var(--warn); }
.sig.s3 i:nth-child(-n+3), .sig.s4 i:nth-child(-n+4) { background: var(--ok); }
table.nearby tr.flash td { background: var(--warn-weak); transition: background .3s; }
.guide summary { cursor: pointer; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary h3::after { content: " ▾"; color: var(--muted); font-weight: 400; }
.chipbtn { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--line-strong); background: var(--card-2); color: var(--text); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chipbtn:hover { border-color: var(--accent); color: var(--accent-ink); }
.maptools { margin-bottom: 12px; }
.maptools p { margin: 8px 0; }
.mapwrap { padding: 12px; }
.map { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background-color: var(--card-2); background-size: 100% 100%; background-repeat: no-repeat;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); }
.map:not(.img) { background-size: 4% 7.1%, 4% 7.1%; background-repeat: repeat; }
.maplayer { position: absolute; inset: 0; }
.mapempty { position: absolute; inset: 0; display: grid; place-items: center; }
.zone { position: absolute; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line-strong);
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(2px); box-shadow: var(--shadow); min-width: 0; }
.zone.st-running { border-color: color-mix(in srgb, var(--ok) 70%, transparent); }
.zone.st-down { border-color: var(--warn); background: color-mix(in srgb, var(--warn-weak) 85%, transparent); }
.zone.st-sos { border-color: var(--bad); background: color-mix(in srgb, var(--bad-weak) 88%, transparent); animation: sosblink 1.2s infinite; }
@keyframes sosblink { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 35%, transparent); } }
.zhead { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.zhead b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zcount { display: inline-flex; gap: 3px; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.zstat { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.zpeople { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; overflow: hidden; }
.pp { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; background: hsl(var(--h, 190) 55% 42%); border: 2px solid var(--card); }
.pp.more { background: var(--line-strong); color: var(--text); }
.pp.sos { background: var(--bad); animation: sosblink 1s infinite; }
.gpin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #16a34a; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 2; }
.gpin.off { background: var(--bad); }
.gpin.on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(34, 197, 94, .55); animation: ring 2.2s infinite; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.gpin.ghost { opacity: .5; }
.map.editing .zone { cursor: move; outline: 2px dashed var(--accent); outline-offset: -5px; touch-action: none; }
.map.editing .gpin { cursor: grab; touch-action: none; }
.zone.dragging, .gpin.dragging { z-index: 5; opacity: .9; }
.zgrip { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--accent) 50%); border-bottom-right-radius: 8px; touch-action: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 4px 0; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--line-strong); display: inline-block; }
.lg.ok { border-color: var(--ok); } .lg.warn { border-color: var(--warn); background: var(--warn-weak); } .lg.bad { border-color: var(--bad); background: var(--bad-weak); }
.maplist { display: none; gap: 10px; margin-top: 12px; }
.card.mini { padding: 12px 14px; }
.card.mini.st-sos { border-color: var(--bad); } .card.mini.st-down { border-color: var(--warn); }
@media (max-width: 760px) {
  .zone { padding: 4px 6px; } .zstat, .zpeople { display: none; } .zhead b { font-size: 11px; }
  .maplist { display: grid; }
  .search input { min-width: 120px; }
}
.grid > .full { grid-column: 1 / -1; }
.map.img .zone { background: color-mix(in srgb, var(--card) 45%, transparent); }
.map.img .zone.st-down { background: color-mix(in srgb, var(--warn-weak) 60%, transparent); }
.map.img .zone.st-sos { background: color-mix(in srgb, var(--bad-weak) 65%, transparent); }
.map.img .zhead b, .map.img .zcount { text-shadow: 0 0 3px var(--card), 0 0 6px var(--card); }

/* Bileklik ekleme sihirbazı ve toplu ekleme */
.modal.wiz { width: min(520px, 100%); }
.btnlike { background: var(--card); color: var(--text); border-color: var(--line-strong); font-weight: 500; font-size: 13px; min-height: 32px; padding: 5px 12px; }
.btnlike:hover { background: var(--card-2); }
.wizsteps li.cur { font-weight: 700; }
.wizwait { margin: 10px 0; }

/* Firma logosu ve vurgu rengi (v1.7.0) */
.logo.haslogo { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); padding: 4px; overflow: hidden; }
.side-brand .logo.haslogo { width: auto; min-width: 44px; max-width: 110px; height: 44px; border-radius: 11px; padding: 4px 6px; }
.topbar .logo.haslogo { width: auto; min-width: 32px; max-width: 84px; padding: 3px 5px; }
.logo.haslogo img { width: auto; max-width: 100%; }
.side-brand span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.logo.haslogo img, .firmlogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.side-nav button.on { box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.firmlogo { display: inline-flex; align-items: center; justify-content: center; }
.firmlogo.big { width: 100%; height: 84px; margin-bottom: 18px; }
.firmlogo.big img { width: auto; max-width: 220px; height: 84px; }
.loginlogo { display: flex; justify-content: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.firmlogo.print { height: 34px; margin-right: 10px; vertical-align: middle; }
.firmlogo.print img { width: auto; height: 34px; }
.brandedit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logobox { width: 112px; height: 112px; border-radius: 14px; border: 1px dashed var(--line-strong); display: grid; place-items: center; background: repeating-conic-gradient(var(--card-2) 0 25%, var(--card) 0 50%) 0 0 / 16px 16px; padding: 8px; flex: none; }
.logobox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.swatches { gap: 8px; align-items: center; margin-top: 4px; }
.swatches .sw { width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong); }
.swatches .sw.on { box-shadow: 0 0 0 2px var(--text); }
.swatches input[type=color] { width: 38px; height: 32px; padding: 2px; min-height: 0; cursor: pointer; }

/* ---------- ERP ---------- */
.modal.erpm.wide { width: min(880px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal.erpm h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.modal.erpm .erpm-body { margin-top: 12px; }
.modal.erpm .modal-foot { position: sticky; bottom: -22px; background: var(--card); padding: 12px 0 4px; flex-wrap: wrap; align-items: center; }
.erpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.erpgrid .span2 { grid-column: span 2; }
.erpgrid .field { margin: 4px 0 8px; }
table.lines td { padding: 4px 6px; }
table.lines select, table.lines input { width: 100%; }
.mrpgrp { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mrpgrp:last-child { border-bottom: 0; }
.mrpgrp .tablewrap { margin-top: 8px; }
@media (max-width: 640px) { .erpgrid .span2 { grid-column: auto; } }

/* ---------- Üretim analizi ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 14px; background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button { background: none; border: 0; color: var(--muted); font-weight: 600; padding: 6px 16px; min-height: 34px; border-radius: 8px; box-shadow: none; }
.seg button:hover { background: var(--card); color: var(--text); }
.seg button.on { background: var(--card); color: var(--accent-ink); box-shadow: var(--shadow); }
.anleg { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); }
.anleg span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.sw.ok { background: var(--ok); } .sw.warn { background: var(--warn); } .sw.bad { background: var(--bad); } .sw.none { background: color-mix(in srgb, var(--accent) 60%, var(--card)); }
.sw.tgl { height: 2px; width: 14px; border-radius: 0; background: var(--text); }
.sw.avgl { height: 0; width: 14px; border-radius: 0; border-top: 2px dashed var(--muted); }
.anchart { position: relative; overflow-x: auto; margin-top: 10px; }
.anchart svg { display: block; }
.anchart:empty { height: 240px; }
.anchart .gl { stroke: var(--line); stroke-width: 1; }
.anchart .base { stroke: var(--line-strong); stroke-width: 1; }
.anchart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.anchart .b { fill: color-mix(in srgb, var(--accent) 60%, var(--card)); }
.anchart .b.ok { fill: var(--ok); } .anchart .b.warn { fill: var(--warn); } .anchart .b.bad { fill: var(--bad); }
.anchart .tg { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.anchart .avg { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.anchart .hit { fill: transparent; }
.anchart .bk.hov .hit { fill: color-mix(in srgb, var(--accent-weak) 70%, transparent); }
.antip { position: absolute; top: 6px; width: 180px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 12.5px; line-height: 1.45; pointer-events: none; z-index: 3; }
.antip .oktext { color: var(--ok); } .antip .warntext { color: var(--warn); } .antip .badtext { color: var(--bad); }
.insights { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.hbars { display: grid; gap: 7px; }
.hb { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 4px 10px; font-size: 13px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-b { height: 10px; background: var(--card-2); border-radius: 5px; overflow: hidden; }
.hb-b i { display: block; height: 100%; border-radius: 5px; background: color-mix(in srgb, var(--accent) 65%, var(--card)); }
.hb-b i.ok { background: var(--ok); } .hb-b i.warn { background: var(--warn); } .hb-b i.bad { background: var(--bad); } .hb-b i.mute { background: var(--line-strong); }
.hb b { font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }
.hb-s { grid-column: 3; font-size: 11px; color: var(--muted); text-align: right; margin-top: -4px; }
.anrow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.anrow:last-child { border-bottom: 0; }
.anrow-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.anf { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.anf .pill.auto { margin-top: 0; }
.annotes { margin-top: 4px; }
.tnum { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .seg { display: flex; } .seg button { flex: 1; padding: 6px 8px; } .sheet-head { grid-template-columns: 1fr 1fr; } .sheet-head .span2, .sheet-head .tgt { grid-column: 1 / -1; } }
@media print { .seg { display: none; } .anchart { overflow: hidden; } }
table.anper td.annote { min-width: 220px; max-width: 360px; }
table.anper td:first-child { white-space: nowrap; }

/* Haritada kişinin yaklaşık konumu (en az 2 dinleyici) */
.ppos { position: absolute; z-index: 4; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #fff; background: hsl(var(--h, 190) 55% 42%); border: 2px solid var(--card);
  box-shadow: 0 0 0 4px color-mix(in srgb, hsl(var(--h, 190) 55% 42%) 25%, transparent), 0 2px 6px rgba(0,0,0,.25); transition: left 1.5s ease, top 1.5s ease; pointer-events: auto; }
.ppos.sos { background: var(--bad); animation: sosblink 1s infinite; }
.lg.dot { border-radius: 50%; background: hsl(190 55% 42%); }

/* ---------- Plan durumları: duruş kırmızı, mola mavi, bakım mor, üretim yok gri ---------- */
:root { --info: #2563eb; --info-weak: #dbeafe; --maint: #7c3aed; --maint-weak: #ede9fe; --none-weak: #eef1f5; }
:root[data-theme="dark"] { --info: #60a5fa; --info-weak: #13284a; --maint: #a78bfa; --maint-weak: #2a2047; --none-weak: #15213a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --info: #60a5fa; --info-weak: #13284a; --maint: #a78bfa; --maint-weak: #2a2047; --none-weak: #15213a; } }
table.sheet col.c-b { width: 132px; }
table.sheet .stsel { width: 100%; min-height: 34px; padding: 4px 6px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.stsel.st-break { color: var(--info); } .stsel.st-none { color: var(--muted); } .stsel.st-maint { color: var(--maint); } .stsel.st-down { color: var(--bad); }
table.sheet tr.st-break td { background: color-mix(in srgb, var(--info-weak) 60%, transparent); }
table.sheet tr.st-maint td { background: color-mix(in srgb, var(--maint-weak) 60%, transparent); }
table.sheet tr.st-none td { background: repeating-linear-gradient(45deg, var(--none-weak) 0 8px, transparent 8px 16px); }
table.sheet tr.isdown td { background: color-mix(in srgb, var(--bad-weak) 55%, transparent); }
table.sheet tr.isdown td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
table.sheet tr.st-break td:first-child { box-shadow: inset 3px 0 0 var(--info); } table.sheet tr.st-maint td:first-child { box-shadow: inset 3px 0 0 var(--maint); }
.stl { font-size: 13px; font-weight: 600; color: var(--muted); }
tr.st-break .stl, td.st-break .stl { color: var(--info); } tr.st-maint .stl, td.st-maint .stl { color: var(--maint); }
.prodl { margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.prodl.chg { color: var(--warn); }
.note.noprod { background: var(--none-weak); border-color: var(--line-strong); }
.sheet-head .dayprod { display: flex; flex-direction: column; gap: 4px; } .sheet-head .dayprod b { min-height: 36px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* pano hücreleri */
table.plant-t td.pc { position: relative; }
table.plant-t td.pc[data-cell] { cursor: pointer; }
table.plant-t td.pc[data-cell]:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
table.plant-t td.st-break { background: color-mix(in srgb, var(--info-weak) 75%, var(--card)); }
table.plant-t td.st-maint { background: color-mix(in srgb, var(--maint-weak) 75%, var(--card)); }
table.plant-t td.st-none { background: repeating-linear-gradient(45deg, var(--none-weak) 0 8px, var(--card) 8px 16px); }
table.plant-t td.isdown { background: color-mix(in srgb, var(--bad-weak) 80%, var(--card)); box-shadow: inset 3px 0 0 var(--bad); }
table.plant-t td.isdown .dl { color: var(--bad); font-weight: 600; }
table.plant-t th.hnone { background: var(--none-weak); }
table.plant-t th .hprods { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
table.plant-t th .hprods .pill { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
table.plant-t th .ghost.sm { margin-top: 6px; }
.plegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--muted); align-items: center; }
.plegend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); }
.lg.run { background: var(--card); } .lg.isdown { background: var(--bad-weak); border-color: var(--bad); } .lg.brk { background: var(--info-weak); border-color: var(--info); }
.lg.maint { background: var(--maint-weak); border-color: var(--maint); } .lg.none { background: repeating-linear-gradient(45deg, var(--none-weak) 0 3px, var(--card) 3px 6px); }
/* üretim planı */
.planadd { display: grid; grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)) auto; gap: 10px; align-items: start; }
.planadd .field { margin: 0; }
.planadd small { display: block; margin-top: 3px; font-size: 11.5px; }
table.plant-plan input.ni { width: 100px; text-align: right; }
table.plant-plan td { vertical-align: top; }
.drange { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .drange input { width: 136px; }
table.plant-plan select { min-width: 120px; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .planadd { grid-template-columns: 1fr 1fr; } .planadd .field:first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { table.sheet td.mola { grid-column: 3; grid-row: 1; } table.sheet .stsel { min-height: 30px; font-size: 12.5px; } table.sheet tr.isdown { border-color: var(--bad); } table.sheet tr.st-break { border-color: var(--info); } }
@media print { table.plant-t td.isdown { box-shadow: none; } }
@media (max-width: 760px) {
  table.sheet tr.st-break { background: color-mix(in srgb, var(--info-weak) 70%, var(--card)); }
  table.sheet tr.st-maint { background: color-mix(in srgb, var(--maint-weak) 70%, var(--card)); }
  table.sheet tr.st-none { background: repeating-linear-gradient(45deg, var(--none-weak) 0 8px, var(--card) 8px 16px); }
  table.sheet tr.isdown { background: color-mix(in srgb, var(--bad-weak) 70%, var(--card)); }
}

/* v1.9.2: telefon düzeltmeleri */
.topbar .logo.haslogo img { height: 26px; width: auto; max-width: 100%; }
.side-brand .logo.haslogo img { height: 36px; width: auto; max-width: 100%; }
.sheet-head > * { min-width: 0; }
.sheet-head > div b { flex-wrap: wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) { .sheet-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Mola saatleri (Ayarlar) */
#brows { display: grid; gap: 8px; }
.brow { display: grid; max-width: 640px; grid-template-columns: 130px auto 130px minmax(160px, 1fr) auto; gap: 8px; align-items: center; }
.brow input { min-width: 0; }
@media (max-width: 560px) { .brow { grid-template-columns: 1fr auto 1fr auto; } .brow [data-bk] { grid-column: 1 / 4; grid-row: 2; } .brow [data-bdel] { grid-row: 1; grid-column: 4; } }
.pill.brkpill { background: var(--info-weak); color: var(--info); border-color: transparent; }
.brktext { color: var(--info); }
