:root {
    --bg: #F3F3F0;
    --bg-soft: #FBFBF9;
    --surface: #FFFFFF;
    --text: #101211;
    --muted: #5D6259;
    --muted-2: #83887F;
    --muted-3: #9A9E95;
    --muted-4: #A9ADA3;
    --border: #E1E1DB;
    --border-soft: #EFEFEA;
    --border-line: #EDEDE8;
    --accent: #17603F;
    --accent-hover: #0E3F29;
    --accent-soft: #E7EEE9;
    --danger: #A33A2A;
    --chip: #EFEFEA;
    --track: #E7E7E2;
    --radius: 3px;
    --radius-sm: 2px;
    --font: 'Space Grotesk', Helvetica, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --sidebar-w: 232px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --tabbar-h: 72px;
}

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

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

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    min-height: 100%;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-2); }
.muted-3 { color: var(--muted-3); }
.danger { color: var(--danger); }
.accent { color: var(--accent); }
.uppercase {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: .13em;
}

/* ===== App shell ===== */
.app-shell {
    min-height: 100dvh;
    display: flex;
    background: var(--bg);
}

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    border-right: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 0;
    height: 100dvh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    color: inherit;
}

.brand:hover { color: inherit; }

.brand-mark {
    width: 26px;
    height: 26px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    flex: none;
}

.brand-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.brand-text small {
    display: block;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .12em;
    color: var(--muted-3);
    text-transform: uppercase;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .14em;
    color: var(--muted-4);
    text-transform: uppercase;
    padding: 16px 10px 6px;
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
}

.side-link:hover {
    background: #EFEFEA;
    color: var(--text);
}

.side-link.is-active {
    background: var(--text);
    color: #FBFBF9;
    font-weight: 500;
}

.side-link .count {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-4);
}

.side-link.is-active .count { color: #C0C4BA; }

.wallet-card {
    margin-top: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
}

.wallet-card .label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wallet-card .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.wallet-card .amount {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.wallet-card .meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted-2);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    flex: none;
}

.user-chip .name { font-size: 12.5px; font-weight: 500; line-height: 1.25; }
.user-chip .role {
    font-family: var(--mono);
    font-size: 9.5px;
    color: var(--muted-3);
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.main-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 36px;
    border-bottom: 1px solid var(--border);
}

.main-header .crumb {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted-3);
    display: block;
    margin-bottom: 6px;
}

.main-header h1 {
    margin: 0;
    font-size: 29px;
    font-weight: 600;
    letter-spacing: -.025em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.rate-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
}

.rate-pill .k { color: var(--muted-3); }
.rate-pill .v { color: var(--text); font-variant-numeric: tabular-nums; }

.main-body {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
}

.mobile-top {
    display: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--text);
    color: #FBFBF9;
}
.btn-primary:hover { background: var(--accent); color: #FBFBF9; }

.btn-accent {
    background: var(--accent);
    color: #FBFBF9;
}
.btn-accent:hover { background: var(--accent-hover); color: #FBFBF9; }

.btn-ghost {
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid #E8C9C4;
}
.btn-danger:hover { background: #FBF1EF; }

.btn-sm { padding: 6px 12px; font-size: 11px; font-family: var(--mono); }
.btn-block { width: 100%; }

/* ===== KPI strip ===== */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.kpi {
    padding: 26px 24px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    min-width: 0;
}
.kpi:last-child { border-right: 0; }
.kpi.is-accent { background: var(--bg-soft); }

.kpi-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.kpi-value {
    font-family: var(--mono);
    font-size: clamp(21px, 2.2vw, 31px);
    font-weight: 500;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-value.is-green { color: var(--accent); }
.kpi-value.is-red { color: var(--danger); }

.kpi-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 16px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
}

.kpi-hint::before {
    content: '';
    display: inline-block;
    flex: none;
    width: 18px;
    height: 1px;
    background: #C9CCC3;
}

/* ===== Cards / panels ===== */
.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.panel-soft { background: var(--bg-soft); }

.panel-pad { padding: 20px; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.section-head .meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-3);
}

.section-head .meta.accent { color: var(--accent); }
.section-head .meta.danger { color: var(--danger); }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    align-items: start;
}

.object-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.object-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: border-color .15s ease;
}
.object-card:hover { border-color: var(--text); }

.object-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.object-addr {
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--text);
    text-wrap: pretty;
}
.object-addr:hover { color: var(--accent); }

.object-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-3);
    margin-top: 5px;
}

