:root {
    --bg: #f3f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #142033;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --border: #dbe6f2;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #eef5ff 0%, #f7fbff 100%);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-shell {
    min-height: 100vh;
    padding-bottom: 90px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(219,230,242,0.8);
    padding: 16px 16px 12px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.brand-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.1;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.desktop-nav {
    display: none;
}

.page-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 14px 24px;
}

.page-card,
.content-card,
.summary-card,
.form-card,
.table-card,
.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.hero-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.hero-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.section-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.grid {
    display: grid;
    gap: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.stat-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-value {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.primary { color: var(--primary); }
.stat-value.danger { color: var(--danger); }

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.btn,
button,
input[type="submit"] {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    min-height: 46px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary,
button,
input[type="submit"] {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: #eaf1ff;
    color: var(--primary);
}

.btn-secondary:hover {
    background: #dbe8ff;
    text-decoration: none;
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.btn-danger:hover {
    background: #fecaca;
    text-decoration: none;
}

.filter-card,
.form-card,
.table-card,
.summary-card,
.content-card {
    padding: 16px;
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    padding: 12px 14px;
    font-size: 1rem;
    outline: none;
}

input:focus,
select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.period-text,
.helper-text,
.empty-text {
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.mobile-expense-list {
    display: grid;
    gap: 12px;
}

.expense-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    background: var(--surface-soft);
}

.expense-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.expense-title {
    margin: 0;
    font-size: 1rem;
}

.expense-value {
    margin: 0;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.expense-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.meta-item small {
    display: block;
    color: var(--muted);
    margin-bottom: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge-paid {
    background: #dcfce7;
    color: #166534;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.expense-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-desktop {
    display: none;
}

.summary-list {
    display: grid;
    gap: 12px;
}

.summary-item {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    z-index: 30;
}

.bottom-nav a {
    color: var(--muted);
    text-align: center;
    padding: 8px 4px;
    border-radius: 14px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bottom-nav a span {
    font-size: 1.1rem;
    line-height: 1;
}

.bottom-nav a:hover {
    text-decoration: none;
    background: #eef4ff;
    color: var(--primary);
}

.bottom-nav .nav-add {
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    font-weight: 700;
}

.bottom-nav .nav-add:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), #0ea5e9);
}

.inline-form {
    display: inline;
}

@media (min-width: 768px) {
    .app-shell {
        padding-bottom: 30px;
    }

    .topbar {
        padding: 18px 24px;
    }

    .desktop-nav {
        display: flex;
        gap: 14px;
        margin-top: 16px;
        flex-wrap: wrap;
    }

    .desktop-nav a {
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        padding: 0 14px;
        border-radius: 12px;
        background: #eef4ff;
        font-weight: 700;
    }

    .desktop-nav a:hover {
        text-decoration: none;
        background: #dbe8ff;
    }

    .mobile-nav {
        display: none;
    }

    .page-container {
        padding: 24px 20px 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid.two-cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-desktop {
        display: block;
        overflow-x: auto;
    }

    .mobile-expense-list {
        display: none;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th, td {
        padding: 14px 12px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        vertical-align: top;
    }

    th {
        color: var(--muted);
        font-size: 0.88rem;
        font-weight: 700;
        background: #f8fbff;
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-title {
        font-size: 1.8rem;
    }
}

.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.hf-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100;
    padding: 18px;
    align-items: center;
    justify-content: center;
}

.hf-modal.active {
    display: flex;
}

.hf-modal-content {
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    padding: 18px;
}

.hf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.hf-modal-header h3 {
    margin: 0;
}

.hf-modal-close {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
    font-size: 1.4rem;
    line-height: 1;
    background: #eef4ff;
    color: #2563eb;
}

.hf-modal-body {
    display: grid;
    gap: 12px;
}

.welcome-card {
    background: linear-gradient(135deg, #eef6ff, #ffffff);
}

.welcome-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.profile-soft-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.soft-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.soft-gradient {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.status-action-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-hero {
    background: linear-gradient(135deg, #eef6ff, #ffffff);
}

.auth-card {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.auth-form {
    gap: 18px;
}

.password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.password-field input {
    margin: 0;
}

.password-toggle {
    min-width: 72px;
    background: #eef4ff;
    color: #2563eb;
}

.password-toggle:hover {
    background: #dbe8ff;
}

.auth-actions {
    justify-content: flex-start;
}

.auth-links {
    margin-top: 4px;
}

.alert-box {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border-color: #bbf7d0;
}

.welcome-card {
    background: linear-gradient(135deg, #eef6ff, #ffffff);
}

.welcome-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.profile-soft-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.soft-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.soft-gradient {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.hf-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100;
    padding: 18px;
    align-items: center;
    justify-content: center;
}

.hf-modal.active {
    display: flex;
}

.hf-modal-content {
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    padding: 18px;
}

.hf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.hf-modal-header h3 {
    margin: 0;
}

.hf-modal-close {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
    font-size: 1.4rem;
    line-height: 1;
    background: #eef4ff;
    color: #2563eb;
}

.hf-modal-body {
    display: grid;
    gap: 12px;
}

.status-action-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-footer-signature {
    text-align: center;
    padding: 10px 16px 90px;
    color: #64748b;
    font-size: 0.82rem;
}

.app-footer-signature a {
    color: #64748b;
    text-decoration: none;
}

.app-footer-signature a:hover {
    color: #2563eb;
    text-decoration: none;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (min-width: 768px) {
    .app-footer-signature {
        padding-bottom: 20px;
    }
}

.install-banner {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 86px;
    z-index: 120;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    padding: 14px;
}

.install-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.install-banner-content p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.install-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .install-banner {
        max-width: 720px;
        margin: 0 auto;
        bottom: 24px;
    }
}

.auth-screen {
    min-height: calc(100vh - 180px);
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 8px 0 24px;
}

.auth-screen-top {
    text-align: center;
    padding: 12px 8px 4px;
}

.auth-logo-badge {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.auth-kicker {
    margin: 0 0 6px;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-main-title {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.05;
    color: #0f172a;
}

.auth-main-text {
    max-width: 560px;
    margin: 10px auto 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

.auth-panel {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 20px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.auth-form-modern {
    gap: 16px;
}

.auth-form-modern .form-group label {
    font-weight: 700;
    color: #0f172a;
}

.auth-form-modern input,
.auth-form-modern select {
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid #dbe3ef;
    background: #fff;
    padding: 0 16px;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.auth-form-modern input:focus,
.auth-form-modern select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.mini-link:hover {
    text-decoration: underline;
}

.modern-password-field {
    grid-template-columns: 1fr auto;
    align-items: stretch;
}

.modern-password-field .password-toggle {
    min-width: 78px;
    border-radius: 16px;
    border: 1px solid #dbe3ef;
    background: #eef4ff;
    color: #2563eb;
    font-weight: 700;
    padding: 0 14px;
}

.modern-password-field .password-toggle:hover {
    background: #dbeafe;
}

.auth-actions-stack {
    display: block;
}

.btn-auth-primary {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.btn-auth-primary:hover {
    transform: translateY(-1px);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 18px 0 14px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e2e8f0;
    transform: translateY(-50%);
}

.auth-divider span {
    position: relative;
    z-index: 1;
    background: #f8fbff;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.auth-secondary-actions {
    display: grid;
}

.btn-auth-secondary {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .auth-screen {
        min-height: calc(100vh - 220px);
        align-content: center;
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-panel {
        padding: 28px;
    }
}

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-soft: #f8fbff;
    --text-main: #0f172a;
    --text-soft: #64748b;
    --border-soft: #e2e8f0;
    --input-bg: #ffffff;
    --shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.08);
}

body.theme-dark,
body[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #111827;
    --bg-soft: #172033;
    --text-main: #f8fafc;
    --text-soft: #cbd5e1;
    --border-soft: #263246;
    --input-bg: #0b1220;
    --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.35);
}

body {
    background: var(--bg-main);
    color: var(--text-main);
}

.topbar,
.content-card,
.form-card,
.stat-card,
.table-card,
.auth-panel,
.settings-card,
.hf-modal-content {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border-soft);
}

.hero-text,
.helper-text,
.brand-subtitle,
.auth-main-text,
.install-banner-content p,
.app-footer-signature,
.app-footer-signature a {
    color: var(--text-soft);
}

input,
select,
textarea {
    background: var(--input-bg);
    color: var(--text-main);
    border-color: var(--border-soft);
}

.settings-hero {
    margin-bottom: 18px;
}

.settings-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #eef6ff, #ffffff);
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    padding: 18px;
}

body.theme-dark .settings-user-card,
body[data-theme="dark"] .settings-user-card {
    background: linear-gradient(135deg, #172033, #111827);
}

.settings-avatar-wrap {
    flex-shrink: 0;
}

.settings-avatar,
.settings-avatar-fallback {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    object-fit: cover;
}

.settings-avatar {
    border: 3px solid rgba(37, 99, 235, 0.18);
}

.settings-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.hidden {
    display: none;
}

.settings-grid {
    display: grid;
    gap: 18px;
}

.settings-card {
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.settings-form {
    gap: 16px;
}

.settings-form .full-width {
    grid-column: 1 / -1;
}

.topbar-user-chip {
    display: flex;
    align-items: center;
}

.topbar-avatar,
.topbar-avatar-fallback {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
}

.topbar-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-weight: 700;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .settings-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
    }

    .desktop-only {
        display: flex;
    }
}

.settings-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #eef6ff, #ffffff);
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    padding: 18px;
    overflow: hidden;
}

.settings-avatar-wrap {
    width: 88px;
    min-width: 88px;
    height: 88px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf2ff;
}

.settings-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

.settings-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.topbar-user-chip {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.topbar-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.topbar-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-weight: 700;
}

/* =========================
   GLOBAL AVATAR FIX
========================= */

img {
    max-width: 100%;
    height: auto;
}

.settings-user-card,
.topbar,
.topbar-user-chip,
.settings-avatar-wrap,
.topbar-avatar,
.topbar-avatar-fallback {
    box-sizing: border-box;
}

.settings-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #eef6ff, #ffffff);
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    padding: 18px;
    overflow: hidden;
}

.settings-avatar-wrap {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 88px !important;
    max-height: 88px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eaf2ff !important;
}

.settings-avatar-wrap img,
img.settings-avatar,
.settings-avatar {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
    border-radius: 24px !important;
    object-fit: cover !important;
    display: block !important;
    border: 0 !important;
}

.settings-avatar-fallback {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
    color: #fff !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    overflow: hidden !important;
}

.topbar-user-chip {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.topbar-user-chip img,
img.topbar-avatar,
.topbar-avatar {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 14px !important;
    object-fit: cover !important;
    display: block !important;
}

.topbar-avatar-fallback {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
    color: #fff !important;
    font-weight: 700 !important;
    overflow: hidden !important;
}

/* =========================
   BETTER DARK THEME
========================= */

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-soft: #f8fbff;
    --bg-elevated: #ffffff;
    --text-main: #0f172a;
    --text-soft: #64748b;
    --text-muted: #94a3b8;
    --border-soft: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #dbe3ef;
    --shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.08);
    --brand-1: #2563eb;
    --brand-2: #38bdf8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body.theme-dark,
body[data-theme="dark"],
body.theme-dark[data-theme="dark"] {
    --bg-main: #0b1220;
    --bg-card: #111827;
    --bg-soft: #172033;
    --bg-elevated: #1a2438;
    --text-main: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --border-soft: #243045;
    --input-bg: #0f172a;
    --input-border: #314056;
    --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.38);
    --brand-1: #60a5fa;
    --brand-2: #38bdf8;
    --success: #22c55e;
    --warning: #fbbf24;
    --danger: #fb7185;
}

body {
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
}

.app-shell,
.page-container {
    background: transparent !important;
}

.topbar,
.content-card,
.form-card,
.stat-card,
.table-card,
.auth-panel,
.settings-card,
.hf-modal-content,
.install-banner {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: var(--shadow-soft) !important;
}

.topbar {
    background: color-mix(in srgb, var(--bg-card) 92%, transparent) !important;
    backdrop-filter: blur(12px);
}

.hero-card,
.soft-card,
.soft-gradient,
.settings-user-card {
    background: linear-gradient(180deg, var(--bg-elevated), var(--bg-card)) !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--text-main) !important;
}

.hero-title,
.section-title,
.brand-title,
h1, h2, h3, h4 {
    color: var(--text-main) !important;
}

.hero-text,
.helper-text,
.brand-subtitle,
.auth-main-text,
.auth-divider span,
.install-banner-content p,
.app-footer-signature,
.app-footer-signature a,
small,
.meta-item small {
    color: var(--text-soft) !important;
}

input,
select,
textarea {
    background: var(--input-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--input-border) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--brand-1) !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18) !important;
}

button,
.btn,
.btn-secondary,
.password-toggle {
    border-color: transparent;
}

.btn-auth-primary,
button[type="submit"]:not(.hf-modal-close):not(.password-toggle):not(.btn-secondary):not(.btn-danger) {
    background: linear-gradient(135deg, var(--brand-1), #2563eb) !important;
    color: #fff !important;
}

.btn-secondary,
.password-toggle {
    background: rgba(96, 165, 250, 0.12) !important;
    color: var(--brand-1) !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.24) !important;
}

.badge,
.badge-pending {
    background: rgba(96, 165, 250, 0.12) !important;
    color: var(--brand-1) !important;
    border: 1px solid rgba(96, 165, 250, 0.18) !important;
}

.expense-card,
.summary-item {
    background: var(--bg-soft) !important;
    border: 1px solid var(--border-soft) !important;
}

.bottom-nav {
    background: color-mix(in srgb, var(--bg-card) 95%, transparent) !important;
    border-top: 1px solid var(--border-soft) !important;
    backdrop-filter: blur(14px);
}

.bottom-nav a,
.top-nav a,
.app-footer-signature a {
    color: var(--text-soft) !important;
}

.bottom-nav a:hover,
.top-nav a:hover,
.app-footer-signature a:hover {
    color: var(--brand-1) !important;
}

.install-banner {
    background: var(--bg-elevated) !important;
}

.auth-logo-badge,
.brand-badge,
.profile-soft-badge {
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24) !important;
}

body.theme-dark .settings-user-card,
body[data-theme="dark"] .settings-user-card {
    background: linear-gradient(135deg, #172033, #111827) !important;
}

/* melhora visual no mobile */
@media (max-width: 767px) {
    .settings-user-card {
        align-items: flex-start;
    }

    .topbar {
        gap: 10px;
    }

    .brand-wrap {
        min-width: 0;
    }

    .brand-title {
        line-height: 1.05;
    }

    .brand-subtitle {
        line-height: 1.35;
    }
}

/* =========================
   AUTH UI UPGRADE
========================= */

.auth-screen-upgraded {
    position: relative;
    padding: 10px 0 34px;
}

.auth-screen-upgraded::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 28%),
        radial-gradient(circle at bottom center, rgba(37, 99, 235, 0.08), transparent 34%);
    pointer-events: none;
}

.auth-modern-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 22px;
    align-items: stretch;
}

.auth-modern-showcase {
    display: grid;
    gap: 16px;
    padding: 12px 4px 2px;
}

.auth-modern-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.auth-modern-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.02;
    color: var(--text-main);
    max-width: 760px;
}

.auth-modern-text {
    margin: 0;
    max-width: 640px;
    color: var(--text-soft);
    font-size: 1.02rem;
    line-height: 1.7;
}

.auth-modern-highlights {
    display: grid;
    gap: 12px;
}

.auth-highlight-card {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--bg-card) 90%, transparent);
    border: 1px solid var(--border-soft);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.auth-highlight-card strong {
    color: var(--text-main);
    font-size: 0.98rem;
}

.auth-highlight-card span {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-panel-upgraded {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 24px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 96%, white) 0%, var(--bg-card) 100%) !important;
    box-shadow:
        0 24px 64px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.auth-panel-upgraded::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #8b5cf6);
}

.auth-panel-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-google-wrap {
    margin-bottom: 18px;
}

.btn-auth-google {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 18px;
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 700;
    text-decoration: none !important;
}

.btn-auth-google:hover {
    transform: translateY(-1px);
    background: #f8fbff !important;
    border-color: #cfdceb !important;
}

.google-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.google-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.auth-form-upgraded {
    gap: 18px;
}

.auth-form-upgraded .form-group {
    gap: 8px;
}

.auth-form-upgraded .form-group label {
    font-size: 0.94rem;
}

.auth-form-upgraded input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-form-upgraded input:focus {
    transform: translateY(-1px);
}

.auth-divider-upgraded {
    margin: 20px 0 16px;
}

.auth-bottom-links {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.auth-bottom-links a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.auth-bottom-links a:hover {
    text-decoration: underline;
}

body.theme-dark .btn-auth-google,
body[data-theme="dark"] .btn-auth-google {
    background: #111827 !important;
    color: #f8fafc !important;
    border-color: #2c3b52 !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-dark .btn-auth-google:hover,
body[data-theme="dark"] .btn-auth-google:hover {
    background: #172033 !important;
    border-color: #364963 !important;
}

body.theme-dark .auth-highlight-card,
body[data-theme="dark"] .auth-highlight-card {
    background: color-mix(in srgb, var(--bg-card) 94%, transparent);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

body.theme-dark .auth-panel-upgraded,
body[data-theme="dark"] .auth-panel-upgraded {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 96%, #1a2438) 0%, var(--bg-card) 100%) !important;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (min-width: 992px) {
    .auth-modern-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
        gap: 28px;
    }

    .auth-modern-showcase {
        padding: 28px 12px 12px 8px;
        align-content: center;
    }

    .auth-modern-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-panel-upgraded {
        align-self: center;
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .auth-panel-upgraded {
        border-radius: 24px;
        padding: 20px 16px;
    }

    .auth-modern-title {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
    }

    .btn-auth-google {
        min-height: 56px;
    }

    .auth-bottom-links {
        font-size: 0.92rem;
    }
}

/* =========================================
   FINAL UI FIX / MOBILE-FIRST / TOPBAR
========================================= */

.topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-action-form {
    margin: 0;
}

.quick-action-btn {
    position: relative;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.10) !important;
    color: var(--brand-1, #2563eb) !important;
    border: 1px solid rgba(37, 99, 235, 0.16) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    padding: 0;
    font-size: 0.95rem;
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.16) !important;
}

.quick-action-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.desktop-nav a,
.bottom-nav a {
    position: relative;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.desktop-nav a.is-active,
.bottom-nav a.is-active {
    color: var(--brand-1, #2563eb) !important;
    background: rgba(37, 99, 235, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.10);
}

.desktop-nav a.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-1, #2563eb), #38bdf8);
}

.mobile-nav-seven {
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px;
}

.mobile-nav-seven a {
    min-width: 0;
    padding: 8px 2px;
}

.mobile-nav-seven a small {
    font-size: 0.66rem;
    line-height: 1.15;
}

.mobile-nav-seven .nav-add {
    transform: translateY(-10px);
    border-radius: 18px;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.mobile-nav-seven .nav-add.is-active {
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9) !important;
    color: #fff !important;
}

.alerts-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.alert-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--text-main);
}

.alert-row small {
    display: block;
    margin-top: 4px;
}

body.theme-dark .quick-action-btn,
body[data-resolved-theme="dark"] .quick-action-btn {
    background: rgba(96, 165, 250, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.22) !important;
    color: #93c5fd !important;
}

body.theme-dark .desktop-nav a.is-active,
body.theme-dark .bottom-nav a.is-active,
body[data-resolved-theme="dark"] .desktop-nav a.is-active,
body[data-resolved-theme="dark"] .bottom-nav a.is-active {
    background: rgba(96, 165, 250, 0.14) !important;
    color: #93c5fd !important;
}

body.theme-dark .hero-card,
body.theme-dark .soft-card,
body.theme-dark .soft-gradient,
body.theme-dark .summary-item,
body.theme-dark .expense-card,
body[data-resolved-theme="dark"] .hero-card,
body[data-resolved-theme="dark"] .soft-card,
body[data-resolved-theme="dark"] .soft-gradient,
body[data-resolved-theme="dark"] .summary-item,
body[data-resolved-theme="dark"] .expense-card {
    background: linear-gradient(180deg, #172033, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .auth-main-title,
body.theme-dark .auth-form-modern .form-group label,
body[data-resolved-theme="dark"] .auth-main-title,
body[data-resolved-theme="dark"] .auth-form-modern .form-group label {
    color: #f8fafc !important;
}

body.theme-dark .auth-divider span,
body[data-resolved-theme="dark"] .auth-divider span {
    background: #111827 !important;
}

@media (max-width: 767px) {
    .topbar {
        padding: 14px 12px 10px;
    }

    .topbar-main {
        align-items: flex-start;
    }

    .brand-wrap {
        min-width: 0;
        flex: 1;
    }

    .brand-title {
        font-size: 1.06rem;
    }

    .brand-subtitle {
        font-size: 0.78rem;
    }

    .desktop-only {
        display: none !important;
    }

    .page-container {
        padding: 16px 12px 30px;
    }
}

/* ===== FINAL MOBILE/TOPBAR FIX ===== */

.topbar {
    padding-bottom: 14px !important;
}

.topbar-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-wrap-left {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-profile-frame {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.topbar-profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.topbar-profile-fallback {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    margin: 0;
    font-size: 1.05rem;
}

.brand-subtitle {
    margin: 4px 0 0;
    font-size: 0.92rem;
    line-height: 1.3;
    word-break: break-word;
}

.topbar-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.topbar-actions-row::-webkit-scrollbar {
    display: none;
}

.topbar-pill-btn {
    appearance: none;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
    box-shadow: none;
}

.topbar-pill-btn:hover {
    background: rgba(37, 99, 235, 0.14);
}

.topbar-pill-label {
    font-size: 0.8rem;
    opacity: 0.82;
}

body.theme-dark .topbar-pill-btn,
body[data-theme="dark"] .topbar-pill-btn {
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.22);
}

.bottom-nav.bottom-nav-seven {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px !important;
    align-items: end;
}

.bottom-nav.bottom-nav-seven a {
    min-width: 0;
    padding: 8px 2px 10px;
    border-radius: 16px;
    font-size: 0.68rem;
    gap: 5px;
}

.bottom-nav.bottom-nav-seven a small {
    font-size: 0.68rem;
    line-height: 1.15;
}

.bottom-nav.bottom-nav-seven a.is-active {
    background: #dbe8ff;
    color: #2563eb !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.bottom-nav.bottom-nav-seven .nav-center-add {
    min-height: 60px;
    border-radius: 18px;
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.bottom-nav.bottom-nav-seven .nav-center-add span {
    font-size: 1.22rem;
}

.alerts-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.alert-row {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--text-main);
}

@media (max-width: 767px) {
    .topbar {
        padding: 14px 12px 12px !important;
    }

    .page-container {
        padding: 16px 8px 24px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .bottom-nav.bottom-nav-seven {
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media (min-width: 768px) {
    .topbar-actions-row {
        justify-content: flex-start;
    }
}
/* ===== HOUSEFLOW PREMIUM UI SYSTEM / PHASE 1 ===== */

:root {
    --hf-bg: #f6f8fc;
    --hf-surface: #ffffff;
    --hf-surface-soft: #f8fbff;
    --hf-surface-tint: #eef4ff;
    --hf-border: #e5eaf2;
    --hf-border-strong: #d8e1ee;
    --hf-text: #111827;
    --hf-text-soft: #6b7280;
    --hf-text-muted: #94a3b8;
    --hf-primary: #2f6fed;
    --hf-primary-strong: #1d4ed8;
    --hf-success: #22c55e;
    --hf-warning: #f59e0b;
    --hf-danger: #ef4444;
    --hf-radius-xl: 24px;
    --hf-radius-lg: 20px;
    --hf-radius-md: 16px;
    --hf-radius-sm: 12px;
    --hf-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.04);
    --hf-shadow-md: 0 14px 34px rgba(15, 23, 42, 0.07);
    --hf-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.10);
}

body {
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    background: linear-gradient(180deg, #f8fbff 0%, #f6f8fc 100%) !important;
    color: var(--hf-text) !important;
}

.page-container {
    max-width: 1140px !important;
    padding: 20px 16px 34px !important;
}

.topbar {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid rgba(229, 234, 242, 0.88) !important;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04) !important;
    padding: 16px 16px 14px !important;
}

.topbar-main-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.brand-wrap-left {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
}

.topbar-profile-frame {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, var(--hf-primary), #67a3ff) !important;
    box-shadow: var(--hf-shadow-md) !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.topbar-profile-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.topbar-profile-fallback {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #fff !important;
}

.brand-copy {
    min-width: 0 !important;
}

.brand-title {
    margin: 0 !important;
    font-size: 1.08rem !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--hf-text) !important;
}

.brand-subtitle {
    margin: 6px 0 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.35 !important;
    color: var(--hf-text-soft) !important;
}

.topbar-actions-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 14px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
}

.topbar-icon-btn {
    appearance: none !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.topbar-icon-btn:hover {
    transform: none !important;
    background: transparent !important;
}

.topbar-icon-btn-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(180deg, #ffffff, #f3f7ff) !important;
    border: 1px solid rgba(47, 111, 237, 0.10) !important;
    box-shadow: var(--hf-shadow-sm) !important;
    color: var(--hf-primary-strong) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
}

.topbar-icon-btn-badge {
    top: -4px !important;
    right: -4px !important;
    min-width: 20px !important;
    height: 20px !important;
    border-radius: 999px !important;
    background: var(--hf-primary) !important;
    color: #fff !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    padding: 0 5px !important;
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.22) !important;
}

.desktop-nav {
    margin-top: 16px !important;
    gap: 10px !important;
}

.desktop-nav a {
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    background: #f2f6fd !important;
    color: #35507b !important;
    font-weight: 700 !important;
    transition: all 0.18s ease !important;
}

.desktop-nav a:hover {
    background: #eaf1ff !important;
    color: var(--hf-primary-strong) !important;
    text-decoration: none !important;
}

.desktop-nav a.is-active {
    background: #e8f0ff !important;
    color: var(--hf-primary-strong) !important;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.10) !important;
}

.desktop-nav a.is-active::after {
    display: none !important;
}

.hero-card,
.content-card,
.form-card,
.table-card,
.summary-card,
.stat-card,
.settings-card,
.settings-user-card,
.soft-card {
    border-radius: var(--hf-radius-lg) !important;
    border: 1px solid var(--hf-border) !important;
    background: var(--hf-surface) !important;
    box-shadow: var(--hf-shadow-md) !important;
}

.hero-card {
    padding: 24px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
}

.hero-title {
    margin: 0 0 8px !important;
    font-size: clamp(1.75rem, 3vw, 2.2rem) !important;
    line-height: 1.04 !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: var(--hf-text) !important;
}

.hero-text {
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: var(--hf-text-soft) !important;
    max-width: 68ch !important;
}

.section-title {
    margin: 0 0 10px !important;
    font-size: 1.22rem !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
    color: var(--hf-text) !important;
    letter-spacing: -0.02em !important;
}

.helper-text {
    color: var(--hf-text-soft) !important;
    font-size: 0.94rem !important;
    line-height: 1.6 !important;
}

.stats-grid {
    gap: 16px !important;
    margin-bottom: 18px !important;
}

.stat-card {
    padding: 18px 18px 16px !important;
}

.stat-label {
    font-size: 0.9rem !important;
    color: var(--hf-text-soft) !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
}

.stat-value {
    font-size: clamp(1.6rem, 3vw, 2rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: var(--hf-text) !important;
}

.action-row,
.form-actions,
.expense-actions {
    gap: 10px !important;
}

button,
.btn,
input[type="submit"] {
    min-height: 46px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    padding: 0 16px !important;
    transition: all 0.18s ease !important;
}

.btn-primary,
button[type="submit"]:not(.hf-modal-close):not(.password-toggle):not(.btn-secondary):not(.btn-danger) {
    background: linear-gradient(135deg, var(--hf-primary), var(--hf-primary-strong)) !important;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(47, 111, 237, 0.18) !important;
}

.btn-secondary {
    background: #edf4ff !important;
    color: var(--hf-primary-strong) !important;
    border: 1px solid #dbe8ff !important;
}

.btn-danger {
    background: #fff1f2 !important;
    color: #dc2626 !important;
    border: 1px solid #ffd5da !important;
}

input,
select,
textarea {
    min-height: 48px !important;
    border-radius: 14px !important;
    border: 1px solid var(--hf-border-strong) !important;
    background: #fff !important;
    color: var(--hf-text) !important;
    padding: 0 14px !important;
    font-size: 1rem !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #9cbcff !important;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.10) !important;
}

.form-group label {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
}

.expense-card,
.summary-item {
    background: #fbfdff !important;
    border: 1px solid var(--hf-border) !important;
    border-radius: 18px !important;
    padding: 16px !important;
}

.badge,
.badge-pending,
.badge-paid {
    min-height: 28px !important;
    border-radius: 999px !important;
    padding: 5px 10px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
}

.bottom-nav.mobile-nav.bottom-nav-seven {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom)) !important;
    background: rgba(255,255,255,0.94) !important;
    backdrop-filter: blur(18px) !important;
    border-top: 1px solid rgba(229, 234, 242, 0.94) !important;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.05) !important;
}

.bottom-nav a {
    min-width: 0 !important;
    min-height: 58px !important;
    border-radius: 18px !important;
    padding: 8px 4px 10px !important;
    color: var(--hf-text-soft) !important;
    gap: 4px !important;
}

.bottom-nav a span {
    font-size: 1.12rem !important;
}

.bottom-nav a small {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
}

.bottom-nav a.is-active {
    background: #edf4ff !important;
    color: var(--hf-primary-strong) !important;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.10) !important;
}

.bottom-nav .nav-center-add {
    transform: none !important;
    background: linear-gradient(135deg, var(--hf-primary), #5ea2ff) !important;
    color: #fff !important;
    box-shadow: 0 16px 28px rgba(47, 111, 237, 0.24) !important;
}

.app-footer-signature {
    padding-bottom: 92px !important;
}

@media (max-width: 767px) {
    .page-container {
        padding: 16px 12px 26px !important;
    }

    .topbar {
        padding: 14px 12px 12px !important;
    }

    .brand-title {
        font-size: 1rem !important;
    }

    .brand-subtitle {
        font-size: 0.84rem !important;
    }

    .topbar-icon-btn-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 0.96rem !important;
    }

    .hero-card {
        padding: 20px !important;
    }

    .hero-title {
        font-size: clamp(1.5rem, 7vw, 1.9rem) !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .bottom-nav.mobile-nav.bottom-nav-seven {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .bottom-nav a:last-child {
        display: none !important;
    }
}

body.theme-dark .topbar,
body[data-theme="dark"] .topbar {
    background: rgba(17, 24, 39, 0.84) !important;
    border-bottom-color: rgba(49, 64, 86, 0.84) !important;
}

body.theme-dark .hero-card,
body.theme-dark .content-card,
body.theme-dark .form-card,
body.theme-dark .table-card,
body.theme-dark .summary-card,
body.theme-dark .stat-card,
body.theme-dark .settings-card,
body.theme-dark .settings-user-card,
body.theme-dark .soft-card,
body[data-theme="dark"] .hero-card,
body[data-theme="dark"] .content-card,
body[data-theme="dark"] .form-card,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .summary-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .settings-user-card,
body[data-theme="dark"] .soft-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .topbar-icon-btn-icon,
body[data-theme="dark"] .topbar-icon-btn-icon {
    background: linear-gradient(180deg, #182235, #101827) !important;
    color: #93c5fd !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
}

body.theme-dark .desktop-nav a,
body[data-theme="dark"] .desktop-nav a {
    background: #182235 !important;
    color: #cbd5e1 !important;
}

body.theme-dark .desktop-nav a.is-active,
body[data-theme="dark"] .desktop-nav a.is-active,
body.theme-dark .bottom-nav a.is-active,
body[data-theme="dark"] .bottom-nav a.is-active {
    background: rgba(96,165,250,0.14) !important;
    color: #93c5fd !important;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

body.theme-dark .bottom-nav.mobile-nav.bottom-nav-seven,
body[data-theme="dark"] .bottom-nav.mobile-nav.bottom-nav-seven {
    background: rgba(17,24,39,0.94) !important;
    border-top-color: rgba(49,64,86,0.84) !important;
}

/* ===== HOUSEFLOW DOMESTIC PREMIUM MINIMAL / PHASE 1 ===== */

:root {
    --hf-bg: #F6F8FC;
    --hf-card: #FFFFFF;
    --hf-card-soft: #FBFCFE;
    --hf-border: #E5EAF2;
    --hf-text: #111827;
    --hf-text-soft: #6B7280;
    --hf-text-muted: #94A3B8;
    --hf-primary: #2F6FED;
    --hf-primary-strong: #1D4ED8;
    --hf-primary-soft: #EEF4FF;
    --hf-success-soft: #EAF8EF;
    --hf-success-text: #1F7A3D;
    --hf-warning-soft: #FFF4DD;
    --hf-warning-text: #A16207;
    --hf-danger-soft: #FFF0F1;
    --hf-danger-text: #C2414D;
    --hf-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.04);
    --hf-shadow-md: 0 10px 28px rgba(15, 23, 42, 0.06);
    --hf-radius-xl: 20px;
    --hf-radius-lg: 18px;
    --hf-radius-md: 16px;
    --hf-radius-sm: 12px;
}

body {
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    background: linear-gradient(180deg, #FAFBFE 0%, var(--hf-bg) 100%) !important;
    color: var(--hf-text) !important;
}

.page-container {
    max-width: 1120px !important;
    padding: 20px 16px 32px !important;
}

.topbar {
    padding: 16px !important;
    background: rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(229, 234, 242, 0.92) !important;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04) !important;
}

.topbar-main-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.topbar-brand-block {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.topbar-profile-frame {
    width: 52px !important;
    height: 52px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, var(--hf-primary), #7AB4FF) !important;
    box-shadow: var(--hf-shadow-md) !important;
    flex-shrink: 0 !important;
}

.topbar-profile-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.topbar-profile-fallback {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
}

.topbar-copy {
    min-width: 0 !important;
}

.topbar-kicker {
    margin: 0 0 4px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--hf-primary) !important;
}

.topbar-title {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    color: var(--hf-text) !important;
    letter-spacing: -0.02em !important;
}

.topbar-subtitle {
    margin: 6px 0 0 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    color: var(--hf-text-soft) !important;
}

.topbar-actions-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    margin-top: 0 !important;
}

.topbar-icon-btn {
    appearance: none !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    height: auto !important;
}

.topbar-icon-btn:hover {
    transform: none !important;
    background: transparent !important;
}

.topbar-icon-btn-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    border: 1px solid rgba(47, 111, 237, 0.10) !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%) !important;
    box-shadow: var(--hf-shadow-sm) !important;
    font-size: 16px !important;
    line-height: 1 !important;
    color: var(--hf-primary-strong) !important;
}

.topbar-icon-btn-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--hf-primary) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.22) !important;
}

