:root {
    --blue: #295f98;
    --green: #2f8f5b;
    --red: #b94b48;
    --ink: #1d2733;
    --muted: #667385;
    --line: #e7ecf2;
    --paper: #ffffff;
    --soft: #f3f6fa;
    --shadow: 0 10px 24px rgba(31, 47, 71, .09);
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(41, 95, 152, .13), transparent 34rem),
        linear-gradient(135deg, #eef3f8 0%, #f8fafc 58%, #edf4ef 100%);
    font-family: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
    font-size: 13px;
    line-height: 1.35;
    overflow-x: hidden;
}

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

.app-shell {
    display: grid;
    grid-template-columns: 218px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px;
    background: rgba(255,255,255,.78);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}

.brand span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(145deg, var(--blue), #1c405f);
    font-weight: 800;
    letter-spacing: .04em;
}

.brand.center {
    justify-content: center;
    margin-bottom: 16px;
}

.sidebar nav {
    display: grid;
    gap: 4px;
}

.mobile-more-toggle {
    display: none;
}

.mobile-more-group {
    display: contents;
}

.mobile-logout {
    display: none;
}

.sidebar nav a,
.logout {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: #405166;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.sidebar nav a.active,
.sidebar nav a:hover,
.logout:hover {
    background: #edf3fa;
    color: var(--blue);
}

.logout {
    margin-top: 18px;
    color: var(--red);
}

.main {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 18px;
    overflow-x: hidden;
}

.page-head {
    position: relative;
    padding: 16px 18px;
    border-radius: 18px;
    color: #fff;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--blue), #21425d);
}

.page-head-copy {
    padding-right: 56px;
}

.page-head-menu {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: rgba(255,255,255,.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    line-height: 1;
}

.page-head-menu:hover {
    background: rgba(255,255,255,.22);
}

.page-head.green { background: linear-gradient(135deg, var(--green), #1f5e42); }
.page-head.red { background: linear-gradient(135deg, var(--red), #843431); }
.page-head p { margin: 0 0 3px; opacity: .82; font-size: 11px; }
.page-head h1 { margin: 0; font-size: clamp(19px, 3.4vw, 27px); letter-spacing: -.03em; }

.cards,
.calc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin: 13px 0;
}

.card,
.panel,
.list-row,
.auth-card {
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(231,236,242,.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: 13px;
}

.card span,
.card small,
.list-row small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.card strong {
    display: block;
    margin: 5px 0 1px;
    font-size: 19px;
    letter-spacing: -.03em;
}

.card.accent {
    color: #fff;
    background: linear-gradient(145deg, #20364e, #315d88);
}
.card.accent small,
.card.accent span { color: rgba(255,255,255,.78); }

.launch-summary-panel {
    margin-top: 13px;
}

.launch-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.launch-summary-card {
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,248,252,.9));
    border: 1px solid rgba(226, 233, 241, .95);
    box-shadow: var(--shadow);
}

.launch-summary-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.launch-summary-card strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    letter-spacing: -.03em;
}

.launch-summary-card small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.launch-summary-card.accent.green {
    background: linear-gradient(145deg, rgba(47,143,91,.1), rgba(47,143,91,.03));
    border-color: rgba(47,143,91,.18);
}

.launch-summary-card.accent.blue {
    background: linear-gradient(145deg, rgba(41,95,152,.1), rgba(41,95,152,.03));
    border-color: rgba(41,95,152,.18);
}

.launch-summary-card.danger {
    background: linear-gradient(145deg, rgba(185,75,72,.1), rgba(185,75,72,.03));
    border-color: rgba(185,75,72,.18);
}

.panel {
    margin-top: 13px;
    padding: 13px;
    overflow: hidden;
}

.panel canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.panel h2,
.section-title {
    margin: 0 0 10px;
    font-size: 16px;
    letter-spacing: -.02em;
}

.list {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-left: 4px solid transparent;
}

.launch-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef3f8;
    color: var(--blue);
    font-weight: 900;
    font-size: 18px;
}

.launch-icon-action {
    cursor: pointer;
    text-decoration: none;
}

.launch-icon.paid {
    background: #e7f6ee;
    color: var(--green);
}

.launch-icon.vencida {
    background: #fdeceb;
    color: var(--red);
}

.launch-icon.proxima {
    background: #fff4df;
    color: #a96d08;
}

.launch-icon.parcial {
    background: #edf5ff;
    color: #2d6cb6;
}

.launch-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px 12px 13px;
}

.launch-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.launch-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.launch-title-block {
    min-width: 0;
}

.launch-money {
    text-align: right;
    white-space: nowrap;
}

.launch-money b {
    display: block;
    font-size: 17px;
    letter-spacing: -.03em;
    color: #243449;
}

.launch-money small {
    color: var(--muted);
    font-size: 11px;
}

.launch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
}

.launch-account,
.launch-meta span {
    color: var(--muted);
    font-size: 11px;
}

.launch-title-block strong {
    display: block;
    margin-top: 2px;
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.launch-meta span {
    padding-right: 8px;
    border-right: 1px solid rgba(189, 198, 209, .7);
}

.launch-meta span:last-child {
    padding-right: 0;
    border-right: 0;
}

.launch-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.list-row strong {
    display: block;
    font-weight: 700;
}

.list-row b {
    display: block;
    white-space: nowrap;
    text-align: right;
}

.list-row.efetivada { border-left-color: var(--green); }
.list-row.pendente { border-left-color: var(--blue); }
.list-row.parcial { border-left-color: #4f8fcf; }
.list-row.proxima { border-left-color: #d8992b; }
.list-row.vencida { border-left-color: var(--red); }

.row-actions {
    display: grid;
    justify-items: end;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.row-actions a:hover { color: var(--blue); }

.amount-stack { display: none; }

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.action-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 850;
    line-height: 1;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.action-chip:hover {
    transform: translateY(-1px);
    filter: brightness(.98);
}

.action-chip.pay {
    color: #fff;
    background: linear-gradient(135deg, #2f8f5b, #23849a);
    box-shadow: 0 8px 16px rgba(47, 143, 91, .18);
}

.list-row.vencida .action-chip.pay,
.list-row.proxima .action-chip.pay {
    background: linear-gradient(135deg, #d8992b, #b94b48);
    box-shadow: 0 8px 16px rgba(185, 75, 72, .18);
}

.action-chip.edit {
    color: #2c5478;
    background: #edf5ff;
    border-color: #d7e8fa;
}

.action-chip.delete {
    color: #9a3d39;
    background: #fff0ef;
    border-color: #f2d4d1;
}

form label {
    display: grid;
    gap: 4px;
    color: #3c4c5f;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d9e1ea;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

textarea { min-height: 72px; resize: vertical; }

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

.span-2 { grid-column: 1 / -1; }

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox input { width: auto; }

.inline-form,
.filter-bar,
.month-nav,
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.inline-form input,
.inline-form select,
.filter-bar input,
.filter-bar select,
.month-nav input {
    width: auto;
    min-width: 132px;
}

.btn,
button.btn {
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    background: #e8edf3;
    color: #26384d;
    cursor: pointer;
    font-weight: 700;
    font: inherit;
}

.btn.primary { background: var(--blue); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn:hover { filter: brightness(.97); }

.filter-bar .btn {
    background: linear-gradient(135deg, #295f98, #2f8f5b);
    color: #fff;
    box-shadow: 0 8px 18px rgba(41, 95, 152, .16);
}

.launch-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, rgba(41,95,152,.94), rgba(47,143,91,.94));
    box-shadow: 0 10px 24px rgba(31, 47, 71, .12);
}

.launch-month-nav strong {
    min-width: 140px;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    text-transform: capitalize;
}

.launch-month-step {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.14);
    font-size: 24px;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.launch-filter-panel {
    margin-top: 10px;
}

.launch-filter-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(226, 233, 241, .95);
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(242,247,252,.86));
    box-shadow: var(--shadow);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.launch-filter-toggle::-webkit-details-marker { display: none; }
.launch-filter-toggle::marker { content: ""; }

.launch-filter-toggle-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 6px 14px rgba(41, 95, 152, .15);
    flex: 0 0 34px;
}

.launch-filter-toggle-text {
    display: grid;
    gap: 2px;
}

.launch-filter-toggle-text strong {
    font-size: 14px;
    font-weight: 900;
}

.launch-filter-toggle-text small {
    color: var(--muted);
    font-size: 11px;
}

.launch-filter-panel[open] .launch-filter-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none;
}

.launch-filter-card {
    padding: 12px;
    border: 1px solid rgba(226, 233, 241, .95);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
}

.launch-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.launch-filter-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.launch-filter-form input,
.launch-filter-form select {
    width: 100%;
    min-width: 0;
}

.launch-filter-submit {
    grid-column: 1 / -1;
}

.receipt-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(47,143,91,.96), rgba(41,95,152,.96)),
        radial-gradient(circle at 12% 40%, rgba(255,255,255,.26), transparent 8rem);
    box-shadow: 0 10px 24px rgba(41, 95, 152, .18);
}

.receipt-shortcut::before {
    content: "📷";
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
}

.receipt-shortcut strong,
.receipt-shortcut span {
    display: block;
}

.receipt-shortcut strong {
    margin-right: auto;
    font-weight: 900;
}

.receipt-shortcut span {
    color: rgba(255,255,255,.82);
    font-size: 11px;
}

.quick-recurring,
.recurrence-hero {
    margin-top: 11px;
    padding: 12px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,255,255,.76)),
        radial-gradient(circle at 12% 20%, rgba(185,75,72,.16), transparent 8rem),
        radial-gradient(circle at 90% 10%, rgba(216,153,43,.18), transparent 7rem);
    border: 1px solid rgba(226, 233, 241, .95);
    box-shadow: var(--shadow);
}

.recurrence-hero.top {
    margin-top: 0;
    border-color: rgba(185,75,72,.22);
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,247,240,.88)),
        radial-gradient(circle at 8% 18%, rgba(185,75,72,.18), transparent 9rem),
        radial-gradient(circle at 86% 10%, rgba(47,143,91,.14), transparent 8rem);
}

