/* Yönetim paneli — sitenin açık temasıyla, telefon öncelikli */
.panel-body { min-height: 100svh; background: var(--soft); }
.gate { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; }
.gate-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 20px; box-shadow: var(--shadow); }
.gate-ic svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gate h1 { font-size: clamp(24px, 5vw, 32px); max-width: 480px; line-height: 1.15; }
.gate p { color: var(--ink-2); margin: 10px 0 24px; }

.app { max-width: 980px; margin: 0 auto; padding: 0 16px calc(100px + env(safe-area-inset-bottom)); }
.p-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 14px 0; background: rgba(244, 246, 250, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.p-head .logo span:last-child { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--head); font-weight: 700; }
.p-head .logo small { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--muted); }
.p-sync { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spin svg { animation: spin .8s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 26px; }
.stat { text-align: left; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 96px; transition: border-color .2s; }
button.stat:hover { border-color: var(--line-2); }
.stat b { font-family: var(--head); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat-red { background: var(--accent); border-color: var(--accent); color: #fff; }
.stat-red span { color: rgba(255, 255, 255, 0.75); }
.stat-red b { color: #fff; }
.app[data-tab="araclar"] .stats, .app[data-tab="ayarlar"] .stats { display: none; }
.app[data-tab="araclar"] .views, .app[data-tab="ayarlar"] .views { padding-top: 8px; }
.mini-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; align-items: end; height: 44px; }
.mini-days i { display: block; border-radius: 3px; background: var(--ok); min-height: 4px; }
.mini-days i.l1 { background: var(--warn); } .mini-days i.l2 { background: var(--bad); }
.mini-days i.x { background: repeating-linear-gradient(45deg, var(--line-2) 0 2px, transparent 2px 4px); height: 100% !important; }

.view { display: none; }
.view.on { display: block; animation: paneIn .35s var(--ease); }
.v-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.v-head h2 { font-size: 24px; letter-spacing: -0.02em; }
.hint { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }

/* kartlar */
.cards { display: grid; gap: 10px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.card { animation: cardIn .45s var(--ease) both; }
.card:nth-child(2) { animation-delay: .04s; } .card:nth-child(3) { animation-delay: .08s; } .card:nth-child(4) { animation-delay: .12s; }
.card { position: relative; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-content: start; transition: opacity .35s, transform .35s var(--ease); }
.card > * { min-width: 0; }
.when { grid-row: span 3; align-self: start; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; padding: 10px 0; border-radius: 14px; background: var(--soft); }
.when small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.when b { font-family: var(--head); font-size: 24px; font-weight: 600; line-height: 1.05; }
.when em { font-style: normal; font-weight: 600; color: var(--accent); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.card.pending .when { background: var(--warn-soft); }
.card.approved .when { background: var(--ok-soft); }
.card.approved .when em { color: var(--ok); }
.who { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.who b { font-size: 16px; font-weight: 600; }
.who a { font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tag.plate { font-weight: 700; letter-spacing: .04em; background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-left: 5px solid #1b46c2; border-radius: 5px; }
.tag.svc { background: var(--accent-soft); color: var(--accent); }
.tag.st-pending { background: var(--warn-soft); color: #8a5a00; }
.tag.st-approved { background: var(--ok-soft); color: var(--ok); }
.tag.st-done { background: var(--surface-2); color: var(--ink); }
.tag.st-noshow { background: var(--bad-soft); color: var(--bad); }
.note { grid-column: 2; margin: 2px 0 0; font-size: 14px; color: var(--ink-2); background: var(--soft); padding: 8px 12px; border-radius: 10px; }
.ago { font-size: 12px; color: var(--muted); }
.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions .btn { --h: 44px; flex: 1; min-width: 0; padding: 0 12px; font-size: 14px; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #158a50; }
.btn-wa { background: #e6f7ed; color: #118a45; }
.btn-wa:hover { background: #d4f1df; }
.btn-wa svg { width: 17px; height: 17px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-2); border-radius: 18px; font-size: 14px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* segment, gün gezgini */
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: .2s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.day-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.day-nav-label { flex: 1; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.timeline { display: grid; gap: 10px; }
.group-h { margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; }
.group-h span:last-child { color: var(--muted); font-weight: 500; }
.group-h:first-child { margin-top: 0; }

/* takvim */
.month-nav { display: flex; gap: 8px; }
.pcal-week, .pcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pcal-week span { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.pday { aspect-ratio: 1 / 1.05; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 7px; text-align: left; overflow: hidden; transition: border-color .2s, transform .2s var(--ease); }
.pday:hover { border-color: var(--ink); }
.pday:active { transform: scale(.96); }
.pday b { font-size: 14px; font-weight: 600; }
.pday small { font-size: 10px; color: var(--muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pday .lbar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pday .lbar i { display: block; height: 100%; background: var(--ok); }
.pday.l1 .lbar i { background: var(--warn); } .pday.l2 .lbar i { background: var(--bad); }
.pday.closed { background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--soft) 4px 8px); }
.pday.closed small { color: var(--bad); }
.pday.past { opacity: .45; }
.pday.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pday.pad { visibility: hidden; }

/* ayarlar */
.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.set-card, .views, .view { min-width: 0; max-width: 100%; }
.set-row > span:first-child { min-width: 0; }
.set-card { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.settings .set-card { margin: 0; }
.set-card h3 { font-size: 16px; margin-bottom: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.set-row:last-child { border-bottom: 0; }
.set-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.set-row select, .wk-times input { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; flex: none; }
.stepper button { width: 38px; height: 38px; border: 0; background: var(--soft); font-size: 18px; }
.stepper input { width: 46px; height: 38px; text-align: center; border: 0; background: var(--surface); font-weight: 600; font-size: 16px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wk-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wk-row:last-child { border-bottom: 0; }
.wk-name { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.wk-times { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.wk-times input { padding: 7px 8px; font-size: 14px; }
.wk-row.off .wk-times { opacity: .3; pointer-events: none; }
.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; cursor: pointer; transition: background .25s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--ease); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }
.switch.red:checked { background: var(--bad); }

/* sekme çubuğu */
.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  width: min(calc(100% - 16px), 500px); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: var(--shadow-lg);
}
.tabbar button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 16px; color: var(--muted); font-size: 11px; font-weight: 500; transition: color .2s, background .2s; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--accent); background: var(--accent-soft); }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.badge.bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.4); } }

/* alt pencere */
.sheet { width: 100%; max-width: 560px; max-height: 88svh; margin: auto auto 0; border: 0; border-radius: 24px 24px 0 0; padding: 12px 18px calc(24px + env(safe-area-inset-bottom)); background: var(--surface); color: var(--ink); overflow-y: auto; box-shadow: var(--shadow-lg); }
.sheet::backdrop { background: rgba(15, 16, 18, 0.4); backdrop-filter: blur(3px); }
.sheet[open] { animation: up .4s var(--ease); }
@keyframes up { from { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h3 { font-size: 21px; margin-bottom: 4px; }
.sheet .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.quick button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.quick button:hover { border-color: var(--ink); color: var(--ink); }
.sheet .fld { margin-bottom: 12px; }
.sheet .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 16px; }
.slot-tg { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.slot-tg b { font-size: 14px; font-variant-numeric: tabular-nums; }
.slot-tg small { display: block; font-size: 11px; color: var(--muted); }
.slot-tg.blocked { opacity: .55; }
.sheet .switch { transform: scale(.85); }
.sec-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 18px 0 6px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { flex: 1; }
.toast .t-act { margin-left: 12px; font-weight: 700; color: #9fd8b8; background: none; border: 0; padding: 0; text-decoration: underline; }

/* giriş */
.login { width: min(100%, 380px); text-align: left; display: grid; gap: 14px; padding: 32px 26px 26px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: paneIn .5s var(--ease); }
.login-logo { width: 56px; height: 56px; border-radius: 50%; color: var(--ink); display: block; }
.login-logo svg { width: 100%; height: 100%; display: block; }
.login h1 { font-size: 26px; letter-spacing: -0.02em; margin-top: 4px; }
.login-sub { color: var(--ink-2); margin: -8px 0 4px !important; font-size: 15px; }
.login .fld span { font-size: 13px; color: var(--ink-2); }
.login .form-err { margin: -4px 0 0; min-height: 0; }
.login .form-err:empty { display: none; }
.login .btn { width: 100%; }
.login-foot { font-size: 12px; color: var(--muted); margin: 0 !important; text-align: center; }

/* araç dosyaları */
.plate-search { display: flex; align-items: stretch; height: 58px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; overflow: hidden; margin-bottom: 10px; transition: box-shadow .2s; }
.plate-search:focus-within { box-shadow: 0 0 0 5px var(--accent-soft); }
.plate-search .tr { width: 34px; flex: none; background: #1b46c2; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.plate-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0 16px; font-size: 22px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.plate-search input::placeholder { font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.files { display: grid; gap: 10px; }
.file { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); animation: cardIn .4s var(--ease) both; }
.file:hover { border-color: var(--ink); }
.file:active { transform: scale(.985); }
.tplate { display: inline-flex; align-items: stretch; height: 34px; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; background: #fff; font-weight: 800; font-size: 16px; letter-spacing: .05em; white-space: nowrap; }
.tplate::before { content: "TR"; width: 16px; background: #1b46c2; color: #fff; font-size: 7px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; letter-spacing: 0; }
.tplate span { padding: 0 10px; display: flex; align-items: center; }
.tplate.lg { height: 52px; font-size: 26px; border-width: 2px; border-radius: 8px; }
.tplate.lg::before { width: 24px; font-size: 10px; padding-bottom: 6px; }
.tplate.lg span { padding: 0 16px; }
.file-info { min-width: 0; }
.file-info b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-n { text-align: right; font-size: 12px; color: var(--muted); }
.file-n b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.new-hit { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; border-radius: 18px; border: 1.5px dashed var(--line-2); background: var(--surface); font-size: 14px; color: var(--ink-2); }

.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; font-weight: 600; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.car-head { padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; animation: cardIn .4s var(--ease) both; }
.car-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.car-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.car-name small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv div { padding: 12px; border-radius: 14px; background: var(--soft); min-width: 0; }
.kv small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kv b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.owner a { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.car-note { margin: 0; font-size: 14px; color: var(--ink-2); background: var(--soft); padding: 10px 12px; border-radius: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.hist { position: relative; display: grid; gap: 12px; margin-top: 18px; padding-left: 22px; }
.hist::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); border-radius: 1px; }
.rec { position: relative; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: cardIn .4s var(--ease) both; }
.rec::before { content: ""; position: absolute; left: -22px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.rec-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rec-top b { font-size: 16px; }
.rec-top span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rec ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.rec li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.rec li span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-sum { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.rec-sum b { font-size: 19px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rec-note { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); background: var(--soft); padding: 8px 12px; border-radius: 10px; }
.rec-edit { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: underline; }

.kv4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv .due { background: var(--bad-soft); }
.kv .due b { color: var(--bad); }
.link-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); }
.link-box small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.link-box .code { font-size: 18px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.link-acc { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.link-acc small { text-transform: none; letter-spacing: 0; font-size: 13px; }
.link-acc .tag button { border: 0; background: none; padding: 0 0 0 4px; font-size: 14px; color: var(--muted); }
.rec-note small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.rec-note.cust { background: #eef4ff; }
.rec-note.cust small { color: #1b46c2; }
.rec-note.staff { background: var(--warn-soft); }
.rec-note.staff small { color: #8a5a00; }
.pay-box { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft); display: grid; gap: 6px; }
.pay-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.pay-line b { font-size: 16px; font-variant-numeric: tabular-nums; }
.pay-line.sub { font-size: 13px; color: var(--ink-2); }
.pay-line.sub span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-line.due b { color: var(--bad); }
.pay-line .tag { margin-left: 6px; }
.x-mini { border: 0; background: none; padding: 0 2px; font-size: 16px; line-height: 1; color: var(--muted); }
.files-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 8px 4px 12px; background: #fff; max-width: 100%; }
.file-chip > button:first-child { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rec-actions .btn { --h: 38px; padding: 0 12px; font-size: 13px; flex: 1 1 auto; }
.rec-by { font-size: 12px; color: var(--muted); margin-top: 8px; }
.rec-by:empty { display: none; }
.pay-seg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
.file-view { border-radius: 14px; overflow: hidden; background: var(--soft); }
.file-view img { display: block; width: 100%; height: auto; }
.file-view iframe { display: block; width: 100%; height: 60vh; border: 0; }
.cust-res { display: grid; }
.note-cust textarea { border-color: #c9d8ff; }
.note-staff textarea { border-color: #f0d9a8; }
.work-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.work-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; align-items: center; }
.work-row input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 15px; }
.work-row input:focus { outline: none; border-color: var(--ink); }
.work-row .x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); font-size: 18px; color: var(--muted); }
.add-work { border: 0; background: none; font-weight: 700; font-size: 14px; padding: 6px 0; }
.sheet .fld > span { font-size: 13px; color: var(--ink-2); }
.total-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--soft); margin: 4px 0 12px; }
.total-box span { font-size: 14px; font-weight: 600; }
.total-box input { width: 150px; text-align: right; font-size: 20px; font-weight: 800; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: #fff; font-variant-numeric: tabular-nums; }

.user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row b { display: block; font-size: 15px; }
.user-row small { color: var(--muted); font-size: 13px; }
.user-row .btn { --h: 36px; padding: 0 12px; font-size: 13px; }
.tag.role { background: var(--ink); color: #fff; }

@media (max-width: 480px) {
  .kv4 { grid-template-columns: 1fr 1fr; }
  .link-box { grid-template-columns: 1fr auto; }
  .link-acc { grid-column: 1 / -1; grid-row: 2; }
  .set-card { padding: 16px 14px; }
  .set-row { gap: 10px; font-size: 14px; }
  .wk-row { grid-template-columns: 1fr; gap: 8px; }
  .wk-times { padding-left: 58px; }
  .wk-times input { flex: 1; min-width: 0; width: 100%; }
  .stepper button { width: 34px; }
  .stepper input { width: 40px; }
}
@media (max-width: 420px) {
  .kv { grid-template-columns: 1fr 1fr; }
  .kv div:last-child { grid-column: 1 / -1; }
  .kv4 div:last-child { grid-column: auto; }
  .work-row { grid-template-columns: 1fr 96px 36px; }
  .file { grid-template-columns: auto 1fr; }
  .file-n { grid-column: 1 / -1; text-align: left; display: flex; gap: 8px; }
  .file-n b { display: inline; font-size: 13px; }
}

@media (min-width: 900px) {
  .tabbar { top: 14px; bottom: auto; left: auto; right: max(16px, calc(50% - 490px)); transform: none; width: 470px; box-shadow: var(--shadow); }
  .p-head { padding-right: 490px; }
  .files { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .sheet { margin: auto; border-radius: 24px; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat-strip { grid-column: 1 / -1; min-height: 0; }
  .stat { padding: 12px; min-height: 84px; }
  .stat b { font-size: 28px; }
  .v-head h2 { font-size: 21px; }
  .pday { padding: 5px; border-radius: 10px; }
  .pday b { font-size: 13px; }
  .pday small { font-size: 9px; }
  .pcal, .pcal-week { gap: 4px; }
  .demo-flag { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
