:root {
    --blue-950: #082f66;
    --blue-900: #0b3b83;
    --blue-800: #1554ad;
    --blue-700: #1d68d8;
    --blue-600: #2878f0;
    --cyan: #3fd6ff;
    --ink: #10223f;
    --muted: #64748b;
    --line: #d9e5f5;
    --bg: #f4f8ff;
    --panel: rgba(255, 255, 255, .92);
    --danger: #dc2626;
    --success: #059669;
    --shadow: 0 18px 55px rgba(10, 53, 120, .16);
    --shadow-soft: 0 12px 28px rgba(15, 56, 118, .1);
    --radius: 8px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 8%, rgba(63, 214, 255, .28), transparent 28rem),
        radial-gradient(circle at 86% 18%, rgba(45, 212, 191, .18), transparent 22rem),
        linear-gradient(135deg, #eef6ff 0%, #dbeafe 42%, #eff6ff 100%);
    overflow-x: hidden;
}

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

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

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7vw;
    color: white;
    background:
        linear-gradient(135deg, rgba(8, 47, 102, .96), rgba(37, 99, 235, .88)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='700' viewBox='0 0 900 700'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18'%3E%3Cpath d='M80 540C220 400 280 610 410 470S590 290 800 350'/%3E%3Cpath d='M120 280C250 180 370 330 500 210S690 130 810 190'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    animation: brandWash 10s var(--ease) infinite alternate;
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #bdefff);
    color: var(--blue-900);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

.brand-mark:hover {
    transform: translateY(-2px) rotate(-4deg);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.brand-logo {
    width: 54px;
    height: 54px;
    display: block;
    flex: 0 0 auto;
    border-radius: 16px;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, .2));
    transition: transform .22s var(--ease), filter .22s var(--ease);
}

.brand-logo:hover {
    transform: translateY(-2px) rotate(-4deg);
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .24));
}

.hero-logo {
    width: 76px;
    height: 76px;
    border-radius: 22px;
}

.auth-brand h1 {
    margin: 26px 0 12px;
    font-size: clamp(42px, 7vw, 76px);
    letter-spacing: 0;
}

.auth-brand p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
    line-height: 1.8;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px;
}

.auth-card,
.panel,
.stat,
.table-wrap {
    border: 1px solid rgba(255, 255, 255, .65);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}

.auth-card {
    width: 100%;
    max-width: 390px;
    padding: 30px;
    border-radius: 8px;
    animation: cardIn .45s var(--ease) both;
}

.auth-card h2,
.page-title h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.hint,
.copyright,
.muted {
    color: var(--muted);
}

.form-grid {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: #254160;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}

textarea {
    resize: vertical;
    line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(40, 120, 240, .18);
    border-color: var(--blue-600);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .1);
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
    box-shadow: 0 10px 25px rgba(37, 99, 235, .23);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}

.button:hover,
button:hover {
    transform: translateY(-1px);
    filter: saturate(1.06);
    box-shadow: 0 14px 28px rgba(37, 99, 235, .26);
}

.button:active,
button:active {
    transform: translateY(0) scale(.98);
}

button.is-loading,
.button.is-loading {
    pointer-events: none;
    opacity: .76;
}

.button.secondary {
    color: var(--blue-800);
    background: #eaf3ff;
    box-shadow: none;
}

.button.secondary:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, .12);
}

.full-button {
    width: 100%;
}

.button.danger {
    color: var(--danger);
    background: #fff1f2;
    box-shadow: none;
}

.alert {
    margin: 0 0 16px;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff1f2;
    color: #be123c;
    animation: alertIn .32s var(--ease) both;
}

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

.menu-toggle,
.sidebar-mask {
    display: none;
}

.sidebar {
    padding: 24px 18px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(8, 47, 102, .98), rgba(21, 84, 173, .98)),
        linear-gradient(135deg, rgba(255, 255, 255, .12), transparent);
    box-shadow: 16px 0 40px rgba(8, 47, 102, .16);
    z-index: 30;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    font-size: 22px;
    font-weight: 900;
}

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

.nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 0 14px;
    color: rgba(255, 255, 255, .78);
    font-weight: 700;
    transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.nav a.active,
.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    transform: translateX(3px);
}

.sidebar-footer {
    position: sticky;
    top: calc(100vh - 90px);
    margin-top: 42px;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
}

