:root {
    --bg: #f7f3ee;
    --bg-accent: #efe7dc;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-soft: rgba(255, 250, 244, 0.88);
    --border: rgba(122, 95, 66, 0.16);
    --text: #271c12;
    --muted: #6e5f50;
    --muted-strong: #56483b;
    --primary: #146c5a;
    --primary-strong: #0f5547;
    --danger: #ae3d31;
    --danger-soft: #f8e4e1;
    --warning: #ad6b17;
    --warning-soft: #f8eedf;
    --shadow: 0 16px 42px rgba(69, 45, 20, 0.1);
    --shadow-soft: 0 10px 24px rgba(69, 45, 20, 0.07);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --focus: 0 0 0 3px rgba(20, 108, 90, 0.22);
    --max-width: 980px;
    --fab-gap: 4.6rem;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    direction: rtl;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.94), transparent 28%),
        linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 35%, #faf8f5 100%);
}

body,
button,
input,
label,
small,
span {
    font: inherit;
}

button,
input {
    border-radius: var(--radius-sm);
}

button {
    border: 0;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
.file-action:focus-within {
    outline: none;
    box-shadow: var(--focus);
}

input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    padding: 0.68rem 0.78rem;
    background: var(--surface-strong);
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder {
    color: #9f8f80;
}

.page-shell,
.panel,
.summary-sheet {
    min-width: 0;
}

.page-shell {
    width: min(100% - 1rem, var(--max-width));
    margin: 0 auto;
    padding: 0.85rem 0 6.7rem;
}

.page-header {
    padding: 0.45rem 0 0.8rem;
}

.topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: center;
}

.title-block {
    min-width: 0;
}

.title-block {
    min-width: 0;
}