.topbar-icon-btn-alerts {
    position: relative !important;
}

.desktop-nav {
    margin-top: 16px !important;
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.desktop-nav a {
    min-height: 40px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 999px !important;
    background: #F4F7FC !important;
    color: #52627A !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.desktop-nav a:hover {
    background: #ECF3FF !important;
    color: var(--hf-primary-strong) !important;
    text-decoration: none !important;
}

.desktop-nav a.is-active {
    background: var(--hf-primary-soft) !important;
    color: var(--hf-primary-strong) !important;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.10) !important;
}

.desktop-nav a.is-active::after {
    display: none !important;
}

.hero-card,
.content-card,
.form-card,
.table-card,
.summary-card,
.stat-card,
.settings-card,
.settings-user-card,
.soft-card {
    background: var(--hf-card) !important;
    border: 1px solid var(--hf-border) !important;
    border-radius: var(--hf-radius-lg) !important;
    box-shadow: var(--hf-shadow-md) !important;
}

.hero-card {
    padding: 24px !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%) !important;
}

.hero-title {
    margin: 0 0 8px !important;
    font-size: 28px !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--hf-text) !important;
}

.hero-text {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: var(--hf-text-soft) !important;
}

.section-title {
    margin: 0 0 10px !important;
    font-size: 22px !important;
    line-height: 1.18 !important;
    font-weight: 700 !important;
    color: var(--hf-text) !important;
    letter-spacing: -0.02em !important;
}

