:root {
    --bg: #f7f7f8;
    --ink: #17191d;
    --muted: #6b7280;
    --muted-2: #9aa3b2;
    --panel: #ffffff;
    --panel-soft: #f7f9fc;
    --line: #dde2ea;
    --line-strong: #cfd6df;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eaf2ff;
    --green: #059669;
    --green-soft: #e8fbf2;
    --purple: #7c3aed;
    --purple-soft: #f2edff;
    --red: #dc2626;
    --red-soft: #fff1f2;
    --amber: #d97706;
    --amber-soft: #fff7e6;
    --shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    font-optical-sizing: auto;
    font-size: 16px;
    letter-spacing: 0;
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.app-frame {
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 14px;
    grid-template-columns: auto 1fr minmax(220px, 280px) auto;
    left: 0;
    padding: 14px 28px;
    position: sticky;
    right: 0;
    top: 0;
    z-index: 30;
}

.brand {
    align-items: center;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 800;
    gap: 10px;
    line-height: 1;
    white-space: nowrap;
}

.brand::before {
    background: var(--blue);
    border-radius: 8px;
    content: "";
    display: inline-block;
    height: 28px;
    width: 28px;
}

.desktop-nav {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: center;
}

.topbar-project {
    justify-self: end;
    min-width: 220px;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-self: end;
}

.logout-form {
    margin: 0;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    gap: 9px;
    list-style: none;
    min-height: 44px;
    padding: 5px 11px 5px 6px;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-menu summary:hover,
.profile-menu[open] summary {
    border-color: var(--line-strong);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.profile-menu-avatar {
    align-items: center;
    background: var(--blue-soft);
    border-radius: 999px;
    color: var(--blue);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 850;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.profile-menu-email {
    color: var(--ink);
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 800;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu summary i {
    color: var(--muted);
    font-size: 0.72rem;
}

.profile-menu-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: none;
    gap: 8px;
    min-width: 250px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: 52px;
    z-index: 60;
}

.profile-menu[open] .profile-menu-panel {
    display: grid;
}

.profile-menu-user {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 3px;
    padding: 8px 10px 12px;
}

.profile-menu-user strong {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.profile-menu-user span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.profile-menu-action {
    align-items: center;
    background: transparent;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    min-height: 42px;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.profile-menu-action:hover {
    background: var(--panel-soft);
}

.project-picker {
    display: grid;
    gap: 6px;
    width: 100%;
}

.project-switcher-panel {
    display: grid;
    gap: 14px;
    margin: 0 0 18px;
}

.project-picker.compact label {
    margin: 0;
}

.project-picker select {
    min-height: 44px;
}

.desktop-nav a {
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 10px 14px;
}

.desktop-nav a.active,
.desktop-nav a:hover {
    background: var(--blue);
    color: white;
}

.quick-add {
    position: relative;
}

.quick-add summary,
.add-button,
.primary-link,
.primary-action,
.small-action,
.search-bar button,
.compact-filter button,
.contact-actions a,
.contact-actions button,
.action-grid a,
.action-grid button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 44px;
    padding: 10px 17px;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    white-space: nowrap;
}

.quick-add summary,
.add-button,
.primary-link,
.primary-action {
    background: var(--blue);
    color: white;
}

.quick-add summary:hover,
.add-button:hover,
.primary-link:hover,
.primary-action:hover {
    background: var(--blue-dark);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.quick-add summary {
    list-style: none;
}

.quick-add summary::-webkit-details-marker {
    display: none;
}

.add-button,
.header-add {
    gap: 8px;
}

.dashboard-actions {
    align-items: center;
    display: flex;
    gap: 14px;
}

.icon-button {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.notification-button i {
    font-size: 1.16rem;
}

.header-add i,
.add-button i {
    font-size: 0.95em;
}

.quick-add nav {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 4px;
    min-width: 220px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: 52px;
}

.quick-add nav a,
.menu-list a,
.menu-form button {
    border-radius: 8px;
    padding: 12px;
}

.quick-add nav a:hover,
.menu-list a:hover,
.menu-form button:hover {
    background: var(--panel-soft);
}

.messages {
    margin: 0 auto;
    max-width: 1180px;
    padding: 14px 20px 0;
}

.messages p {
    background: var(--green-soft);
    border: 1px solid #b8ebd1;
    border-radius: 8px;
    color: #047857;
    font-weight: 800;
    margin: 0;
    padding: 12px 14px;
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 30px 24px 54px;
}

.page-header {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 0 0 24px;
}

.page-title-stack {
    min-width: 0;
}

.page-kicker {
    color: var(--muted);
    display: block;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
    margin-top: 4px;
    order: 2;
}

.page-header h1 {
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 850;
    line-height: 1.02;
    margin: 0;
}

h2 {
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 30px 0 14px;
}

.metric-grid,
.vendor-grid,
.item-list,
.menu-list,
.split-list {
    display: grid;
    gap: 18px;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.menu-form {
    margin: 0;
}

.menu-form button {
    color: inherit;
    cursor: pointer;
    display: block;
    text-align: left;
    width: 100%;
}

.summary-strip,
.metric-card,
.row-card,
.folder-card,
.vendor-card,
.form-panel,
.summary-list,
.warnings,
.progress-section,
.note-block,
.menu-list a,
.menu-form button,
.location-preview,
.record-section,
.record-table,
.search-bar,
.compact-filter,
.profile-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-card {
    display: grid;
    gap: 14px;
    min-height: 142px;
    min-width: 0;
    padding: 22px;
}

.metric-card span,
.summary-strip span,
.summary-list span,
.row-card span,
.vendor-card span,
.folder-card span,
.menu-list span,
.menu-form span,
small {
    color: var(--muted);
    display: block;
    font-size: 0.96rem;
    line-height: 1.35;
}

.metric-card span::before {
    background: var(--blue);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 10px;
    margin-right: 10px;
    vertical-align: 1px;
    width: 10px;
}

.metric-card.paid span::before {
    background: var(--green);
}

.metric-card.future span::before {
    background: var(--blue);
}

.metric-card.shortage span::before {
    background: var(--red);
}

.metric-card strong {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.summary-strip {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 22px;
    overflow: hidden;
}

.summary-strip.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-strip div {
    border-right: 1px solid var(--line);
    min-width: 0;
    padding: 22px 26px;
}

.summary-strip div:last-child {
    border-right: 0;
}

.summary-strip strong {
    display: block;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.progress-section {
    padding: 24px 28px;
}

.progress-row,
.summary-list div,
.record-row,
.vendor-card-header,
.vendor-quote-row,
.card-top,
.profile-card {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.progress-row span {
    color: var(--muted);
    font-size: 1.05rem;
}

.progress-row strong {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.progress-track {
    background: #e6ebf2;
    border-radius: 999px;
    height: 20px;
    margin-top: 18px;
    overflow: hidden;
}

.progress-fill {
    background: var(--green);
    display: block;
    height: 100%;
}

.progress-fill.warning {
    background: var(--amber);
}

.progress-fill.danger {
    background: var(--red);
}

.progress-track.over-budget {
    display: flex;
}

.progress-track.over-budget .progress-fill {
    background: var(--green);
    flex: 1 1 auto;
    width: auto !important;
}

.progress-overfill {
    background: var(--red);
    display: block;
    flex: 0 0 32px;
    height: 100%;
}

.progress-legend {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.progress-legend strong {
    color: var(--green);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.2;
}

.progress-legend .danger-text {
    color: var(--red);
}

.summary-list {
    display: grid;
    margin-top: 18px;
    overflow: hidden;
}

.summary-list div {
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
}

.summary-list div:last-child {
    border-bottom: 0;
}

.summary-list.single {
    margin-bottom: 18px;
}

.warnings {
    background: transparent;
    border: 0;
    display: grid;
    gap: 14px;
}

.warnings > p {
    background: var(--red-soft);
    border: 1px solid #fecdd3;
    border-radius: 8px;
    color: #8f1d1d;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0;
    padding: 20px 22px;
}

.warnings > p:nth-child(3) {
    background: var(--amber-soft);
    border-color: #fde68a;
    color: #92400e;
}

.warning-card {
    align-items: center;
    background: var(--red-soft);
    border: 1px solid #ffa5aa;
    border-radius: 14px;
    color: #9f1d20;
    display: grid;
    gap: 14px;
    grid-template-columns: 30px minmax(0, 1fr);
    margin: 0;
    min-height: 80px;
    padding: 16px;
}

.warning-card p {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.warning-icon {
    align-items: center;
    align-self: center;
    background: var(--red);
    border-radius: 999px;
    color: white;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.warning-icon i {
    font-size: 0.82rem;
}

.warning-card.amber {
    background: #fffaf0;
    border-color: #ffd45a;
    color: #9a4b00;
}

.warning-card.amber .warning-icon {
    background: #f59e0b;
}

.reminder-panel {
    background: #ecfeff;
    border: 1px solid #67e8f9;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.12);
    display: grid;
    gap: 14px;
    margin: 0 0 24px;
    padding: 18px;
}

.reminder-panel-header {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.reminder-panel-icon,
.reminder-alert-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.reminder-panel-icon {
    background: #0891b2;
    color: white;
    height: 42px;
    width: 42px;
}

.reminder-panel-header h2 {
    color: #164e63;
    font-size: 1.22rem;
    font-weight: 850;
    line-height: 1.16;
    margin: 0;
}

.reminder-panel-header > div > span {
    color: #155e75;
    display: block;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.3;
    margin-top: 4px;
}

.reminder-panel-link {
    align-items: center;
    background: white;
    border: 1px solid rgba(8, 145, 178, 0.22);
    border-radius: 999px;
    color: #0e7490;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    padding: 10px 14px;
    white-space: nowrap;
}

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

.reminder-alert {
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(8, 145, 178, 0.22);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 64px;
    padding: 12px;
}

.reminder-alert:hover,
.reminder-panel-link:hover {
    box-shadow: 0 8px 18px rgba(8, 145, 178, 0.14);
    transform: translateY(-1px);
}

.reminder-alert-icon {
    background: #cffafe;
    color: #0e7490;
    height: 36px;
    width: 36px;
}

.reminder-alert-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.reminder-alert-main strong {
    color: #0f172a;
    display: block;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.reminder-alert-main span {
    color: #155e75;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.25;
}

.reminder-empty {
    background: rgba(255, 255, 255, 0.74);
    border: 1px dashed rgba(8, 145, 178, 0.28);
    color: #155e75;
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px;
}

.paid-text,
.received {
    color: var(--green);
}

.future-text {
    color: var(--blue);
}

.expected {
    color: var(--purple);
}

.danger-text {
    color: var(--red);
}

.record-section {
    padding: 18px;
}

.section-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 14px;
}

.section-header h2 {
    margin: 0;
}

.record-table {
    display: grid;
    overflow: hidden;
}

.row-card,
.folder-card {
    align-items: center;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 86px;
    min-width: 0;
    padding: 18px 22px;
}

.row-card.expense-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.record-table .row-card:last-child {
    border-bottom: 0;
}

.row-card:hover,
.folder-card:hover,
.vendor-card:hover,
.menu-list a:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.record-main,
.row-card > div,
.folder-card > div {
    min-width: 0;
}

.row-card strong,
.vendor-card strong,
.folder-card strong,
.menu-list strong,
.profile-card strong {
    color: var(--ink);
    display: block;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.22;
}

.amount-stack,
.row-actions {
    align-items: flex-end;
    display: grid;
    gap: 8px;
    justify-items: end;
    min-width: max-content;
    text-align: right;
}

.amount-stack b {
    font-size: 1.2rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    white-space: nowrap;
}

.stage-preview {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.stage-preview-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stage-preview span {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.3;
}

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

.inline-form .small-action {
    min-height: 36px;
}

.small-action,
.search-bar button,
.compact-filter button,
.contact-actions a,
.contact-actions button,
.action-grid a,
.action-grid button {
    background: var(--blue-soft);
    border-color: #bfdbfe;
    color: var(--blue);
    min-height: 40px;
    padding: 8px 15px;
}

.small-action:hover,
.search-bar button:hover,
.compact-filter button:hover,
.contact-actions a:hover,
.contact-actions button:hover,
.action-grid a:hover,
.action-grid button:hover {
    background: #dbeafe;
}

.warning-action {
    background: var(--amber-soft);
    border-color: #fde68a;
    color: var(--amber);
}

.received-action {
    background: var(--green-soft);
    border-color: #bbf7d0;
    color: var(--green);
}

.expected-action {
    background: var(--purple-soft);
    border-color: #ddd6fe;
    color: var(--purple);
}

.segmented,
.tabs,
.status-pills {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 4px;
    margin: 0 0 24px;
    overflow-x: auto;
    padding: 5px;
}

.status-pills {
    background: transparent;
    border: 0;
    gap: 12px;
    padding: 0;
}

.segmented a,
.tabs a,
.status-pills a {
    border-radius: 8px;
    color: var(--muted);
    flex: 1 0 auto;
    font-weight: 850;
    min-height: 48px;
    padding: 13px 18px;
    text-align: center;
}

.status-pills a {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.segmented a.active,
.tabs a.active,
.status-pills a.active {
    background: var(--blue);
    color: white;
}

.folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.folder-card {
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 22px;
    min-width: 0;
}

.folder-card-title,
.folder-card-body {
    min-width: 0;
}

.home-folder-card {
    position: relative;
}

.home-folder-card .card-top {
    padding-right: 42px;
}

.home-folder-card .budget-pill {
    margin-right: 8px;
}

.folder-card-add {
    align-items: center;
    background: var(--blue);
    border-radius: 999px;
    color: white;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    position: absolute;
    right: 16px;
    top: 16px;
    width: 34px;
}

.folder-card-add:hover {
    background: var(--blue-dark);
}

.folder-card-add i {
    font-size: 13px;
    line-height: 1;
}

.budget-pill {
    background: var(--blue-soft);
    border-radius: 999px;
    color: var(--blue);
    font-weight: 850;
    min-width: max-content;
    padding: 10px 16px;
}

.folder-card dl {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.folder-card dl div {
    min-width: 0;
}

.folder-card dt {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.folder-card dd {
    font-size: 1.15rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.folder-card dl div:nth-child(1) dd {
    color: var(--green);
}

.folder-card dl div:nth-child(2) dd {
    color: var(--blue);
}

.folder-card dl div:nth-child(4) dd {
    color: var(--red);
}

.folder-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.folder-photo-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    padding: 10px;
}

.folder-media-preview {
    display: block;
    min-width: 0;
}

.folder-photo-card img,
.folder-photo-card video {
    aspect-ratio: 1 / 1;
    background: var(--panel-soft);
    border-radius: 6px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.folder-photo-card strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.folder-photo-meta {
    display: grid;
    gap: 4px;
}

.folder-photo-card span {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.vendor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vendor-card {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 22px;
}

.vendor-card-header {
    align-items: flex-start;
}

.vendor-card-header a {
    min-width: 0;
}

.vendor-quote-row strong {
    font-size: 1.12rem;
}

.vendor-quote-row span {
    min-width: max-content;
}

.vendor-note {
    min-height: 2.6em;
}

.contact-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-actions a,
.contact-actions button {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-actions {
    margin-top: 18px;
}

.action-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0;
}

.action-grid > :only-child {
    grid-column: 1 / -1;
}

.location-preview {
    color: var(--blue);
    display: block;
    font-weight: 850;
    margin-top: 18px;
    padding: 16px;
}

.search-bar,
.compact-filter,
.form-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px;
}

.search-bar {
    grid-template-columns: 1fr auto;
}

.compact-filter {
    align-items: center;
    grid-template-columns: 1fr auto;
}

.form-panel {
    padding: 22px;
}

.auth-page {
    margin-left: auto;
    margin-right: auto;
    max-width: 440px;
    padding-top: 48px;
}

.auth-page .page-header {
    margin-bottom: 18px;
}

.auth-page .page-header h1 {
    font-size: 2.25rem;
}

.auth-panel {
    gap: 16px;
    padding: 24px;
}

.auth-panel .primary-action {
    width: 100%;
}

.form-page-panel {
    margin-left: auto;
    margin-right: auto;
    max-width: 840px;
    width: 100%;
}

.form-field {
    align-content: start;
    display: grid;
    gap: 7px;
}

.sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.checkbox-field {
    display: block;
}

.checkbox-field .form-check {
    align-items: center;
    display: flex;
    gap: 12px;
    margin: 0;
    min-height: 50px;
}

.checkbox-field .form-check-label {
    font-weight: 850;
}

label {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 850;
}

input,
select,
textarea {
    background: white;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--ink);
    min-height: 50px;
    min-width: 0;
    padding: 12px 14px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: 0;
}

input[type="checkbox"]:not(.form-check-input) {
    min-height: auto;
    width: auto;
}

textarea {
    min-height: 116px;
}

.primary-action {
    justify-content: center;
    min-height: 52px;
}

.field-error {
    color: var(--red);
    font-size: 0.9rem;
}

.payment-stage-builder {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    padding-top: 16px;
}

.media-upload-form {
    gap: 18px;
}

.media-upload-shell {
    display: grid;
    gap: 18px;
}

.media-dropzone {
    align-items: center;
    background: var(--panel);
    border: 2px dashed var(--line-strong);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    min-height: 340px;
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.media-dropzone.dragover {
    background: var(--blue-soft);
    border-color: var(--blue);
}

.media-dropzone-copy {
    align-items: center;
    display: grid;
    gap: 10px;
    justify-items: center;
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.media-dropzone-copy i {
    color: var(--blue);
    font-size: 2.2rem;
}

.media-dropzone-copy strong {
    font-size: 1.2rem;
}

.media-dropzone-copy p,
.media-dropzone-note {
    color: var(--muted);
    margin: 0;
}

.media-dropzone-note {
    font-size: 0.95rem;
}

.media-dropzone .media-file-input {
    display: none;
}

.media-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.media-actions .small-action {
    min-width: 132px;
}

.media-selection {
    display: grid;
    gap: 14px;
}

.media-preview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-preview-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding: 10px;
}

.media-preview-visual {
    background: var(--panel-soft);
    border-radius: 6px;
    overflow: hidden;
}

.media-preview-visual img,
.media-preview-visual video {
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
    width: 100%;
}

.media-preview-fallback {
    align-items: center;
    color: var(--muted-2);
    display: grid;
    font-size: 2rem;
    height: 100%;
    min-height: 220px;
    justify-items: center;
}

.media-preview-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.media-preview-meta strong,
.media-preview-meta span {
    overflow-wrap: anywhere;
}

.media-preview-meta strong {
    font-size: 0.95rem;
    line-height: 1.25;
}

.media-preview-meta span {
    color: var(--muted);
    font-size: 0.9rem;
}

.media-submit {
    justify-self: end;
    min-width: 180px;
}

.stage-help {
    color: var(--muted);
    margin: 0;
}

.stage-list {
    display: grid;
    gap: 14px;
}

.stage-row {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 16px;
}

.stage-row-heading {
    color: var(--blue);
    font-weight: 850;
}

.more-details {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    padding-top: 16px;
}

.more-details summary {
    color: var(--blue);
    cursor: pointer;
    font-weight: 800;
}

.empty-state {
    color: var(--muted);
    margin: 0;
    padding: 22px;
}

.note-block {
    line-height: 1.55;
    padding: 18px;
    white-space: pre-wrap;
}

.menu-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.menu-list a {
    display: grid;
    gap: 6px;
    min-height: 110px;
    padding: 20px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.pill {
    align-items: center;
    background: #eef2f7;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #526071;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    min-height: 30px;
    padding: 5px 12px;
}

.pill.paid,
.pill.received {
    background: var(--green-soft);
    color: var(--green);
}

.pill.future {
    background: var(--blue-soft);
    color: var(--blue);
}

.pill.expected {
    background: var(--purple-soft);
    color: var(--purple);
}

.pill.warning {
    background: var(--amber-soft);
    color: var(--amber);
}

.pill.danger {
    background: var(--red-soft);
    color: var(--red);
}

.profile-card {
    justify-content: flex-start;
    margin-bottom: 28px;
    padding: 26px 30px;
}

.avatar {
    align-items: center;
    background: var(--blue-soft);
    border-radius: 999px;
    color: var(--blue);
    display: inline-flex;
    flex: 0 0 70px;
    font-size: 1.8rem;
    font-weight: 850;
    height: 70px;
    justify-content: center;
    text-transform: uppercase;
    width: 70px;
}

.bottom-nav {
    display: none;
}

.nav-label-mobile {
    display: none;
}

.sheet-open {
    overflow: hidden;
}

.action-sheet {
    inset: 0;
    pointer-events: none;
    position: fixed;
    visibility: hidden;
    z-index: 80;
}

.action-sheet.open {
    pointer-events: auto;
    visibility: visible;
}

.action-sheet-backdrop {
    background: rgba(15, 18, 25, 0.52);
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 160ms ease;
    width: 100%;
}

.action-sheet.open .action-sheet-backdrop {
    opacity: 1;
}

.action-sheet-panel {
    background: #2f3137;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px 28px 0 0;
    bottom: 0;
    box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.28);
    color: white;
    left: 50%;
    max-width: 560px;
    padding: 18px 18px 24px;
    position: absolute;
    transform: translate(-50%, 110%);
    transition: transform 180ms ease;
    width: 100%;
}

.action-sheet.open .action-sheet-panel {
    transform: translate(-50%, 0);
}

.action-sheet-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 4px 2px 12px;
}

.action-sheet-header h2 {
    color: white;
    font-size: 1.05rem;
    margin: 0;
}

.sheet-close {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #d5d8df;
    cursor: pointer;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.action-sheet-list {
    display: grid;
    gap: 2px;
}

.action-sheet-list a {
    align-items: center;
    border-radius: 12px;
    color: #f4f6fb;
    display: grid;
    gap: 18px;
    grid-template-columns: 38px 1fr;
    min-height: 62px;
    padding: 10px 8px;
}

.action-sheet-list a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.action-sheet-list i {
    color: #c6cbd6;
    font-size: 1.25rem;
    text-align: center;
}

.action-sheet-list span {
    font-size: 1.12rem;
    font-weight: 650;
}

@media (max-width: 759px) {
    body {
        font-size: 16px;
    }

    .app-frame {
        align-items: flex-start;
        background: rgba(247, 247, 247, 1);
        display: flex;
        flex-direction: column;
        height: 844px;
        justify-content: flex-start;
        max-width: 100vw;
        min-height: 844px;
        overflow-y: auto;
        width: 390px;
    }

    .topbar {
        display: none;
    }

    .messages {
        padding: 12px 22px 0;
    }

    .page {
        flex: 0 0 auto;
        margin: 0;
        max-width: none;
        padding: 34px 28px 106px;
        width: 100%;
    }

    .app-page,
    .dashboard-screen {
        width: 100%;
    }

    .auth-page {
        max-width: none;
        padding-top: 0;
    }

    .page-header {
        display: grid;
        gap: 12px;
        grid-template-columns: minmax(0, 1fr) auto;
        margin-bottom: 26px;
    }

    .page-title-stack {
        display: flex;
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 24px;
        font-weight: 800;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .auth-page .page-header h1 {
        font-size: 24px;
    }

    .page-kicker {
        color: #687083;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
        margin-top: 4px;
    }

    .primary-link {
        min-height: 50px;
        padding: 0 20px;
    }

    .page-actions,
    .dashboard-actions {
        align-items: center;
        display: flex;
        gap: 12px;
    }

    .icon-button {
        height: 50px;
        width: 50px;
    }

    .notification-button i {
        font-size: 18px;
    }

    .header-add {
        font-size: 16px;
        font-weight: 700;
        height: 50px;
        min-height: 50px;
        padding: 0 20px;
    }

    .header-add i {
        font-size: 15px;
    }

    h2 {
        font-size: 20px;
        font-weight: 800;
        line-height: 1.15;
        margin: 28px 0 16px;
    }

    .dashboard-screen .dashboard-header {
        align-items: start;
        gap: 12px;
        margin-bottom: 26px;
    }

    .dashboard-screen .page-header h1 {
        font-size: 21px;
        font-weight: 800;
        line-height: 1.08;
    }

    .dashboard-screen .page-kicker {
        color: #687083;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
        margin-top: 3px;
    }

    .dashboard-screen .dashboard-actions {
        gap: 12px;
    }

    .dashboard-screen .icon-button {
        height: 40px;
        width: 40px;
    }

    .dashboard-screen .notification-button i {
        font-size: 17px;
    }

    .dashboard-screen .header-add {
        font-size: 15px;
        font-weight: 700;
        height: 40px;
        min-height: 40px;
        padding: 0 17px;
    }

    .dashboard-screen .header-add i {
        font-size: 14px;
    }

    .dashboard-screen h2 {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.15;
        margin: 27px 0 14px;
    }

    .metric-grid,
    .folder-grid,
    .media-preview-grid,
    .folder-gallery,
    .vendor-grid,
    .menu-list,
    .split-list {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        gap: 14px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-strip,
    .summary-strip.three {
        border-radius: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 28px;
    }

    .summary-strip div {
        border-right: 1px solid var(--line);
        padding: 18px 20px;
    }

    .summary-strip div:nth-child(2n),
    .summary-strip div:last-child {
        border-right: 0;
    }

    .summary-strip span {
        color: #687083;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
    }

    .summary-strip strong {
        font-size: 20px;
        font-weight: 800;
        line-height: 1.05;
        margin-top: 8px;
    }

    .segmented,
    .tabs,
    .status-pills {
        border-radius: 12px;
        gap: 4px;
        margin-bottom: 28px;
        padding: 5px;
    }

    .segmented a,
    .tabs a,
    .status-pills a {
        border-radius: 9px;
        font-size: 15px;
        font-weight: 600;
        min-height: 38px;
        padding: 9px 14px;
    }

    .metric-card {
        min-height: 118px;
        padding: 16px;
    }

    .metric-card strong {
        font-size: 1.42rem;
    }

    .metric-card span {
        font-size: 14px;
    }

    .warnings > p {
        font-size: 1.05rem;
        padding: 18px;
    }

    .dashboard-screen .warnings {
        gap: 14px;
    }

    .dashboard-screen .warning-card {
        border-radius: 12px;
        gap: 14px;
        grid-template-columns: 28px minmax(0, 1fr);
        min-height: 80px;
        padding: 15px 16px;
    }

    .dashboard-screen .warning-card p {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.36;
    }

    .dashboard-screen .warning-icon {
        height: 28px;
        width: 28px;
    }

    .dashboard-screen .warning-icon i {
        font-size: 12px;
    }

    .progress-section {
        padding: 20px;
    }

    .progress-track {
        height: 18px;
    }

    .dashboard-screen .primary-metrics {
        gap: 16px;
    }

    .dashboard-screen .metric-card {
        border-radius: 12px;
        gap: 10px;
        min-height: 75px;
        padding: 15px 14px;
    }

    .dashboard-screen .metric-card strong {
        font-size: 20px;
        font-weight: 800;
        letter-spacing: 0;
        line-height: 1.06;
    }

    .dashboard-screen .metric-card span {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
    }

    .dashboard-screen .metric-card span::before {
        height: 8px;
        margin-right: 7px;
        vertical-align: 1px;
        width: 8px;
    }

    .dashboard-screen .progress-section {
        border-radius: 12px;
        padding: 21px 20px 18px;
    }

    .dashboard-screen .progress-row span {
        font-size: 14px;
        font-weight: 500;
    }

    .dashboard-screen .progress-row strong {
        font-size: 20px;
        font-weight: 800;
        line-height: 1.05;
    }

    .dashboard-screen .progress-track {
        height: 11px;
        margin-top: 17px;
    }

    .dashboard-screen .progress-legend {
        margin-top: 14px;
    }

    .dashboard-screen .progress-legend strong {
        font-size: 14px;
        font-weight: 700;
    }

    .expense-page .page-header {
        align-items: center;
        margin-bottom: 26px;
    }

    .expense-page .summary-strip {
        min-height: 94px;
    }

    .expense-page .summary-strip div {
        display: grid;
        align-content: center;
    }

    .expense-page .summary-strip strong {
        font-size: 20px;
    }

    .expense-page .segmented {
        min-height: 54px;
    }

    .expense-page h2 {
        font-size: 20px;
        margin: 28px 0 14px;
    }

    .expense-group {
        border-radius: 12px;
        margin-bottom: 24px;
    }

    .row-card.expense-row {
        align-items: center;
        display: grid;
        gap: 13px;
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 82px;
        padding: 16px 20px;
    }

    .expense-row .record-main strong {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
    }

    .expense-row .record-main span {
        color: #687083;
        font-size: 14px;
        line-height: 1.25;
        margin-top: 4px;
    }

    .expense-row .amount-stack {
        gap: 6px;
        max-width: none;
    }

    .expense-row .amount-stack b {
        font-size: 16px;
        font-weight: 800;
    }

    .expense-row .amount-stack span {
        color: #687083;
        font-size: 13px;
    }

    .expense-row .stage-preview span {
        font-size: 13px;
    }

    .expense-row .small-action {
        min-height: 34px;
        padding: 7px 13px;
    }

    .folder-page .page-header,
    .task-page .page-header {
        align-items: center;
        margin-bottom: 26px;
    }

    .folder-page {
        margin-left: -6px;
        width: calc(100% + 12px);
    }

    .folder-page .page-header {
        margin-bottom: 24px;
    }

    .folder-page .page-header h1 {
        font-size: 23px;
        line-height: 1.08;
    }

    .folder-page .page-kicker {
        font-size: 14px;
        line-height: 1.3;
        max-width: 220px;
    }

    .folder-page .icon-button {
        height: 42px;
        width: 42px;
    }

    .folder-page .notification-button i {
        font-size: 17px;
    }

    .folder-page .header-add {
        font-size: 15px;
        height: 42px;
        min-height: 42px;
        padding: 0 18px;
    }

    .folder-page .header-add i {
        font-size: 14px;
    }

    .folder-page h2,
    .task-page h2 {
        font-size: 20px;
        margin: 28px 0 14px;
    }

    .folder-page h2 {
        font-size: 18px;
        margin: 24px 0 14px;
    }

    .folder-list-grid {
        gap: 14px;
    }

    .folder-card.folder-summary-card {
        border-radius: 12px;
        display: grid;
        gap: 18px;
        min-height: 120px;
        padding: 20px;
    }

    .folder-summary-card .card-top {
        align-items: center;
        gap: 12px;
    }

    .folder-summary-card .card-top strong {
        font-size: 16px;
        font-weight: 800;
        line-height: 1.16;
    }

    .folder-summary-card .budget-pill {
        background: #eef4ff;
        color: #1557e6;
        font-size: 12px;
        font-weight: 700;
        padding: 7px 13px;
    }

    .folder-summary-card .folder-stat-grid {
        display: grid;
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .folder-summary-card dt {
        color: #687083;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.2;
    }

    .folder-summary-card dd {
        font-size: 13px;
        font-weight: 800;
        line-height: 1.15;
        margin-top: 6px;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .task-page .segmented {
        margin-bottom: 24px;
        min-height: 44px;
    }

    .task-page .segmented a {
        font-size: 14px;
        min-height: 34px;
    }

    .task-list {
        border-radius: 12px;
        margin-bottom: 24px;
    }

    .row-card.task-card {
        align-items: center;
        display: grid;
        gap: 12px;
        grid-template-columns: 34px minmax(0, 1fr) auto;
        min-height: 64px;
        padding: 13px 16px;
    }

    .task-icon {
        align-items: center;
        border-radius: 999px;
        display: flex;
        height: 34px;
        justify-content: center;
        width: 34px;
    }

    .task-icon i {
        align-items: center;
        display: flex;
        font-size: 13px;
        height: 14px;
        justify-content: center;
        line-height: 14px;
        vertical-align: 0;
        width: 14px;
    }

    .task-icon i::before {
        display: block;
        line-height: 1;
    }

    .task-icon.pending {
        background: var(--amber-soft);
        color: var(--amber);
    }

    .task-icon.completed {
        background: var(--green-soft);
        color: var(--green);
    }

    .task-card .record-main strong {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
    }

    .task-card .record-main span {
        color: #687083;
        font-size: 12px;
        line-height: 1.25;
        margin-top: 2px;
    }

    .task-card form {
        margin: 0;
    }

    .task-card .task-status-pill {
        font-size: 12px;
        font-weight: 700;
        min-height: 30px;
        padding: 6px 12px;
    }

    .cash-page .page-header,
    .vendor-page .page-header,
    .more-page .page-header,
    .settings-page .page-header {
        align-items: center;
        margin-bottom: 26px;
    }

    .cash-page .page-header h1,
    .vendor-page .page-header h1,
    .more-page .page-header h1,
    .settings-page .page-header h1 {
        font-size: 24px;
        line-height: 1.08;
    }

    .cash-page .page-kicker,
    .vendor-page .page-kicker,
    .more-page .page-kicker,
    .settings-page .page-kicker {
        font-size: 14px;
        line-height: 1.3;
    }

    .cash-page .header-add,
    .vendor-page .header-add {
        font-size: 15px;
        height: 42px;
        min-height: 42px;
        padding: 0 18px;
    }

    .cash-page .header-add i,
    .vendor-page .header-add i {
        font-size: 14px;
    }

    .cash-page .summary-strip {
        margin-bottom: 28px;
    }

    .cash-page .summary-strip div {
        min-height: 86px;
    }

    .cash-page .summary-strip.three div:nth-child(3) {
        grid-column: 1 / -1;
    }

    .cash-page .summary-strip strong {
        font-size: 22px;
    }

    .cash-page h2,
    .settings-page h2 {
        font-size: 20px;
        margin: 28px 0 14px;
    }

    .cash-page .record-table {
        margin-bottom: 26px;
    }

    .cash-page .row-card {
        min-height: 76px;
        padding: 16px 18px;
    }

    .cash-page .row-card strong {
        font-size: 16px;
        font-weight: 700;
    }

    .cash-page .amount-stack b {
        font-size: 16px;
    }

    .vendor-page .search-bar {
        border-radius: 12px;
        gap: 14px;
        grid-template-columns: 1fr;
        margin-bottom: 24px;
        padding: 18px;
    }

    .vendor-page .search-bar input,
    .vendor-page .compact-filter select,
    .settings-page input,
    .settings-page select,
    .settings-page textarea {
        border-radius: 10px;
        font-size: 16px;
        min-height: 50px;
        padding: 12px 14px;
    }

    .vendor-page .search-bar button {
        font-size: 15px;
        min-height: 42px;
    }

    .vendor-page .status-pills {
        display: flex;
        gap: 10px;
        margin-bottom: 24px;
        overflow-x: auto;
        padding: 0 0 8px;
        scrollbar-color: #a5abb5 transparent;
    }

    .vendor-page .status-pills a {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 10px;
        flex: 0 0 auto;
        font-size: 14px;
        min-height: 42px;
        padding: 11px 16px;
    }

    .vendor-page .status-pills a.active {
        background: var(--blue);
        border-color: var(--blue);
        color: white;
    }

    .vendor-page .compact-filter {
        border-radius: 12px;
        gap: 12px;
        grid-template-columns: minmax(0, 1fr) auto;
        margin-bottom: 24px;
        padding: 18px;
    }

    .vendor-page .compact-filter button {
        font-size: 14px;
        min-height: 42px;
        padding: 9px 15px;
    }

    .vendor-page .vendor-grid {
        gap: 16px;
        grid-template-columns: 1fr;
    }

    .vendor-page .vendor-card {
        border-radius: 12px;
        gap: 16px;
        padding: 20px;
    }

    .vendor-page .vendor-card-header strong {
        font-size: 17px;
        font-weight: 800;
        line-height: 1.18;
    }

    .vendor-page .vendor-card-header span {
        font-size: 14px;
    }

    .vendor-page .pill {
        font-size: 13px;
        font-weight: 700;
        min-height: 32px;
        padding: 6px 12px;
    }

    .vendor-page .vendor-quote-row strong {
        font-size: 16px;
        font-weight: 800;
    }

    .vendor-page .vendor-quote-row span,
    .vendor-page .vendor-note {
        color: #687083;
        font-size: 14px;
        line-height: 1.35;
    }

    .vendor-page .contact-actions {
        gap: 10px;
    }

    .vendor-page .contact-actions a {
        font-size: 14px;
        min-height: 38px;
    }

    .more-page .menu-list {
        gap: 18px;
        grid-template-columns: 1fr;
    }

    .more-page .menu-list a {
        border-radius: 12px;
        gap: 20px;
        min-height: 112px;
        padding: 24px;
    }

    .more-page .menu-list strong {
        font-size: 20px;
        font-weight: 800;
        line-height: 1.15;
    }

    .more-page .menu-list span {
        color: #687083;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.28;
    }

    .settings-page .profile-card {
        border-radius: 12px;
        gap: 20px;
        margin-bottom: 30px;
        padding: 22px;
    }

    .settings-page .avatar {
        flex-basis: 78px;
        font-size: 32px;
        height: 78px;
        width: 78px;
    }

    .settings-page .profile-card strong {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.2;
    }

    .settings-page .profile-card span {
        color: var(--ink);
        font-size: 16px;
        line-height: 1.25;
    }

    .settings-page .form-panel {
        border-radius: 12px;
        gap: 18px;
        padding: 22px;
    }

    .settings-page label {
        font-size: 16px;
        font-weight: 800;
    }

    .settings-page small {
        color: #687083;
        font-size: 14px;
        font-weight: 600;
    }

    .settings-page .primary-action {
        font-size: 16px;
        font-weight: 800;
        min-height: 48px;
    }

    .row-card,
    .folder-card {
        min-height: 72px;
        padding: 16px 18px;
    }

    .row-card strong,
    .vendor-card strong,
    .folder-card strong,
    .menu-list strong,
    .profile-card strong {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
    }

    .row-card span,
    .folder-card span,
    .vendor-card span,
    .menu-list span,
    small {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
    }

    .task-card .task-icon {
        align-items: center;
        display: grid;
        flex: 0 0 34px;
        font-size: 0;
        height: 34px;
        justify-items: center;
        line-height: 1;
        width: 34px;
    }

    .task-card .task-icon i {
        align-items: center;
        display: grid;
        font-size: 13px;
        height: 14px;
        justify-items: center;
        line-height: 1;
        width: 14px;
    }

    .row-card {
        align-items: flex-start;
    }

    .amount-stack {
        max-width: 46%;
    }

    .amount-stack b {
        font-size: 16px;
        font-weight: 800;
    }

    .small-action,
    .search-bar button,
    .compact-filter button,
    .contact-actions a,
    .contact-actions button,
    .action-grid a,
    .action-grid button {
        border-radius: 999px;
        font-size: 14px;
        font-weight: 700;
        min-height: 38px;
        padding: 8px 14px;
    }

    .record-table,
    .form-panel,
    .menu-list a,
    .profile-card,
    .vendor-card,
    .folder-card,
    .summary-list,
    .record-section {
        border-radius: 12px;
    }

    .folder-card dl {
        gap: 16px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .folder-card dd {
        font-size: 1.05rem;
    }

    .card-top {
        align-items: flex-start;
    }

    .budget-pill {
        padding: 8px 14px;
    }

    .vendor-card {
        padding: 20px;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .compact-filter {
        grid-template-columns: 1fr auto;
    }

    .compact-filter button {
        padding-left: 13px;
        padding-right: 13px;
    }

    .record-table,
    .search-bar,
    .compact-filter,
    .folder-card,
    .vendor-card,
    .form-panel {
        max-width: 100%;
    }

    .status-pills {
        gap: 10px;
    }

    .tabs {
        scroll-padding: 5px;
    }

    .action-grid,
    .contact-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contact-actions a,
    .contact-actions button,
    .action-grid a,
    .action-grid button {
        padding-left: 8px;
        padding-right: 8px;
    }

    .profile-card {
        padding: 22px;
    }

    .bottom-nav {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--line);
        border-radius: 31px;
        bottom: 16px;
        box-shadow: 0 8px 28px rgba(17, 24, 39, 0.1);
        display: grid;
        gap: 0;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        left: 50%;
        max-width: 336px;
        padding: 4px;
        position: fixed;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 44px);
        z-index: 25;
    }

    .bottom-nav a {
        align-items: center;
        border-radius: 28px;
        color: var(--muted-2);
        display: grid;
        grid-template-rows: 18px auto;
        justify-items: center;
        align-content: center;
        font-size: 10px;
        font-weight: 800;
        row-gap: 3px;
        letter-spacing: 0.02em;
        line-height: 1;
        min-height: 54px;
        min-width: 0;
        padding: 8px 2px 7px;
        text-align: center;
        text-transform: uppercase;
    }

    .bottom-nav .nav-icon {
        align-items: center;
        display: flex;
        height: 18px;
        justify-content: center;
        line-height: 1;
        width: 18px;
    }

    .bottom-nav .nav-icon svg {
        display: block;
        height: 18px;
        width: 18px;
    }

    .bottom-nav .nav-icon svg,
    .bottom-nav .nav-icon svg * {
        fill: currentColor;
        stroke: none;
    }

    .bottom-nav .nav-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: clip;
        line-height: 1;
    }

    .nav-label-desktop {
        display: none;
    }

    .nav-label-mobile {
        display: inline;
    }

    .bottom-nav a.active {
        background: var(--blue);
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
        color: white;
    }
}

@media (max-width: 430px) {
    .page {
        padding-left: 28px;
        padding-right: 28px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .primary-link {
        min-height: 50px;
        padding: 0 20px;
    }

    .metric-grid,
    .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-strip.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-strip div {
        border-right: 1px solid var(--line);
        padding: 18px 20px;
    }

    .summary-strip div:nth-child(2n),
    .summary-strip div:last-child {
        border-right: 0;
    }

    .summary-strip strong,
    .metric-card strong {
        font-size: 20px;
    }

    .summary-strip span,
    .metric-card span {
        font-size: 14px;
    }

    .folder-card dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .row-card {
        display: flex;
        grid-template-columns: none;
    }

    .amount-stack {
        align-items: flex-end;
        justify-items: end;
        flex-shrink: 0;
        max-width: none;
        text-align: right;
    }

    .status-pills {
        gap: 6px;
    }

    .status-pills a {
        font-size: 0.88rem;
        min-height: 46px;
        padding: 11px 12px;
    }

    .contact-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contact-actions a,
    .contact-actions button {
        font-size: 0.9rem;
        padding-left: 6px;
        padding-right: 6px;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 760px) and (max-width: 1040px) {
    .page {
        max-width: 920px;
    }

    .metric-grid,
    .folder-grid,
    .vendor-grid,
    .menu-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .folder-card dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1041px) {
    .split-list.dashboard-lists,
    .vendor-detail,
    .split-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-page-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-page-panel > .form-field {
        grid-column: span 1;
    }

    .form-page-panel > .form-field.field-notes {
        grid-column: 1 / -1;
    }

    .form-page-panel > .payment-stage-builder,
    .form-page-panel > .primary-action,
    .form-page-panel > .field-error,
    .form-page-panel > .errorlist,
    .form-page-panel > .nonfield-errors {
        grid-column: 1 / -1;
    }

    .vendor-detail {
        display: grid;
        gap: 18px;
    }

    .vendor-detail .sticky-actions {
        align-content: start;
        margin: 0;
    }
}