.main {
    min-width: 0;
    padding: 28px;
    animation: pageIn .38s var(--ease) both;
}

.topbar,
.page-head,
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 196, 255, .54);
    border-radius: 16px;
    color: var(--blue-900);
    background: rgba(255, 255, 255, .66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), 0 10px 24px rgba(15, 56, 118, .08);
    font-weight: 900;
}

.notification-bell svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-bell b {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    padding: 0 5px;
    color: #fff;
    background: #ef4444;
    font-size: 11px;
    line-height: 1;
}

.notification-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.notification-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--glass-bg-strong);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(24px) saturate(1.35);
}

.notification-item.unread {
    border-color: rgba(31, 122, 240, .46);
    box-shadow: var(--glass-shadow-hover);
}

.notice-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-700), var(--cyan));
    font-weight: 900;
}

.notification-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.notification-item header span {
    color: var(--muted);
    font-size: 12px;
}

.notification-item p {
    margin: 0 0 12px;
    color: #38536f;
    line-height: 1.7;
}

.topbar {
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: var(--radius);
    padding: 16px 18px;
    background: rgba(255, 255, 255, .7);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.user-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    background: #fff;
    color: var(--muted);
    box-shadow: 0 8px 18px rgba(15, 56, 118, .08);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.stat {
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    animation: cardIn .44s var(--ease) both;
}

.stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(40, 120, 240, .1), transparent 55%);
    opacity: .8;
    pointer-events: none;
}

.stat:hover,
.panel:hover,
.table-wrap:hover,
.auth-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 60px rgba(10, 53, 120, .2);
    border-color: rgba(147, 197, 253, .8);
}

.stat strong {
    display: block;
    margin-top: 10px;
    font-size: 28px;
    position: relative;
}

.income {
    color: var(--success);
}

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

.grid-2 {
    display: grid;
    grid-template-columns: minmax(310px, .72fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.panel,
.table-wrap {
    border-radius: 8px;
    padding: 20px;
    animation: cardIn .44s var(--ease) both;
}

.panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th,
td {
    padding: 13px 10px;
    text-align: left;
    white-space: nowrap;
}

tbody tr {
    transition: background .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}

tbody tr:hover {
    background: rgba(234, 243, 255, .72);
    box-shadow: 0 12px 24px rgba(15, 56, 118, .1), inset 3px 0 0 var(--blue-600);
    transform: translateY(-1px);
}

th {
    color: #47617f;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}

tbody td {
    border-top: 1px solid rgba(217, 229, 245, .86);
    border-bottom: 1px solid rgba(217, 229, 245, .86);
    background: rgba(255, 255, 255, .72);
}

tbody td:first-child {
    border-left: 1px solid rgba(217, 229, 245, .86);
    border-radius: var(--radius) 0 0 var(--radius);
}

tbody td:last-child {
    border-right: 1px solid rgba(217, 229, 245, .86);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eaf3ff;
    color: var(--blue-800);
    font-size: 12px;
    font-weight: 800;
    transition: transform .16s var(--ease), background .16s var(--ease);
}

.badge:hover {
    transform: translateY(-1px);
    background: #dbeafe;
}

.swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: -1px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
}

.progress {
    width: 132px;
    height: 7px;
    margin: 4px 0 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-700), var(--cyan));
    transform-origin: left;
    animation: progressIn .75s var(--ease) both;
}

.filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
    border: 1px solid rgba(217, 229, 245, .9);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(255, 255, 255, .62);
}

.empty {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #b9d3f4;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .56);
}

.page-head {
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: var(--radius);
    padding: 18px;
    background: rgba(255, 255, 255, .62);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    animation: cardIn .36s var(--ease) both;
}

.spotlight-card,
.quick-entry-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, .46);
    border-radius: var(--radius);
    padding: 22px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 47, 102, .96), rgba(37, 99, 235, .9)),
        radial-gradient(circle at 80% 20%, rgba(63, 214, 255, .42), transparent 18rem);
    box-shadow: 0 24px 70px rgba(8, 47, 102, .24);
    animation: cardIn .42s var(--ease) both;
}

.spotlight-card::after,
.quick-entry-hero::after {
    content: "";
    position: absolute;
    inset: -45% auto auto 55%;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 62%);
    animation: slowFloat 7s var(--ease) infinite alternate;
}

