:root {
  --brand: #c8211b; --brand-2: #a51913; --brand-soft: #fdecea;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --line: #e4e6eb;
  --text: #1c1f24; --muted: #6b7280;
  --blue: #2563eb; --blue-soft: #e8efff;
  --green: #15803d; --green-soft: #e3f5e9;
  --amber: #b45309; --amber-soft: #fdf1dc;
  --red: #c8211b; --red-soft: #fdecea;
  --gray-soft: #eef0f3;
  --t-maint: #2563eb; --t-fault: #dc2626; --t-install: #7c3aed; --t-test: #0d9488; --t-survey: #64748b; --t-task: #db2777; --due: #f59e0b;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --side: 236px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-soft: #3a1513; --bg: #0f1114; --surface: #171a1f; --surface-2: #1d2127; --line: #2a2f37;
    --text: #e8eaed; --muted: #9aa3ae;
    --blue: #6b9bff; --blue-soft: #18233d; --green: #4ade80; --green-soft: #12291b;
    --amber: #fbbf24; --amber-soft: #2e230f; --red: #f87171; --red-soft: #351616; --gray-soft: #242931;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.ic { width: 18px; height: 18px; flex: none; }
.sp { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.txt-red { color: var(--red); font-weight: 600; }
.pre { white-space: pre-wrap; margin: 0 0 12px; }

/* marka */
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 17px; letter-spacing: .08em; }
.brand span { display: block; font-size: 10.5px; letter-spacing: .22em; color: var(--muted); font-weight: 600; }
.logo-mark { width: 38px; height: 38px; display: block; flex: none; object-fit: contain; }
.brand.big { justify-content: center; margin-bottom: 6px; }
.brand.big .logo-mark { width: 112px; height: 112px; }
.brand.big b { font-size: 24px; }

/* düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--red); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.sm .ic { width: 15px; height: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.x { font-size: 24px; color: var(--muted); }

/* yerleşim */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; gap: 22px; }
.sidebar .brand { padding: 0 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav a.active { background: var(--brand-soft); color: var(--brand); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; font-style: normal; display: grid; place-items: center; }
.badge[hidden] { display: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.me:hover { background: var(--surface-2); }
.me-txt b { display: block; font-size: 14px; }
.me-txt small { color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gray-soft); color: var(--text); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.off { opacity: .5; }
.main { margin-left: var(--side); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.topbar h1 { font-size: 22px; }
.tb-brand, .avatar-btn { display: none; }
.demo-pill { font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 4px 8px; border-radius: 6px; background: var(--amber-soft); color: var(--amber); }
#view { padding: 4px 28px 40px; max-width: 1240px; }
.bottomnav { display: none; }

/* kartlar ve listeler */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card > header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card > header h3 { font-size: 15px; }
.card > header small { color: var(--muted); }
.card > header .link, .card > header .btn { margin-left: auto; }
.link { color: var(--brand); font-weight: 600; font-size: 13px; }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line); width: 100%; border-radius: 0; }
.list > .row:first-child { border-top: 0; }
button.row:hover, .row .row-main:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.row-main.static:hover { background: none; }
.row-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small .dot { margin-right: 5px; vertical-align: 1px; }
.row-tags { display: flex; gap: 6px; }
.when { width: 46px; flex: none; text-align: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); padding: 4px 0; line-height: 1.15; }
.when b { display: block; font-size: 15px; }
.when small { font-size: 11px; text-transform: uppercase; }
.when.done { background: var(--green-soft); color: var(--green); }
.when.cancelled { background: var(--gray-soft); color: var(--muted); text-decoration: line-through; }
.when.due-w { background: var(--amber-soft); color: var(--amber); }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; }
.check:hover { border-color: var(--green); }
.task.is-done .check { background: var(--green); border-color: var(--green); }
.task.is-done .row-main b { text-decoration: line-through; color: var(--muted); }
.empty { padding: 18px 6px; color: var(--muted); font-size: 14px; text-align: center; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.gray { background: var(--gray-soft); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.t-maint { --c: var(--t-maint); } .t-fault { --c: var(--t-fault); } .t-install { --c: var(--t-install); } .t-test { --c: var(--t-test); } .t-survey { --c: var(--t-survey); }
.dot { background: var(--c, var(--muted)); }
.dot.due { background: var(--due); }
.notice { background: var(--amber-soft); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; white-space: pre-wrap; }

/* panel */
.greet { margin: 4px 0 16px; }
.greet h2 { font-size: 20px; }
.greet p { margin: 2px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; }
.stat b { font-size: 28px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.blue b { color: var(--blue); } .stat.red b { color: var(--red); } .stat.green b { color: var(--green); } .stat.amber b { color: var(--amber); }
button.stat { text-align: left; cursor: pointer; }
button.stat:hover, a.stat:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.card, .row-main, .stat { min-width: 0; }
.row .tag, .row .btn { flex-shrink: 0; }

/* araç çubuğu */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.search { flex: 1; min-width: 200px; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--text); }
.toolbar select, .row select { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 10px; }
.chips { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.chip-btn { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip-btn.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.seg { display: inline-flex; padding: 3px; background: var(--gray-soft); border-radius: 10px; }
.seg button { padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* takvim */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cal-head { gap: 4px !important; }
.cal-head h3 { font-size: 17px !important; min-width: 130px; text-align: center; }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; padding-bottom: 6px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.day { min-height: 92px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day:hover { background: var(--surface-2); }
.day.out { background: var(--surface-2); }
.day.out .n { color: var(--muted); opacity: .6; }
.day .n { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day.today .n { background: var(--brand); color: #fff; }
.day.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev { font-style: normal; font-size: 11px; line-height: 1.3; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ev.done { opacity: .55; text-decoration: line-through; }
.ev.due { --c: var(--due); background: var(--amber-soft); color: var(--amber); }
.ev.task { --c: var(--t-task); }
/* çok günlü randevu: günler arası bant görünümü */
.ev.span-start { border-radius: 4px 0 0 4px; margin-right: -5px; }
.ev.span-mid { border-radius: 0; border-left-width: 0; margin: 0 -5px; padding-left: 6px; }
.ev.span-end { border-radius: 0 4px 4px 0; border-left-width: 0; margin-left: -5px; padding-left: 6px; }
.days-info { margin: -6px 0 10px; }
.notice.conflict ul { margin: 6px 0; padding-left: 18px; }
.notice.push-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; white-space: normal; }
.notice.push-banner > span:first-of-type { flex: 1 1 220px; }
.push-actions { display: flex; gap: 6px; }
/* Birden çok kişi seçimi (iş / randevu) */
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line, rgba(127,127,127,.35)); font-size: 14px; line-height: 1.2; }
.chip-check input:checked + span { background: var(--red, #d32f2f); border-color: var(--red, #d32f2f); color: #fff; }
.chip-check input:checked + span::before { content: '✓ '; }
.chip-check input:focus-visible + span { outline: 2px solid var(--red, #d32f2f); outline-offset: 2px; }
.field > span small { font-weight: 400; }
.ev.task.late { outline: 1px solid var(--red); }
.dot.task { background: var(--t-task); }
.hdr-btns { margin-left: auto; display: flex; gap: 6px; }
.more { font-style: normal; font-size: 11px; color: var(--muted); padding-left: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.day-panel { position: sticky; top: 80px; }
.day-group.late > header h3 { color: var(--red); }
.day-group { margin-bottom: 12px; }

/* müşteriler */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.cust { text-align: left; display: block; width: 100%; position: relative; }
.cust-open { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.cust > header, .cust > p, .cust > dl { position: relative; pointer-events: none; }
.cust-actions { position: relative; z-index: 1; display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cust:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.cust header { align-items: flex-start !important; margin-bottom: 2px !important; }
.cust header h3 { flex: 1; }
.cust p { margin: 0 0 10px; font-size: 13px; }
.cust dl, .info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.cust dt, .info dt { font-size: 12px; color: var(--muted); }
.cust dd, .info dd { margin: 0; font-size: 14px; font-weight: 600; }
.info { margin: 14px 0; }

/* notlar */
.notes { columns: 3 260px; column-gap: 14px; }
.note { break-inside: avoid; display: block; width: 100%; text-align: left; margin-bottom: 14px; position: relative; }
.note.pinned { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.note .pin { position: absolute; top: 12px; right: 12px; color: var(--brand); }
.note h3 { font-size: 15px; margin-bottom: 6px; padding-right: 24px; }
.note p { margin: 0 0 10px; white-space: pre-wrap; color: var(--text); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.note footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note footer small { color: var(--muted); font-size: 12px; }

/* ipucu kutusu */
.hint { background: var(--blue-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; line-height: 1.55; }
.page-hint-last { margin-top: 12px; }

/* malzeme talepleri */
.mat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.mat { text-align: left; display: block; width: 100%; border-left: 4px solid var(--line); }
.mat.new { border-left-color: var(--red); } .mat.quoted { border-left-color: var(--amber); } .mat.ordered { border-left-color: var(--blue); } .mat.done { border-left-color: var(--green); }
.mat header { gap: 6px !important; margin-bottom: 4px !important; }
.mat header h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-title { margin: 0 0 8px; font-weight: 600; }
.items { margin: 0 0 8px; padding: 0; list-style: none; font-size: 13.5px; }
.items li { padding: 3px 0; border-top: 1px dashed var(--line); }
.items li:first-child { border-top: 0; }
.items b { display: inline-block; min-width: 64px; color: var(--muted); font-weight: 600; }
.order-note { margin: 0 0 8px; font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; white-space: pre-wrap; }
.mat footer small { color: var(--muted); font-size: 12px; }
.items-edit { display: flex; flex-direction: column; gap: 6px; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 90px 36px; gap: 6px; align-items: center; }
.item-row input, .item-row select { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 8px 10px; min-height: 40px; outline: none; }
.item-row input:focus { border-color: var(--brand); }
.item-row .icon-btn { color: var(--muted); }
.item-row .it-stock { grid-column: 1 / -1; min-height: 0; margin: -2px 0 4px 2px; }
.item-row .it-stock:empty { display: none; }

/* stok */
.qty { display: inline-flex; align-items: baseline; gap: 3px; font-weight: 700; font-size: 15px; padding: 2px 8px; border-radius: 7px; white-space: nowrap; }
.qty small { font-size: 11px; font-weight: 600; opacity: .8; }
.qty.green { background: var(--green-soft); color: var(--green); }
.qty.amber { background: var(--amber-soft); color: var(--amber); }
.qty.red { background: var(--red-soft); color: var(--red); }
.sh { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.sh.green { background: var(--green-soft); color: var(--green); }
.sh.amber { background: var(--amber-soft); color: var(--amber); }
.sh.red { background: var(--red-soft); color: var(--red); }
.sh.gray { background: var(--gray-soft); color: var(--muted); }
.items li .sh { margin-left: 4px; }
.stock-card { padding: 4px 0; margin-bottom: 16px; overflow: hidden; }
.stock-card > .empty { padding: 28px 16px; }
.stock-table { width: 100%; border-collapse: collapse; }
.stock-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stock-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.stock-table tr:last-child td { border-bottom: 0; }
.stock-table tbody tr:hover { background: var(--surface-2); }
.stock-table .num { text-align: right; }
.link-cell { display: flex; flex-direction: column; text-align: left; width: 100%; }
.link-cell b { font-weight: 600; }
.link-cell small { color: var(--muted); font-size: 12px; }
.stock-table.small-t { font-size: 13px; }
.stock-table.small-t td, .stock-table.small-t th { padding: 6px 8px; }
.stock-table tr.bad td { background: var(--red-soft); }
.table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.mv { min-width: 56px; text-align: center; font-weight: 700; font-size: 13px; padding: 4px 6px; border-radius: 8px; flex: none; }
.mv.plus { background: var(--green-soft); color: var(--green); }
.mv.minus { background: var(--red-soft); color: var(--red); }
.map-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 10px; }
.import-sum { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.stock-info { margin: 0 0 10px; }

/* özel notlar */
.note.private { border-style: dashed; }
.note.private footer small { display: inline-flex; align-items: center; gap: 4px; }
.note.private footer .ic { width: 13px; height: 13px; }
.private-hint { display: flex; align-items: center; gap: 8px; }
.private-hint .ic { flex: none; }
.toolbar .seg { flex: none; }
.add-item { align-self: flex-start; margin-top: 6px; }
.items-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.items-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.items-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.manage-box { margin-top: 14px; padding: 12px 14px 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.manage-box h4 { margin: 0 0 8px !important; }

/* bakım formları */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.form-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.form-card .thumb { position: relative; height: 170px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); border-bottom: 1px solid var(--line); overflow: hidden; }
.form-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.form-card .thumb .ic { width: 40px; height: 40px; }
.form-card .pages { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.fc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.fc-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-title small { color: var(--muted); font-size: 12.5px; }
.fc-body .btn { margin-top: 6px; }
/* Bildirim zili ve listesi */
.bell-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--text); flex: none; }
.bell-btn:hover { background: var(--surface-2); }
.bell-btn .ic { width: 22px; height: 22px; }
.bell-badge { position: absolute; top: 2px; right: 0; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700; border: 2px solid var(--bg); }
.notif-list .notif { display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; background: transparent; }
.notif.unread .notif-dot { background: var(--brand); }
.notif.unread b { font-weight: 700; }
.notif.is-read { opacity: .65; }
.notif .row-main small { display: block; white-space: normal; }
/* Bakım formları: müşteri klasörleri */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card.folder { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; padding: 14px; width: 100%; color: inherit; font: inherit; }
.card.folder:hover { border-color: var(--red, #d32f2f); }
.card.folder.empty { opacity: .6; }
.folder-ic { font-size: 30px; line-height: 1; flex: none; }
.folder-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.folder-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-main small { color: var(--muted); font-size: 12.5px; }
.folder-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.folder-title { margin: 0; font-size: 20px; }
.folder-head .sp { flex: 1; }
.proj-ic { font-size: 24px; line-height: 1; flex: none; width: 32px; text-align: center; }
.proj-view { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; word-break: break-all; }
.proj-view small { display: block; }
.proj-big { font-size: 44px; line-height: 1; flex: none; }
.year-head { margin: 18px 0 10px; font-size: 16px; }
.year-head small { font-weight: 400; margin-left: 6px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; color: var(--muted); }
.drop:hover { border-color: var(--brand); color: var(--brand); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .ic { width: 28px; height: 28px; }
.drop b { color: var(--text); }
.drop small { font-size: 12.5px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.th { position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.th button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.th .spinner { width: 24px; height: 24px; }
.pages-view { display: flex; flex-direction: column; gap: 14px; min-height: 120px; align-items: center; justify-content: center; }
.pages-view figure { margin: 0; width: 100%; }
.pages-view img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; background: #fff; }
.pages-view figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }

/* mobil menü */
.more-menu { display: flex; flex-direction: column; }
.more-menu a, .more-menu button { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--line); font-weight: 600; width: 100%; }
.more-menu > :first-child { border-top: 0; }
.more-menu .badge { position: static; }

/* ekip */
.row.user { flex-wrap: wrap; }
.row.user select { height: 32px; }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 16, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: pop .18s; }
.modal.wide { max-width: 720px; }
.modal > header { display: flex; align-items: center; padding: 14px 14px 6px 20px; }
.modal > header h2 { flex: 1; font-size: 18px; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-body h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 4px; }
.modal > footer { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 9px 11px; outline: none; min-height: 40px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field .invalid { border-color: var(--red); }
.field.ro > div { padding: 2px 0; font-weight: 600; }
.ro-title { font-size: 18px; margin-bottom: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.check-field { display: flex; align-items: center; gap: 8px; font-weight: 600; padding-top: 22px; }
.check-field input { width: 18px; height: 18px; accent-color: var(--brand); }
.actions-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chooser { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chooser button { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.chooser button:hover { border-color: var(--brand); background: var(--brand-soft); }
.chooser .ic { color: var(--brand); width: 22px; height: 22px; margin-bottom: 4px; }
.chooser small { color: var(--muted); }
.profile-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.profile-head b { display: block; font-size: 16px; }
.profile-head small { color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } }

/* giriş */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(16,24,40,.08); text-align: center; }
.auth-card > p { margin: 0 0 18px; font-size: 14px; }
.auth-card h2 { margin: 16px 0 8px; }
.auth-card .field { text-align: left; }
.auth-card .notice { text-align: left; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; }
.auth-links a { color: var(--brand); font-weight: 600; }
.demo-btns { display: flex; gap: 8px; margin-top: 8px; }
.demo-btns .btn { flex: 1; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.splash { min-height: 100vh; display: grid; place-items: center; }

/* bildirimler */
#toasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.2); animation: pop .2s; transition: opacity .3s; }
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: var(--green); color: #fff; }
.toast.out { opacity: 0; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .cal-wrap { grid-template-columns: 1fr; }
  .day-panel { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
/* ---------- mobil ---------- */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar h1 { display: none; }
  .tb-brand { display: block; }
  .tb-brand .logo-mark { width: 32px; height: 32px; }
  .tb-brand .brand b { font-size: 15px; }
  .avatar-btn { display: block; }
  #addBtn span { display: none; }
  #addBtn { width: 38px; padding: 0; }
  #view { padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); }
  .bottomnav { display: flex; position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a, .bottomnav button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 10.5px; font-weight: 600; color: var(--muted); position: relative; }
  .bottomnav a.active, .bottomnav button.active { color: var(--brand); }
  .bottomnav .ic { width: 22px; height: 22px; }
  .bottomnav .badge { position: absolute; top: 2px; left: 55%; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stats { gap: 10px; }
  .stat b { font-size: 24px; }
  .search { max-width: none; }
  .day { min-height: 54px; padding: 3px 2px; align-items: center; }
  .evs { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .ev { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--c); font-size: 0; }
  .ev.due { background: var(--due); }
  .ev.span-start, .ev.span-mid, .ev.span-end { margin: 0; border-radius: 50%; padding: 0; }
  .more { display: none; }
  .two, .three { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; }
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .cards { grid-template-columns: 1fr; }
  .notes { columns: 1; }
  .mat-list { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-card .thumb { height: 130px; }
  .item-row { grid-template-columns: minmax(0, 1fr) 64px 36px; }
  .item-row .it-unit { grid-column: 2; grid-row: 2; }
  .item-row .it-name { grid-row: 1 / span 2; align-self: stretch; }
  .item-row .icon-btn { grid-column: 3; grid-row: 1 / span 2; }
  .item-row .it-stock { grid-row: 3; }
  .hide-m { display: none !important; }
  .stock-table th, .stock-table td { padding: 8px 8px; }
  .map-grid { grid-template-columns: 1fr 1fr; }
  .stock-card { margin-left: -4px; margin-right: -4px; }
  .toolbar select { flex: 1; min-width: 0; }
  .chooser { grid-template-columns: 1fr; }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) { .three { grid-template-columns: 1fr; } }
