/* ============================================================
   ŞANTİYE TAKİP — Stil (v2: modern, derinlikli, animasyonlu)
   ============================================================ */

/* ===== TEMA: Kıyı Gold (varsayılan) — fildişi + altın ===== */
:root {
  --navy: #33383d;
  --navy-2: #565d66;
  --navy-grad: linear-gradient(135deg, #33383d 0%, #4a515a 100%);
  --teal: #5e9c76;
  --teal-grad: linear-gradient(135deg, #4f8f68, #79b28e);
  --amber: #b28e4c;
  --amber-grad: linear-gradient(135deg, #a8854a, #d3b177);
  --red: #c96a5b;
  --bg: #f4f1e9;
  --body-bg: linear-gradient(180deg, #efeadf 0%, #f4f1e9 240px);
  --card: #fffdf8;
  --text: #33383d;
  --muted: #8b8577;
  --line: #e6e0d2;
  --s0: #e3ddcf;
  --s1: #c9a469;
  --s2: #5e9c76;
  --topbar-grad: linear-gradient(135deg, #2d3237 0%, #454c55 100%);
  --btn-grad: linear-gradient(135deg, #a8854a, #c5a266);
  --btn-text: #fff;
  --nav-bg: rgba(255, 253, 248, .93);
  --subtle-bg: #faf8f1;
  --hover-bg: #f6f2e8;
  --plan-bg: #f8f5ee;
  --plan-line: rgba(120, 105, 70, .08);
  --parcel-border: #8a744a;
  --login-bg:
    radial-gradient(900px 500px at 85% -10%, rgba(197, 162, 102, .35), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(178, 142, 76, .22), transparent 60%),
    linear-gradient(160deg, #33383d 0%, #1f2327 100%);
  --radius: 14px;
  --shadow: 0 1px 3px rgba(60,50,30,.07), 0 4px 14px rgba(60,50,30,.06);
  --shadow-hover: 0 4px 10px rgba(60,50,30,.10), 0 10px 28px rgba(60,50,30,.13);
  --ease: cubic-bezier(.22,.8,.36,1);
}

/* ===== TEMA: Klasik Lacivert ===== */
:root[data-theme="navy"] {
  --navy: #1d3557;
  --navy-2: #2b4a75;
  --navy-grad: linear-gradient(135deg, #1d3557 0%, #2b4a75 60%, #2f5d8a 100%);
  --teal: #2a9d8f;
  --teal-grad: linear-gradient(135deg, #2a9d8f, #34c4b3);
  --amber: #e9a03b;
  --amber-grad: linear-gradient(135deg, #e9a03b, #f4b95e);
  --red: #d95d4e;
  --bg: #eef1f6;
  --body-bg: linear-gradient(180deg, #e9edf4 0%, #eef1f6 240px);
  --card: #ffffff;
  --text: #22303f;
  --muted: #6b7a8c;
  --line: #e3e8ee;
  --s0: #d7dee6;
  --s1: #e9a03b;
  --s2: #2a9d8f;
  --topbar-grad: var(--navy-grad);
  --btn-grad: var(--navy-grad);
  --btn-text: #fff;
  --nav-bg: rgba(255,255,255,.92);
  --subtle-bg: #fafbfd;
  --hover-bg: #f7f9fc;
  --plan-bg: #f6f8fb;
  --plan-line: rgba(43,74,117,.05);
  --parcel-border: var(--navy-2);
  --login-bg:
    radial-gradient(900px 500px at 85% -10%, rgba(42,157,143,.25), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(233,160,59,.18), transparent 60%),
    linear-gradient(160deg, #1d3557 0%, #14263e 100%);
  --shadow: 0 1px 3px rgba(16,34,56,.07), 0 4px 14px rgba(16,34,56,.06);
  --shadow-hover: 0 4px 10px rgba(16,34,56,.10), 0 10px 28px rgba(16,34,56,.12);
}

/* ===== TEMA: Deniz ===== */
:root[data-theme="deniz"] {
  --navy: #0f4c5c;
  --navy-2: #17677c;
  --navy-grad: linear-gradient(135deg, #0f4c5c 0%, #17677c 100%);
  --teal: #2a9d8f;
  --teal-grad: linear-gradient(135deg, #2a9d8f, #34c4b3);
  --amber: #dcaf66;
  --amber-grad: linear-gradient(135deg, #d3a75e, #e8c68e);
  --red: #d95d4e;
  --bg: #ecf3f2;
  --body-bg: linear-gradient(180deg, #e3efed 0%, #ecf3f2 240px);
  --card: #ffffff;
  --text: #1f333a;
  --muted: #64797f;
  --line: #dbe6e5;
  --s0: #d3e0df;
  --s1: #dcaf66;
  --s2: #2a9d8f;
  --topbar-grad: linear-gradient(135deg, #0d4351 0%, #136175 100%);
  --btn-grad: var(--navy-grad);
  --btn-text: #fff;
  --nav-bg: rgba(255,255,255,.92);
  --subtle-bg: #f7fafa;
  --hover-bg: #f1f7f6;
  --plan-bg: #f3f8f7;
  --plan-line: rgba(15,76,92,.06);
  --parcel-border: var(--navy-2);
  --login-bg:
    radial-gradient(900px 500px at 85% -10%, rgba(42,157,143,.3), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(220,175,102,.22), transparent 60%),
    linear-gradient(160deg, #0f4c5c 0%, #082b34 100%);
  --shadow: 0 1px 3px rgba(10,50,60,.07), 0 4px 14px rgba(10,50,60,.06);
  --shadow-hover: 0 4px 10px rgba(10,50,60,.10), 0 10px 28px rgba(10,50,60,.12);
}

/* ===== TEMA: Koyu Lüks ===== */
:root[data-theme="dark"] {
  --navy: #d8b878;
  --navy-2: #b28e4c;
  --navy-grad: linear-gradient(135deg, #2a2f36, #3a414a);
  --teal: #58a08a;
  --teal-grad: linear-gradient(135deg, #3f8f7a, #58a08a);
  --amber: #c9a469;
  --amber-grad: linear-gradient(135deg, #a8854a, #c9a469);
  --red: #d97b6c;
  --bg: #15181c;
  --body-bg: linear-gradient(180deg, #101317 0%, #15181c 240px);
  --card: #1e2329;
  --text: #e6e2d8;
  --muted: #98a0a8;
  --line: #2c333b;
  --s0: #39414a;
  --s1: #c9a469;
  --s2: #58a08a;
  --topbar-grad: linear-gradient(135deg, #0f1216 0%, #1c2127 100%);
  --btn-grad: linear-gradient(135deg, #a8854a, #c9a469);
  --btn-text: #15181c;
  --nav-bg: rgba(24, 28, 33, .93);
  --subtle-bg: #181d22;
  --hover-bg: #242a31;
  --plan-bg: #181d22;
  --plan-line: rgba(200, 180, 130, .06);
  --parcel-border: #8a744a;
  --login-bg:
    radial-gradient(900px 500px at 85% -10%, rgba(178, 142, 76, .25), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(178, 142, 76, .15), transparent 60%),
    linear-gradient(160deg, #14181d 0%, #08090c 100%);
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35);
  --shadow-hover: 0 4px 10px rgba(0,0,0,.5), 0 10px 28px rgba(0,0,0,.45);
}
:root[data-theme="dark"] .parcel { background: #232930; }
:root[data-theme="dark"] .parcel.p-part { background: linear-gradient(160deg, #3a3325, #4a3f28); border-color: #a8854a; }
:root[data-theme="dark"] .parcel.p-part .parcel-pct { color: #d3b177; }
:root[data-theme="dark"] .parcel.p-done { background: linear-gradient(160deg, #1f3630, #26443b); border-color: #58a08a; }
:root[data-theme="dark"] .parcel.p-done .parcel-pct { color: #7cc4ae; }
:root[data-theme="dark"] .parcel .parcel-name { color: #e6e2d8; }
:root[data-theme="dark"] .info-box { background: #232a33; border-color: #34404d; color: #a9bdd3; }
:root[data-theme="dark"] .ok-box { background: #1e332e; border-color: #2c4c44; color: #7cc4ae; }
:root[data-theme="dark"] .demo-banner { background: #2e2718; color: #d3b177; border-color: #4a3f28; }
:root[data-theme="dark"] .wpct-badge.p-none { background: #2c333b; color: #98a0a8; }
:root[data-theme="dark"] .donut text[fill="var(--navy)"] { fill: #d8b878; }
:root[data-theme="dark"] input[type="range"]::-webkit-slider-thumb { background: #1e2329; border-color: #c9a469; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:active { transform: scale(.985); }
input, select, textarea { font: inherit; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], select {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--card);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
input:focus, select:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(43,74,117,.12); }

.loading { padding: 48px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes popIn  { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes flashOk {
  0%   { box-shadow: 0 0 0 0 rgba(42,157,143,.55); background: #e5f5f3; }
  100% { box-shadow: 0 0 0 14px rgba(42,157,143,0); background: transparent; }
}

/* ---------- Yerleşim ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--topbar-grad);
  color: #fff;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 14px rgba(16,34,56,.25);
}
.topbar .logo { height: 42px; width: auto; flex-shrink: 0; }
.topbar .title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.topbar .subtitle { font-size: 11.5px; opacity: .75; }
.topbar .spacer { flex: 1; }
.topbar .user { text-align: right; font-size: 12.5px; line-height: 1.3; }
.topbar .user .role { opacity: .7; font-size: 11px; }
.btn-logout {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  color: #fff;
  padding: 6px 11px;
  font-size: 12px;
  transition: background .18s var(--ease);
}
.btn-logout:hover { background: rgba(255,255,255,.15); }

.demo-banner {
  background: linear-gradient(90deg, #fdf3e3, #fbeed3);
  color: #8a5a12;
  border-bottom: 1px solid #f3ddb4;
  font-size: 12.5px;
  padding: 7px 16px;
  text-align: center;
}

main { flex: 1; padding: 16px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 1100px; width: 100%; margin: 0 auto; }
main.view-enter { animation: fadeUp .28s var(--ease); }
.step-body { animation: fadeUp .24s var(--ease); }

/* ---------- Alt gezinme ---------- */
.nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 18px rgba(16,34,56,.08);
}
.nav button {
  flex: 1;
  padding: 10px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 2.5px solid transparent;
  transition: color .18s var(--ease), transform .12s var(--ease);
}
.nav button:hover { color: var(--navy); }
.nav button.active { color: var(--navy); font-weight: 600; border-top-color: var(--amber); }
.nav .ico { font-size: 19px; line-height: 1; }

/* ---------- Kartlar ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  transition: box-shadow .22s var(--ease), transform .22s var(--ease);
  animation: popIn .25s var(--ease);
}
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-hover); }
}
.card h2 { font-size: 15px; margin-bottom: 12px; color: var(--navy); }
.card h2 .hint { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }

.sub-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
  margin: 16px 0 7px;
}
.sub-title:first-child { margin-top: 0; }
.sub-title input.ft-name {
  border: 1px solid transparent; background: transparent;
  font: inherit; text-transform: none;
  padding: 4px 6px; border-radius: 6px; width: 60%;
  font-size: 13.5px; font-weight: 700; color: var(--navy);
}
.sub-title input.ft-name:hover, .sub-title input.ft-name:focus { border-color: var(--line); background: var(--card); box-shadow: none; }

/* ---------- Breadcrumb ---------- */
.crumbs {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13px;
}
.crumb-back {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--card); box-shadow: var(--shadow);
  font-size: 20px; line-height: 1; color: var(--navy);
  margin-right: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.crumb-back:hover { transform: translateX(-2px); box-shadow: var(--shadow-hover); }
.crumb { color: var(--muted); padding: 4px 6px; border-radius: 7px; transition: background .15s, color .15s; }
.crumb:hover { background: rgba(43,74,117,.08); color: var(--navy); }
.crumb.current { color: var(--navy); font-weight: 700; padding: 4px 6px; }
.crumb-sep { color: var(--muted); opacity: .5; }

.step-title { font-size: 14px; font-weight: 700; color: var(--navy); margin: 2px 0 12px; }

/* ---------- Adım 1: Ana blok kartları ---------- */
.group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.group-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 16px 14px;
  text-align: left;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 4px solid var(--navy-2);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.group-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.group-card .gc-name { font-size: 17px; font-weight: 800; color: var(--navy); }
.group-card .gc-count { font-size: 12px; color: var(--muted); }
.group-card .gc-pct { font-size: 13px; font-weight: 700; color: var(--teal); }

/* ---------- Şematik planlar ---------- */
.plan-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.plan-hint { font-size: 11.5px; color: var(--muted); margin-bottom: 12px; text-align: center; font-style: italic; }
.plan-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  padding: 14px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 19px, var(--plan-line) 19px, var(--plan-line) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, var(--plan-line) 19px, var(--plan-line) 20px),
    var(--plan-bg);
  border-radius: 12px;
  border: 1px dashed var(--line);
}
.parcel {
  min-height: 84px;
  border-radius: 10px;
  border: 2.5px solid var(--parcel-border);
  background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 3px 4px 0 rgba(29,53,87,.14);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  position: relative;
  overflow: hidden;
}
.parcel:hover { transform: translateY(-3px) scale(1.02); box-shadow: 5px 8px 16px rgba(29,53,87,.22); }
.parcel .parcel-name { font-weight: 800; font-size: 15px; color: var(--navy); z-index: 1; }
.parcel .parcel-pct { font-size: 12px; font-weight: 700; color: var(--muted); z-index: 1; }
.parcel.p-part { background: linear-gradient(160deg, #fdf3e2, #fbe9c8); border-color: #cf8f34; }
.parcel.p-part .parcel-pct { color: #a86a15; }
.parcel.p-done { background: linear-gradient(160deg, #e2f3f0, #cdeae5); border-color: var(--teal); }
.parcel.p-done .parcel-pct { color: #1d7a6f; }
.plan-area.rooms .parcel { min-height: 74px; border-width: 2px; }
.plan-area.rooms .parcel .parcel-name { font-size: 13px; text-align: center; padding: 0 6px; }

/* ---------- Adım 3: Kat kartları ---------- */
.floor-card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  text-align: left;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.floor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.floor-card .fname { font-weight: 700; font-size: 15px; min-width: 84px; flex-shrink: 0; }
.floor-card .bar { flex: 1; }
.floor-card .fpct { font-size: 12.5px; color: var(--muted); min-width: 40px; text-align: right; }
.floor-card .arrow { color: var(--muted); font-size: 20px; line-height: 1; }

/* ---------- Adım 5: Kategori kartları ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cat-card .cat-icon { font-size: 30px; }
.cat-card .cat-name { font-weight: 800; font-size: 15px; color: var(--navy); }
.cat-card .cat-count { font-size: 11.5px; color: var(--muted); }
.cat-card .bar { width: 100%; }
.cat-card .gc-pct { font-size: 13px; font-weight: 700; color: var(--teal); }

/* ---------- Adım 6-7: İş kalemleri ---------- */
.work-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .2s var(--ease);
}
.work-card.open { box-shadow: var(--shadow-hover); }
.work-head {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  text-align: left;
  transition: background .18s var(--ease);
}
.work-head:hover { background: var(--hover-bg); }
.work-head.flash { animation: flashOk .9s var(--ease); }
.work-head .wname { flex: 1; font-weight: 600; font-size: 14.5px; }
.work-head .wfirm { font-size: 11.5px; color: var(--muted); font-style: italic; }
.wpct-badge {
  font-size: 12px; font-weight: 800;
  padding: 5px 11px; border-radius: 20px;
  transition: transform .2s var(--ease);
}
.wpct-badge.p-none { background: #edf1f5; color: var(--muted); }
.wpct-badge.p-part { background: var(--amber-grad); color: #fff; box-shadow: 0 2px 8px rgba(233,160,59,.4); }
.wpct-badge.p-done { background: var(--teal-grad); color: #fff; box-shadow: 0 2px 8px rgba(42,157,143,.4); }
.work-head:hover .wpct-badge { transform: scale(1.06); }

.work-detail {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: var(--subtle-bg);
  animation: fadeUp .22s var(--ease);
}
.wd-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.wd-slider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wd-slider-row input[type="range"] { flex: 1; }
.wd-val { font-size: 16px; font-weight: 800; color: var(--navy); min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 8px; border-radius: 6px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--navy);
  box-shadow: 0 2px 8px rgba(16,34,56,.3);
  cursor: grab; transition: transform .15s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--navy);
  box-shadow: 0 2px 8px rgba(16,34,56,.3); cursor: grab;
}

.wd-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.wd-fields { margin-top: 12px; display: grid; gap: 4px; animation: fadeUp .25s var(--ease); }
.wd-fields label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.wd-fields input { width: 100%; }
.work-detail > input#wd-note { width: 100%; margin-top: 2px; }
.wd-actions { display: flex; gap: 10px; margin-top: 14px; }
.wd-meta { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- Çipler ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all .18s var(--ease);
  box-shadow: 0 1px 3px rgba(16,34,56,.05);
}
.chip:hover { border-color: var(--navy-2); color: var(--navy); transform: translateY(-1px); }
.chip.active { background: var(--navy-grad); border-color: var(--navy); color: #fff; box-shadow: 0 3px 10px rgba(29,53,87,.3); }
.chips.group-chips { margin-bottom: 8px; }
.chips.group-chips .chip { padding: 6px 13px; font-size: 12.5px; border-radius: 9px; }
.chips.group-chips .chip.active { background: var(--amber-grad); border-color: var(--amber); }
.chips.block-chips .chip { padding: 7px 14px; font-size: 13.5px; }

/* ---------- İlerleme çubukları ---------- */
.bar { background: var(--s0); border-radius: 6px; height: 10px; overflow: hidden; position: relative; }
.bar .fill { background: var(--teal-grad); height: 100%; border-radius: 6px; transition: width .5s var(--ease); }
.bar .fill.part { background: var(--amber-grad); }
.bar.lg { height: 14px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-row .bname { min-width: 120px; font-size: 13px; font-weight: 600; }
.bar-row .bar { flex: 1; }
.bar-row .bpct { min-width: 42px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px;
  position: relative;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3.5px;
  background: var(--navy-grad);
}
.kpi.accent::before { background: var(--teal-grad); }
.kpi.warn::before { background: var(--amber-grad); }
@media (hover: hover) { .kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); } }
.kpi .kval { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .klabel { font-size: 12px; color: var(--muted); margin-top: 3px; }
.kpi.accent .kval { color: var(--teal); }
.kpi.warn .kval { color: var(--amber); }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { flex-shrink: 0; }
.donut circle { transition: stroke-dasharray .6s var(--ease); }
.legend { font-size: 13px; display: flex; flex-direction: column; gap: 7px; }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

.block-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 22px; }

/* Isı haritası */
.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.matrix { border-collapse: collapse; font-size: 11.5px; min-width: 100%; }
table.matrix th { color: var(--muted); font-weight: 600; padding: 5px 6px; text-align: center; white-space: nowrap; }
table.matrix th.rowh { text-align: right; padding-right: 10px; }
table.matrix th .vert { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 110px; display: inline-block; }
table.matrix td { padding: 3px; }
table.matrix td .cell {
  width: 100%; min-width: 27px; height: 27px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10.5px; font-weight: 700;
  transition: transform .15s var(--ease);
}
table.matrix td .cell:hover { transform: scale(1.12); }
.cell.c0 { background: var(--s0); }
.cell.c1 { background: var(--amber-grad); }
.cell.c2 { background: var(--teal-grad); }

/* Etkinlik akışı */
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed-item:last-child { border-bottom: none; }
.feed-item .fi-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.feed-item .fi-text { flex: 1; line-height: 1.45; }
.feed-item .fi-meta { color: var(--muted); font-size: 11.5px; }

/* ---------- Ayarlar & Kullanıcılar ---------- */
.set-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.set-row input[type="text"] { flex: 1; min-width: 0; padding: 9px 11px; font-size: 14px; }
.set-row select { padding: 8px; font-size: 13px; }
.set-row .lbl { font-size: 12px; color: var(--muted); white-space: nowrap; }
.btn-del { color: var(--red); font-size: 17px; padding: 6px 9px; border-radius: 8px; transition: background .15s; }
.btn-del:hover { background: #fbeae8; }

.btn {
  background: var(--btn-grad);
  color: var(--btn-text);
  border-radius: 10px; padding: 11px 20px;
  font-weight: 600; font-size: 14px;
  display: inline-block;
  box-shadow: 0 3px 10px rgba(29,53,87,.25);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29,53,87,.35); filter: brightness(1.06); }
.btn:disabled { opacity: .6; transform: none; cursor: default; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy-2); box-shadow: none; }
.btn.ghost:hover { background: rgba(43,74,117,.06); }
.btn.warn { background: linear-gradient(135deg, #d95d4e, #e3796b); box-shadow: 0 3px 10px rgba(217,93,78,.3); }
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.info-box { background: #eef4fb; border: 1px solid #d5e3f3; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: #2b4a75; }
.info-box code { background: #fff; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.ok-box { background: #e5f5f2; border: 1px solid #bfe5df; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #1d7a6f; margin-top: 12px; animation: popIn .25s var(--ease); }

.user-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.user-row:last-child { border-bottom: none; }
.user-row .u-info { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.user-row .u-meta { font-size: 12px; color: var(--muted); }
.user-row select { padding: 7px 8px; font-size: 13px; border-radius: 8px; }
.user-row.rejected .u-info { opacity: .55; }

.uform { display: grid; gap: 4px; max-width: 460px; }
.uform label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.uform label .hint { font-weight: 400; }
.grp-toggles { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.grp-toggle {
  border: 1.5px solid var(--line); border-radius: 18px;
  padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: all .18s var(--ease);
}
.grp-toggle:hover { border-color: var(--navy-2); }
.grp-toggle.active { background: var(--teal-grad); border-color: var(--teal); color: #fff; box-shadow: 0 2px 8px rgba(42,157,143,.35); }

/* ---------- Giriş ekranı ---------- */
.login-wrap {
  min-height: 100vh;
  width: 100%; flex: 1;   /* #app masaüstünde flex-row: kart yine ortalansın */
  display: flex; align-items: center; justify-content: center;
  background: var(--login-bg);
  padding: 20px;
}
.login-card {
  background: var(--card); border-radius: 18px;
  padding: 30px 26px; width: 100%; max-width: 390px;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
  animation: popIn .35s var(--ease);
}
.login-card .logo-big { height: 132px; width: auto; display: block; margin: 0 auto 14px; }
.login-card h1 { font-size: 20px; text-align: center; color: var(--navy); margin-bottom: 2px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-card label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
.login-card input, .login-card select { width: 100%; padding: 11px 12px; font-size: 15px; }
.login-card .btn { width: 100%; margin-top: 20px; padding: 13px; text-align: center; }
.login-err { color: var(--red); font-size: 13px; margin-top: 10px; text-align: center; animation: popIn .2s; }
.login-note { margin-top: 16px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; }
.login-card .info-box { margin-top: 14px; }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 13.5px; }

/* ---------- Tema seçici ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.theme-card {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 13px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  background: var(--card);
  text-align: left;
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.theme-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.theme-card.active { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(178,142,76,.18); }
.theme-card .theme-dots { display: flex; gap: 5px; }
.theme-card .theme-dots span { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.12); }
.theme-card .theme-name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.theme-card .theme-desc { font-size: 11.5px; color: var(--muted); }
@media (min-width: 800px) { .theme-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Geniş ekran ---------- */
@media (min-width: 800px) {
  main { padding: 24px 24px 96px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .dash-grid .card { margin-bottom: 0; }
  .dash-grid .full { grid-column: 1 / -1; }
  .group-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-area { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; padding: 20px; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v3 — Sol menü (masaüstü) + üst çubuk + Ana Sayfa
   ============================================================ */

.ic { display: block; }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* --- Üst çubuk (yeni öğeler) --- */
.topbar .page-title { font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.topbar-logo {
  height: 42px; width: auto; flex-shrink: 0;
  background: #fff; border-radius: 9px; padding: 4px 7px;
}
.topbar .user { display: none; text-align: right; line-height: 1.25; }
.topbar .user .u-name { font-size: 13px; font-weight: 600; }
.topbar .user .role { opacity: .72; font-size: 11px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--btn-grad); color: var(--btn-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13.5px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* --- Sol menü (mobilde gizli) --- */
.sidebar { display: none; }
.side-brand { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 6px 18px; text-align: center; }
.side-logo-box {
  background: #fff; border-radius: 14px;   /* logo.gif opak beyaz zeminli — panel de beyaz olmalı */
  padding: 12px 22px; margin-bottom: 8px;
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
}
.side-logo { height: 108px; width: auto; display: block; }
.sb-name { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sb-sub { font-size: 11px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 11px;
  color: rgba(255,255,255,.72); font-size: 14px; font-weight: 600;
  text-align: left; width: 100%;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.side-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.side-item.active { background: rgba(255,255,255,.15); color: #fff; }
.side-item.active .ic { color: var(--amber); }
.side-logout { color: rgba(255,255,255,.6); margin-top: 6px; }
.side-logout:hover { background: rgba(255,255,255,.09); color: #fff; }

/* --- Alt bar: çok öğe olursa yatay kaydır --- */
.nav { overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { flex: 1 0 auto; min-width: 62px; }
.nav .ico { display: flex; align-items: center; justify-content: center; }

/* --- Ana Sayfa --- */
.home-top { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.card-head h2 { margin-bottom: 0; }
.link-btn { font-size: 12.5px; font-weight: 600; color: var(--amber); white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }

.home-progress .progress-flex { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.home-progress .donut { flex-shrink: 0; }
.stat-list { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-lbl { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat-lbl .dotc { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.stat-val { font-size: 20px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-val.done { color: var(--teal); }
.stat-val.prog { color: var(--amber); }

.home-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.home-block-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; text-align: left;
  display: flex; flex-direction: column; gap: 9px;
  box-shadow: var(--shadow); width: 100%;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.home-block-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.home-block-card .hb-name { font-weight: 800; font-size: 15px; color: var(--navy); }
.home-block-card .hb-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.home-block-card .hb-pct { font-weight: 800; color: var(--teal); font-size: 13px; }
.home-block-card .hb-sub { font-size: 11px; color: var(--muted); margin-top: -4px; }

/* Geciken işler uyarı kartı */
.alert-card {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(201,106,91,.12), rgba(201,106,91,.05));
  border: 1.5px solid rgba(201,106,91,.35);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; text-align: left;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  animation: popIn .25s var(--ease);
}
.alert-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.alert-card .ac-icon { font-size: 22px; flex-shrink: 0; }
.alert-card .ac-body { flex: 1; min-width: 0; }
.alert-card .ac-title { font-weight: 800; font-size: 15px; color: var(--red); }
.alert-card .ac-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.alert-card .ac-arrow { color: var(--red); font-size: 22px; flex-shrink: 0; }
.alert-list { margin-bottom: 14px; }
.gec-gun {
  font-size: 12px; font-weight: 800; color: var(--red);
  background: rgba(201,106,91,.12); padding: 3px 9px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}

/* Son 7 gün hareket çubukları */
.hareket { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.hareket-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.hareket-head b { color: var(--navy); font-size: 13px; }
.hareket-bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.hareket-bars .hb {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 3px;
}
.hareket-bars .hb-fill {
  width: 100%; border-radius: 4px 4px 2px 2px;
  background: var(--amber-grad); min-height: 3px;
  transition: height .4s var(--ease);
}
.hareket-bars .hb-day { font-size: 9.5px; color: var(--muted); font-weight: 600; }

/* Ana blok kırılımı — üzerine gelince açılan kutu */
.home-group-wrap { position: relative; }
.hg-pop {
  display: none;
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 12px 14px;
  min-width: 240px;
  animation: fadeUp .16s var(--ease);
}
.hg-pop-head {
  font-size: 11.5px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 9px;
}
.hg-pop .bar-row { margin-bottom: 7px; }
.hg-pop .bar-row:last-child { margin-bottom: 0; }
.hg-pop .bname { min-width: 76px; font-size: 12.5px; }
/* Kutu, kartın altında görünmeli — grid kırpmasın */
.home-blocks { overflow: visible; }
.card:has(.home-group-wrap) { overflow: visible; }

/* Yalnızca fare/imleç olan cihazlarda; telefonda dokunmak akışı açar */
@media (hover: hover) {
  .home-group-wrap:hover .hg-pop { display: block; }
  .home-group-wrap:focus-within .hg-pop { display: block; }
}
/* Sağdaki kartların kutusu ekrandan taşmasın */
.home-blocks .home-group-wrap:nth-child(n+3) .hg-pop { left: auto; right: 0; }

/* --- Raporlar --- */
.rapor-actions { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rapor-ozet { font-size: 13px; color: var(--red); font-weight: 700; margin-bottom: 10px; }
table.rtable { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.rtable th {
  text-align: left; color: var(--muted); font-weight: 700;
  padding: 8px 10px; border-bottom: 2px solid var(--line);
  white-space: nowrap; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px;
}
table.rtable td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.rtable tbody tr:nth-child(even) { background: var(--subtle-bg); }
table.rtable tbody tr:hover { background: var(--hover-bg); }

/* --- Ayarlar: blok ağacı --- */
.tree { display: flex; flex-direction: column; }
.tree-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 12px 10px; border-radius: 10px;
  transition: background .15s var(--ease);
}
.tree-row:hover { background: var(--hover-bg); }
.tree-caret {
  display: flex; color: var(--muted); flex-shrink: 0;
  transition: transform .18s var(--ease);
}
.tree-row.open .tree-caret { transform: rotate(90deg); color: var(--amber); }
.tree-name { font-weight: 700; flex: 1; min-width: 0; }
.tree-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }

.tree-root .tree-name { font-size: 16px; color: var(--navy); }
.tree-group .tree-name { font-size: 14px; color: var(--text); }
.tree-group { border-left: 2px solid var(--line); border-radius: 0 10px 10px 0; }
.tree-group.open { border-left-color: var(--amber); background: var(--subtle-bg); }

.tree-row.warn { background: rgba(201,164,105,.1); }
.tree-warn { color: var(--red); font-weight: 700; }

.tree-block .tree-name { font-size: 13.5px; font-weight: 600; }
.tree-block { border-left: 2px solid var(--line); border-radius: 0 10px 10px 0; }
.tree-block.open { border-left-color: var(--teal); }

/* Yaprak: seçilebilir kat satırı (caret yok) */
.tree-leaf {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 9px;
  padding-left: 26px;
  transition: background .15s var(--ease), color .15s;
}
.tree-leaf:hover { background: var(--hover-bg); }
.tree-leaf .tree-name { font-weight: 600; font-size: 13.5px; }
.tree-leaf.active { background: var(--amber-grad); color: #fff; }
.tree-leaf.active .tree-name, .tree-leaf.active .tree-meta { color: #fff; }

.tree-children {
  margin-left: 12px; padding-left: 12px;
  border-left: 2px solid var(--line);
  animation: fadeUp .2s var(--ease);
}
.tree-children .tree-children { border-left-color: var(--amber); }
.tree-children .set-row .lbl { min-width: 84px; }

/* Satır içi ekleme kutusu */
.set-row.inline-add { animation: fadeUp .18s var(--ease); }
.set-row.inline-add input { border-color: var(--amber); }

/* --- İş kalemi fotoğrafı --- */
.wphoto { font-size: 13px; opacity: .8; flex-shrink: 0; }
.photo-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.photo-wrap {
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: var(--subtle-bg); line-height: 0;
}
.photo-wrap img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.photo-empty {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  border: 1.5px dashed var(--line); border-radius: 10px;
  padding: 14px; background: var(--subtle-bg);
  font-size: 13px; color: var(--muted);
}

/* --- Kat planı görüntüleyici --- */
.plan-viewer {
  position: relative; display: block; width: 100%;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.plan-viewer img { width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.plan-viewer.drawing { cursor: crosshair; touch-action: none; }
.plan-viewer.drawing .plan-rect { pointer-events: none; }

/* Mahal hücresi — plan üzerinde yarı saydam alan */
.plan-rect {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; padding: 0;
  min-width: 0; min-height: 0;
  transition: filter .15s var(--ease);
  animation: rectPop .18s var(--ease);
  overflow: hidden;
}
@keyframes rectPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.plan-rect:hover { filter: brightness(1.12) saturate(1.3); z-index: 3; }
.plan-rect .pr-lbl {
  font-size: 10.5px; font-weight: 800; color: #fff;
  background: rgba(20,25,30,.8);
  padding: 2px 6px; border-radius: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 96%; pointer-events: none;
}
.plan-rect.pr-none { background: rgba(120,130,140,.3); border: 2px solid #79838d; }
.plan-rect.pr-part { background: rgba(201,164,105,.34); border: 2px solid var(--amber); }
.plan-rect.pr-done { background: rgba(94,156,118,.34); border: 2px solid var(--teal); }
/* Ayarlarda (durum değil, tanım görünümü) */
.plan-rect.pr-set  { background: rgba(178,142,76,.22); border: 2px dashed var(--amber); }
.plan-rect.selected { outline: 3px solid var(--red); outline-offset: 1px; z-index: 4; }
/* Çizim önizlemesi */
.plan-rect.pr-preview {
  background: rgba(201,164,105,.28); border: 2px dashed var(--red);
  pointer-events: none; animation: none;
}

/* Plan altındaki mahal listesi — plandaki renklerle eşleşen durum noktası */
.floor-card .m-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.floor-card .m-dot.p-none { background: #9aa3ac; }
.floor-card .m-dot.p-part { background: var(--amber); }
.floor-card .m-dot.p-done { background: var(--teal); }
.floor-card .fname { display: flex; flex-direction: column; gap: 2px; }
.floor-card .m-off {
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  font-style: italic;
}

.plan-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: var(--muted);
}
.plan-legend .dotc { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* Isı haritasında "bu mahale atanmamış" hücre */
.cell.cx { background: transparent; border: 1px dashed var(--line); color: var(--muted); }

/* --- Yazdırma / PDF --- */
@media print {
  .sidebar, .nav, .topbar, .demo-banner, .chips, .rapor-actions, .btn { display: none !important; }
  body { background: #fff; font-size: 11px; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: none; padding: 0; animation: none; }
  .matrix-scroll { overflow: visible; }
  table.rtable { font-size: 10.5px; }
  table.rtable th, table.rtable td { border: 1px solid #ccc; padding: 4px 6px; }
  table.rtable tbody tr:nth-child(even) { background: #f4f4f4; }
}

/* --- Masaüstü: sol menü açılır, alt bar gizlenir --- */
@media (min-width: 800px) {
  #app { flex-direction: row; }
  .sidebar {
    display: flex; flex-direction: column;
    width: 236px; flex-shrink: 0;
    background: var(--topbar-grad); color: #fff;
    padding: calc(20px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    position: sticky; top: 0; height: 100vh;
    box-shadow: 2px 0 18px rgba(16,34,56,.12);
    z-index: 20;
  }
  .nav { display: none; }
  .topbar-logo { display: none; }
  .topbar-logout { display: none; }
  .topbar .user { display: block; }
  .home-top { grid-template-columns: 1.12fr 1fr 1fr; align-items: start; }
  .home-top .card { margin-bottom: 0; }
}