.summary-kicker {
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    color: var(--muted);
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: clamp(1.45rem, 6vw, 1.9rem);
    line-height: 1.1;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

.current-date {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.module-nav {
    display: inline-flex;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.module-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(122, 95, 66, 0.14);
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted-strong);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
}

.module-link.is-active {
    background: rgba(20, 108, 90, 0.14);
    color: var(--primary-strong);
    border-color: rgba(20, 108, 90, 0.18);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    justify-content: center;
    width: 44px;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.menu-toggle-lines {
    position: relative;
}

.menu-toggle-lines::before {
    position: absolute;
    top: -5px;
    right: 0;
}

.menu-toggle-lines::after {
    position: absolute;
    top: 5px;
    right: 0;
}

.menu-panel {
    margin-top: 0.65rem;
    padding: 0.75rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.menu-actions {
    display: grid;
    gap: 0.55rem;
}

.menu-action,
.primary-action,
.delete-button,
.floating-button,
.sheet-close {
    min-height: 44px;
}

.menu-action,
.file-action {
    width: 100%;
    padding: 0.72rem 0.85rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    border: 1px solid var(--border);
}

.file-action {
    position: relative;
    display: grid;
    place-items: center;
    gap: 0.08rem;
}

.file-action input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-action small {
    color: var(--muted);
    font-size: 0.8rem;
}

.danger-action {
    background: var(--danger-soft);
    color: var(--danger);
}

.save-indicator {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.save-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
    background: rgba(20, 108, 90, 0.12);
    color: var(--primary-strong);
    font-weight: 700;
    font-size: 0.84rem;
}

.save-badge[data-state="dirty"] {
    background: var(--warning-soft);
    color: var(--warning);
}

.save-badge[data-state="saving"] {
    background: rgba(20, 108, 90, 0.16);
    color: var(--primary-strong);
}

.content-grid {
    display: grid;
    gap: 0.75rem;
}

.panel {
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.panel-title-group {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}

.panel-header h2 {
    font-size: 1.05rem;
}

.section-total {
    color: var(--primary-strong);
    font-size: 0.9rem;
    font-weight: 700;
    direction: ltr;
}

.primary-action {
    padding: 0.62rem 0.8rem;
    background: var(--primary);
    color: #fff;
}

.primary-action:hover,
.primary-action:focus-visible {
    background: var(--primary-strong);
}

.add-row-action {
    white-space: nowrap;
}

.panel-add-action {
    min-height: 38px;
    font-size: 0.88rem;
    padding: 0.55rem 0.72rem;
}

.list-head {
    display: none;
}

.savings-grid {
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

.item-list {
    display: grid;
    gap: 0.15rem;
}

.compact-row {
    display: grid;
    gap: 0.3rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(122, 95, 66, 0.12);
}

.compact-row:last-child {
    border-bottom: 0;
}

.compact-row.is-invalid .amount-input {
    border-color: rgba(174, 61, 49, 0.5);
    background: rgba(255, 248, 247, 0.95);
}

.compact-row-main {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(0, 1fr) minmax(96px, 108px) 40px;
    align-items: start;
}

.compact-row-actions {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: auto;
    justify-content: end;
    align-items: center;
}

.compact-row-actions-simple {
    display: none;
}

.field-label {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.field-caption {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.validation-message {
    min-height: 0.9rem;
    color: var(--danger);
    font-size: 0.72rem;
    line-height: 1.3;
}

.delete-button {
    min-height: 32px;
    min-width: 32px;
    padding: 0.3rem;
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(122, 95, 66, 0.14);
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1;
}

.compact-row-delete {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 0.15rem;
}

.compact-row-delete::before {
    content: "";
    display: block;
    min-height: 0.9rem;
}

.field-caption-action {
    text-align: center;
    width: 100%;
}

.delete-button:hover,
.delete-button:focus-visible {
    color: var(--danger);
    background: rgba(174, 61, 49, 0.08);
}

.empty-state {
    padding: 1rem 0.25rem 0.4rem;
    text-align: center;
}

.empty-title {
    font-weight: 700;
    margin-bottom: 0.28rem;
}

.empty-text {
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 0.7rem;
}

.empty-state .primary-action {
    max-width: 13rem;
    margin: 0 auto;
}

.trend-content {
    min-height: 180px;
}

.trend-empty {
    padding: 0.75rem 0;
}

.trend-chart-wrap {
    display: grid;
    gap: 0.6rem;
}

.trend-chart {
    width: 100%;
    height: auto;
    display: block;
}

.trend-area {
    fill: rgba(20, 108, 90, 0.1);
}

.trend-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-chart circle {
    fill: var(--primary-strong);
}

.trend-axis,
.trend-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.trend-summary {
    color: var(--muted-strong);
    font-weight: 600;
}

.floating-button {
    position: fixed;
    left: 0.85rem;
    z-index: 25;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 16px 36px rgba(19, 13, 8, 0.18);
}

.summary-fab {
    right: 0.85rem;
    left: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.85rem);
    display: inline-grid;
    gap: 0.02rem;
    min-width: 110px;
    text-align: right;
    background: rgba(39, 28, 18, 0.96);
    color: #fff8f1;
}

.savings-fab {
    min-width: 142px;
}

.fab-label {
    color: rgba(255, 248, 241, 0.68);
    font-size: 0.76rem;
}

.fab-value {
    font-weight: 700;
    direction: ltr;
    text-align: left;
    font-size: 0.95rem;
}

.fab-meta {
    font-size: 0.77rem;
    font-weight: 600;
    text-align: left;
    direction: ltr;
}

.fab-meta.is-positive,
.summary-list dd.is-positive {
    color: #9ef0c5;
}

.fab-meta.is-negative,
.summary-list dd.is-negative {
    color: #ffb9a8;
}

.fab-meta.is-neutral,
.summary-list dd.is-neutral {
    color: rgba(255, 248, 241, 0.68);
}

.top-fab {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.85rem);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border: 1px solid var(--border);
    width: 44px;
    padding: 0.72rem;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 32;
    background: rgba(20, 14, 10, 0.36);
}

.summary-sheet {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 33;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0.65rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
    background: rgba(39, 28, 18, 0.98);
    color: #fff8f1;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 44px rgba(19, 13, 8, 0.26);
}

.summary-sheet-handle {
    width: 52px;
    height: 5px;
    margin: 0 auto 0.8rem;
    border-radius: 999px;
    background: rgba(255, 248, 241, 0.22);
}

.summary-sheet-header {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: start;
    margin-bottom: 1rem;
}

.summary-sheet h2 {
    font-size: 1.16rem;
}

.sheet-close {
    padding: 0.62rem 0.84rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff8f1;
    border: 1px solid rgba(255, 248, 241, 0.15);
}

.summary-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.summary-list div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.summary-list dt {
    color: rgba(255, 248, 241, 0.72);
}

.summary-list dd {
    margin: 0;
    font-size: 1.14rem;
    font-weight: 700;
    text-align: left;
    direction: ltr;
}

.net-row dd.positive {
    color: #9ef0c5;
}

.net-row dd.negative {
    color: #ffb9a8;
}

.summary-note {
    margin-top: 0.8rem;
    color: rgba(255, 248, 241, 0.64);
    font-size: 0.82rem;
}

.sheet-trend-divider {
    height: 1px;
    margin: 0.9rem 0 0.7rem;
    background: rgba(255, 248, 241, 0.14);
}

.sheet-trend-title {
    margin: 0 0 0.45rem;
    font-size: 0.92rem;
    color: rgba(255, 248, 241, 0.82);
}

.sheet-trend .trend-content {
    min-height: 0;
}

.sheet-trend .trend-empty {
    padding: 0.5rem 0;
}

.sheet-trend .empty-title {
    color: rgba(255, 248, 241, 0.72);
}

.sheet-trend .empty-text {
    color: rgba(255, 248, 241, 0.48);
}

.sheet-trend .trend-area {
    fill: rgba(158, 240, 197, 0.12);
}

.sheet-trend .trend-line {
    stroke: #9ef0c5;
}

.sheet-trend .trend-chart circle {
    fill: #9ef0c5;
}

.sheet-trend .trend-axis,
.sheet-trend .trend-summary {
    color: rgba(255, 248, 241, 0.55);
}

.sheet-trend .trend-summary {
    color: rgba(255, 248, 241, 0.78);
}

.toast-stack {
    position: fixed;
    right: 0.75rem;
    left: 0.75rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--fab-gap));
    z-index: 34;
    display: grid;
    gap: 0.45rem;
    pointer-events: none;
}

.toast {
    padding: 0.8rem 0.92rem;
    border-radius: 16px;
    background: rgba(39, 28, 18, 0.94);
    color: #fff;
    box-shadow: 0 16px 40px rgba(19, 13, 8, 0.22);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast[data-tone="success"] {
    background: rgba(15, 85, 71, 0.96);
}

.toast[data-tone="error"] {
    background: rgba(145, 45, 34, 0.96);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Insurance module */
.insurance-grid {
    grid-template-columns: 1fr;
}

.insurance-search {
    margin: 0.5rem 0;
    padding: 0 0.25rem;
}

.insurance-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.insurance-search-input {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.insurance-search-clear {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    min-height: 28px;
    min-width: 28px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(122, 95, 66, 0.15);
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insurance-search-clear:hover,
.insurance-search-clear:focus-visible {
    background: rgba(122, 95, 66, 0.25);
    color: var(--text);
}

.insurance-search-input::placeholder {
    color: #9f8f80;
}

.insurance-search-input:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus);
}

.insurance-list {
    display: grid;
    gap: 0.25rem;
}

.insurance-row {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(122, 95, 66, 0.12);
}

.insurance-row:last-child {
    border-bottom: 0;
}

.insurance-row-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.45rem;
    align-items: center;
}

.insurance-row-info {
    min-width: 0;
}

.insurance-row-name {
    display: block;
    font-weight: 700;
    font-size: 0.94rem;
    margin-bottom: 0.15rem;
}

.insurance-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.insurance-row-category {
    background: rgba(20, 108, 90, 0.1);
    color: var(--primary-strong);
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-weight: 600;
}

.insurance-row-cost {
    font-weight: 700;
    font-size: 0.88rem;
    direction: ltr;
    text-align: left;
    white-space: nowrap;
    color: var(--primary-strong);
}

.insurance-row-actions {
    display: flex;
    gap: 0.2rem;
}

.icon-btn {
    min-height: 34px;
    min-width: 34px;
    padding: 0.25rem;
    background: transparent;
    border: 1px solid rgba(122, 95, 66, 0.12);
    border-radius: 999px;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--muted);
}

.icon-btn:hover,
.icon-btn:focus-visible {
    color: var(--text);
    background: rgba(122, 95, 66, 0.06);
}

.icon-btn-danger:hover,
.icon-btn-danger:focus-visible {
    color: var(--danger);
    background: rgba(174, 61, 49, 0.08);
}

/* Modal overlay */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(20, 14, 10, 0.4);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 41;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-reminder-overlay {
    max-height: 90vh;
    height: auto;
    top: auto;
    bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem 0.5rem;
}

.modal-step-title {
    font-size: 1.05rem;
    margin: 0;
}

.modal-close {
    min-height: 36px;
    min-width: 36px;
    padding: 0.3rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
    color: var(--danger);
    background: rgba(174, 61, 49, 0.06);
}

.modal-progress {
    height: 4px;
    margin: 0 1rem;
    background: rgba(122, 95, 66, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.modal-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.25s ease;
    width: 0;
}

.modal-step-counter {
    padding: 0.25rem 1rem 0;
    color: var(--muted);
    font-size: 0.76rem;
    text-align: center;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    display: grid;
    gap: 0.65rem;
    align-content: start;
}

.modal-body textarea {
    width: 100%;
    min-height: 4.5rem;
    padding: 0.68rem 0.78rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    resize: vertical;
}

.modal-body textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.modal-body select {
    width: 100%;
    padding: 0.68rem 0.78rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
}

.modal-body select:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.65rem 1rem 0.85rem;
}

.modal-btn {
    min-height: 42px;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
}

.modal-btn-next {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.modal-btn-next:hover,
.modal-btn-next:focus-visible {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.modal-btn-skip {
    color: var(--muted);
    border-color: transparent;
    background: transparent;
}

.modal-btn-skip:hover,
.modal-btn-skip:focus-visible {
    color: var(--text);
    background: rgba(122, 95, 66, 0.06);
}

/* Reminder links */
.reminder-links {
    display: grid;
    gap: 0.4rem;
    padding: 0 1rem 0.85rem;
}

/* Details modal */
.modal-details-overlay {
    max-height: 90vh;
    height: auto;
    top: auto;
    bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
}

.details-body {
    padding: 0.75rem 1rem;
}

.details-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
}

.details-row {
    display: grid;
    gap: 0.2rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(122, 95, 66, 0.1);
}

.details-row:last-child {
    border-bottom: 0;
}

.details-row dt {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}

.details-row dd {
    margin: 0;
    font-size: 0.94rem;
    color: var(--text);
    word-break: break-word;
}

.reminder-link {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(20, 108, 90, 0.08);
    color: var(--primary-strong);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    text-align: center;
    border: 1px solid rgba(20, 108, 90, 0.15);
}

.reminder-link:hover {
    background: rgba(20, 108, 90, 0.14);
}

[hidden] {
    display: none !important;
}

@media (min-width: 720px) {
    .page-shell {
        padding-bottom: 2rem;
    }

    .page-header {
        padding-top: 1rem;
    }

    .menu-actions {
        grid-template-columns: repeat(4, max-content);
        justify-content: start;
    }

    .content-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 0.85rem;
    }

    .savings-grid {
        grid-template-columns: 1fr;
    }

    .insurance-grid {
        grid-template-columns: 1fr;
    }

    .modal-overlay {
        position: fixed;
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        max-width: 440px;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }

    .modal-reminder-overlay {
        position: fixed;
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        border-radius: var(--radius-lg);
    }

    .modal-details-overlay {
        position: fixed;
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        max-width: 440px;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }

    .compact-row-main {
        grid-template-columns: minmax(0, 1fr) 132px;
    }

    .list-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 132px 40px;
        gap: 0.5rem;
        padding: 0 0 0.48rem;
        border-bottom: 1px solid rgba(122, 95, 66, 0.14);
        color: var(--muted);
        font-size: 0.82rem;
    }

    .compact-row {
        gap: 0.3rem;
    }

    .compact-row-main,
    .compact-row-actions {
        display: contents;
    }

    .compact-row {
        grid-template-columns: minmax(0, 1fr) 132px 40px;
        align-items: start;
        gap: 0.5rem;
    }

    .field-caption {
        display: none;
    }

    .summary-sheet {
        left: auto;
        right: max(1rem, calc((100vw - var(--max-width)) / 2));
        bottom: 1rem;
        width: 24rem;
        max-height: 80vh;
        border-radius: 22px;
        padding-top: 0.95rem;
    }

    .sheet-backdrop {
        background: transparent;
        pointer-events: none;
    }

    .floating-button {
        left: auto;
        right: max(1rem, calc((100vw - var(--max-width)) / 2));
    }

    .summary-fab {
        bottom: 1rem;
    }

    .top-fab {
        bottom: 5rem;
    }

    .toast-stack {
        left: auto;
        right: max(1rem, calc((100vw - var(--max-width)) / 2));
        width: 19rem;
        bottom: 9.4rem;
    }
}