.helper-text {
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: var(--hf-text-soft) !important;
}

.stat-card {
    padding: 18px !important;
}

.stat-label {
    margin: 0 0 8px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: var(--hf-text-soft) !important;
}

.stat-value {
    margin: 0 !important;
    font-size: 30px !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
}

.action-row,
.form-actions,
.expense-actions {
    gap: 10px !important;
    margin-top: 16px !important;
}

button,
.btn,
input[type="submit"] {
    min-height: 46px !important;
    border-radius: 14px !important;
    padding: 0 16px !important;
    font-weight: 600 !important;
    transition: all 0.18s ease !important;
}

.btn-primary,
button[type="submit"]:not(.hf-modal-close):not(.password-toggle):not(.btn-secondary):not(.btn-danger) {
    background: linear-gradient(135deg, var(--hf-primary), var(--hf-primary-strong)) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(47, 111, 237, 0.16) !important;
}

.btn-secondary {
    background: var(--hf-primary-soft) !important;
    color: var(--hf-primary-strong) !important;
    border: 1px solid #DCE8FF !important;
}

.btn-danger {
    background: var(--hf-danger-soft) !important;
    color: var(--hf-danger-text) !important;
    border: 1px solid #FFD9DE !important;
}

input,
select,
textarea {
    min-height: 48px !important;
    background: #FFFFFF !important;
    border: 1px solid #DCE4EF !important;
    border-radius: 12px !important;
    padding: 0 14px !important;
    color: var(--hf-text) !important;
    font-size: 15px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #A9C4FF !important;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.10) !important;
}

.form-group {
    gap: 6px !important;
}

.form-group label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.expense-card,
.summary-item {
    padding: 16px !important;
    border-radius: 16px !important;
    background: var(--hf-card-soft) !important;
    border: 1px solid var(--hf-border) !important;
}

.badge,
.badge-paid,
.badge-pending {
    min-height: 28px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.badge {
    background: #EEF4FF !important;
    color: #315CA8 !important;
}

.badge-paid {
    background: var(--hf-success-soft) !important;
    color: var(--hf-success-text) !important;
}

.badge-pending {
    background: var(--hf-warning-soft) !important;
    color: var(--hf-warning-text) !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important;
    background: rgba(255,255,255,0.94) !important;
    backdrop-filter: blur(18px) !important;
    border-top: 1px solid rgba(229, 234, 242, 0.94) !important;
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.05) !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium a {
    min-height: 60px !important;
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    color: var(--hf-text-soft) !important;
    text-decoration: none !important;
    padding: 6px 2px !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium a span {
    font-size: 18px !important;
    line-height: 1 !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium a small {
    font-size: 11px !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium a.is-active {
    background: var(--hf-primary-soft) !important;
    color: var(--hf-primary-strong) !important;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.08) !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium .nav-add {
    background: linear-gradient(135deg, var(--hf-primary), #5D9DFF) !important;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(47, 111, 237, 0.20) !important;
}

.welcome-card .action-row .btn,
.welcome-card .action-row button {
    min-width: 148px !important;
}

.empty-text {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: var(--hf-text-soft) !important;
}

body.theme-dark .topbar,
body[data-theme="dark"] .topbar {
    background: rgba(17, 24, 39, 0.88) !important;
}

body.theme-dark .hero-card,
body.theme-dark .content-card,
body.theme-dark .form-card,
body.theme-dark .table-card,
body.theme-dark .summary-card,
body.theme-dark .stat-card,
body.theme-dark .settings-card,
body.theme-dark .settings-user-card,
body[data-theme="dark"] .hero-card,
body[data-theme="dark"] .content-card,
body[data-theme="dark"] .form-card,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .summary-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .settings-user-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .topbar-title,
body.theme-dark .hero-title,
body.theme-dark .section-title,
body[data-theme="dark"] .topbar-title,
body[data-theme="dark"] .hero-title,
body[data-theme="dark"] .section-title {
    color: #F8FAFC !important;
}

body.theme-dark .topbar-subtitle,
body.theme-dark .hero-text,
body.theme-dark .helper-text,
body[data-theme="dark"] .topbar-subtitle,
body[data-theme="dark"] .hero-text,
body[data-theme="dark"] .helper-text {
    color: #CBD5E1 !important;
}

body.theme-dark .topbar-icon-btn-icon,
body[data-theme="dark"] .topbar-icon-btn-icon {
    background: linear-gradient(180deg, #182235, #101827) !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
    color: #93C5FD !important;
}

body.theme-dark .desktop-nav a,
body[data-theme="dark"] .desktop-nav a {
    background: #182235 !important;
    color: #CBD5E1 !important;
}

body.theme-dark .desktop-nav a.is-active,
body.theme-dark .bottom-nav.mobile-nav.bottom-nav-premium a.is-active,
body[data-theme="dark"] .desktop-nav a.is-active,
body[data-theme="dark"] .bottom-nav.mobile-nav.bottom-nav-premium a.is-active {
    background: rgba(96,165,250,0.14) !important;
    color: #93C5FD !important;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
    background: #0F172A !important;
    border-color: #314056 !important;
    color: #F8FAFC !important;
}

body.theme-dark .bottom-nav.mobile-nav.bottom-nav-premium,
body[data-theme="dark"] .bottom-nav.mobile-nav.bottom-nav-premium {
    background: rgba(17,24,39,0.94) !important;
    border-top-color: rgba(49,64,86,0.84) !important;
}

@media (max-width: 767px) {
    .topbar {
        padding: 14px 12px !important;
    }

    .page-container {
        padding: 16px 12px 28px !important;
    }

    .topbar-main-row {
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .topbar-brand-block {
        gap: 12px !important;
    }

    .topbar-profile-frame {
        width: 48px !important;
        height: 48px !important;
        border-radius: 15px !important;
    }

    .topbar-title {
        font-size: 20px !important;
    }

    .topbar-subtitle {
        font-size: 13px !important;
    }

    .topbar-icon-btn-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 15px !important;
    }

    .hero-card {
        padding: 20px !important;
    }

    .hero-title {
        font-size: 24px !important;
    }

    .section-title {
        font-size: 20px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ========================================================================
   HF FOUNDATION LAYER — 2026-04-09
   identidade visual + tipografia + spacing + componentes base
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;
    --color-primary-soft: #EFF6FF;
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-border: #E2E8F0;
    --color-text-primary: #0F172A;
    --color-text-secondary: #64748B;
    --color-success: #16A34A;
    --color-success-soft: #DCFCE7;
    --color-warning: #D97706;
    --color-warning-soft: #FEF3C7;
    --color-danger: #DC2626;
    --color-danger-soft: #FEE2E2;
    --radius-xs: 10px;
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 14px 36px rgba(15, 23, 42, 0.06);
}

html { scroll-behavior: smooth; }

body {
    background: var(--color-bg) !important;
    color: var(--color-text-primary) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body, button, input, select, textarea {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.page-container {
    max-width: 1120px !important;
    padding: var(--space-5) var(--space-4) calc(var(--space-7) + 12px) !important;
}

/* TIPOGRAFIA */
.topbar-title, .auth-main-title, h1 {
    font-size: 24px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--color-text-primary) !important;
}

.hero-title, .auth-modern-title {
    font-size: 30px !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--color-text-primary) !important;
}

.section-title, h2, h3 {
    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    color: var(--color-text-primary) !important;
}

.stat-value, .dashboard-total-value {
    font-size: 30px !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: var(--color-text-primary) !important;
}

body, p, label, input, select, textarea {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.helper-text, .hero-text, .topbar-subtitle, .stat-label, .dashboard-total-note, small.helper-text {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--color-text-secondary) !important;
}

.topbar-kicker, .hero-eyebrow, .bottom-nav-label, .badge, .badge-paid, .badge-pending, .dashboard-status-pill {
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
}

/* COMPONENTES BASE */
.app-card,
.hero-card,
.content-card,
.form-card,
.table-card,
.summary-card,
.stat-card,
.settings-card,
.settings-user-card,
.hf-modal-content {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-card) !important;
}

.hero-card, .content-card, .form-card, .table-card, .summary-card, .settings-card {
    padding: var(--space-5) !important;
    margin-bottom: var(--space-4) !important;
}

.stat-card {
    padding: var(--space-5) !important;
    border-radius: var(--radius-xl) !important;
}

.section-title { margin: 0 0 var(--space-2) !important; }

.btn, button, input[type="submit"] {
    min-height: 48px !important;
    border-radius: var(--radius-md) !important;
    padding: 0 var(--space-4) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
}

.btn-primary, button.btn-primary, input[type="submit"].btn-primary {
    background: var(--color-primary) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16) !important;
}

.btn-primary:hover, button.btn-primary:hover, input[type="submit"].btn-primary:hover {
    background: var(--color-primary-hover) !important;
    transform: translateY(-1px) !important;
}

.btn-secondary {
    background: var(--color-primary-soft) !important;
    color: var(--color-primary) !important;
    border: 1px solid rgba(37, 99, 235, 0.08) !important;
    box-shadow: none !important;
}

.btn-secondary:hover {
    background: #E1EEFF !important;
    color: var(--color-primary-hover) !important;
}

.btn-danger {
    background: var(--color-danger-soft) !important;
    color: var(--color-danger) !important;
    border: 1px solid rgba(220, 38, 38, 0.10) !important;
}

.input-field,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="search"],
select,
textarea {
    min-height: 48px !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-sm) !important;
    background: #FFFFFF !important;
    color: var(--color-text-primary) !important;
    padding: 0 14px !important;
    box-shadow: none !important;
}

textarea {
    min-height: 120px !important;
    padding: 14px !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

label {
    display: inline-block !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--color-text-primary) !important;
}

.badge, .badge-paid, .badge-pending {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 28px !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-pill) !important;
    border: none !important;
}

.badge { background: var(--color-primary-soft) !important; color: var(--color-primary) !important; }
.badge-paid { background: var(--color-success-soft) !important; color: var(--color-success) !important; }
.badge-pending { background: var(--color-warning-soft) !important; color: var(--color-warning) !important; }

/* HEADER BASE */
.topbar.topbar-premium {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    padding: var(--space-4) var(--space-4) var(--space-4) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
}

.topbar-main-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--space-3) !important;
}

.topbar-brand-block {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--space-3) !important;
    flex: 1 1 auto !important;
}

.topbar-profile-frame {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE) !important;
    border: 1px solid rgba(37, 99, 235, 0.12) !important;
}

.topbar-avatar { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.topbar-avatar-fallback { font-size: 18px !important; font-weight: 800 !important; color: var(--color-primary) !important; }
.topbar-copy { min-width: 0 !important; }
.topbar-kicker { margin: 0 0 4px !important; text-transform: uppercase !important; letter-spacing: 0.06em !important; color: var(--color-primary) !important; }
.topbar-title { margin: 0 !important; }
.topbar-subtitle { margin: 6px 0 0 !important; }

.topbar-user-chip, .topbar-status-chip {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: var(--radius-pill) !important;
}

.topbar-user-chip {
    background: var(--color-primary-soft) !important;
    color: var(--color-primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: 1px solid rgba(37, 99, 235, 0.08) !important;
}

.topbar-status-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--space-2) !important;
    margin-top: var(--space-3) !important;
}

.topbar-status-chip {
    background: #F8FAFC !important;
    color: var(--color-text-secondary) !important;
    border: 1px solid var(--color-border) !important;
}

.topbar-actions-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: var(--space-2) !important;
    margin-top: var(--space-3) !important;
}

.topbar-icon-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(37, 99, 235, 0.10) !important;
    background: linear-gradient(180deg, #FFFFFF, #F8FBFF) !important;
    color: var(--color-primary) !important;
    box-shadow: var(--shadow-soft) !important;
}

.topbar-icon-btn-icon { font-size: 18px !important; line-height: 1 !important; }

.topbar-icon-btn-badge {
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: var(--radius-pill) !important;
    background: var(--color-danger) !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* HOME BASE */
.dashboard-hero-card {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%) !important;
}

.hero-eyebrow {
    margin: 0 0 var(--space-2) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: var(--color-primary) !important;
}

.dashboard-total-block {
    margin: var(--space-5) 0 var(--space-4) !important;
}

.dashboard-total-value {
    margin: 0 0 var(--space-2) !important;
}

.dashboard-total-note {
    margin: 0 !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--space-4) !important;
    margin-bottom: var(--space-5) !important;
}

