/* DDPL Office: Digital Dhatu brand (purple #5235e0, yellow #f5b301), light, app-like on mobile. */
:root {
	--brand: #5235e0; --brand-600: #4326c4; --brand-700: #3519a8; --brand-50: #f4f1ff; --brand-100: #e7e1ff;
	--accent: #f5b301; --accent-50: #fff7df; --ink: #14122b; --body: #4a4766; --muted: #7c7896; --line: #e8e6f2; --bg: #f6f5fb; --card: #fff;
	--ok: #16a34a; --ok-50: #ecfdf3; --warn: #d97706; --warn-50: #fff7ed; --bad: #dc2626; --bad-50: #fef2f2; --info: #0284c7; --info-50: #f0f9ff;
	--r: 14px; --sh: 0 1px 2px rgba(20, 18, 43, .04), 0 6px 20px -10px rgba(20, 18, 43, .14);
	--sh-lg: 0 20px 50px -18px rgba(40, 24, 140, .35); --side: 252px; --top: 60px; --tab: 64px;
	--safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14.5px; line-height: 1.5; color: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15.5px; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* boot & auth */
.boot { min-height: 100vh; display: grid; place-items: center; gap: 18px; align-content: center; }
.boot img { height: 52px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(800px 400px at 90% -10%, #ece6ff, transparent 60%), radial-gradient(600px 300px at -10% 110%, #fff2cc, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 410px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--sh-lg); }
.auth-logo { height: 46px; display: block; margin: 0 auto 22px; }
.auth-card h1 { text-align: center; font-size: 21px; }
.auth-card > .muted { text-align: center; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; }
.verify-card { text-align: center; }
.verify-badge { display: inline-block; padding: 8px 16px; border-radius: 100px; font-weight: 700; margin-bottom: 14px; }
.verify-badge.ok { background: var(--ok-50); color: var(--ok); } .verify-badge.bad { background: var(--bad-50); color: var(--bad); }
.verify-list { text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 18px 0 0; }
.verify-list dt { color: var(--muted); } .verify-list dd { margin: 0; color: var(--ink); font-weight: 600; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; text-decoration: none; line-height: 1.2; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(82, 53, 224, .7); }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #261c00; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-ok { background: var(--ok); color: #fff; } .btn-bad { background: #fff; color: var(--bad); border-color: #f3c4c4; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.icon { width: 18px; height: 18px; flex: none; }

/* forms */
.form { display: grid; gap: 14px; }
.form label, .field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.form .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input, select, textarea { width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(82, 53, 224, .14); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
.check { display: flex !important; align-items: center; gap: 9px; font-weight: 500 !important; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--muted); cursor: pointer; }
.pw-meter { height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; }
.alert-err { background: var(--bad-50); color: #991b1b; border: 1px solid #fecaca; }
.alert-ok { background: var(--ok-50); color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.alert-warn { background: var(--warn-50); color: #9a3412; border: 1px solid #fed7aa; }

/* app layout */
.layout { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.side-logo { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.side-logo img { height: 36px; display: block; }
.side-logo small { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--body); font-weight: 500; position: relative; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav a .icon { width: 19px; height: 19px; }
.nav .badge { margin-left: auto; }
.side-me { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.side-me:hover { background: var(--bg); }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 22px; }
.top-title { font-size: 17px; font-weight: 700; color: var(--ink); min-width: 0; }
.top-logo { display: none; height: 30px; }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: none; border: 0; cursor: pointer; }
.top-btn:hover { background: var(--bg); }
.top-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.page { padding: 22px; max-width: 1240px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-bottom: 8px; cursor: pointer; }
.tabbar { display: none; }

/* cards & tiles */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card, .cards > *, .cols2 > *, .cols3 > *, .detail-grid > *, .editor > * { min-width: 0; }
.row > input, .row > select { min-width: 0; flex: 1 1 140px; }
.card-head h2, .card-head h3 { margin: 0; }
.cards { display: grid; gap: 16px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); cursor: default; }
a.tile, .tile.link { cursor: pointer; color: inherit; transition: transform .15s, border-color .15s; }
a.tile:hover, .tile.link:hover { transform: translateY(-2px); border-color: var(--brand-100); }
.tile-n { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.02em; }
.tile-l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 10px; }
.tile.warn .tile-ico { background: var(--warn-50); color: var(--warn); } .tile.bad .tile-ico { background: var(--bad-50); color: var(--bad); } .tile.ok .tile-ico { background: var(--ok-50); color: var(--ok); }
.hello { background: linear-gradient(120deg, var(--brand-700), var(--brand) 60%, #6d52f0); color: #fff; border: 0; position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -80px; top: -150px; background: radial-gradient(circle, rgba(245, 179, 1, .4), transparent 65%); }
.hello h1 { color: #fff; } .hello p { color: rgba(255, 255, 255, .85); margin: 0; }
.hello .btn-light { border: 0; }
.progress { height: 8px; background: var(--brand-50); border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7b62f3); border-radius: 6px; }

/* lists */
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; color: inherit; }
.li:last-child { border-bottom: 0; }
.li:hover { background: #fbfaff; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.task:hover { border-color: var(--brand-100); box-shadow: var(--sh); }
.task + .task { margin-top: 10px; }
.task-bar { width: 4px; border-radius: 4px; background: var(--line); flex: none; }
.task.p-high .task-bar { background: var(--warn); } .task.p-urgent .task-bar { background: var(--bad); } .task.p-normal .task-bar { background: var(--brand-100); }
.task.st-approved .task-bar { background: var(--ok); }
.task-title { font-weight: 600; color: var(--ink); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); margin-top: 6px; align-items: center; }
.task.st-approved .task-title { color: var(--muted); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--brand-100); margin-bottom: 8px; }

/* badges & chips */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 600; background: var(--bg); color: var(--body); white-space: nowrap; }
.badge-brand { background: var(--brand-50); color: var(--brand); } .badge-ok { background: var(--ok-50); color: var(--ok); }
.badge-warn { background: var(--warn-50); color: var(--warn); } .badge-bad { background: var(--bad-50); color: var(--bad); }
.badge-info { background: var(--info-50); color: var(--info); } .badge-accent { background: var(--accent-50); color: #8a6200; }
.badge-count { background: var(--bad); color: #fff; min-width: 20px; justify-content: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 100px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--body); cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick label { display: inline-flex !important; }
.daypick input { display: none; }
.daypick span { width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; cursor: pointer; background: #fff; }
.daypick input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--body); padding: 7px 13px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* avatars */
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13.5px; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 30px; height: 30px; font-size: 11.5px; } .av-lg { width: 64px; height: 64px; font-size: 22px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; background: #faf9fd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: #fbfaff; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }

/* modal / sheet */
.overlay { position: fixed; inset: 0; background: rgba(20, 18, 43, .45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--sh-lg); animation: pop .18s ease-out; }
.modal.wide { max-width: 860px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; flex: 1; font-size: 17px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.x { background: none; border: 0; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.x:hover { background: var(--bg); color: var(--ink); }
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 500; box-shadow: var(--sh-lg); animation: pop .2s; }
.toast.err { background: var(--bad); } .toast.ok { background: #14532d; }

/* today popup */
.today-hero { text-align: center; padding: 6px 0 14px; }
.today-hero .big { font-size: 44px; font-weight: 800; color: var(--brand); line-height: 1; }

/* task detail */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); font-weight: 500; }
.desc { white-space: pre-wrap; color: var(--ink); }
.timeline { display: grid; gap: 12px; }
.tl { display: flex; gap: 10px; }
.tl-body { background: var(--bg); border-radius: 12px; padding: 10px 12px; flex: 1; min-width: 0; }
.tl-body .desc { font-size: 13.5px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); background: #fff; max-width: 100%; }

/* chat */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - var(--top) - 44px); border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; box-shadow: var(--sh); }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list .li { padding: 12px 14px; }
.chat-list .li.on { background: var(--brand-50); }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 6px; background: #fbfaff; }
.msg { max-width: 72%; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--line); color: var(--ink); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.msg time { display: block; font-size: 10.5px; opacity: .65; margin-top: 3px; text-align: right; }
.msg a { color: inherit; text-decoration: underline; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; margin: 8px 0; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 140px; border-radius: 12px; resize: none; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }

/* documents */
.doc-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.doc-type { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; color: inherit; transition: border-color .15s, transform .15s; }
.doc-type:hover { border-color: var(--brand); transform: translateY(-2px); }
.doc-type b { display: block; color: var(--ink); font-size: 14px; }
.doc-type small { color: var(--muted); font-size: 12px; }
.doc-code { width: 44px; height: 44px; border-radius: 11px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.doc-type.fin .doc-code { background: var(--accent-50); color: #8a6200; } .doc-type.cert .doc-code { background: var(--ok-50); color: var(--ok); }
.editor { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 18px; align-items: start; }
.editor-form { position: sticky; top: calc(var(--top) + 14px); max-height: calc(100vh - var(--top) - 30px); overflow-y: auto; }
.preview-wrap { background: #e9e7f3; border-radius: var(--r); padding: 18px; overflow: auto; }
.preview-scale { transform-origin: top left; }
.items-edit { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 70px 100px 32px; gap: 6px; align-items: start; }
.item-row textarea { min-height: 40px; }
.item-row input, .item-row textarea { padding: 8px 9px; font-size: 13.5px; }
.sig-thumb { height: 46px; max-width: 160px; object-fit: contain; background: repeating-conic-gradient(#f3f2f8 0 25%, #fff 0 50%) 0 0 / 12px 12px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 6px 0 -4px; }

/* install prompt / push banner */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-50); border: 1px solid #fde68a; margin-bottom: 16px; }
.banner .icon { color: #a16207; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.tiles { grid-template-columns: repeat(2, 1fr); }
	.editor { grid-template-columns: 1fr; }
	.editor-form { position: static; max-height: none; }
	.detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.side { display: none; }
	.main { margin-left: 0; padding-bottom: calc(var(--tab) + var(--safe-b)); }
	.top { padding: 0 12px; }
	.top-logo { display: block; }
	.top-title { font-size: 16px; }
	.page { padding: 16px 14px; }
	.cols2, .cols3 { grid-template-columns: 1fr; }
	.tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); }
	.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
	.tabbar a.on { color: var(--brand); }
	.tabbar a .icon { width: 23px; height: 23px; }
	.tabbar .dot { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
	.chat { grid-template-columns: 1fr; height: calc(100vh - var(--top) - var(--tab) - var(--safe-b) - 32px); }
	.chat.has-pane .chat-list { display: none; }
	.chat:not(.has-pane) .chat-pane { display: none; }
	.msg { max-width: 86%; }
	.overlay { align-items: flex-end; padding: 0; }
	.modal { border-radius: 20px 20px 0 0; max-height: 92vh; animation: up .22s ease-out; }
	@keyframes up { from { transform: translateY(40px); opacity: .4; } }
	.modal-foot { padding-bottom: calc(14px + var(--safe-b)); }
	.modal-foot .btn { flex: 1; }
	.toast-wrap { bottom: calc(var(--tab) + 16px + var(--safe-b)); }
	.d-only { display: none !important; }
}
@media (min-width: 861px) { .m-only { display: none !important; } }
@media (max-width: 560px) {
	.grid2, .grid3 { grid-template-columns: 1fr; }
	.tiles { gap: 10px; }
	.tile { padding: 13px; }
	.tile-n { font-size: 24px; }
	.item-row { grid-template-columns: 1fr 56px 84px 30px; }
	.page-head .btn { flex: 1; }
	.auth-card { padding: 26px 20px; }
}

/* ---------- clients & work proof ---------- */
.client-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--accent-50); color: #7a5600; font-weight: 600; font-size: 11.5px; }
.client-chip .icon { width: 13px; height: 13px; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.client-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: inherit; box-shadow: var(--sh); transition: border-color .15s, transform .15s; min-width: 0; }
.client-card:hover { border-color: var(--brand-100); transform: translateY(-1px); }
.client-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.shots img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--bg); }
.shot-drop { display: flex !important; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 1.5px dashed var(--brand-100); border-radius: 12px; background: var(--brand-50); color: var(--brand); font-weight: 600 !important; cursor: pointer; text-align: center; }
input[list]::-webkit-calendar-picker-indicator { opacity: .5; }

/* ---------- premium mobile ---------- */
@media (max-width: 860px) {
	body { font-size: 14px; background: #f5f4fa; }
	h1 { font-size: 18px; } h2 { font-size: 15.5px; } h3 { font-size: 14.5px; }
	.top { height: 54px; padding: 0 8px 0 14px; background: rgba(255, 255, 255, .96); }
	.top-title { display: block !important; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
	.top-logo { display: none; height: 26px; }
	body.is-home .top-logo { display: block; }
	body.is-home .top-title { display: none !important; }
	.top-btn { width: 38px; height: 38px; }
	.page { padding: 12px 12px 18px; }
	.page-head { margin-bottom: 12px; gap: 8px; }
	.page-head > div:first-child h1 { display: none; }
	.page-head p { font-size: 12.5px; margin: 0; }
	.page-head .row { width: 100%; gap: 8px; }
	.page-head .btn { flex: 1; }
	.back { font-size: 13px; margin-bottom: 6px; }
	.card { padding: 14px; border-radius: 16px; box-shadow: 0 1px 2px rgba(20, 18, 43, .04); }
	.card + .card, .cards { gap: 12px; }
	.card-head { margin-bottom: 10px; }
	.cols2, .cols3, .cards { gap: 12px; }
	.tiles { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
	.tile { padding: 11px 12px; border-radius: 14px; box-shadow: none; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
	.tile-ico { width: 30px; height: 30px; border-radius: 9px; margin: 0; grid-row: span 2; }
	.tile-ico .icon { width: 16px; height: 16px; }
	.tile-n { font-size: 18px; line-height: 1.15; }
	.tile-l { font-size: 11px; margin-top: 1px; line-height: 1.3; }
	.hello { padding: 14px 16px; }
	.hello h1 { font-size: 17px; margin-bottom: 2px; }
	.hello p { font-size: 12.5px; }
	.hello .btn { padding: 8px 12px; font-size: 13px; width: 100%; margin-top: 10px; }
	.btn { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }
	.btn-lg { padding: 11px 16px; font-size: 14px; }
	.btn-sm { padding: 6px 10px; font-size: 12.5px; }
	.btn-icon { width: 36px; height: 36px; }
	input, select, textarea { font-size: 16px; padding: 9px 11px; border-radius: 10px; }
	.form { gap: 12px; }
	.form label, .field { font-size: 12.5px; gap: 5px; }
	.task { padding: 11px 12px; border-radius: 13px; gap: 10px; }
	.task + .task { margin-top: 8px; }
	.task-title { font-size: 14px; }
	.task-meta { font-size: 11.5px; gap: 4px 10px; margin-top: 5px; }
	.task-meta .icon { width: 13px; height: 13px; }
	.badge { font-size: 10.5px; padding: 2px 8px; }
	.chip { padding: 6px 12px; font-size: 12.5px; }
	.chip-scroll { margin: 0 -12px 12px; padding: 0 12px 2px; }
	.li { padding: 10px 2px; gap: 10px; }
	.li-title { font-size: 14px; }
	.li-sub { font-size: 12px; }
	.av { width: 34px; height: 34px; font-size: 12.5px; }
	.av-sm { width: 28px; height: 28px; font-size: 11px; }
	.av-lg { width: 54px; height: 54px; font-size: 19px; }
	.kv { font-size: 13px; gap: 7px 12px; }
	.t { font-size: 12.5px; }
	.t th { font-size: 10.5px; padding: 9px 10px; }
	.t td { padding: 9px 10px; }
	.alert { font-size: 12.5px; padding: 9px 12px; }
	.banner { padding: 10px 12px; gap: 10px; font-size: 13px; }
	.seg button { padding: 6px 10px; font-size: 12.5px; }
	.empty { padding: 18px 12px; font-size: 13px; }
	.empty .icon { width: 26px; height: 26px; margin-bottom: 4px; }
	.empty p { margin: 0 0 6px; }
	.client-grid { grid-template-columns: 1fr; gap: 8px; }
	.prof-head > .grow { flex: 1 1 calc(100% - 70px); }
	.prof-head > .row { flex: 1 1 100%; }
	.prof-head > .row .btn { flex: 1; }
	.prof-head h1 { font-size: 18px !important; }
	.client-card { padding: 11px 12px; box-shadow: none; }
	.doc-types { grid-template-columns: 1fr 1fr; gap: 8px; }
	.doc-type { padding: 10px; gap: 9px; border-radius: 12px; }
	.doc-type b { font-size: 12.5px; line-height: 1.3; }
	.doc-type small { display: none; }
	.doc-code { width: 34px; height: 34px; font-size: 10.5px; border-radius: 9px; }
	.section-title { font-size: 11px; }
	.preview-wrap { padding: 8px; border-radius: 14px; }
	.shots { grid-template-columns: repeat(4, 1fr); gap: 6px; }
	/* bottom tab bar with pill indicator */
	.tabbar { height: calc(60px + var(--safe-b)); box-shadow: 0 -6px 20px -14px rgba(20, 18, 43, .25); border-top-color: #eeedf5; }
	.tabbar a { font-size: 10.5px; gap: 2px; }
	.tabbar a .icon { width: 22px; height: 22px; padding: 0; }
	.tabbar a::before { content: ""; position: absolute; top: 6px; width: 50px; height: 30px; border-radius: 15px; background: transparent; transition: background .2s; z-index: -1; }
	.tabbar a { z-index: 0; }
	.tabbar a.on::before { background: var(--brand-50); }
	.tabbar a.on .icon { stroke-width: 2.4; }
	.main { padding-bottom: calc(60px + var(--safe-b)); }
	/* bottom sheets */
	.modal { border-radius: 22px 22px 0 0; }
	.modal::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 4px; background: #d9d6e8; margin: 8px auto 0; }
	.modal-head { padding: 8px 14px 10px; border-bottom: 0; }
	.modal-head h2 { font-size: 16px; }
	.modal-body { padding: 4px 16px 14px; }
	.modal-foot { padding: 10px 14px calc(10px + var(--safe-b)); gap: 8px; }
	.chat { height: calc(100vh - 54px - 60px - var(--safe-b) - 24px); border-radius: 16px; }
	.msg { font-size: 14px; padding: 8px 12px; }
	.daypick span { width: 38px; height: 34px; font-size: 12.5px; }
	.toast-wrap { bottom: calc(72px + var(--safe-b)); }
	.toast { font-size: 13px; padding: 10px 14px; }
}