.spotlight-card h2,
.quick-entry-hero h2,
.family-modal h2 {
    margin: 8px 0;
    letter-spacing: 0;
}

.spotlight-card p,
.quick-entry-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    line-height: 1.7;
}

.modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(125, 211, 252, .36);
    border-radius: 999px;
    padding: 5px 10px;
    color: #0ea5e9;
    background: rgba(224, 242, 254, .78);
    font-size: 12px;
    font-weight: 900;
}

.spotlight-card .modal-kicker,
.quick-entry-hero .modal-kicker {
    color: #dff9ff;
    background: rgba(255, 255, 255, .14);
}

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
    gap: 18px;
    margin-bottom: 18px;
}

.chart-card canvas {
    width: 100%;
    max-height: 300px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .72);
    color: #38536f;
    font-size: 12px;
    font-weight: 800;
}

.chart-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.amount-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.amount-chips button {
    min-width: 70px;
    color: var(--blue-900);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.invite-code {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(147, 197, 253, .7);
    border-radius: var(--radius);
    padding: 8px;
    background: rgba(255, 255, 255, .72);
}

.invite-code span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.invite-code strong {
    color: var(--blue-800);
    letter-spacing: 1px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 47, 102, .46);
    backdrop-filter: blur(16px);
}

.modal-backdrop.is-visible {
    display: flex;
}

.family-modal {
    position: relative;
    width: min(780px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: var(--radius);
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .94)),
        radial-gradient(circle at 90% 10%, rgba(63, 214, 255, .28), transparent 16rem);
    box-shadow: 0 34px 100px rgba(8, 47, 102, .36);
    animation: modalIn .3s var(--ease) both;
}

.modal-glow {
    position: absolute;
    inset: -90px -70px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(40, 120, 240, .2), transparent 68%);
}

.family-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 14px;
}

.choice-card {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(217, 229, 245, .92);
    border-radius: var(--radius);
    padding: 18px;
    background: rgba(255, 255, 255, .8);
    box-shadow: var(--shadow-soft);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.choice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(10, 53, 120, .16);
}

.choice-card strong {
    font-size: 18px;
}

.choice-card span {
    color: var(--muted);
    line-height: 1.6;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slowFloat {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-24px, 18px, 0) scale(1.08);
    }
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes alertIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes brandWash {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 50%;
    }
}

@media (max-width: 980px) {
    .auth-shell,
    .app-shell,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .app-shell {
        display: block;
    }

    .menu-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 50;
        display: inline-flex;
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 8px;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(82vw, 290px);
        transform: translateX(-104%);
        transition: transform .24s var(--ease);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-mask {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: block;
        pointer-events: none;
        background: rgba(8, 47, 102, .32);
        opacity: 0;
        transition: opacity .22s var(--ease);
    }

    body.sidebar-open .sidebar-mask {
        pointer-events: auto;
        opacity: 1;
    }

    .topbar {
        margin-left: 56px;
    }

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

    .analytics-grid,
    .family-choice-grid {
        grid-template-columns: 1fr;
    }

    .spotlight-card,
    .quick-entry-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .amount-chips {
        justify-content: flex-start;
    }

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

@media (max-width: 560px) {
    .main,
    .auth-panel,
    .auth-brand {
        padding: 20px;
    }

    .stats,
    .filters {
        grid-template-columns: 1fr;
    }

    .topbar,
    .page-head,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        margin-left: 52px;
    }

    th,
    td {
        padding: 11px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Unified Liquid Glass Theme */
:root {
    --radius: 22px;
    --radius-sm: 14px;
    --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(226, 242, 255, .36));
    --glass-bg-strong: linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(232, 246, 255, .58));
    --glass-dark: linear-gradient(160deg, rgba(7, 34, 82, .78), rgba(24, 96, 196, .42));
    --glass-border: rgba(255, 255, 255, .72);
    --glass-line: rgba(148, 196, 255, .42);
    --glass-shadow: 0 24px 80px rgba(7, 42, 108, .18), inset 0 1px 0 rgba(255, 255, 255, .72);
    --glass-shadow-hover: 0 30px 95px rgba(7, 42, 108, .24), inset 0 1px 0 rgba(255, 255, 255, .86);
    --liquid-blue: #1f7af0;
    --liquid-cyan: #62e3ff;
}