.badge {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    background: var(--chip);
    color: var(--muted);
}
.badge-ok { background: var(--accent-soft); color: var(--accent); }
.badge-warn { background: var(--chip); color: var(--muted); }
.badge-off { background: #FBF1EF; color: var(--danger); }

.cat-material { background: #E8F0EA; color: #17603F; }
.cat-usta { background: #EEF1F8; color: #3A4A7A; }
.cat-elektrika { background: #F7F0D8; color: #7A5B12; }
.cat-santexnika { background: #E7F3F6; color: #1F5F6B; }
.cat-iqlim { background: #F3EAF6; color: #6B3D78; }
.cat-otdelka { background: #F6EDE6; color: #7A4A28; }
.cat-chiqindi { background: #F1F1EC; color: #5C5C54; }
.cat-boshqa { background: var(--chip); color: var(--muted); }

.progress {
    height: 4px;
    background: var(--border-line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
}
.progress > span {
    display: block;
    height: 100%;
    background: var(--accent);
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted-2);
    margin-top: 7px;
}

.stat-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    border-top: 1px solid var(--border-line);
    padding-top: 16px;
}

.stat-pair .lab {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted-3);
    display: block;
    margin-bottom: 4px;
}

.stat-pair .val {
    font-family: var(--mono);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== Tables ===== */
.data-table {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.data-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.table th {
    text-align: left;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted-2);
    font-weight: 400;
}

.table td {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    font-size: 13.5px;
}

.table tr:hover td { background: var(--bg-soft); }

.table .num {
    font-family: var(--mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.table .right { text-align: right; }

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    gap: 12px;
}

.pager-actions { display: flex; gap: 6px; }

/* ===== Lists / tx ===== */
.tx-list { display: flex; flex-direction: column; }
.tx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--border-soft);
}
.tx-item:first-child { border-top: 0; }
.tx-title { font-size: 12.5px; font-weight: 500; }
.tx-meta { font-family: var(--mono); font-size: 10px; color: var(--muted-3); margin-top: 3px; }
.tx-amount {
    font-family: var(--mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-row-top {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}
.bar-track {
    height: 3px;
    background: var(--track);
    display: flex;
}
.bar-track > span {
    display: block;
    height: 100%;
    background: var(--text);
}

/* ===== Forms ===== */
.form-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 28px;
}

.form-card h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    padding: 11px 12px;
    outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--text);
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235D6259' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted-3);
}

.kurs-field { display: none; }
.kurs-field.show { display: block; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: var(--bg-soft);
    font-size: 13px;
}

/* ===== Filters ===== */
.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
}
.chip:hover,
.chip.is-active {
    border-color: var(--text);
    color: var(--text);
}

.search-pill {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    min-width: 220px;
    color: var(--muted-3);
    font-size: 13px;
}
.search-pill .slash {
    font-family: var(--mono);
    font-size: 12px;
    color: #C0C4BA;
}

/* ===== Alerts / empty ===== */
.alert {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 13.5px;
    font-weight: 500;
}
.alert-success { background: var(--accent-soft); color: var(--accent); border-color: #C9DDD1; }
.alert-error { background: #FBF1EF; color: var(--danger); border-color: #E8C9C4; }

.empty {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    color: var(--muted-2);
    background: var(--bg-soft);
}
.empty h3 { color: var(--text); margin-bottom: 8px; font-size: 16px; }
.empty p { margin-bottom: 16px; font-size: 13.5px; }

.actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    font-size: 12px;
}
.icon-btn:hover { border-color: var(--text); color: var(--text); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.inline-form { display: inline-flex; margin: 0; }

.status-form {
    border-top: 1px solid var(--border-line);
    padding-top: 14px;
    display: grid;
    gap: 10px;
}
.status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sold-price-input { display: none; }
.sold-price-input.show { display: block; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}
.tab-btn.active { background: var(--text); color: #FBFBF9; border-color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Login ===== */
.auth-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 36px 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-brand h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-brand p {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-3);
}

/* ===== Mobile tabbar / sheets ===== */
.tabbar { display: none; }
.more-sheet,
.install-modal { display: none; }

.more-sheet:not([hidden]),
.install-modal:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 300;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(16, 18, 17, .35);
}

.sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    padding: 10px 16px calc(20px + var(--safe-bottom));
}

.sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--track);
    margin: 4px auto 14px;
}

.sheet-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sheet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 2px;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
}
.sheet-link.danger { color: var(--danger); }

.install-card {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.install-card h2 { font-size: 18px; margin: 12px 0 8px; }
.install-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.install-card ol { padding-left: 18px; margin-bottom: 18px; color: var(--text); line-height: 1.55; font-size: 13.5px; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .sidebar { display: none; }

    .app-shell {
        flex-direction: column;
        padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
    }

    .main { background: transparent; }

    .mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px 10px;
        padding-top: calc(14px + var(--safe-top));
        gap: 12px;
    }

    .mobile-top .titles .crumb {
        font-family: var(--mono);
        font-size: 9.5px;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--muted-3);
    }

    .mobile-top .titles .title {
        font-size: 22px;
        font-weight: 600;
        letter-spacing: -.02em;
    }

    .main-header { display: none; }

    .main-body {
        padding: 0 20px 24px;
        gap: 14px;
    }

    .kpi-strip {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .kpi {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 14px;
        gap: 8px;
    }
    .kpi:last-child { border-right: 1px solid var(--border); }
    .kpi-value { font-size: 19px; }
    .kpi-hint { display: none; }

    .grid-2 { grid-template-columns: 1fr; gap: 14px; }
    .object-grid { grid-template-columns: 1fr; gap: 10px; }
    .object-card { padding: 16px; gap: 12px; }

    .form-card { padding: 18px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }

    .header-actions-mobile {
        display: flex;
        gap: 8px;
        margin-bottom: 4px;
    }

    .tabbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        border-top: 1px solid var(--border);
        background: var(--bg-soft);
        padding: 10px 12px calc(10px + var(--safe-bottom));
        gap: 4px;
    }

    .tab-item {
        background: transparent;
        border: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 8px 0;
        min-height: 48px;
        cursor: pointer;
        font-family: var(--font);
        text-decoration: none;
        color: var(--muted-3);
    }

    .tab-item .icon {
        width: 16px;
        height: 16px;
        border-radius: var(--radius-sm);
        border: 1.5px solid currentColor;
        background: transparent;
    }

    .tab-item.is-active { color: var(--text); }
    .tab-item.is-active .icon {
        background: var(--accent);
        border-color: var(--accent);
    }

    .tab-item span.label { font-size: 10.5px; }

    .filter-row { flex-wrap: nowrap; overflow-x: auto; }
    .search-pill { display: none; }
}

@media (min-width: 981px) {
    .tabbar,
    .header-actions-mobile { display: none !important; }
}