.quick-recurring {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.quick-recurring div {
    flex: 1 1 190px;
}

.quick-recurring strong,
.recurrence-hero span {
    display: block;
    font-weight: 900;
    color: #233447;
}

.quick-recurring span,
.recurrence-hero p {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.quick-recurring a,
.recurrence-pills button {
    border: 0;
    border-radius: 999px;
    padding: 7px 10px;
    color: #78342f;
    background: #fff4ee;
    box-shadow: 0 6px 14px rgba(185,75,72,.08);
    font-weight: 850;
    cursor: pointer;
}

.quick-recurring a:nth-of-type(2),
.recurrence-pills button:nth-of-type(3) {
    color: #8a5d12;
    background: #fff7df;
}

.quick-recurring a:nth-of-type(3),
.recurrence-pills button:nth-of-type(4) {
    color: #1f7048;
    background: #e9f8ef;
}

.quick-recurring a:nth-of-type(4),
.recurrence-pills button:nth-of-type(5) {
    color: #285b8f;
    background: #eaf3ff;
}

.quick-recurring a:nth-of-type(5),
.recurrence-pills button:nth-of-type(6) {
    color: #5e4d9f;
    background: #f0edff;
}

.recurrence-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.recurrence-pills button.active {
    color: #fff;
    background: linear-gradient(135deg, #c6504b, #8f3632);
    box-shadow: 0 8px 18px rgba(185,75,72,.22);
    transform: translateY(-1px);
}

.link-danger {
    border: 0;
    background: transparent;
    color: var(--red);
    cursor: pointer;
    font: inherit;
}

.fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 14px 30px rgba(31, 47, 71, .24);
    font-size: 25px;
    line-height: 1;
}
.fab.green { background: var(--green); }
.fab.red { background: var(--red); }

.flash {
    margin-bottom: 10px;
    padding: 9px 11px;
    border-radius: 12px;
    color: #225337;
    background: #e7f6ee;
    border: 1px solid #c9ead7;
}
.flash.bad {
    color: #7d2b2b;
    background: #fdeceb;
    border-color: #f2cfcc;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}

.status-strip article {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(31, 47, 71, .07);
}

.status-strip strong {
    display: block;
    font-size: 17px;
}

.status-strip span {
    color: var(--muted);
    font-size: 11px;
}

.empty {
    margin: 0;
    padding: 14px;
    color: var(--muted);
    text-align: center;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.auth-card {
    width: min(430px, 100%);
    padding: 18px;
}

.auth-card h1 {
    margin: 0 0 14px;
    font-size: 20px;
}

.auth-card form {
    display: grid;
    gap: 10px;
}

.auth-card p,
.auth-card small {
    margin: 0;
    color: var(--muted);
}

.auth-actions {
    display: grid;
    gap: 8px;
    margin-top: 2px;
}

.auth-note {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.auth-note.bad {
    color: var(--red);
}

.biometric-list {
    display: grid;
    gap: 10px;
}

.biometric-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.8);
}

.biometric-item strong {
    display: block;
    margin-bottom: 3px;
}

.biometric-item small {
    display: block;
    color: var(--muted);
}

.empty-state {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px dashed var(--line);
    color: var(--muted);
    background: rgba(255,255,255,.62);
}

.token-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    background: #f3f6fa;
    word-break: break-all;
}

.calculator {
    display: grid;
    gap: 8px;
}

.attachments {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.attachments h3 {
    margin: 0 0 8px;
    font-size: 13px;
}

.attachment {
    display: inline-flex;
    margin: 0 8px 8px 0;
    padding: 6px 8px;
    border-radius: 10px;
    background: #edf3fa;
    color: var(--blue);
    font-weight: 700;
    font-size: 11px;
}

.attachment-card {
    display: inline-grid;
    gap: 8px;
    margin: 0 10px 10px 0;
    max-width: 180px;
    vertical-align: top;
}

.attachment-card img {
    width: 180px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.pdf-badge {
    display: grid;
    place-items: center;
    width: 180px;
    height: 112px;
    border-radius: 14px;
    color: var(--red);
    background: #fdeceb;
    border: 1px solid #f1c9c6;
    font-weight: 900;
    letter-spacing: .08em;
}

.calc-result {
    color: var(--blue);
}

.ai-import p {
    margin: 0 0 12px;
    color: var(--muted);
    max-width: 680px;
}

.ai-import input[type="file"] {
    border-style: dashed;
    background: linear-gradient(135deg, #f8fbff, #fff8f3);
}

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

.capture-card {
    min-height: 126px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(220, 229, 239, .95);
    box-shadow: 0 10px 24px rgba(31, 47, 71, .08);
    cursor: pointer;
    overflow: hidden;
}

.capture-card::before {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
}

.capture-card.camera { background: linear-gradient(135deg, #fff8ef, #fff); }
.capture-card.file { background: linear-gradient(135deg, #eef7ff, #fff); }
.capture-card.audio { background: linear-gradient(135deg, #f0fff6, #fff); }
.capture-card.camera::before { content: "📷"; background: linear-gradient(135deg, #d8992b, #b94b48); }
.capture-card.file::before { content: "PDF"; background: linear-gradient(135deg, #295f98, #23849a); font-size: 11px; }
.capture-card.audio::before { content: "🎙"; background: linear-gradient(135deg, #2f8f5b, #1f7048); }

.capture-card span {
    display: block;
    font-weight: 900;
    color: #233447;
}

.capture-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 600;
}

.capture-card input {
    margin-top: 10px;
    padding: 7px;
    font-size: 11px;
    background: rgba(255,255,255,.76);
}

.capture-card.audio {
    gap: 8px;
}

.capture-card.camera {
    gap: 8px;
}

.capture-card.camera input {
    display: none;
}

.camera-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(135deg, #d8992b, #b94b48);
    box-shadow: 0 10px 18px rgba(185,75,72,.16);
}

.camera-status {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.record-audio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(135deg, #2f8f5b, #1f7048);
    box-shadow: 0 10px 18px rgba(47,143,91,.18);
}

.audio-status {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 840px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
    }

    .app-shell {
        display: block;
        padding-bottom: 172px;
    }

    .sidebar {
        position: fixed;
        inset: auto 0 0;
        z-index: 30;
        height: auto;
        padding: 8px 10px 12px;
        border-right: 0;
        border-top: 1px solid var(--line);
        background:
            linear-gradient(180deg, rgba(255,255,255,.68), rgba(255,255,255,.94)),
            radial-gradient(circle at 8% 20%, rgba(47,143,91,.18), transparent 9rem),
            radial-gradient(circle at 88% 30%, rgba(185,75,72,.16), transparent 8rem);
        box-shadow: 0 -18px 44px rgba(31, 47, 71, .12);
        transition: transform .28s ease, inset .28s ease, width .28s ease, height .28s ease, padding .28s ease, box-shadow .28s ease;
    }

    .sidebar .brand,
    .logout {
        display: none;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        width: min(100%, 420px);
        margin: 0 auto;
        padding: 0;
        position: relative;
    }

    .sidebar nav a,
    .mobile-more-toggle {
        position: relative;
        min-height: 42px;
        padding: 7px 5px 6px;
        border-radius: 15px;
        font-size: 10px;
        font-weight: 800;
        text-align: center;
        color: #42536a;
        background: rgba(255,255,255,.76);
        border: 1px solid rgba(220, 229, 239, .92);
        box-shadow: 0 8px 18px rgba(31, 47, 71, .06);
    }

    .mobile-more-toggle {
        display: block;
    }

    .desktop-logout {
        display: none;
    }

    .mobile-more-group {
        display: none;
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
    }

    body.more-menu-open .mobile-more-group {
        display: grid;
    }

    body.more-menu-open .mobile-logout {
        display: block;
    }

    body.more-menu-open .mobile-more-toggle {
        grid-column: 1 / -1;
    }

    .sidebar nav a::before,
    .mobile-more-toggle::before {
        content: "";
        display: block;
        width: 7px;
        height: 7px;
        margin: 0 auto 4px;
        border-radius: 50%;
        background: var(--blue);
        box-shadow: 0 0 0 4px rgba(41, 95, 152, .12);
    }

    body.menu-open .sidebar {
        inset: 0 auto 0 0;
        width: min(82vw, 340px);
        height: 100vh;
        padding: 14px 12px 12px;
        border-right: 1px solid var(--line);
        border-top: 0;
        box-shadow: 18px 0 44px rgba(31, 47, 71, .18);
        background:
            linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.98)),
            radial-gradient(circle at 20% 15%, rgba(47,143,91,.16), transparent 10rem),
            radial-gradient(circle at 80% 25%, rgba(185,75,72,.14), transparent 8rem);
    }

    body.menu-open .sidebar .brand,
    body.menu-open .sidebar .logout {
        display: flex;
    }

    body.menu-open .sidebar nav {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 20;
        border: 0;
        background: rgba(21, 30, 41, .38);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .24s ease;
    }

    body.menu-open .menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-more-toggle::before { background: #334e68; box-shadow: 0 0 0 4px rgba(51,78,104,.13); }
    .mobile-more-group .mobile-more-item:nth-of-type(1)::before { background: #d8992b; box-shadow: 0 0 0 4px rgba(216,153,43,.15); }
    .mobile-more-group .mobile-more-item:nth-of-type(2)::before { background: #6c63b7; box-shadow: 0 0 0 4px rgba(108,99,183,.13); }
    .mobile-more-group .mobile-more-item:nth-of-type(3)::before { background: #cf6b3b; box-shadow: 0 0 0 4px rgba(207,107,59,.13); }
    .mobile-more-group .mobile-more-item:nth-of-type(4)::before { background: #23849a; box-shadow: 0 0 0 4px rgba(35,132,154,.13); }
    .mobile-more-group .mobile-more-item:nth-of-type(5)::before { background: #7d6a55; box-shadow: 0 0 0 4px rgba(125,106,85,.13); }
    .mobile-more-group .mobile-more-item:nth-of-type(6)::before { background: #334e68; box-shadow: 0 0 0 4px rgba(51,78,104,.13); }

    .sidebar nav a.active {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #295f98, #1f4668);
        box-shadow: 0 8px 18px rgba(41, 95, 152, .24);
        transform: translateY(-2px);
    }

    .mobile-more-toggle.active { background: linear-gradient(135deg, #334e68, #22384f); box-shadow: 0 10px 24px rgba(51,78,104,.24); color: #fff; }
    .mobile-more-group .mobile-more-item:nth-of-type(1).active { background: linear-gradient(135deg, #d8992b, #9f6918); box-shadow: 0 10px 24px rgba(216,153,43,.25); }
    .mobile-more-group .mobile-more-item:nth-of-type(2).active { background: linear-gradient(135deg, #6c63b7, #45408c); box-shadow: 0 10px 24px rgba(108,99,183,.25); }
    .mobile-more-group .mobile-more-item:nth-of-type(3).active { background: linear-gradient(135deg, #cf6b3b, #994522); box-shadow: 0 10px 24px rgba(207,107,59,.24); }
    .mobile-more-group .mobile-more-item:nth-of-type(4).active { background: linear-gradient(135deg, #23849a, #155f70); box-shadow: 0 10px 24px rgba(35,132,154,.24); }
    .mobile-more-group .mobile-more-item:nth-of-type(5).active { background: linear-gradient(135deg, #7d6a55, #524233); box-shadow: 0 10px 24px rgba(125,106,85,.22); }
    .mobile-more-group .mobile-more-item:nth-of-type(6).active { background: linear-gradient(135deg, #334e68, #22384f); box-shadow: 0 10px 24px rgba(51,78,104,.24); }

    .sidebar nav a.active::before {
        background: rgba(255,255,255,.96);
        box-shadow: 0 0 0 4px rgba(255,255,255,.22);
    }

    body.more-menu-open .mobile-more-toggle {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #334e68, #22384f);
        box-shadow: 0 8px 18px rgba(51,78,104,.24);
    }

    body.more-menu-open .mobile-more-toggle::before {
        background: rgba(255,255,255,.96);
        box-shadow: 0 0 0 4px rgba(255,255,255,.22);
    }

    .main {
        padding: 10px;
        padding-bottom: 120px;
    }

    .page-head {
        padding: 14px 14px 16px;
    }

    .page-head-copy {
        padding-right: 44px;
    }

    .page-head-menu {
        top: 12px;
        right: 12px;
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 16px;
    }

    .receipt-shortcut {
        padding: 8px 10px;
    }

    .cards,
    .status-strip,
    .calc-grid,
    .capture-grid,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .span-2 { grid-column: auto; }

    .list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .launch-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .launch-body {
        grid-column: 2 / -1;
    }

    .launch-head {
        flex-direction: column;
        gap: 4px;
    }

    .launch-money {
        text-align: left;
    }

    .launch-actions,
    .action-buttons {
        justify-items: stretch;
        justify-content: stretch;
    }

    .action-chip {
        flex: 1 1 0;
    }

    .inline-form input,
    .inline-form select,
    .month-nav input,
    .month-nav .btn {
        width: 100%;
    }

    .filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar .btn {
        width: 100%;
        min-width: 0;
    }

    .filter-bar .btn {
        grid-column: 1 / -1;
    }

    .launch-month-nav {
        gap: 10px;
        padding: 9px 12px;
    }

    .launch-month-nav strong {
        min-width: 0;
        flex: 1 1 auto;
        font-size: 16px;
    }

    .launch-month-step {
        width: 30px;
        height: 30px;
        font-size: 22px;
    }

    .launch-filter-toggle {
        padding: 11px 12px;
    }

    .launch-filter-card {
        padding: 10px;
    }

    .launch-filter-form {
        grid-template-columns: 1fr;
    }

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

    .quick-recurring {
        display: flex;
        gap: 6px;
        padding: 10px;
    }

    .quick-recurring div {
        flex: 1 1 100%;
    }

    .quick-recurring span {
        display: none;
    }

    .quick-recurring a {
        text-align: center;
        padding: 6px 8px;
        font-size: 11px;
    }

    .capture-card {
        min-height: 96px;
        padding: 12px;
    }

    .biometric-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .fab {
        right: 14px;
        bottom: 118px;
    }
}

@media print {
    .sidebar,
    .page-head,
    .filter-bar,
    .launch-month-nav,
    .launch-filter-panel,
    .fab,
    .btn { display: none !important; }

    body { background: #fff; }
    .main { width: 100%; padding: 0; }
    .panel,
    .list-row,
    .card { box-shadow: none; border-color: #bbb; }
}