.dashboard-status-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--space-2) !important;
    margin-top: var(--space-4) !important;
}

.dashboard-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: var(--radius-pill) !important;
    background: #F8FAFC !important;
    color: var(--color-text-secondary) !important;
    border: 1px solid var(--color-border) !important;
}

/* NAV BASE */
.bottom-nav.mobile-nav.bottom-nav-premium {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: var(--space-2) !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(18px) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.94) !important;
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.05) !important;
}

.bottom-nav-item,
.bottom-nav.mobile-nav.bottom-nav-premium a {
    min-height: 72px !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    color: var(--color-text-secondary) !important;
    text-decoration: none !important;
    padding: 8px 4px !important;
}

.bottom-nav-icon,
.bottom-nav.mobile-nav.bottom-nav-premium a span { font-size: 20px !important; line-height: 1 !important; }

.bottom-nav-label,
.bottom-nav.mobile-nav.bottom-nav-premium a small { font-size: 12px !important; line-height: 1.1 !important; }

.bottom-nav-item.is-active,
.bottom-nav.mobile-nav.bottom-nav-premium a.is-active {
    background: var(--color-primary-soft) !important;
    color: var(--color-primary) !important;
}

.bottom-nav.mobile-nav.bottom-nav-premium .nav-add {
    background: linear-gradient(135deg, var(--color-primary), #5D9DFF) !important;
    color: #FFFFFF !important;
}

/* LOGIN BASE */
.auth-modern-badge {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: var(--radius-pill) !important;
    background: var(--color-primary-soft) !important;
    color: var(--color-primary) !important;
    font-weight: 700 !important;
}

.auth-panel {
    border-radius: 24px !important;
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.10) !important;
}

.auth-logo-badge {
    width: 76px !important;
    height: 76px !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, var(--color-primary), #60A5FA) !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
}

.btn-auth-primary {
    width: 100% !important;
    min-height: 56px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)) !important;
    color: #FFFFFF !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.btn-auth-google {
    min-height: 52px !important;
    border-radius: 16px !important;
    border: 1px solid var(--color-border) !important;
    background: #FFFFFF !important;
}

/* DARK MODE */
body.theme-dark,
body[data-theme="dark"] {
    background: #0B1220 !important;
    color: #F8FAFC !important;
}

body.theme-dark .topbar.topbar-premium,
body[data-theme="dark"] .topbar.topbar-premium,
body.theme-dark .hero-card,
body.theme-dark .content-card,
body.theme-dark .form-card,
body.theme-dark .table-card,
body.theme-dark .summary-card,
body.theme-dark .stat-card,
body.theme-dark .settings-card,
body.theme-dark .settings-user-card,
body.theme-dark .hf-modal-content,
body[data-theme="dark"] .hero-card,
body[data-theme="dark"] .content-card,
body[data-theme="dark"] .form-card,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .summary-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .settings-user-card,
body[data-theme="dark"] .hf-modal-content {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
    box-shadow: none !important;
}

body.theme-dark .topbar-title,
body.theme-dark .hero-title,
body.theme-dark .section-title,
body.theme-dark .auth-main-title,
body.theme-dark .auth-modern-title,
body[data-theme="dark"] .topbar-title,
body[data-theme="dark"] .hero-title,
body[data-theme="dark"] .section-title,
body[data-theme="dark"] .auth-main-title,
body[data-theme="dark"] .auth-modern-title { color: #F8FAFC !important; }

body.theme-dark .topbar-subtitle,
body.theme-dark .hero-text,
body.theme-dark .helper-text,
body.theme-dark .stat-label,
body.theme-dark .auth-main-text,
body.theme-dark .auth-modern-text,
body.theme-dark .dashboard-total-note,
body[data-theme="dark"] .topbar-subtitle,
body[data-theme="dark"] .hero-text,
body[data-theme="dark"] .helper-text,
body[data-theme="dark"] .stat-label,
body[data-theme="dark"] .auth-main-text,
body[data-theme="dark"] .auth-modern-text,
body[data-theme="dark"] .dashboard-total-note { color: #CBD5E1 !important; }

body.theme-dark .dashboard-status-pill,
body[data-theme="dark"] .dashboard-status-pill {
    background: #111827 !important;
    color: #CBD5E1 !important;
    border-color: #243045 !important;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
    background: #0F172A !important;
    border-color: #314056 !important;
    color: #F8FAFC !important;
}

/* RESPONSIVO */
@media (max-width: 767px) {
    .page-container {
        padding: var(--space-4) var(--space-3) calc(var(--space-7) + 12px) !important;
    }

    .topbar.topbar-premium {
        padding: var(--space-4) var(--space-3) var(--space-3) !important;
    }

    .topbar-main-row { align-items: flex-start !important; }

    .topbar-profile-frame {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }

    .topbar-title { font-size: 20px !important; }
    .topbar-subtitle { font-size: 13px !important; }

    .topbar-icon-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }

    .hero-card, .content-card, .form-card, .table-card, .summary-card, .settings-card, .stat-card {
        padding: 18px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .action-row {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-3) !important;
    }

    .action-row .btn {
        width: 100% !important;
    }
}

/* HouseFlow: dashboard clickable cards */
.dashboard-total-link,
.dashboard-stat-link {
    color: inherit;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.dashboard-total-link:hover,
.dashboard-stat-link:hover {
    transform: translateY(-1px);
}

.dashboard-total-link:focus-visible,
.dashboard-stat-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* ===== HOUSEFLOW LOGIN UX V2 START ===== */

/* HOUSEFLOW LOGIN UX V6 - APP CLEAN / FINTECH */

body:has(.auth-screen-app) {
    background: #f3f6fa !important;
    color: #111827 !important;
}

body:has(.auth-screen-app) .topbar,
body:has(.auth-screen-app) .bottom-nav,
body:has(.auth-screen-app) .bottom-nav-shell,
body:has(.auth-screen-app) .app-footer-signature,
body:has(.auth-screen-app) .install-banner {
    display: none !important;
}

body:has(.auth-screen-app) .app-shell {
    min-height: 100dvh !important;
    padding-bottom: 0 !important;
    background: #f3f6fa !important;
}

body:has(.auth-screen-app) .page-container {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    background: #f3f6fa !important;
}

.auth-screen-app {
    min-height: 100dvh !important;
    width: 100% !important;
    padding: 24px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background:
        radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.09), transparent 36%),
        linear-gradient(180deg, #f8fafc 0%, #f3f6fa 100%) !important;
}

.auth-app-shell {
    width: 100% !important;
    max-width: 408px !important;
    display: grid !important;
    gap: 16px !important;
    animation: hfAuthEnter 340ms ease-out both !important;
}

@keyframes hfAuthEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-app-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 4px !important;
}

.auth-app-logo {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #1d4ed8 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.20) !important;
}

.auth-app-brand strong {
    display: block !important;
    color: #111827 !important;
    font-size: 1rem !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

.auth-app-brand span {
    display: block !important;
    margin-top: 2px !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
}

.auth-app-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 24px !important;
    padding: 24px !important;
    box-shadow:
        0 22px 54px rgba(15, 23, 42, 0.085),
        0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

.auth-app-heading {
    margin-bottom: 20px !important;
}

.auth-app-chip {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.auth-app-heading h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.75rem, 5vw, 2.08rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.auth-app-heading p {
    margin: 10px 0 0 !important;
    color: #64748b !important;
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
}

.auth-google-button-app {
    width: 100% !important;
    min-height: 50px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #111827 !important;
    box-shadow: none !important;
    font-size: 0.94rem !important;
    font-weight: 700 !important;
}

.auth-google-button-app:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

.auth-google-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.auth-google-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

.auth-divider-app {
    margin: 18px 0 16px !important;
}

.auth-divider-clean {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
}

.auth-divider-clean::before,
.auth-divider-clean::after {
    content: "" !important;
    flex: 1 !important;
    height: 1px !important;
    background: #e2e8f0 !important;
}

.auth-login-form-app {
    display: grid !important;
    gap: 15px !important;
}

.auth-field {
    display: grid !important;
    gap: 8px !important;
}

.auth-label-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.auth-field label,
.auth-label-row label {
    color: #111827 !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
}

.auth-forgot-link {
    color: #2563eb !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.auth-input-shell {
    min-height: 50px !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 12px !important;
    box-shadow: none !important;
}

.auth-input-shell:hover {
    border-color: #cbd5e1 !important;
}

.auth-input-shell:focus-within {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
}

.auth-input-icon {
    width: 18px !important;
    min-width: 18px !important;
    color: #94a3b8 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.auth-input-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.auth-input-shell:focus-within .auth-input-icon {
    color: #2563eb !important;
}

.auth-input-shell input {
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    font-size: 0.94rem !important;
    font-weight: 500 !important;
    padding: 0 !important;
}

.auth-input-shell input::placeholder {
    color: #94a3b8 !important;
}

.auth-password-shell {
    padding-right: 6px !important;
}

.auth-password-toggle {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 12px !important;
    border: 1px solid #dbeafe !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.auth-password-toggle:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.auth-password-toggle svg {
    width: 18px !important;
    height: 18px !important;
}

.auth-helper-text {
    margin: -2px 0 0 !important;
    color: #64748b !important;
    font-size: 0.78rem !important;
}

.auth-submit-app {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18) !important;
}

.auth-submit-app:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22) !important;
}

.auth-create-account-app {
    margin-top: 18px !important;
    color: #64748b !important;
    font-size: 0.88rem !important;
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.auth-create-account-app a {
    color: #2563eb !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.auth-message {
    margin-bottom: 16px !important;
}

@media (max-width: 560px) {
    .auth-screen-app {
        padding: 16px !important;
    }

    .auth-app-card {
        padding: 22px 20px !important;
        border-radius: 22px !important;
    }

    .auth-app-shell {
        gap: 14px !important;
    }
}

/* ===== HOUSEFLOW LOGIN UX V2 END ===== */
.auth-app-logo-image {
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.auth-app-logo-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}


/* ===== HOUSEFLOW LOGIN LOGO SIZE FIX 20260501151121 ===== */

.auth-app-logo.auth-app-logo-image {
    width: 72px !important;
    min-width: 72px !important;
    height: 72px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10) !important;
}

.auth-app-logo.auth-app-logo-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.auth-app-brand {
    gap: 14px !important;
}

@media (max-width: 560px) {
    .auth-app-logo.auth-app-logo-image {
        width: 66px !important;
        min-width: 66px !important;
        height: 66px !important;
        border-radius: 18px !important;
    }
}

/* ===== END HOUSEFLOW LOGIN LOGO SIZE FIX 20260501151121 ===== */

/* ===== HOUSEFLOW DASHBOARD UX START ===== */

/*
   HouseFlow Dashboard UX
   Estilo app/Ionic, isolado por .hf-dashboard-screen.
   Não depende dos blocos antigos .hero-card/.stat-card/.stats-grid.
*/

body:has(.hf-dashboard-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-dashboard-screen) .page-container {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-dashboard-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfDashboardEnter 300ms ease-out both !important;
}

@keyframes hfDashboardEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-dashboard-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-dashboard-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-dashboard-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-dashboard-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-dashboard-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.55rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-dashboard-hero-top p:not(.hf-dashboard-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-dashboard-month-badge {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-weight: 850 !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.hf-dashboard-balance-card {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 20px !important;
    display: grid !important;
    gap: 5px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease !important;
}

.hf-dashboard-balance-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 24px 44px rgba(30, 58, 138, 0.28) !important;
    text-decoration: none !important;
}

.hf-dashboard-balance-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-dashboard-balance-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 9vw, 2.7rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 900 !important;
}

.hf-dashboard-balance-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-dashboard-progress {
    margin-top: 18px !important;
    display: grid !important;
    gap: 9px !important;
}

.hf-dashboard-progress-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
}

.hf-dashboard-progress-copy strong {
    color: #111827 !important;
}

.hf-dashboard-progress-track {
    width: 100% !important;
    height: 9px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #e2e8f0 !important;
}

.hf-dashboard-progress-track span {
    display: block !important;
    height: 100% !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #2563eb, #38bdf8) !important;
}