body {
    background:
        radial-gradient(circle at 12% 10%, rgba(98, 227, 255, .34), transparent 28rem),
        radial-gradient(circle at 78% 4%, rgba(54, 121, 255, .32), transparent 24rem),
        radial-gradient(circle at 82% 86%, rgba(20, 184, 166, .2), transparent 25rem),
        linear-gradient(135deg, #edf7ff 0%, #dbeafe 46%, #f7fbff 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(2px);
}

body::before {
    width: 520px;
    height: 520px;
    top: -170px;
    right: -130px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .92), rgba(98, 227, 255, .28) 38%, rgba(31, 122, 240, .08) 70%, transparent 72%);
    animation: liquidDrift 12s var(--ease) infinite alternate;
}

body::after {
    width: 430px;
    height: 430px;
    left: -160px;
    bottom: -140px;
    background: radial-gradient(circle at 45% 45%, rgba(255, 255, 255, .78), rgba(37, 99, 235, .16) 44%, transparent 72%);
    animation: liquidDrift 14s var(--ease) infinite alternate-reverse;
}

.auth-card,
.panel,
.stat,
.table-wrap,
.topbar,
.page-head,
.filters,
.empty,
.family-modal,
.choice-card,
.invite-code {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.auth-card::before,
.panel::before,
.stat::before,
.table-wrap::before,
.topbar::before,
.page-head::before,
.family-modal::before,
.choice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .66), transparent 34%),
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .46), transparent 22rem),
        radial-gradient(circle at 88% 92%, rgba(98, 227, 255, .16), transparent 18rem);
    mix-blend-mode: screen;
}

.auth-card > *,
.panel > *,
.stat > *,
.table-wrap > *,
.topbar > *,
.page-head > *,
.family-modal > *,
.choice-card > * {
    position: relative;
    z-index: 1;
}

.auth-card:hover,
.panel:hover,
.table-wrap:hover,
.stat:hover,
.choice-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, .92);
    box-shadow: var(--glass-shadow-hover);
}

.auth-shell {
    background:
        radial-gradient(circle at 18% 18%, rgba(98, 227, 255, .18), transparent 22rem),
        radial-gradient(circle at 72% 76%, rgba(31, 122, 240, .16), transparent 24rem);
}

.auth-brand,
.sidebar,
.admin-sidebar {
    background:
        linear-gradient(160deg, rgba(7, 34, 82, .9), rgba(21, 101, 216, .66)),
        radial-gradient(circle at 26% 12%, rgba(255, 255, 255, .24), transparent 18rem),
        radial-gradient(circle at 92% 82%, rgba(98, 227, 255, .2), transparent 20rem);
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
}

.auth-brand {
    border-right: 1px solid rgba(255, 255, 255, .18);
}

.auth-panel {
    background:
        radial-gradient(circle at 72% 18%, rgba(98, 227, 255, .18), transparent 20rem),
        radial-gradient(circle at 18% 84%, rgba(31, 122, 240, .12), transparent 22rem);
}

.sidebar {
    border-right: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 18px 0 70px rgba(7, 42, 108, .22);
}

.logo {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.brand-logo {
    border-radius: 18px;
}

.nav a {
    border: 1px solid transparent;
    border-radius: 16px;
    color: rgba(236, 249, 255, .82);
}

.nav a.active,
.nav a:hover {
    border-color: rgba(255, 255, 255, .22);
    background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(98, 227, 255, .08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 12px 30px rgba(0, 0, 0, .12);
}

.main {
    padding: 30px;
}

.topbar,
.page-head {
    padding: 18px 20px;
}

.auth-card,
.panel,
.table-wrap {
    background: var(--glass-bg-strong);
}

.stat {
    min-height: 128px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .8), rgba(227, 243, 255, .42)),
        radial-gradient(circle at 82% 18%, rgba(98, 227, 255, .22), transparent 12rem);
}

.stat span {
    color: #47617f;
    font-weight: 800;
}

.stat strong {
    color: #082f66;
}

input,
select {
    border: 1px solid rgba(148, 196, 255, .54);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
}

textarea {
    border: 1px solid rgba(148, 196, 255, .54);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, .66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(64, 150, 255, .72);
    background: rgba(255, 255, 255, .8);
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: rgba(31, 122, 240, .82);
    box-shadow: 0 0 0 4px rgba(98, 227, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .86);
}

@media (max-width: 680px) {
    .modal-backdrop {
        align-items: flex-start;
        padding: 14px;
        overflow-y: auto;
    }

    .family-modal {
        width: 100%;
        max-height: none;
        margin: 56px 0 18px;
        padding: 18px;
        border-radius: 18px;
    }

    .family-modal h2 {
        font-size: 22px;
    }

    .family-modal p {
        line-height: 1.65;
    }

    .family-choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 14px 0;
    }

    .choice-card {
        padding: 14px;
        gap: 10px;
    }

    .top-actions {
        justify-content: space-between;
        width: 100%;
    }

    .notification-item {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 14px;
    }

    .notice-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .notification-item header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

.button,
button {
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(135deg, rgba(35, 116, 238, .96), rgba(21, 173, 231, .9)),
        radial-gradient(circle at 20% 12%, rgba(255, 255, 255, .48), transparent 9rem);
    box-shadow: 0 14px 34px rgba(31, 122, 240, .24), inset 0 1px 0 rgba(255, 255, 255, .44);
}

.button.secondary,
.button.danger {
    background: rgba(255, 255, 255, .62);
    border-color: rgba(148, 196, 255, .48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.button.secondary {
    color: var(--blue-800);
}

.button.danger {
    color: var(--danger);
}

.alert {
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(255, 241, 242, .82), rgba(255, 255, 255, .62));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

table {
    border-spacing: 0 10px;
}

th {
    border-bottom: 0;
    color: #58718f;
}

tbody td {
    border-color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
}

tbody td:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

tbody td:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, .78);
}

tbody tr:hover {
    box-shadow: 0 16px 36px rgba(7, 42, 108, .12), inset 4px 0 0 var(--liquid-blue);
}

.badge,
.modal-kicker,
.chart-legend span {
    border: 1px solid rgba(148, 196, 255, .46);
    background: rgba(255, 255, 255, .56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
    backdrop-filter: blur(12px);
}

.spotlight-card,
.quick-entry-hero {
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(7, 34, 82, .82), rgba(31, 122, 240, .48)),
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .24), transparent 18rem),
        radial-gradient(circle at 88% 70%, rgba(98, 227, 255, .22), transparent 20rem);
    box-shadow: 0 28px 90px rgba(7, 42, 108, .28), inset 0 1px 0 rgba(255, 255, 255, .24);
    backdrop-filter: blur(20px) saturate(1.2);
}

.spotlight-card::before,
.quick-entry-hero::before {
    content: "";
    position: absolute;
    inset: 1px;
    pointer-events: none;
    border-radius: calc(var(--radius) - 1px);
    background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 45%);
}

.amount-chips button {
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .32);
}

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

.field-actions .button,
.field-actions button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.progress {
    background: rgba(148, 196, 255, .26);
    box-shadow: inset 0 1px 2px rgba(7, 42, 108, .12);
}

.progress span {
    background: linear-gradient(90deg, var(--liquid-blue), var(--liquid-cyan));
    box-shadow: 0 0 18px rgba(98, 227, 255, .54);
}

.modal-backdrop {
    background:
        radial-gradient(circle at 50% 16%, rgba(98, 227, 255, .24), transparent 26rem),
        rgba(6, 25, 62, .5);
}

.family-modal {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(226, 242, 255, .68)),
        radial-gradient(circle at 88% 10%, rgba(98, 227, 255, .22), transparent 18rem);
}

.auth-brand h1,
.page-title h1,
.spotlight-card h2,
.quick-entry-hero h2 {
    text-shadow: 0 12px 34px rgba(7, 42, 108, .16);
}

@media (max-width: 980px) {
    .sidebar {
        background:
            linear-gradient(160deg, rgba(7, 34, 82, .94), rgba(21, 101, 216, .74)),
            radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .22), transparent 18rem);
        backdrop-filter: blur(28px) saturate(1.35);
    }

    .menu-toggle {
        border-radius: 16px;
        background: rgba(31, 122, 240, .86);
        backdrop-filter: blur(18px);
    }
}

@media (max-width: 560px) {
    .main {
        padding: 20px;
    }

    .auth-card,
    .panel,
    .table-wrap,
    .topbar,
    .page-head,
    .spotlight-card,
    .quick-entry-hero {
        border-radius: 18px;
    }
}

@keyframes liquidDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-26px, 34px, 0) scale(1.08);
    }
}