.hf-dashboard-chips {
    margin-top: 16px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.hf-dashboard-chips span {
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
}

.hf-dashboard-actions {
    margin-top: 18px !important;
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 10px !important;
}

.hf-dashboard-primary-action,
.hf-dashboard-secondary-action {
    min-height: 50px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 14px !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease !important;
}

.hf-dashboard-primary-action {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-dashboard-primary-action:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

.hf-dashboard-secondary-action {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-dashboard-secondary-action:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

.hf-dashboard-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.hf-dashboard-metric-card {
    min-height: 132px !important;
    padding: 16px !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
    display: grid !important;
    align-content: space-between !important;
    gap: 10px !important;
    color: inherit !important;
    text-decoration: none !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
}

.hf-dashboard-metric-card:hover {
    transform: translateY(-2px) !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09) !important;
    text-decoration: none !important;
}

.hf-dashboard-metric-card span {
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 750 !important;
}

.hf-dashboard-metric-card strong {
    color: #111827 !important;
    font-size: 2rem !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
    font-weight: 900 !important;
}

.hf-dashboard-metric-card small {
    color: #94a3b8 !important;
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
}

.hf-dashboard-metric-warning strong {
    color: #d97706 !important;
}

.hf-dashboard-metric-success strong {
    color: #16a34a !important;
}

.hf-dashboard-insight {
    display: grid !important;
    grid-template-columns: 46px 1fr !important;
    gap: 14px !important;
    padding: 18px !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-dashboard-insight-icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
}

.hf-dashboard-insight h2 {
    margin: 0 0 6px !important;
    color: #111827 !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
}

.hf-dashboard-insight p {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
}

.hf-dashboard-insight-actions {
    margin-top: 12px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.hf-dashboard-insight-actions a {
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    border: 1px solid #dbeafe !important;
}

.hf-dashboard-insight-actions a:hover {
    background: #dbeafe !important;
    text-decoration: none !important;
}

body.theme-dark .hf-dashboard-hero,
body.theme-dark .hf-dashboard-metric-card,
body.theme-dark .hf-dashboard-insight,
body[data-theme="dark"] .hf-dashboard-hero,
body[data-theme="dark"] .hf-dashboard-metric-card,
body[data-theme="dark"] .hf-dashboard-insight {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-dashboard-hero h1,
body.theme-dark .hf-dashboard-metric-card strong,
body.theme-dark .hf-dashboard-insight h2,
body[data-theme="dark"] .hf-dashboard-hero h1,
body[data-theme="dark"] .hf-dashboard-metric-card strong,
body[data-theme="dark"] .hf-dashboard-insight h2 {
    color: #f8fafc !important;
}

body.theme-dark .hf-dashboard-hero-top p:not(.hf-dashboard-kicker),
body.theme-dark .hf-dashboard-progress-copy,
body.theme-dark .hf-dashboard-insight p,
body[data-theme="dark"] .hf-dashboard-hero-top p:not(.hf-dashboard-kicker),
body[data-theme="dark"] .hf-dashboard-progress-copy,
body[data-theme="dark"] .hf-dashboard-insight p {
    color: #cbd5e1 !important;
}

@media (max-width: 420px) {
    body:has(.hf-dashboard-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-dashboard-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-dashboard-actions {
        grid-template-columns: 1fr !important;
    }

    .hf-dashboard-metrics {
        gap: 10px !important;
    }

    .hf-dashboard-metric-card {
        min-height: 118px !important;
        padding: 14px !important;
        border-radius: 20px !important;
    }

    .hf-dashboard-metric-card strong {
        font-size: 1.72rem !important;
    }
}

/* ===== HOUSEFLOW DASHBOARD UX END ===== */

/* ===== HOUSEFLOW EXPENSE LIST UX START ===== */

/*
   HouseFlow Expense List UX
   Estilo app/Ionic isolado em .hf-expenses-screen.
   Não depende de .mobile-expense-list, .expense-card, .table-card ou .stats-grid antigos.
*/

body:has(.hf-expenses-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-expenses-screen) .page-container {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-expenses-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfExpensesEnter 300ms ease-out both !important;
}

@keyframes hfExpensesEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-expenses-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-expenses-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-expenses-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-expenses-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-expenses-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-expenses-hero-top p:not(.hf-expenses-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-expenses-month-badge {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-weight: 850 !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.hf-expenses-total-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-expenses-total-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-expenses-total-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 9vw, 2.7rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 900 !important;
}

.hf-expenses-total-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-expenses-filter-tabs {
    margin-top: 16px !important;
    padding: 4px !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    border-radius: 16px !important;
    background: #eef4ff !important;
    border: 1px solid #dbeafe !important;
}

.hf-expenses-filter-tabs a {
    min-height: 38px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease !important;
}

.hf-expenses-filter-tabs a:hover {
    background: rgba(255,255,255,0.58) !important;
    text-decoration: none !important;
}

.hf-expenses-filter-tabs a.is-active {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.10) !important;
}

.hf-expenses-filter-card,
.hf-expenses-empty,
.hf-expense-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-expenses-filter-card {
    border-radius: 24px !important;
    padding: 16px !important;
}

.hf-expenses-filter-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
}

.hf-expenses-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-expenses-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

.hf-expenses-field input,
.hf-expenses-field select {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 12px !important;
    font-size: 0.94rem !important;
    box-shadow: none !important;
}

.hf-expenses-field input:focus,
.hf-expenses-field select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
    outline: none !important;
}

.hf-expenses-filter-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.hf-expenses-filter-actions button,
.hf-expenses-filter-actions a {
    min-height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 14px !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease !important;
}

.hf-expenses-filter-actions button {
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-expenses-filter-actions button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.hf-expenses-filter-actions a {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-expenses-filter-actions a:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
}

.hf-expenses-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.hf-expenses-summary-grid article {
    min-height: 88px !important;
    padding: 13px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05) !important;
    display: grid !important;
    align-content: space-between !important;
}

.hf-expenses-summary-grid span {
    color: #64748b !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
}

.hf-expenses-summary-grid strong {
    color: #111827 !important;
    font-size: 1.55rem !important;
    line-height: 1 !important;
    letter-spacing: -0.04em !important;
    font-weight: 900 !important;
}

.hf-expenses-summary-grid .is-warning strong {
    color: #d97706 !important;
}

.hf-expenses-summary-grid .is-success strong {
    color: #16a34a !important;
}

.hf-expenses-list {
    display: grid !important;
    gap: 12px !important;
}

.hf-expense-item {
    border-radius: 24px !important;
    padding: 16px !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
}

.hf-expense-item:hover {
    transform: translateY(-2px) !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09) !important;
}

.hf-expense-item-top {
    display: flex !important;
    justify-content: space-between !important;
    gap: 14px !important;
    align-items: flex-start !important;
}

.hf-expense-category {
    min-height: 28px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
}

.hf-expense-item h2 {
    margin: 9px 0 0 !important;
    color: #111827 !important;
    font-size: 1.05rem !important;
    line-height: 1.18 !important;
    letter-spacing: -0.025em !important;
    font-weight: 850 !important;
}

.hf-expense-item-top > strong {
    color: #111827 !important;
    font-size: 1.16rem !important;
    line-height: 1.1 !important;
    letter-spacing: -0.04em !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.hf-expense-meta-grid {
    margin-top: 14px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.hf-expense-meta-grid div {
    padding: 12px !important;
    border-radius: 16px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: grid !important;
    gap: 4px !important;
}

.hf-expense-meta-grid span {
    color: #94a3b8 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
}

.hf-expense-meta-grid strong {
    color: #111827 !important;
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
}

.hf-expense-meta-grid strong.is-paid {
    color: #16a34a !important;
}

.hf-expense-meta-grid strong.is-pending {
    color: #d97706 !important;
}

.hf-expense-status-row {
    margin-top: 12px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.hf-expense-pill {
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.76rem !important;
    font-weight: 850 !important;
    border: 1px solid transparent !important;
}

.hf-expense-pill.is-paid {
    background: #ecfdf5 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
}

.hf-expense-pill.is-pending {
    background: #fffbeb !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

.hf-expense-pill.is-carry {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

.hf-expense-actions {
    margin-top: 14px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.hf-expense-actions a,
.hf-expense-actions button {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.86rem !important;
    font-weight: 850 !important;
    text-decoration: none !important;
    padding: 0 12px !important;
}

.hf-expense-actions a {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-expense-actions a:hover {
    background: #dbeafe !important;
    text-decoration: none !important;
}

.hf-expense-actions form {
    margin: 0 !important;
}

.hf-expense-actions button {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    box-shadow: none !important;
}

.hf-expense-actions button:hover {
    background: #fee2e2 !important;
}

.hf-expenses-empty {
    border-radius: 24px !important;
    padding: 28px 20px !important;
    text-align: center !important;
}

.hf-expenses-empty div {
    width: 52px !important;
    height: 52px !important;
    margin: 0 auto 14px !important;
    border-radius: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
}

.hf-expenses-empty h2 {
    margin: 0 0 8px !important;
    color: #111827 !important;
    font-size: 1.12rem !important;
    font-weight: 850 !important;
}

.hf-expenses-empty p {
    margin: 0 auto 16px !important;
    max-width: 320px !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.hf-expenses-empty a {
    min-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 0.88rem !important;
    font-weight: 850 !important;
    text-decoration: none !important;
}

.hf-expenses-empty a:hover {
    background: #1d4ed8 !important;
    text-decoration: none !important;
}

body.theme-dark .hf-expenses-hero,
body.theme-dark .hf-expenses-filter-card,
body.theme-dark .hf-expenses-summary-grid article,
body.theme-dark .hf-expense-item,
body.theme-dark .hf-expenses-empty,
body[data-theme="dark"] .hf-expenses-hero,
body[data-theme="dark"] .hf-expenses-filter-card,
body[data-theme="dark"] .hf-expenses-summary-grid article,
body[data-theme="dark"] .hf-expense-item,
body[data-theme="dark"] .hf-expenses-empty {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-expenses-hero h1,
body.theme-dark .hf-expenses-summary-grid strong,
body.theme-dark .hf-expense-item h2,
body.theme-dark .hf-expense-item-top > strong,
body.theme-dark .hf-expense-meta-grid strong,
body.theme-dark .hf-expenses-empty h2,
body[data-theme="dark"] .hf-expenses-hero h1,
body[data-theme="dark"] .hf-expenses-summary-grid strong,
body[data-theme="dark"] .hf-expense-item h2,
body[data-theme="dark"] .hf-expense-item-top > strong,
body[data-theme="dark"] .hf-expense-meta-grid strong,
body[data-theme="dark"] .hf-expenses-empty h2 {
    color: #f8fafc !important;
}

body.theme-dark .hf-expenses-hero-top p:not(.hf-expenses-kicker),
body.theme-dark .hf-expenses-empty p,
body[data-theme="dark"] .hf-expenses-hero-top p:not(.hf-expenses-kicker),
body[data-theme="dark"] .hf-expenses-empty p {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-expenses-field input,
body.theme-dark .hf-expenses-field select,
body.theme-dark .hf-expense-meta-grid div,
body[data-theme="dark"] .hf-expenses-field input,
body[data-theme="dark"] .hf-expenses-field select,
body[data-theme="dark"] .hf-expense-meta-grid div {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

@media (max-width: 420px) {
    body:has(.hf-expenses-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-expenses-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-expenses-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .hf-expenses-filter-form {
        grid-template-columns: 1fr !important;
    }

    .hf-expense-meta-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== HOUSEFLOW EXPENSE LIST UX END ===== */

/* ===== HOUSEFLOW EXPENSE EDIT UX START ===== */

/*
   HouseFlow Expense Edit UX
   Estilo app/Ionic isolado em .hf-edit-screen.
   Não depende de .hero-card, .form-card, .form-grid ou .form-group antigos.
*/

body:has(.hf-edit-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-edit-screen) .page-container {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-edit-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfEditEnter 300ms ease-out both !important;
}

@keyframes hfEditEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-edit-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-edit-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-edit-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-edit-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-edit-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-edit-hero-top p:not(.hf-edit-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-edit-status-badge {
    min-width: 88px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.hf-edit-status-badge.is-paid {
    background: #ecfdf5 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.hf-edit-status-badge.is-pending {
    background: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.hf-edit-value-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-edit-value-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-edit-value-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 9vw, 2.7rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 900 !important;
}

.hf-edit-value-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-edit-form-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 28px !important;
    padding: 18px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-edit-form {
    display: grid !important;
    gap: 18px !important;
}

.hf-edit-section {
    display: grid !important;
    gap: 14px !important;
}

.hf-edit-section + .hf-edit-section {
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.hf-edit-section-heading {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 12px !important;
    align-items: start !important;
}

.hf-edit-section-heading > span {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
}

.hf-edit-section-heading h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    font-weight: 850 !important;
}

.hf-edit-section-heading p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.hf-edit-grid,
.hf-edit-status-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.hf-edit-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-edit-field-full {
    grid-column: 1 / -1 !important;
}

.hf-edit-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

.hf-edit-field input,
.hf-edit-field select {
    width: 100% !important;
    min-height: 50px !important;
    border-radius: 15px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 13px !important;
    font-size: 0.94rem !important;
    box-shadow: none !important;
    outline: none !important;
}

.hf-edit-field input:hover,
.hf-edit-field select:hover {
    border-color: #cbd5e1 !important;
}

.hf-edit-field input:focus,
.hf-edit-field select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
    outline: none !important;
}

.hf-edit-field input[readonly] {
    background: #f8fafc !important;
    color: #64748b !important;
    cursor: default !important;
}

.hf-edit-person-card {
    padding: 14px !important;
    border-radius: 20px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.hf-edit-person-card > div {
    display: grid !important;
    gap: 3px !important;
}

.hf-edit-person-card strong {
    color: #111827 !important;
    font-size: 0.96rem !important;
    font-weight: 850 !important;
}

.hf-edit-person-card small {
    color: #94a3b8 !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
}

.hf-edit-person-card select {
    margin-top: 4px !important;
    background: #ffffff !important;
}

.hf-edit-actions {
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
    gap: 10px !important;
}

.hf-edit-actions button,
.hf-edit-actions a {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    font-weight: 850 !important;
    text-decoration: none !important;
    padding: 0 14px !important;
}

.hf-edit-actions button {
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-edit-actions button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.hf-edit-actions a {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-edit-actions a:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
}

body.theme-dark .hf-edit-hero,
body.theme-dark .hf-edit-form-card,
body.theme-dark .hf-edit-person-card,
body[data-theme="dark"] .hf-edit-hero,
body[data-theme="dark"] .hf-edit-form-card,
body[data-theme="dark"] .hf-edit-person-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-edit-hero h1,
body.theme-dark .hf-edit-section-heading h2,
body.theme-dark .hf-edit-field label,
body.theme-dark .hf-edit-person-card strong,
body[data-theme="dark"] .hf-edit-hero h1,
body[data-theme="dark"] .hf-edit-section-heading h2,
body[data-theme="dark"] .hf-edit-field label,
body[data-theme="dark"] .hf-edit-person-card strong {
    color: #f8fafc !important;
}

body.theme-dark .hf-edit-hero-top p:not(.hf-edit-kicker),
body.theme-dark .hf-edit-section-heading p,
body[data-theme="dark"] .hf-edit-hero-top p:not(.hf-edit-kicker),
body[data-theme="dark"] .hf-edit-section-heading p {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-edit-field input,
body.theme-dark .hf-edit-field select,
body[data-theme="dark"] .hf-edit-field input,
body[data-theme="dark"] .hf-edit-field select {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

body.theme-dark .hf-edit-field input[readonly],
body[data-theme="dark"] .hf-edit-field input[readonly] {
    background: #111827 !important;
    color: #cbd5e1 !important;
}

@media (max-width: 420px) {
    body:has(.hf-edit-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-edit-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-edit-form-card {
        border-radius: 24px !important;
        padding: 16px !important;
    }

    .hf-edit-grid,
    .hf-edit-status-grid {
        grid-template-columns: 1fr !important;
    }

    .hf-edit-actions {
        grid-template-columns: 1fr !important;
    }

    .hf-edit-status-badge {
        min-width: auto !important;
    }
}

/* ===== HOUSEFLOW EXPENSE EDIT UX END ===== */

/* ===== HOUSEFLOW EXPENSE CREATE UX START ===== */

body:has(.hf-create-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-create-screen) .page-container {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-create-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfCreateEnter 300ms ease-out both !important;
}

@keyframes hfCreateEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-create-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-create-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-create-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-create-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-create-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-create-hero-top p:not(.hf-create-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-create-month-badge {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-weight: 850 !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.hf-create-preview-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-create-preview-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-create-preview-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 9vw, 2.7rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 900 !important;
}

.hf-create-preview-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-create-form-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 28px !important;
    padding: 18px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-create-form {
    display: grid !important;
    gap: 18px !important;
}

.hf-create-section {
    display: grid !important;
    gap: 14px !important;
}

.hf-create-section + .hf-create-section {
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.hf-create-section-heading {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 12px !important;
    align-items: start !important;
}

.hf-create-section-heading > span {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
}

.hf-create-section-heading h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    font-weight: 850 !important;
}

.hf-create-section-heading p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.hf-create-grid,
.hf-create-status-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.hf-create-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-create-field-full {
    grid-column: 1 / -1 !important;
}

.hf-create-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

.hf-create-field input,
.hf-create-field select {
    width: 100% !important;
    min-height: 50px !important;
    border-radius: 15px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 13px !important;
    font-size: 0.94rem !important;
    box-shadow: none !important;
    outline: none !important;
}

.hf-create-field input:hover,
.hf-create-field select:hover {
    border-color: #cbd5e1 !important;
}

.hf-create-field input:focus,
.hf-create-field select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
    outline: none !important;
}

.hf-create-field input[readonly] {
    background: #f8fafc !important;
    color: #64748b !important;
    cursor: default !important;
}

.hf-create-person-card {
    padding: 14px !important;
    border-radius: 20px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.hf-create-person-card > div {
    display: grid !important;
    gap: 3px !important;
}

.hf-create-person-card strong {
    color: #111827 !important;
    font-size: 0.96rem !important;
    font-weight: 850 !important;
}

.hf-create-person-card small {
    color: #94a3b8 !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
}

.hf-create-person-card select {
    margin-top: 4px !important;
    background: #ffffff !important;
}

.hf-create-actions {
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
    gap: 10px !important;
}

.hf-create-actions button,
.hf-create-actions a {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    font-weight: 850 !important;
    text-decoration: none !important;
    padding: 0 14px !important;
}

.hf-create-actions button {
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-create-actions button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.hf-create-actions a {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-create-actions a:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
}

body.theme-dark .hf-create-hero,
body.theme-dark .hf-create-form-card,
body.theme-dark .hf-create-person-card,
body[data-theme="dark"] .hf-create-hero,
body[data-theme="dark"] .hf-create-form-card,
body[data-theme="dark"] .hf-create-person-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-create-hero h1,
body.theme-dark .hf-create-section-heading h2,
body.theme-dark .hf-create-field label,
body.theme-dark .hf-create-person-card strong,
body[data-theme="dark"] .hf-create-hero h1,
body[data-theme="dark"] .hf-create-section-heading h2,
body[data-theme="dark"] .hf-create-field label,
body[data-theme="dark"] .hf-create-person-card strong {
    color: #f8fafc !important;
}

body.theme-dark .hf-create-hero-top p:not(.hf-create-kicker),
body.theme-dark .hf-create-section-heading p,
body[data-theme="dark"] .hf-create-hero-top p:not(.hf-create-kicker),
body[data-theme="dark"] .hf-create-section-heading p {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-create-field input,
body.theme-dark .hf-create-field select,
body[data-theme="dark"] .hf-create-field input,
body[data-theme="dark"] .hf-create-field select {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

body.theme-dark .hf-create-field input[readonly],
body[data-theme="dark"] .hf-create-field input[readonly] {
    background: #111827 !important;
    color: #cbd5e1 !important;
}

@media (max-width: 420px) {
    body:has(.hf-create-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-create-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-create-form-card {
        border-radius: 24px !important;
        padding: 16px !important;
    }

    .hf-create-grid,
    .hf-create-status-grid {
        grid-template-columns: 1fr !important;
    }

    .hf-create-actions {
        grid-template-columns: 1fr !important;
    }
}

/* ===== HOUSEFLOW EXPENSE CREATE UX END ===== */

/* ===== HOUSEFLOW HOUSEHOLD CREATE UX START ===== */

body:has(.hf-household-create-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-household-create-screen) .page-container {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-household-create-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfHouseholdCreateEnter 300ms ease-out both !important;
}

@keyframes hfHouseholdCreateEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-household-create-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-household-create-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-household-create-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-household-create-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-household-create-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-household-create-hero-top p:not(.hf-household-create-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-household-create-badge {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.3rem !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.hf-household-create-info-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-household-create-info-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-household-create-info-card strong {
    color: #ffffff !important;
    font-size: clamp(1.9rem, 8vw, 2.45rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 900 !important;
}

.hf-household-create-info-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-household-create-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 28px !important;
    padding: 18px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-household-create-form {
    display: grid !important;
    gap: 18px !important;
}

.hf-household-create-section {
    display: grid !important;
    gap: 14px !important;
}

.hf-household-create-section-heading {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 12px !important;
    align-items: start !important;
}

.hf-household-create-section-heading > span {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
}

.hf-household-create-section-heading h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    font-weight: 850 !important;
}

.hf-household-create-section-heading p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.hf-household-create-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-household-create-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

.hf-household-create-field input {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 14px !important;
    font-size: 0.96rem !important;
    box-shadow: none !important;
    outline: none !important;
}

.hf-household-create-field input:hover {
    border-color: #cbd5e1 !important;
}

.hf-household-create-field input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
}

.hf-household-create-actions {
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
    gap: 10px !important;
}

.hf-household-create-actions button,
.hf-household-create-actions a {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    font-weight: 850 !important;
    text-decoration: none !important;
    padding: 0 14px !important;
}

.hf-household-create-actions button {
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-household-create-actions button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.hf-household-create-actions a {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-household-create-actions a:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
}

body.theme-dark .hf-household-create-hero,
body.theme-dark .hf-household-create-card,
body[data-theme="dark"] .hf-household-create-hero,
body[data-theme="dark"] .hf-household-create-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-household-create-hero h1,
body.theme-dark .hf-household-create-section-heading h2,
body.theme-dark .hf-household-create-field label,
body[data-theme="dark"] .hf-household-create-hero h1,
body[data-theme="dark"] .hf-household-create-section-heading h2,
body[data-theme="dark"] .hf-household-create-field label {
    color: #f8fafc !important;
}

body.theme-dark .hf-household-create-hero-top p:not(.hf-household-create-kicker),
body.theme-dark .hf-household-create-section-heading p,
body[data-theme="dark"] .hf-household-create-hero-top p:not(.hf-household-create-kicker),
body[data-theme="dark"] .hf-household-create-section-heading p {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-household-create-field input,
body[data-theme="dark"] .hf-household-create-field input {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

@media (max-width: 420px) {
    body:has(.hf-household-create-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-household-create-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-household-create-card {
        border-radius: 24px !important;
        padding: 16px !important;
    }

    .hf-household-create-actions {
        grid-template-columns: 1fr !important;
    }
}

/* ===== HOUSEFLOW HOUSEHOLD CREATE UX END ===== */

/* ===== HOUSEFLOW HOUSEHOLD JOIN UX START ===== */

body:has(.hf-household-join-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-household-join-screen) .page-container {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-household-join-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfHouseholdJoinEnter 300ms ease-out both !important;
}

@keyframes hfHouseholdJoinEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-household-join-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-household-join-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-household-join-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-household-join-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-household-join-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-household-join-hero-top p:not(.hf-household-join-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-household-join-badge {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.3rem !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.hf-household-join-info-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-household-join-info-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-household-join-info-card strong {
    color: #ffffff !important;
    font-size: clamp(1.9rem, 8vw, 2.45rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 900 !important;
}

.hf-household-join-info-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-household-join-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 28px !important;
    padding: 18px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-household-join-form {
    display: grid !important;
    gap: 18px !important;
}

.hf-household-join-section {
    display: grid !important;
    gap: 14px !important;
}

.hf-household-join-section-heading {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 12px !important;
    align-items: start !important;
}

.hf-household-join-section-heading > span {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
}

.hf-household-join-section-heading h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    font-weight: 850 !important;
}

.hf-household-join-section-heading p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.hf-household-join-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-household-join-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

.hf-household-join-field input {
    width: 100% !important;
    min-height: 56px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 16px !important;
    font-size: 1.08rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
    outline: none !important;
}

.hf-household-join-field input::placeholder {
    color: #94a3b8 !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
}

.hf-household-join-field input:hover {
    border-color: #cbd5e1 !important;
}

.hf-household-join-field input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
}

.hf-household-join-actions {
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
    gap: 10px !important;
}

.hf-household-join-actions button,
.hf-household-join-actions a {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    font-weight: 850 !important;
    text-decoration: none !important;
    padding: 0 14px !important;
}

.hf-household-join-actions button {
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-household-join-actions button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.hf-household-join-actions a {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-household-join-actions a:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
}

body.theme-dark .hf-household-join-hero,
body.theme-dark .hf-household-join-card,
body[data-theme="dark"] .hf-household-join-hero,
body[data-theme="dark"] .hf-household-join-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-household-join-hero h1,
body.theme-dark .hf-household-join-section-heading h2,
body.theme-dark .hf-household-join-field label,
body[data-theme="dark"] .hf-household-join-hero h1,
body[data-theme="dark"] .hf-household-join-section-heading h2,
body[data-theme="dark"] .hf-household-join-field label {
    color: #f8fafc !important;
}

body.theme-dark .hf-household-join-hero-top p:not(.hf-household-join-kicker),
body.theme-dark .hf-household-join-section-heading p,
body[data-theme="dark"] .hf-household-join-hero-top p:not(.hf-household-join-kicker),
body[data-theme="dark"] .hf-household-join-section-heading p {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-household-join-field input,
body[data-theme="dark"] .hf-household-join-field input {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

@media (max-width: 420px) {
    body:has(.hf-household-join-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-household-join-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-household-join-card {
        border-radius: 24px !important;
        padding: 16px !important;
    }

    .hf-household-join-actions {
        grid-template-columns: 1fr !important;
    }
}

/* ===== HOUSEFLOW HOUSEHOLD JOIN UX END ===== */

/* ===== HOUSEFLOW HOUSEHOLD DETAILS UX START ===== */

body:has(.hf-household-details-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-household-details-screen) .page-container {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-household-details-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    animation: hfHouseholdDetailsEnter 300ms ease-out both !important;
}

@keyframes hfHouseholdDetailsEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hf-household-details-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hf-household-details-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-household-details-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.hf-household-details-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-household-details-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
}

.hf-household-details-hero-top p:not(.hf-household-details-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
}

.hf-household-details-badge {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.3rem !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.hf-household-details-code-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-household-details-code-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-household-details-code-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 10vw, 2.75rem) !important;
    line-height: 1 !important;
    letter-spacing: 0.04em !important;
    font-weight: 950 !important;
}

.hf-household-details-code-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-household-details-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.hf-household-details-stats article {
    min-height: 118px !important;
    padding: 16px !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
    display: grid !important;
    align-content: space-between !important;
    gap: 10px !important;
}

.hf-household-details-stats span {
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 750 !important;
}

.hf-household-details-stats strong {
    color: #111827 !important;
    font-size: 1.55rem !important;
    line-height: 1 !important;
    letter-spacing: -0.04em !important;
    font-weight: 900 !important;
}

.hf-household-details-stats small {
    color: #94a3b8 !important;
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
}

.hf-household-details-stats article.is-owner strong {
    color: #2563eb !important;
}

.hf-household-members-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 28px !important;
    padding: 18px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-household-members-heading {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 12px !important;
    align-items: start !important;
    margin-bottom: 16px !important;
}

.hf-household-members-heading > span {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
}

.hf-household-members-heading h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    font-weight: 850 !important;
}

.hf-household-members-heading p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.hf-household-members-list {
    display: grid !important;
    gap: 12px !important;
}

.hf-household-member-item {
    display: grid !important;
    grid-template-columns: 46px 1fr auto !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px !important;
    border-radius: 20px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.hf-household-member-item.is-current {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.hf-household-member-avatar {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16) !important;
}

.hf-household-member-main {
    min-width: 0 !important;
}

.hf-household-member-top {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.hf-household-member-top h3 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
}

.hf-household-member-top p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
}

.hf-household-member-role {
    min-height: 28px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.hf-household-member-meta {
    margin-top: 8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.hf-household-member-meta span {
    min-height: 26px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    background: #ffffff !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
}

.hf-household-member-meta span.is-you {
    background: #ecfdf5 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
}

.hf-household-member-meta span.is-owner {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

.hf-household-remove-form {
    margin: 0 !important;
}

.hf-household-remove-form button {
    min-height: 42px !important;
    border-radius: 14px !important;
    padding: 0 12px !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    box-shadow: none !important;
}

.hf-household-remove-form button:hover {
    background: #fee2e2 !important;
    transform: translateY(-1px) !important;
}

.hf-household-owner-note {
    margin-top: 14px !important;
    padding: 13px !important;
    border-radius: 18px !important;
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    display: grid !important;
    grid-template-columns: 28px 1fr !important;
    gap: 10px !important;
    align-items: start !important;
}

.hf-household-owner-note span {
    width: 28px !important;
    height: 28px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    color: #92400e !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
}

.hf-household-owner-note p {
    margin: 0 !important;
    color: #92400e !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
}

.hf-household-details-actions {
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.hf-household-details-actions a {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-household-details-actions a:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

body.theme-dark .hf-household-details-hero,
body.theme-dark .hf-household-details-stats article,
body.theme-dark .hf-household-members-card,
body[data-theme="dark"] .hf-household-details-hero,
body[data-theme="dark"] .hf-household-details-stats article,
body[data-theme="dark"] .hf-household-members-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-household-member-item,
body[data-theme="dark"] .hf-household-member-item {
    background: #0f172a !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-household-details-hero h1,
body.theme-dark .hf-household-details-stats strong,
body.theme-dark .hf-household-members-heading h2,
body.theme-dark .hf-household-member-top h3,
body[data-theme="dark"] .hf-household-details-hero h1,
body[data-theme="dark"] .hf-household-details-stats strong,
body[data-theme="dark"] .hf-household-members-heading h2,
body[data-theme="dark"] .hf-household-member-top h3 {
    color: #f8fafc !important;
}

body.theme-dark .hf-household-details-hero-top p:not(.hf-household-details-kicker),
body.theme-dark .hf-household-members-heading p,
body.theme-dark .hf-household-member-top p,
body[data-theme="dark"] .hf-household-details-hero-top p:not(.hf-household-details-kicker),
body[data-theme="dark"] .hf-household-members-heading p,
body[data-theme="dark"] .hf-household-member-top p {
    color: #cbd5e1 !important;
}

@media (max-width: 520px) {
    body:has(.hf-household-details-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-household-details-hero {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .hf-household-details-stats {
        grid-template-columns: 1fr !important;
    }

    .hf-household-members-card {
        border-radius: 24px !important;
        padding: 16px !important;
    }

    .hf-household-member-item {
        grid-template-columns: 46px 1fr !important;
    }

    .hf-household-remove-form {
        grid-column: 1 / -1 !important;
    }

    .hf-household-remove-form button {
        width: 100% !important;
    }

    .hf-household-member-top {
        display: grid !important;
        gap: 8px !important;
    }

    .hf-household-member-role {
        width: fit-content !important;
    }
}

/* ===== HOUSEFLOW HOUSEHOLD DETAILS UX END ===== */

/* ===== HOUSEFLOW MONTHLY SUMMARY UX START ===== */

body:has(.hf-monthly-summary-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-monthly-summary-screen) .page-container {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-monthly-summary-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
}

.hf-monthly-summary-hero {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    padding: 22px !important;
    margin-bottom: 0 !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08) !important;
}

.hf-monthly-summary-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8) !important;
}

.hf-monthly-summary-hero-top {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 14px !important;
}

.hf-monthly-summary-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-monthly-summary-hero .hero-title {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.58rem, 6vw, 2.05rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 900 !important;
}

.hf-monthly-summary-hero .hero-text {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
}

.hf-monthly-summary-period {
    min-width: 84px !important;
    min-height: 48px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.hf-monthly-summary-total-card {
    margin-top: 20px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    background: linear-gradient(135deg, #111827 0%, #1e3a8a 56%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: grid !important;
    gap: 5px !important;
    box-shadow: 0 18px 34px rgba(30, 58, 138, 0.22) !important;
}

.hf-monthly-summary-total-card span {
    color: #bfdbfe !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-monthly-summary-total-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 10vw, 2.85rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.06em !important;
    font-weight: 950 !important;
}

.hf-monthly-summary-total-card small {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

.hf-monthly-summary-filter-card {
    margin-bottom: 0 !important;
    padding: 18px !important;
    border-radius: 28px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-monthly-summary-filter-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    align-items: end !important;
}

.hf-monthly-summary-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-monthly-summary-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
}

.hf-monthly-summary-field input,
.hf-monthly-summary-field select {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 14px !important;
    font-size: 0.96rem !important;
    box-shadow: none !important;
    outline: none !important;
}

.hf-monthly-summary-filter-actions {
    grid-column: 1 / -1 !important;
}

.hf-monthly-summary-filter-actions button {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-monthly-summary-import-row {
    margin-top: 14px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    gap: 10px !important;
}

.hf-monthly-summary-import-row form,
.hf-monthly-summary-import-row .inline-form {
    width: 100% !important;
    display: block !important;
}

.hf-monthly-summary-import-row button {
    width: 100% !important;
    min-height: 50px !important;
    border-radius: 16px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #dbeafe !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
    box-shadow: none !important;
}

.hf-monthly-summary-import-row .helper-text {
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 16px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 0.86rem !important;
    line-height: 1.45 !important;
}

.hf-monthly-summary-import-row .helper-text strong {
    color: #111827 !important;
    font-weight: 900 !important;
}

.hf-monthly-summary-stats {
    display: grid !important;
    gap: 12px !important;
}

.hf-monthly-summary-total-stat,
.hf-monthly-summary-split-stat {
    grid-column: 1 / -1 !important;
}

.hf-monthly-summary-users-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.hf-monthly-summary-user-column {
    min-width: 0 !important;
    display: grid !important;
    gap: 10px !important;
}

.hf-monthly-summary-user-header {
    min-height: 58px !important;
    padding: 12px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
    display: grid !important;
    gap: 3px !important;
}

.hf-monthly-summary-user-header span {
    color: #111827 !important;
    font-size: 0.98rem !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
}

.hf-monthly-summary-user-header small {
    color: #94a3b8 !important;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

.hf-monthly-summary-stat {
    min-height: 120px !important;
    margin: 0 !important;
    padding: 16px !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
    display: grid !important;
    align-content: space-between !important;
    gap: 9px !important;
}

.hf-monthly-summary-total-stat {
    min-height: 118px !important;
    background:
        radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.12), transparent 36%),
        #ffffff !important;
}

.hf-monthly-summary-person-stat {
    min-height: 124px !important;
}

.hf-monthly-summary-split-stat {
    min-height: 112px !important;
    background: #f8fafc !important;
}

.hf-monthly-summary-stat.clickable-card {
    cursor: pointer !important;
}

.hf-monthly-summary-stat.clickable-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10) !important;
    border-color: #bfdbfe !important;
}

.hf-monthly-summary-stat .stat-label {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
}

.hf-monthly-summary-stat .stat-value {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.26rem, 5vw, 1.72rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.055em !important;
    font-weight: 950 !important;
}

.hf-monthly-summary-stat .stat-value.primary {
    color: #2563eb !important;
}

.hf-monthly-summary-stat .stat-value.success {
    color: #16a34a !important;
}

.hf-monthly-summary-stat .stat-value.warning {
    color: #d97706 !important;
}

.hf-monthly-summary-stat .helper-text {
    margin: 0 !important;
    color: #94a3b8 !important;
    font-size: 0.73rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.hf-monthly-summary-modal-item {
    display: grid !important;
    gap: 8px !important;
    padding: 14px !important;
    border-radius: 18px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.hf-monthly-summary-modal-item strong {
    color: #111827 !important;
    font-size: 0.96rem !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
}

.hf-monthly-summary-modal-item .helper-text {
    color: #64748b !important;
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
}

.hf-monthly-summary-modal-item .status-action-row form,
.hf-monthly-summary-modal-item .inline-form {
    width: 100% !important;
    display: block !important;
}

.hf-monthly-summary-modal-item .status-action-row button {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 14px !important;
    font-size: 0.84rem !important;
    font-weight: 850 !important;
}

body:has(.hf-monthly-summary-screen) .hf-modal-content {
    border-radius: 24px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22) !important;
}

body:has(.hf-monthly-summary-screen) .hf-modal-header h3 {
    color: #111827 !important;
    font-size: 1.08rem !important;
    font-weight: 900 !important;
}

body:has(.hf-monthly-summary-screen) .hf-modal-close {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

@media (max-width: 420px) {
    .hf-monthly-summary-stat {
        padding: 14px !important;
    }

    .hf-monthly-summary-stat .stat-value {
        font-size: 1.24rem !important;
    }

    .hf-monthly-summary-user-header {
        padding: 10px !important;
    }
}

/* ===== HOUSEFLOW MONTHLY SUMMARY UX END ===== */

/* ===== HOUSEFLOW MONTHLY SUMMARY CENTER CARDS START ===== */

.hf-monthly-summary-stats .hf-monthly-summary-stat {
    text-align: center !important;
    align-content: center !important;
    justify-items: center !important;
    place-items: center !important;
}

.hf-monthly-summary-total-stat,
.hf-monthly-summary-person-stat,
.hf-monthly-summary-split-stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.hf-monthly-summary-stat .stat-label,
.hf-monthly-summary-stat .stat-value,
.hf-monthly-summary-stat .helper-text {
    width: 100% !important;
    text-align: center !important;
}

.hf-monthly-summary-user-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.hf-monthly-summary-user-header span,
.hf-monthly-summary-user-header small {
    width: 100% !important;
    text-align: center !important;
}

.hf-monthly-summary-split-stat {
    min-height: 118px !important;
}

.hf-monthly-summary-person-stat {
    min-height: 128px !important;
}

/* ===== HOUSEFLOW MONTHLY SUMMARY CENTER CARDS END ===== */



/* ===== HOUSEFLOW PROFILE SETTINGS UX START ===== */

body:has(.hf-settings-screen) {
    background: #f3f6fa !important;
}

body:has(.hf-settings-screen) .page-container {
    width: 100% !important;
    max-width: 780px !important;
    margin: 0 auto !important;
    padding: 18px 14px 120px !important;
}

.hf-settings-screen {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
}

.hf-settings-hero {
    display: grid !important;
    grid-template-columns: 88px 1fr !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 20px !important;
    border-radius: 28px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07) !important;
}

.hf-settings-avatar-wrap {
    width: 88px !important;
    min-width: 88px !important;
    height: 88px !important;
    border-radius: 26px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18) !important;
}

.hf-settings-avatar,
.hf-settings-avatar-fallback {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
    border-radius: 26px !important;
}

.hf-settings-avatar {
    object-fit: cover !important;
    display: block !important;
    border: 0 !important;
}

.hf-settings-avatar-fallback {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 1.8rem !important;
    line-height: 1 !important;
    font-weight: 950 !important;
}

.hf-settings-avatar.hidden,
.hf-settings-avatar-fallback.hidden {
    display: none !important;
}

.hf-settings-hero-copy {
    min-width: 0 !important;
}

.hf-settings-kicker {
    margin: 0 0 6px !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.hf-settings-hero h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.45rem, 6vw, 2rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 950 !important;
}

.hf-settings-hero p:not(.hf-settings-kicker) {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
}

.hf-settings-grid {
    display: grid !important;
    gap: 14px !important;
}

.hf-settings-card {
    padding: 18px !important;
    border-radius: 28px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
}

.hf-settings-card-heading {
    display: grid !important;
    grid-template-columns: 42px 1fr !important;
    gap: 12px !important;
    align-items: start !important;
    margin-bottom: 16px !important;
}

.hf-settings-card-heading > span {
    width: 42px !important;
    height: 42px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-size: 0.82rem !important;
    font-weight: 950 !important;
}

.hf-settings-card-heading h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.04rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    font-weight: 900 !important;
}

.hf-settings-card-heading p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.hf-settings-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.hf-settings-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-settings-field-full {
    grid-column: 1 / -1 !important;
}

.hf-settings-field label {
    color: #111827 !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
}

.hf-settings-field input {
    width: 100% !important;
    min-height: 54px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 15px !important;
    font-size: 0.96rem !important;
    box-shadow: none !important;
    outline: none !important;
}

.hf-settings-field input[type="file"] {
    min-height: auto !important;
    padding: 13px !important;
    cursor: pointer !important;
}

.hf-settings-field input:disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
}

.hf-settings-field input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
}

.hf-settings-field small {
    color: #64748b !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
}

.hf-settings-actions {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.hf-settings-actions button,
.hf-settings-secondary-link,
.hf-settings-danger-link {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
}

.hf-settings-actions button {
    border: 0 !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

.hf-settings-actions button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.hf-settings-secondary-link {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}

.hf-settings-secondary-link:hover {
    background: #dbeafe !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.hf-settings-danger-link {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

.hf-settings-danger-link:hover {
    background: #fee2e2 !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.hf-settings-mini-card {
    display: grid !important;
    gap: 10px !important;
}

@media (min-width: 760px) {
    .hf-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .hf-settings-profile-card {
        grid-column: 1 / -1 !important;
    }
}

body.theme-dark:has(.hf-settings-screen),
body[data-theme="dark"]:has(.hf-settings-screen) {
    background: #0b1220 !important;
}

body.theme-dark .hf-settings-hero,
body.theme-dark .hf-settings-card,
body[data-theme="dark"] .hf-settings-hero,
body[data-theme="dark"] .hf-settings-card {
    background: linear-gradient(180deg, #182235, #111827) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-settings-hero h1,
body.theme-dark .hf-settings-card-heading h2,
body.theme-dark .hf-settings-field label,
body[data-theme="dark"] .hf-settings-hero h1,
body[data-theme="dark"] .hf-settings-card-heading h2,
body[data-theme="dark"] .hf-settings-field label {
    color: #f8fafc !important;
}

body.theme-dark .hf-settings-hero p:not(.hf-settings-kicker),
body.theme-dark .hf-settings-card-heading p,
body.theme-dark .hf-settings-field small,
body[data-theme="dark"] .hf-settings-hero p:not(.hf-settings-kicker),
body[data-theme="dark"] .hf-settings-card-heading p,
body[data-theme="dark"] .hf-settings-field small {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-settings-field input,
body[data-theme="dark"] .hf-settings-field input {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

body.theme-dark .hf-settings-field input:disabled,
body[data-theme="dark"] .hf-settings-field input:disabled {
    background: #111827 !important;
    color: #64748b !important;
}

@media (max-width: 520px) {
    body:has(.hf-settings-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-settings-hero {
        grid-template-columns: 74px 1fr !important;
        gap: 14px !important;
        padding: 18px !important;
        border-radius: 24px !important;
    }

    .hf-settings-avatar-wrap,
    .hf-settings-avatar,
    .hf-settings-avatar-fallback {
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        height: 74px !important;
        min-height: 74px !important;
        max-height: 74px !important;
        border-radius: 22px !important;
    }

    .hf-settings-card {
        border-radius: 24px !important;
        padding: 16px !important;
    }

    .hf-settings-form {
        grid-template-columns: 1fr !important;
    }

    .hf-settings-field-full {
        grid-column: auto !important;
    }
}

/* ===== HOUSEFLOW PROFILE SETTINGS UX END ===== */

/* ===== HOUSEFLOW FOOTER REAL NAV START ===== */

.app-shell {
    padding-bottom: 118px !important;
}

.bottom-nav-shell-floating {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 80 !important;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom)) !important;
    pointer-events: none !important;
}

.bottom-nav-shell-floating .bottom-nav-premium.bottom-nav-clean {
    pointer-events: auto !important;
    width: min(100%, 520px) !important;
    min-height: 76px !important;
    margin: 0 auto !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 30px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(226, 232, 240, 0.96) !important;
    box-shadow:
        0 22px 48px rgba(15, 23, 42, 0.16),
        0 4px 12px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
}

.bottom-nav-shell-floating .bottom-nav-item {
    position: relative !important;
    min-width: 0 !important;
    min-height: 60px !important;
    padding: 8px 4px !important;
    border-radius: 22px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    color: #94a3b8 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 0.68 !important;
    filter: grayscale(0.32) saturate(0.72) !important;
    transform: scale(0.96) !important;
    text-decoration: none !important;
    overflow: hidden !important;
    transition:
        transform 180ms ease,
        opacity 180ms ease,
        color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease,
        filter 180ms ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.bottom-nav-shell-floating .bottom-nav-item::before {
    content: "" !important;
    position: absolute !important;
    inset: 5px !important;
    z-index: 0 !important;
    border-radius: 20px !important;
    background: transparent !important;
    opacity: 0 !important;
    transform: scale(0.78) !important;
    transition: 180ms ease !important;
}

.bottom-nav-shell-floating .bottom-nav-item::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    bottom: 6px !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    opacity: 0 !important;
    transform: translateX(-50%) scale(0.5) !important;
    transition: 180ms ease !important;
}

.bottom-nav-shell-floating .bottom-nav-icon,
.bottom-nav-shell-floating .bottom-nav-label {
    position: relative !important;
    z-index: 1 !important;
}

.bottom-nav-shell-floating .bottom-nav-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: currentColor !important;
    font-size: 0 !important;
    line-height: 1 !important;
    transition: transform 180ms ease !important;
}

.bottom-nav-shell-floating .bottom-nav-icon svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.15 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.bottom-nav-shell-floating .bottom-nav-label {
    width: 100% !important;
    color: currentColor !important;
    font-size: 0.68rem !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    letter-spacing: -0.01em !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.bottom-nav-shell-floating .bottom-nav-item:hover {
    opacity: 0.92 !important;
    filter: grayscale(0.12) saturate(0.9) !important;
    color: #64748b !important;
    background: rgba(148, 163, 184, 0.10) !important;
    transform: scale(0.99) !important;
    text-decoration: none !important;
}

.bottom-nav-shell-floating .bottom-nav-item:active {
    transform: scale(0.92) !important;
}

.bottom-nav-shell-floating .bottom-nav-item.is-active {
    opacity: 1 !important;
    filter: none !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #0ea5e9 100%) !important;
    transform: translateY(-8px) scale(1.045) !important;
    box-shadow:
        0 20px 34px rgba(37, 99, 235, 0.34),
        0 8px 16px rgba(14, 165, 233, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.bottom-nav-shell-floating .bottom-nav-item.is-active::before {
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.28), transparent 44%),
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0)) !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}

.bottom-nav-shell-floating .bottom-nav-item.is-active::after {
    opacity: 0.92 !important;
    background: #ffffff !important;
    transform: translateX(-50%) scale(1) !important;
}

.bottom-nav-shell-floating .bottom-nav-item.is-active .bottom-nav-icon {
    transform: translateY(-1px) scale(1.05) !important;
}

.bottom-nav-shell-floating .bottom-nav-item.is-active .bottom-nav-icon svg {
    stroke-width: 2.35 !important;
}

.bottom-nav-shell-floating .bottom-nav-item.is-active .bottom-nav-label {
    font-weight: 950 !important;
}

.bottom-nav-shell-floating .nav-center-add:not(.is-active) {
    opacity: 0.82 !important;
    color: #64748b !important;
}

.bottom-nav-shell-floating .nav-center-add:not(.is-active) .bottom-nav-icon {
    color: #475569 !important;
}

.bottom-nav-shell-floating .nav-center-add:not(.is-active) .bottom-nav-icon svg {
    stroke-width: 2.45 !important;
}

.bottom-nav-shell-floating .nav-center-add.is-active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #38bdf8 100%) !important;
}

.bottom-nav-shell-floating .nav-center-add.is-active .bottom-nav-icon {
    transform: translateY(-1px) scale(1.12) !important;
}

.alert-row-status {
    width: 10px !important;
    height: 10px !important;
    margin-top: 5px !important;
    border-radius: 999px !important;
    display: inline-block !important;
    background: #94a3b8 !important;
}

.alert-row-status.is-unread {
    background: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.alert-row-status.is-read {
    background: #22c55e !important;
}

.alert-row-status.is-info {
    background: #38bdf8 !important;
}

body.theme-dark .bottom-nav-shell-floating .bottom-nav-premium.bottom-nav-clean,
body[data-theme="dark"] .bottom-nav-shell-floating .bottom-nav-premium.bottom-nav-clean {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(51, 65, 85, 0.9) !important;
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-dark .bottom-nav-shell-floating .bottom-nav-item,
body[data-theme="dark"] .bottom-nav-shell-floating .bottom-nav-item {
    color: #64748b !important;
}

body.theme-dark .bottom-nav-shell-floating .bottom-nav-item:hover,
body[data-theme="dark"] .bottom-nav-shell-floating .bottom-nav-item:hover {
    background: rgba(148, 163, 184, 0.10) !important;
    color: #cbd5e1 !important;
}

body.theme-dark .bottom-nav-shell-floating .bottom-nav-item.is-active,
body[data-theme="dark"] .bottom-nav-shell-floating .bottom-nav-item.is-active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #0ea5e9 100%) !important;
    box-shadow:
        0 20px 34px rgba(37, 99, 235, 0.28),
        0 8px 16px rgba(14, 165, 233, 0.14) !important;
}

@media (max-width: 390px) {
    .bottom-nav-shell-floating {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .bottom-nav-shell-floating .bottom-nav-premium.bottom-nav-clean {
        gap: 5px !important;
        padding: 7px !important;
        border-radius: 26px !important;
    }

    .bottom-nav-shell-floating .bottom-nav-item {
        min-height: 58px !important;
        border-radius: 20px !important;
    }

    .bottom-nav-shell-floating .bottom-nav-icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .bottom-nav-shell-floating .bottom-nav-label {
        font-size: 0.62rem !important;
    }
}

@media (min-width: 768px) {
    .bottom-nav-shell-floating {
        display: none !important;
    }

    .app-shell {
        padding-bottom: 30px !important;
    }
}

/* ===== HOUSEFLOW FOOTER REAL NAV END ===== */

/* ===== HOUSEFLOW HEADER PRODUCT BAR START ===== */

.topbar.hf-header-product {
    position: sticky !important;
    top: 0 !important;
    z-index: 70 !important;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
}

.hf-header-product-main {
    width: 100% !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
}

.hf-header-logo-link {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12) !important;
    text-decoration: none !important;
}

.hf-header-logo {
    width: 100% !important;
    height: 100% !important;
    padding: 4px !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: 14px !important;
    background: #ffffff !important;
}

.hf-header-logo.is-hidden {
    display: none !important;
}

.hf-header-logo-fallback {
    width: 100% !important;
    height: 100% !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 950 !important;
}

.hf-header-logo-fallback.is-hidden {
    display: none !important;
}

.hf-header-product-copy {
    min-width: 0 !important;
    display: grid !important;
    gap: 2px !important;
}

.hf-header-brand {
    margin: 0 !important;
    color: #2563eb !important;
    font-size: 0.66rem !important;
    line-height: 1 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    font-weight: 950 !important;
}

.hf-header-product-copy h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1rem, 4vw, 1.16rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.035em !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hf-header-product-copy p:not(.hf-header-brand) {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 0.73rem !important;
    line-height: 1.2 !important;
    font-weight: 650 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hf-header-actions-cluster {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
}

.hf-header-action-btn {
    position: relative !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #334155 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    appearance: none !important;
    cursor: pointer !important;
    outline: none !important;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.hf-header-action-btn:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #2563eb !important;
    transform: translateY(-1px) !important;
}

.hf-header-action-btn:active {
    transform: scale(0.94) !important;
}

.hf-header-action-btn:focus-visible {
    background: rgba(37, 99, 235, 0.10) !important;
    color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.hf-header-action-icon {
    position: relative !important;
    width: 34px !important;
    height: 34px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hf-header-action-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.08 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.hf-header-alert-badge {
    position: absolute !important;
    top: 1px !important;
    right: 0 !important;
    min-width: 15px !important;
    height: 15px !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    font-size: 0.56rem !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hf-header-alert-badge.is-empty {
    display: none !important;
}

body.theme-dark .topbar.hf-header-product,
body[data-theme="dark"] .topbar.hf-header-product {
    background: rgba(15, 23, 42, 0.94) !important;
    border-bottom-color: rgba(51, 65, 85, 0.8) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2) !important;
}

body.theme-dark .hf-header-logo-link,
body[data-theme="dark"] .hf-header-logo-link {
    background: #ffffff !important;
}

body.theme-dark .hf-header-product-copy h1,
body[data-theme="dark"] .hf-header-product-copy h1 {
    color: #f8fafc !important;
}

body.theme-dark .hf-header-product-copy p:not(.hf-header-brand),
body[data-theme="dark"] .hf-header-product-copy p:not(.hf-header-brand) {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-header-action-btn,
body[data-theme="dark"] .hf-header-action-btn {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-header-action-btn:hover,
body[data-theme="dark"] .hf-header-action-btn:hover {
    background: rgba(96, 165, 250, 0.12) !important;
    color: #93c5fd !important;
}

body.theme-dark .hf-header-alert-badge,
body[data-theme="dark"] .hf-header-alert-badge {
    border-color: #0f172a !important;
}

@media (max-width: 520px) {
    .topbar.hf-header-product {
        padding: 9px 12px !important;
    }

    .hf-header-product-main {
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
        gap: 8px !important;
    }

    .hf-header-logo-link {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        border-radius: 13px !important;
    }

    .hf-header-logo {
        border-radius: 13px !important;
        padding: 4px !important;
    }

    .hf-header-actions-cluster {
        gap: 2px !important;
    }

    .hf-header-action-btn,
    .hf-header-action-icon {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
    }

    .hf-header-action-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .hf-header-brand {
        font-size: 0.62rem !important;
    }

    .hf-header-product-copy h1 {
        font-size: 0.96rem !important;
    }

    .hf-header-product-copy p:not(.hf-header-brand) {
        font-size: 0.68rem !important;
    }
}

@media (max-width: 370px) {
    .hf-header-product-copy p:not(.hf-header-brand) {
        display: none !important;
    }

    .hf-header-actions-cluster {
        gap: 1px !important;
    }

    .hf-header-action-btn,
    .hf-header-action-icon {
        width: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
    }
}

/* ===== HOUSEFLOW HEADER PRODUCT BAR END ===== */

/* ===== HOUSEFLOW REGISTER UX START ===== */

body:has(.hf-register-screen) {
    background:
        radial-gradient(circle at 16% 8%, rgba(37, 99, 235, 0.12), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.12), transparent 24%),
        #f6f8fb !important;
}

body:has(.hf-register-screen) .page-container {
    max-width: 1180px !important;
    padding: 18px 14px 118px !important;
}

.hf-register-screen {
    width: 100% !important;
}

.hf-register-shell {
    display: grid !important;
    gap: 18px !important;
    align-items: center !important;
}

.hf-register-intro {
    display: grid !important;
    gap: 14px !important;
    padding: 8px 2px 0 !important;
}

.hf-register-logo {
    width: 64px !important;
    height: 64px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14) !important;
    overflow: hidden !important;
}

.hf-register-logo img {
    width: 100% !important;
    height: 100% !important;
    padding: 7px !important;
    object-fit: contain !important;
    display: block !important;
}

.hf-register-kicker {
    margin: 0 !important;
    color: #2563eb !important;
    font-size: 0.76rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase !important;
}

.hf-register-intro h1 {
    max-width: 720px !important;
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(2rem, 8vw, 3.8rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.065em !important;
    font-weight: 950 !important;
}

.hf-register-intro > p:not(.hf-register-kicker) {
    max-width: 620px !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 1rem !important;
    line-height: 1.65 !important;
}

.hf-register-benefits {
    display: grid !important;
    gap: 10px !important;
    margin-top: 4px !important;
}

.hf-register-benefits article {
    padding: 14px 15px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045) !important;
    display: grid !important;
    gap: 4px !important;
}

.hf-register-benefits strong {
    color: #111827 !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
}

.hf-register-benefits span {
    color: #64748b !important;
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
}

.hf-register-card {
    position: relative !important;
    overflow: hidden !important;
    padding: 20px !important;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10) !important;
}

.hf-register-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #2563eb, #38bdf8) !important;
}

.hf-register-card-header {
    text-align: center !important;
    display: grid !important;
    justify-items: center !important;
    gap: 6px !important;
    margin-bottom: 18px !important;
}

.hf-register-card-logo {
    width: 58px !important;
    height: 58px !important;
    border-radius: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12) !important;
    overflow: hidden !important;
    margin-bottom: 4px !important;
}

.hf-register-card-logo img {
    width: 100% !important;
    height: 100% !important;
    padding: 6px !important;
    object-fit: contain !important;
    display: block !important;
}

.hf-register-card-header p {
    margin: 0 !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    font-weight: 950 !important;
}

.hf-register-card-header h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.55rem, 6vw, 2rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.045em !important;
    font-weight: 950 !important;
}

.hf-register-card-header span {
    color: #64748b !important;
    font-size: 0.88rem !important;
}

.hf-register-alert {
    padding: 13px 14px !important;
    margin-bottom: 14px !important;
    border-radius: 16px !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
    font-size: 0.9rem !important;
}

.hf-register-google-btn {
    width: 100% !important;
    min-height: 54px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055) !important;
    text-decoration: none !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
}

.hf-register-google-btn:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.hf-register-google-icon,
.hf-register-google-icon svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
}

.hf-register-divider {
    position: relative !important;
    margin: 18px 0 16px !important;
    text-align: center !important;
}

.hf-register-divider::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 50% !important;
    height: 1px !important;
    background: #e2e8f0 !important;
}

.hf-register-divider span {
    position: relative !important;
    z-index: 1 !important;
    padding: 0 12px !important;
    background: #ffffff !important;
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-register-form {
    display: grid !important;
    gap: 14px !important;
}

.hf-register-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-register-field label {
    color: #111827 !important;
    font-size: 0.84rem !important;
    font-weight: 850 !important;
}

.hf-register-field input {
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 15px !important;
    border-radius: 15px !important;
    border: 1px solid #dbe3ef !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 0.96rem !important;
    outline: none !important;
    box-shadow: none !important;
}

.hf-register-field input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
}

.hf-register-field small {
    color: #64748b !important;
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
}

.hf-register-password-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
}

.hf-register-password-toggle {
    min-width: 66px !important;
    min-height: 52px !important;
    padding: 0 13px !important;
    border-radius: 15px !important;
    border: 0 !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    box-shadow: none !important;
    font-size: 0.84rem !important;
    font-weight: 900 !important;
}

.hf-register-password-toggle:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.hf-register-submit {
    width: 100% !important;
    min-height: 54px !important;
    margin-top: 2px !important;
    border-radius: 16px !important;
    border: 0 !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22) !important;
    font-size: 0.96rem !important;
    font-weight: 950 !important;
}

.hf-register-submit:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    transform: translateY(-1px) !important;
}

.hf-register-bottom-link {
    margin-top: 16px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
}

.hf-register-bottom-link a {
    color: #2563eb !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

.hf-register-bottom-link a:hover {
    color: #1d4ed8 !important;
    text-decoration: none !important;
}

body.theme-dark:has(.hf-register-screen),
body[data-theme="dark"]:has(.hf-register-screen) {
    background:
        radial-gradient(circle at 16% 8%, rgba(96, 165, 250, 0.16), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.10), transparent 24%),
        #0b1220 !important;
}

body.theme-dark .hf-register-card,
body.theme-dark .hf-register-benefits article,
body[data-theme="dark"] .hf-register-card,
body[data-theme="dark"] .hf-register-benefits article {
    background: rgba(17, 24, 39, 0.96) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-register-intro h1,
body.theme-dark .hf-register-card-header h2,
body.theme-dark .hf-register-benefits strong,
body.theme-dark .hf-register-field label,
body[data-theme="dark"] .hf-register-intro h1,
body[data-theme="dark"] .hf-register-card-header h2,
body[data-theme="dark"] .hf-register-benefits strong,
body[data-theme="dark"] .hf-register-field label {
    color: #f8fafc !important;
}

body.theme-dark .hf-register-intro > p:not(.hf-register-kicker),
body.theme-dark .hf-register-benefits span,
body.theme-dark .hf-register-card-header span,
body.theme-dark .hf-register-field small,
body.theme-dark .hf-register-bottom-link,
body[data-theme="dark"] .hf-register-intro > p:not(.hf-register-kicker),
body[data-theme="dark"] .hf-register-benefits span,
body[data-theme="dark"] .hf-register-card-header span,
body[data-theme="dark"] .hf-register-field small,
body[data-theme="dark"] .hf-register-bottom-link {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-register-field input,
body[data-theme="dark"] .hf-register-field input {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

body.theme-dark .hf-register-divider span,
body[data-theme="dark"] .hf-register-divider span {
    background: #111827 !important;
}

body.theme-dark .hf-register-google-btn,
body[data-theme="dark"] .hf-register-google-btn {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #314056 !important;
}

@media (min-width: 900px) {
    .hf-register-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr) !important;
        gap: 30px !important;
        min-height: calc(100vh - 180px) !important;
    }

    .hf-register-intro {
        align-content: center !important;
        padding-left: 8px !important;
    }

    .hf-register-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        max-width: 760px !important;
    }

    .hf-register-card {
        padding: 24px !important;
    }
}

@media (max-width: 560px) {
    body:has(.hf-register-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-register-logo {
        width: 56px !important;
        height: 56px !important;
        border-radius: 18px !important;
    }

    .hf-register-intro h1 {
        font-size: clamp(1.8rem, 10vw, 2.55rem) !important;
    }

    .hf-register-card {
        padding: 18px !important;
        border-radius: 24px !important;
    }
}

/* ===== HOUSEFLOW REGISTER UX END ===== */

/* ===== HOUSEFLOW FORGOT PASSWORD UX START ===== */

body:has(.hf-forgot-screen) {
    background:
        radial-gradient(circle at 16% 8%, rgba(37, 99, 235, 0.12), transparent 28%),
        radial-gradient(circle at 86% 8%, rgba(56, 189, 248, 0.10), transparent 24%),
        #f6f8fb !important;
}

body:has(.hf-forgot-screen) .page-container {
    max-width: 1060px !important;
    padding: 20px 14px 118px !important;
}

.hf-forgot-screen {
    width: 100% !important;
}

.hf-forgot-shell {
    display: grid !important;
    gap: 18px !important;
    align-items: center !important;
}

.hf-forgot-card {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    padding: 22px !important;
    border-radius: 30px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10) !important;
    position: relative !important;
    overflow: hidden !important;
}

.hf-forgot-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #2563eb, #38bdf8) !important;
}

.hf-forgot-logo {
    width: 66px !important;
    height: 66px !important;
    margin: 0 auto 16px !important;
    border-radius: 21px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

.hf-forgot-logo img {
    width: 100% !important;
    height: 100% !important;
    padding: 7px !important;
    object-fit: contain !important;
    display: block !important;
}

.hf-forgot-heading {
    text-align: center !important;
    display: grid !important;
    gap: 7px !important;
    margin-bottom: 18px !important;
}

.hf-forgot-heading p {
    margin: 0 !important;
    color: #2563eb !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase !important;
    font-weight: 950 !important;
}

.hf-forgot-heading h1 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(1.7rem, 7vw, 2.25rem) !important;
    line-height: 1.03 !important;
    letter-spacing: -0.055em !important;
    font-weight: 950 !important;
}

.hf-forgot-heading span {
    max-width: 390px !important;
    margin: 0 auto !important;
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
}

.hf-forgot-alert {
    margin-bottom: 15px !important;
    padding: 13px 14px !important;
    border-radius: 16px !important;
    background: #ecfdf5 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
}

.hf-forgot-form {
    display: grid !important;
    gap: 14px !important;
}

.hf-forgot-field {
    display: grid !important;
    gap: 7px !important;
}

.hf-forgot-field label {
    color: #111827 !important;
    font-size: 0.84rem !important;
    font-weight: 850 !important;
}

.hf-forgot-field input {
    width: 100% !important;
    min-height: 54px !important;
    padding: 0 15px !important;
    border-radius: 16px !important;
    border: 1px solid #dbe3ef !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 0.96rem !important;
    outline: none !important;
    box-shadow: none !important;
}

.hf-forgot-field input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10) !important;
}

.hf-forgot-submit {
    width: 100% !important;
    min-height: 54px !important;
    border-radius: 16px !important;
    border: 0 !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22) !important;
    font-size: 0.96rem !important;
    font-weight: 950 !important;
}

.hf-forgot-submit:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    transform: translateY(-1px) !important;
}

.hf-forgot-divider {
    position: relative !important;
    margin: 20px 0 16px !important;
    text-align: center !important;
}

.hf-forgot-divider::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 50% !important;
    height: 1px !important;
    background: #e2e8f0 !important;
}

.hf-forgot-divider span {
    position: relative !important;
    z-index: 1 !important;
    padding: 0 12px !important;
    background: #ffffff !important;
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
}

.hf-forgot-back-link {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
}

.hf-forgot-back-link:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.hf-forgot-info {
    display: none !important;
}

.hf-forgot-kicker {
    margin: 0 !important;
    color: #2563eb !important;
    font-size: 0.76rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase !important;
}

.hf-forgot-info h2 {
    max-width: 560px !important;
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(2.1rem, 6vw, 3.5rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.065em !important;
    font-weight: 950 !important;
}

.hf-forgot-info > p:not(.hf-forgot-kicker) {
    max-width: 520px !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 1rem !important;
    line-height: 1.65 !important;
}

.hf-forgot-steps {
    display: grid !important;
    gap: 10px !important;
    margin-top: 4px !important;
}

.hf-forgot-steps article {
    padding: 14px 15px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045) !important;
    display: grid !important;
    grid-template-columns: 38px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
}

.hf-forgot-steps strong {
    width: 38px !important;
    height: 38px !important;
    border-radius: 14px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    font-weight: 950 !important;
}

.hf-forgot-steps span {
    color: #64748b !important;
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
}

body.theme-dark:has(.hf-forgot-screen),
body[data-theme="dark"]:has(.hf-forgot-screen) {
    background:
        radial-gradient(circle at 16% 8%, rgba(96, 165, 250, 0.16), transparent 28%),
        radial-gradient(circle at 86% 8%, rgba(56, 189, 248, 0.10), transparent 24%),
        #0b1220 !important;
}

body.theme-dark .hf-forgot-card,
body.theme-dark .hf-forgot-steps article,
body[data-theme="dark"] .hf-forgot-card,
body[data-theme="dark"] .hf-forgot-steps article {
    background: rgba(17, 24, 39, 0.96) !important;
    border-color: #243045 !important;
}

body.theme-dark .hf-forgot-heading h1,
body.theme-dark .hf-forgot-info h2,
body.theme-dark .hf-forgot-field label,
body[data-theme="dark"] .hf-forgot-heading h1,
body[data-theme="dark"] .hf-forgot-info h2,
body[data-theme="dark"] .hf-forgot-field label {
    color: #f8fafc !important;
}

body.theme-dark .hf-forgot-heading span,
body.theme-dark .hf-forgot-info > p:not(.hf-forgot-kicker),
body.theme-dark .hf-forgot-steps span,
body[data-theme="dark"] .hf-forgot-heading span,
body[data-theme="dark"] .hf-forgot-info > p:not(.hf-forgot-kicker),
body[data-theme="dark"] .hf-forgot-steps span {
    color: #cbd5e1 !important;
}

body.theme-dark .hf-forgot-field input,
body[data-theme="dark"] .hf-forgot-field input {
    background: #0f172a !important;
    border-color: #314056 !important;
    color: #f8fafc !important;
}

body.theme-dark .hf-forgot-divider span,
body[data-theme="dark"] .hf-forgot-divider span {
    background: #111827 !important;
}

@media (min-width: 900px) {
    .hf-forgot-shell {
        grid-template-columns: minmax(390px, 0.9fr) minmax(0, 1.1fr) !important;
        gap: 34px !important;
        min-height: calc(100vh - 180px) !important;
    }

    .hf-forgot-info {
        display: grid !important;
        gap: 14px !important;
        align-content: center !important;
    }

    .hf-forgot-card {
        padding: 24px !important;
    }
}

@media (max-width: 560px) {
    body:has(.hf-forgot-screen) .page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hf-forgot-card {
        padding: 18px !important;
        border-radius: 24px !important;
    }

    .hf-forgot-logo {
        width: 58px !important;
        height: 58px !important;
        border-radius: 18px !important;
    }
}

/* ===== HOUSEFLOW FORGOT PASSWORD UX END ===== */