/* Independent Admin Console */
.admin-body {
    background:
        radial-gradient(circle at 8% 8%, rgba(98, 227, 255, .26), transparent 26rem),
        radial-gradient(circle at 88% 12%, rgba(37, 99, 235, .28), transparent 30rem),
        linear-gradient(135deg, #edf7ff 0%, #e8f2ff 46%, #f8fbff 100%);
}

.admin-workspace {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 292px minmax(0, 1fr);
}

.admin-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    background:
        linear-gradient(180deg, rgba(4, 24, 64, .94), rgba(12, 64, 146, .82)),
        radial-gradient(circle at 22% 10%, rgba(98, 227, 255, .2), transparent 20rem);
    z-index: 40;
    color: #fff;
    box-shadow: 20px 0 80px rgba(4, 24, 64, .22);
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 22px;
    padding: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.admin-logo span {
    display: grid;
    gap: 3px;
}

.admin-logo small {
    color: rgba(236, 249, 255, .68);
    font-size: 12px;
    font-weight: 700;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 0 14px;
    color: rgba(236, 249, 255, .82);
    font-weight: 800;
    transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.admin-nav a.active,
.admin-nav a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .22);
    background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(98, 227, 255, .08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 12px 30px rgba(0, 0, 0, .12);
    transform: translateX(3px);
}

.admin-sidebar-footer {
    margin-top: 34px;
    color: rgba(236, 249, 255, .62);
    font-size: 12px;
}

.admin-main {
    padding: 24px 30px 34px;
    min-width: 0;
    animation: pageIn .38s var(--ease) both;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(24px) saturate(1.35);
}

.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.admin-action-card {
    display: grid;
    gap: 8px;
    min-height: 126px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--glass-bg-strong);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(24px) saturate(1.35);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.admin-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-hover);
}

.admin-action-card strong {
    color: var(--blue-900);
    font-size: 18px;
}

.admin-action-card span {
    color: var(--muted);
    line-height: 1.6;
}

.admin-menu-toggle,
.admin-sidebar-mask {
    display: none;
}

@media (max-width: 980px) {
    .admin-workspace {
        display: block;
    }

    .admin-rail {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(84vw, 300px);
        height: auto;
        transform: translateX(-104%);
        transition: transform .24s var(--ease);
    }

    body.admin-sidebar-open .admin-rail {
        transform: translateX(0);
    }

    .admin-menu-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 60;
        display: inline-flex;
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 16px;
        background: rgba(31, 122, 240, .86);
        backdrop-filter: blur(18px);
    }

    .admin-sidebar-mask {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        pointer-events: none;
        opacity: 0;
        background: rgba(8, 47, 102, .32);
        transition: opacity .22s var(--ease);
    }

    body.admin-sidebar-open .admin-sidebar-mask {
        pointer-events: auto;
        opacity: 1;
    }

    .admin-topbar {
        margin-left: 56px;
    }

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

@media (max-width: 560px) {
    .admin-main {
        padding: 20px;
    }

    .admin-top-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

/* Final Mobile Adaptation Layer */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
        background:
            radial-gradient(circle at 16% 4%, rgba(98, 227, 255, .26), transparent 18rem),
            radial-gradient(circle at 84% 18%, rgba(37, 99, 235, .2), transparent 18rem),
            linear-gradient(145deg, #f6fbff 0%, #e7f2ff 100%);
    }

    .auth-shell {
        display: block;
        min-height: 100vh;
    }

    .auth-brand {
        min-height: auto;
        padding: 28px 20px 22px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .18);
    }

    .auth-brand h1 {
        margin: 16px 0 8px;
        font-size: 36px;
        line-height: 1.1;
    }

    .auth-brand p {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.65;
    }

    .hero-logo {
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }

    .auth-panel {
        display: block;
        padding: 18px;
    }

    .auth-card {
        max-width: none;
        width: 100%;
        padding: 20px;
        border-radius: 20px;
    }

    .app-shell,
    .admin-workspace {
        display: block;
        min-height: 100vh;
    }

    .main,
    .admin-main {
        width: 100%;
        min-width: 0;
        padding: 76px 14px 22px;
    }

    .menu-toggle,
    .admin-menu-toggle {
        position: fixed;
        top: 14px;
        left: 14px;
        width: 44px;
        min-height: 44px;
        z-index: 80;
        display: inline-flex;
    }

    .sidebar,
    .admin-rail {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 306px);
        height: 100vh;
        overflow-y: auto;
        padding: 18px 14px;
        transform: translateX(-104%);
        transition: transform .24s var(--ease);
    }

    body.sidebar-open .sidebar,
    body.admin-sidebar-open .admin-rail {
        transform: translateX(0);
    }

    .sidebar-mask,
    .admin-sidebar-mask {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        pointer-events: none;
        opacity: 0;
        background: rgba(8, 47, 102, .36);
        backdrop-filter: blur(4px);
        transition: opacity .22s var(--ease);
    }

    body.sidebar-open .sidebar-mask,
    body.admin-sidebar-open .admin-sidebar-mask {
        pointer-events: auto;
        opacity: 1;
    }

    .logo,
    .admin-logo {
        min-height: 64px;
        margin-bottom: 14px;
        border-radius: 18px;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .nav,
    .admin-nav {
        gap: 7px;
    }

    .nav a,
    .admin-nav a {
        min-height: 42px;
        border-radius: 14px;
        padding: 0 12px;
        font-size: 14px;
    }

    .topbar,
    .admin-topbar,
    .page-head {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
        margin: 0 0 14px;
        margin-left: 0;
        padding: 16px;
        border-radius: 20px;
    }

    .topbar strong,
    .admin-topbar strong {
        font-size: 17px;
    }

    .muted {
        line-height: 1.55;
    }

    .top-actions,
    .admin-top-actions,
    .actions {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: wrap;
    }

    .notification-bell {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
    }

    .user-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-title h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .stats,
    .analytics-grid,
    .grid-2,
    .admin-action-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 14px 0;
    }

    .stat {
        min-height: 108px;
        padding: 16px;
        border-radius: 20px;
    }

    .stat strong {
        font-size: 24px;
        word-break: break-word;
    }

    .spotlight-card,
    .quick-entry-hero {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 14px 0;
        padding: 18px;
        border-radius: 22px;
    }

    .spotlight-card h2,
    .quick-entry-hero h2 {
        font-size: 23px;
        line-height: 1.3;
    }

    .amount-chips {
        justify-content: flex-start;
    }

    .amount-chips button {
        min-width: calc(50% - 6px);
    }

    .panel,
    .table-wrap,
    .admin-action-card,
    .notification-item {
        padding: 16px;
        border-radius: 20px;
    }

    .panel h2,
    .table-wrap h2 {
        font-size: 18px;
        line-height: 1.3;
    }

    .filters {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 10px;
        border-radius: 18px;
    }

    label {
        font-size: 13px;
    }

    input,
    select,
    textarea,
    .button,
    button {
        min-height: 44px;
        border-radius: 14px;
        font-size: 14px;
    }

    .button,
    button {
        width: 100%;
        padding: 10px 12px;
    }

    .field-actions .button,
    .field-actions button {
        width: auto;
        min-height: 34px;
    }

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

    table {
        min-width: 720px;
        border-spacing: 0 8px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 13px;
    }

    td .button,
    td button,
    table .button,
    table button {
        width: auto;
        min-height: 34px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .chart-card canvas {
        max-height: 240px;
    }

    .chart-legend {
        gap: 6px;
    }

    .chart-legend span {
        max-width: 100%;
        white-space: normal;
    }

    .modal-backdrop {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .family-modal {
        width: 100%;
        margin: 64px 0 18px;
        padding: 16px;
        border-radius: 20px;
    }

    .family-modal h2 {
        font-size: 22px;
        line-height: 1.25;
    }

    .family-choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 14px 0;
    }

    .choice-card {
        padding: 14px;
        border-radius: 18px;
    }

    .choice-card button,
    .family-modal .full-button {
        width: 100%;
    }

    .notification-list {
        gap: 12px;
        margin-top: 14px;
    }

    .notification-item {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
    }

    .notice-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .notification-item header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .notification-item p {
        font-size: 14px;
    }

    .invite-code {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .invite-code .button {
        width: auto;
    }
}

@media (max-width: 390px) {
    .main,
    .admin-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .auth-panel {
        padding: 12px;
    }

    .auth-card,
    .panel,
    .table-wrap,
    .topbar,
    .admin-topbar,
    .page-head,
    .spotlight-card,
    .quick-entry-hero,
    .family-modal {
        padding: 14px;
        border-radius: 18px;
    }

    .page-title h1 {
        font-size: 22px;
    }
}
