/* =============================================================================
   PRECENLY DASHBOARD — dashboard.css
   Kompletný CSS vrátane mobile responzivity (breakpoint 768px)
   ============================================================================= */

/* ─── CSS PREMENNÉ ─────────────────────────────────────────────────────────── */
:root {
    --bg-dark: #0a0a0a;
    --bg-sidebar: #050505;
    --bg-main: #f4f5f7;
    --bg-card: #ffffff;
    --text-light: #ffffff;
    --text-dark: #111111;
    --text-muted: #888888;
    --border-color: #eaeaea;
    --border-dark: #222222;
    --sidebar-width: 260px;
    --header-h: 56px;
    /* výška mobilného top baru */
    --bottom-nav-h: 0px;
    /* výška bottom navigation na mobile (zrušené) */
}

/* ─── RESET ────────────────────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Urbanist', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ─── LOADING ──────────────────────────────────────────────────────────────── */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ─── APP LAYOUT ───────────────────────────────────────────────────────────── */
#appContent {
    display: none;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* desktop: sidebar + main side by side */
}

/* ─── SIDEBAR (desktop) ────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-dark);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-dark);
}

.limit-alert-pulse {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #ff4d4d;
    background: none;
    padding: 0;
    margin-left: 0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.nav-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item .nav-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--text-light);
    border-left-color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

.badge {
    background: #333;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.light {
    background: #fff;
    color: #000;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #333;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
    gap: 2px;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

#logoutBtn {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    background: none;
    border: none;
    flex-shrink: 0;
}

#logoutBtn:hover {
    color: #fff;
}

/* ─── MAIN CONTENT (desktop) ───────────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 32px 48px;
    background: #fdfdfd;
    min-width: 0;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.greeting h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.greeting p {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-top: 2px;
}

.btn-outline {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: #fafafa;
    border-color: #ccc;
}

/* ─── TAB PANES ────────────────────────────────────────────────────────────── */
.tab-pane {
    display: none;
    position: relative;
    width: 100%;
    min-height: 200px; /* Safety min-height */
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ─── PANEL ────────────────────────────────────────────────────────────────── */
.panel {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ─── STATS GRID ───────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1;
}

/* ─── DASHBOARD GRID ───────────────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ─── PROPERTIES ───────────────────────────────────────────────────────────── */
/* ─── CUSTOM SCROLLBARS ─── */
.hypo-prop-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.hypo-prop-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}
.hypo-prop-scroll-container::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}
.hypo-prop-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}
.property-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.property-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.property-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.prop-img {
    width: 130px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    filter: grayscale(100%) contrast(0.9);
    background: #eee;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.property-item:hover .prop-img {
    filter: grayscale(0%) saturate(1.15) contrast(1.05);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prop-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.prop-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.prop-address {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prop-tags {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

.prop-tag {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.prop-stats {
    text-align: right;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-shrink: 0;
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-block .val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
}

.stat-block .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.score-val {
    font-size: 1.4rem;
    font-weight: 700;
    position: relative;
}

.empty-state {
    color: #888;
    font-size: 0.9rem;
    padding: 20px 0;
    font-style: italic;
}

/* ─── PREMIUM EMPTY STATE ─────────────────────────────────────────────────── */
.premium-empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 16px 0;
    animation: slideUp 0.5s ease-out;
}

.empty-state-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #111;
}

.premium-empty-state h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.premium-empty-state p {
    font-size: 0.95rem;
    color: #666;
    max-width: 600px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.empty-state-actions {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-bottom: 32px;
}
.empty-state-actions .btn-primary,
.empty-state-actions .btn-secondary {
    white-space: nowrap;
    text-align: center;
}

.empty-state-actions .btn-primary {
    background: #111;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.empty-state-actions .btn-primary:hover {
    background: #333;
}

.empty-state-actions .btn-secondary {
    background: #fff;
    color: #111;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s;
}

.empty-state-actions .btn-secondary:hover {
    background: #f9f9f9;
    border-color: #111;
}

.tutorial-container {
    width: 100%;
    max-width: 500px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #edf2f7;
}

.tutorial-container h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 800;
}


.tutorial-video-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.tutorial-video-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.tutorial-video-box .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    gap: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f4f5f7;
    color: #555;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 24px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


.prop-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.action-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 7px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    transition: all 0.2s ease;
    outline: none;
}

.action-btn:hover {
    background: #f4f5f7;
    color: #111;
}

.action-btn.btn-fav:hover,
.action-btn.btn-fav.active {
    color: #111;
    background: #f4f5f7;
    border: none;
}

.action-btn.btn-fav.active svg {
    fill: #111;
}

.action-btn.btn-del:hover {
    color: #111;
    background: #f4f5f7;
}

/* ─── ANALYSIS GRID ────────────────────────────────────────────────────────── */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.analysis-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}

.analysis-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.analysis-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    filter: grayscale(100%) contrast(0.9);
    background: #eee;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.analysis-card:hover .analysis-img {
    filter: grayscale(0%) saturate(1.15) contrast(1.05);
    transform: scale(1.05);
}

.analysis-body {
    padding: 20px;
    position: relative;
    background: #fff;
    z-index: 2;
}

.score-bar-bg {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin: 12px 0;
}

.score-bar-fill {
    height: 100%;
    background: #111;
}

.analysis-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    font-weight: 800;
    color: #111;
    gap: 12px;
    padding: 6px 14px 14px;
}

.analysis-stats span:first-child {
    color: #999;
    font-weight: 800;
    font-size: 0.68rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.analysis-stats>div {
    white-space: nowrap;
}

/* ─── SEARCH & FILTER ──────────────────────────────────────────────────────── */
.search-bar {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #f9f9f9;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Urbanist', sans-serif;
}

.search-bar:focus {
    border-color: #111;
    background: #fff;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: #111;
    background: #f4f5f7;
}

.filter-tab.active {
    background: #111;
    color: #fff;
}

/* ─── ALERTS ───────────────────────────────────────────────────────────────── */
.alerts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.add-alert-card {
    border: 1px dashed #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: 600;
    cursor: pointer;
    min-height: 150px;
    border-radius: 8px;
    transition: all 0.2s;
}

.add-alert-card:hover {
    border-color: #111;
    color: #111;
    background: #fafafa;
}

/* ─── SETTINGS ─────────────────────────────────────────────────────────────── */
.settings-section {
    max-width: 800px;
    margin-bottom: 30px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

.settings-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #111;
}

.settings-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.settings-input {
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    width: 300px;
    background: #fafafa;
    outline: none;
    transition: 0.2s;
    font-family: 'Urbanist', sans-serif;
}

.settings-input:focus {
    border-color: #111;
    background: #fff;
}

/* ─── TOGGLE SWITCH ────────────────────────────────────────────────────────── */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #111;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* ─── PORTALS ──────────────────────────────────────────────────────────────── */
.portals-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    background: #fff;
    transition: all 0.2s;
}

.portal-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ─── MORTGAGE ─────────────────────────────────────────────────────────────── */
.mortgage-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    background: #fff;
    font-family: 'Urbanist', sans-serif;
}

.input-wrapper input:focus {
    border-color: #111;
}

.input-wrapper .suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.best-offer-box {
    background: var(--bg-dark);
    color: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-top: 24px;
}

.bank-table {
    width: 100%;
    border-collapse: collapse;
}

.bank-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.bank-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
}

/* ─── PROFILE FLEX ROW ─────────────────────────────────────────────────────── */
.profile-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.profile-flex-row .form-group {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

.profile-flex-row .form-group.small {
    flex: 0.6;
    min-width: 80px;
}

.profile-flex-row .form-group.large {
    flex: 1.5;
    min-width: 200px;
}

.profile-flex-row button {
    flex: 1;
    min-width: 150px;
    height: 46px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* ─── HYPO PROFILE COLLAPSE ──────────────────────────────────────────────── */
#hypoSharedTopSections .hypo-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    margin-bottom: 0;
}
#hypoSharedTopSections .hypo-profile-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
#hypoSharedTopSections .hypo-profile-header .panel-title {
    margin-bottom: 0 !important;
    white-space: nowrap;
}
#hypoSharedTopSections .hypo-profile-summary {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#hypoSharedTopSections .hypo-profile-summary.visible {
    opacity: 1;
}
#hypoSharedTopSections .hypo-profile-chevron {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    line-height: 1;
}
#hypoSharedTopSections .hypo-profile-chevron.collapsed {
    transform: rotate(-90deg);
}
#hypoSharedTopSections .hypo-profile-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
    max-height: 600px;
    opacity: 1;
    margin-top: 10px;
}
#hypoSharedTopSections .hypo-profile-body.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

/* ─── COMPACT PROFILE: Hypotéky tab only ─────────────────────────────────── */
#hypoSharedTopSections .panel {
    padding: 14px 16px;
}
#hypoSharedTopSections .panel-title {
    font-size: 0.875rem;
    margin-bottom: 8px !important;
}
#hypoSharedTopSections .profile-flex-row {
    gap: 10px;
}
#hypoSharedTopSections .profile-flex-row > div:first-child {
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
}
#hypoSharedTopSections .form-group label {
    font-size: 0.75rem;
    margin-bottom: 4px;
}
#hypoSharedTopSections .input-wrapper input {
    padding: 8px 12px;
    font-size: 0.9rem;
}
#hypoSharedTopSections select {
    padding: 7px 12px !important;
    font-size: 0.9rem !important;
}
#hypoSharedTopSections .profile-flex-row button {
    height: 36px;
    font-size: 0.85rem;
}

/* ─── ONBOARDING ───────────────────────────────────────────────────────────── */
#onboardingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(249, 248, 246, 0.94), rgba(249, 248, 246, 0.96)), url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?q=80&w=2075&auto=format&fit=crop') center/cover no-repeat fixed;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    overflow-y: auto;
    padding: 40px 0;
}

.top-progress-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: #111;
    transition: width 0.4s ease;
    z-index: 10001;
}

.onboarding-header {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: #111;
    padding: 0 40px;
    margin-bottom: 60px;
}

.onboarding-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    width: 100%;
    background: transparent;
    padding: 0 40px;
    box-shadow: none;
    position: relative;
}

#qCategory {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: #888;
    font-weight: 800;
    margin-bottom: 12px;
}

#qTitle {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    color: #111;
    line-height: 1.1;
}

#qSubtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 500;
}

.options-grid {
    display: grid;
    gap: 16px;
    width: 100%;
    margin-top: 32px;
}

.options-grid.cols-1 {
    grid-template-columns: 1fr;
}

.options-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.options-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.options-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.option-btn {
    border: 1px solid #d1d5db;
    padding: 18px 24px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    transition: all 0.2s ease;
    text-align: center;
    color: #333;
    font-size: 1.05rem;
}

.option-btn:hover {
    border-color: #111;
    background: #f9f9f9;
}

.option-btn.selected {
    background: #111;
    color: #fff;
    border-color: #111;
    font-weight: 600;
}

.onboarding-nav {
    display: flex;
    gap: 16px;
    margin-top: 60px;
    width: 100%;
    max-width: 400px;
}

.btn-next {
    flex: 1;
    background: #111;
    color: #fff;
    border: none;
    padding: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s ease;
    font-family: 'Urbanist', sans-serif;
    letter-spacing: 0.02em;
}

.btn-next:hover {
    background: #333;
}

.btn-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #111;
}

.btn-back {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #111;
    padding: 16px 24px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
    font-family: 'Urbanist', sans-serif;
}

.btn-back:hover {
    background: #fff;
    border-color: #111;
}

.btn-skip {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #111;
    padding: 16px 24px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
    font-family: 'Urbanist', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-skip:hover {
    background: #fff;
    border-color: #111;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    height: 6px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #111;
    cursor: pointer;
    border-radius: 0;
}

/* =============================================================================
   MOBILE HAMBURGER OVERLAY SIDEBAR
   ============================================================================= */

/* Tmavý overlay za mobilným sidebarem */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    backdrop-filter: blur(2px);
    animation: fadeOverlay 0.2s ease;
}

.sidebar-overlay.active {
    display: block;
}

@keyframes fadeOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobilný top bar */
.mobile-topbar {
    display: none;
    /* skrytý na desktop */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--bg-sidebar);
    color: var(--text-light);
    z-index: 150;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-dark);
}

.mobile-topbar-logo {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-tab-title {
    display: none;
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Hamburger → X animácia */
.hamburger-btn .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn .bar+.bar {
    margin-top: 5px;
}

.hamburger-btn.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}



/* =============================================================================
   MEDIA QUERIES — MOBILE (max-width: 768px)
   ============================================================================= */
@media (max-width: 768px) {

    /* ── AppContent: stack vertically, enable scroll ── */
    #appContent {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    /* ── Mobilný top bar viditeľný ── */
    .mobile-topbar {
        display: flex;
    }

    /* ── Sidebar: fixed panel, schovaj mimo obrazovky ── */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        z-index: 250;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* ── Main content: posun pod top bar, nad bottom nav ── */
    .main-content {
        flex: 1;
        padding: 16px;
        padding-top: calc(var(--header-h) + 16px);
        padding-bottom: 16px;
        overflow-y: auto;
        height: 100vh;
    }

    /* ── Top header schovaj (nahradil ho mobile-topbar + bottom-nav) ── */
    .top-header {
        margin-bottom: 16px;
    }

    .top-header .greeting h1 {
        font-size: 1.2rem;
    }



    /* ── Stats grid: 2 stĺpce na mobile ── */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-header {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    /* ── Dashboard grid: 1 stĺpec ── */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ── Panel: menší padding ── */
    .panel {
        padding: 16px;
        margin-bottom: 16px;
    }

    .panel-title {
        font-size: 1rem;
    }

    /* ── Property item: stack na mobile ── */
    .property-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 20px;
    }

    .prop-img {
        width: 100%;
        height: 180px;
        border-radius: 8px;
    }

    .property-item:hover .prop-img {
        transform: none;
        /* disable hover zoom na mobile (touch) */
    }

    .prop-stats {
        width: 100%;
        justify-content: flex-start;
        gap: 16px;
    }

    .stat-block {
        align-items: flex-start;
    }

    .prop-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ── Analysis grid: 1 stĺpec na mobile ── */
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analysis-img {
        height: 200px;
    }

    /* ── Profile flex row: stack ── */
    .profile-flex-row {
        flex-direction: column;
        gap: 12px;
    }

    .profile-flex-row .form-group,
    .profile-flex-row .form-group.small,
    .profile-flex-row .form-group.large {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .profile-flex-row button {
        width: 100%;
    }

    /* ── Mortgage grid: 1 stĺpec ── */
    .mortgage-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ── Bank table: horizontálny scroll ── */
    .bank-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .bank-table {
        min-width: 700px;
    }

    /* ── Search & filter bar ── */
    .search-filter-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
        margin-bottom: 16px;
    }

    .search-filter-row .search-bar {
        width: 100% !important;
    }

    /* ── Settings ── */
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .settings-input {
        width: 100%;
    }

    /* ── Onboarding: menší padding ── */
    .onboarding-header {
        padding: 0 20px;
        margin-bottom: 32px;
    }

    .onboarding-content {
        padding: 0 20px;
    }

    #qTitle {
        font-size: 2rem;
    }

    #qSubtitle {
        font-size: 0.95rem;
    }

    .options-grid.cols-3,
    .options-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .onboarding-nav {
        max-width: 100%;
    }

    /* ── Alerts grid: 1 stĺpec ── */
    .alerts-grid {
        grid-template-columns: 1fr;
    }

    /* ── Upgrade modal ── */
    #upgradeModal>div {
        width: 92% !important;
        padding: 28px 20px !important;
    }

    /* ── Mobile tab title ── */
    .mobile-tab-title {
        display: block;
    }

    /* ── bankOffersPanel header: stack na mobile ── */
    #bankOffersPanel .panel-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px;
    }

    #bankOffersPanel .panel-header .panel-title {
        font-size: 0.95rem;
        margin-bottom: 0;
    }
}


/* ─── INTERMEDIATE BREAKPOINT: 1300px (Posledná aktivita) ─────────────────── */
/* Pri šírke okolo 1300px je pravý panel (1fr) príliš úzky — prepneme na 1 stĺpec */
@media (max-width: 1300px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet (769px – 1024px): 2 stĺpce pre analýzy */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mortgage-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 24px 32px;
    }
}


/* =============================================================================
   HYPOTÉKY — REDESIGN PRE MOBILE
   Bank cards namiesto tabuľky na mobile, kalkulačka fullwidth
   ============================================================================= */

/* ── Bank Card layout (mobile) ─────────────────────────────────────────────── */
.bank-card {
    display: flex;
    flex-direction: column;
}

/* ── Rate badge ── */
.rate-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffe082;
}

/* ── DTI badge ── */
.dti-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.dti-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.dti-warn {
    background: #fff8e1;
    color: #f57c00;
}

.dti-bad {
    background: #ffebee;
    color: #c62828;
}

/* ── Mortgage summary box (kalkulačka výsledky) ── */
.mortgage-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0 0;
}

.mortgage-summary-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
}

.mortgage-summary-item .ms-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.mortgage-summary-item .ms-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

@media (max-width: 768px) {

    /* ── Kalkulačka: fullwidth, kompaktnejšia ── */
    .mortgage-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ── Bank cards: pod 1650px karty, nad 1650px tabuľka ── */
@media (max-width: 1650px) {

    .mortgage-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ── Tabuľka bánk: skrytá pod 1650px ── */
    .bank-table-wrapper {
        display: none;
    }

    /* ── Bank cards: zobrazené pod 1650px ── */
    .bank-cards-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
} /* <── PRIDANÁ ZATVORKA PRE @media (max-width: 1650px) */

/* ── Bank Comparison Table (Redesign) ─────────────────────────────────────── */
.bank-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.bank-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 900px;
}

.bank-table th {
    background: #fafafa;
    padding: 8px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.bank-table td {
    padding: 4px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    vertical-align: middle;
}

.bank-table tr:last-child td {
    border-bottom: none;
}

.bank-table tr:hover {
    background: #fbfbfb;
}

/* Specific cell alignment */
.bank-table .col-bank { width: 180px; }
.bank-table .col-rate { width: 100px; text-align: center; }
.bank-table .col-pmt { width: 120px; text-align: right; }
.bank-table .col-total { width: 140px; text-align: right; color: #777; }
.bank-table .col-status { width: 180px; text-align: center; }
.bank-table .col-action { width: 150px; text-align: right; }

.bank-logo-mini {
    max-height: 14px;
    max-width: 70px;
    object-fit: contain;
    margin-right: 10px;
}

.bank-name-cell {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #111;
}

.rate-cell {
    font-weight: 800;
    color: #111;
    font-size: 1.05rem;
}

.pmt-cell {
    font-weight: 800;
    color: #111;
    font-size: 1.05rem;
}

.table-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f5f7;
    color: #111;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}

.table-cta-btn:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

    /* ── Mortgage summary: 3 hodnoty v dark boxe ── */
    .mortgage-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .mortgage-summary-item .ms-value {
        font-size: 0.95rem;
    }

    /* ── Kalkulačka inputs: 2 stĺpce na mobile ── */
    .mortgage-inputs-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .mortgage-inputs-grid .form-group {
        margin-bottom: 0;
    }

    /* Insurance checkbox: full width */
    .mortgage-inputs-grid .form-group.full-width {
        grid-column: 1 / -1;
    }

@media (min-width: 1651px) {
    /* Wide desktop: tabuľka ostáva len tam, kde má ID bankTableBody */
    .bank-table-wrapper {
        display: block;
    }
}




/* =============================================================================
   OPRAVY — € symbol, tagy, ikonky, parametre hypotéky
   ============================================================================= */

/* ── € a čísla nesmú sa zalomiť ── */
.stat-block .val,
.score-val,
.p4-cf-big,
.bank-card-stat-value,
.formatEur {
    white-space: nowrap;
}

/* ── Prop-tags: bullet separator namiesto border boxov ── */
.prop-tag+.prop-tag::before {
    content: '·';
    color: #ccc;
    margin-left: 8px;
    margin-right: 8px;
    font-weight: 400;
}

/* ── Action buttons: väčšie SVG, výraznejšie ── */
.action-btn svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    stroke-width: 2.2;
}

.action-btn.btn-fav svg {
    transition: fill 0.2s, stroke 0.2s;
}

.action-btn.btn-fav.active svg {
    fill: #111;
    stroke: #111;
}

.action-btn.btn-del svg {
    stroke: #aaa;
    transition: stroke 0.2s;
}

.action-btn.btn-del:hover svg {
    stroke: #111;
}

/* ── Prop-actions: menší gap, align center ── */
.prop-actions {
    display: flex;
    gap: 2px;
    margin-top: 6px;
    align-items: center;
}

/* ── Analyze btn: ostane s textom (nie ikonka only) ── */
.btn-run-analysis {
    font-size: 0.78rem !important;
    padding: 6px 12px !important;
}

/* ── Parametre hypotéky — responzívny panel ── */
@media (max-width: 1200px) {
    .mortgage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ── Mortgage inputs grid: aj na strednom screene ── */
@media (max-width: 900px) {
    .mortgage-inputs-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .mortgage-inputs-grid .form-group {
        margin-bottom: 0;
    }
}

/* ── Saved property item — cursor pointer ── */
.saved-clickable {
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
}

.saved-clickable:hover {
    background: #fafafa;
}

/* ── Analysis card title: max 2 riadky ── */
.analysis-card .prop-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.3;
    min-height: 2.6em;
}


/* =============================================================================
   OPRAVY — tagy medzery, ikonky, analysis-detail, 940px breakpoint
   ============================================================================= */

/* ── Analysis card prop-title: max 2 riadky (override inline nowrap) ── */
.analysis-card .prop-title {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.6em;
    text-overflow: unset !important;
}

/* ── p4-input-wrap: odstrán border/outline okolo suffix (€, %, rokov) ── */
.p4-suffix {
    padding: 0 12px;
    color: #999;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    border-left: none !important;
    /* odstrán orámovanie */
    background: transparent;
}

/* ── Návratnosť panel: nowrap pre hodnoty ── */
#res-equity,
#res-total-app,
#res-roe,
#res-pmt,
#res-princ,
#res-int {
    white-space: nowrap;
}

/* ── ROE hodnota: zmenšiť font ak je 2 riadky ── */
#res-roe {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    line-height: 1.1;
}

/* ── p4-cf-big: nowrap ── */
.p4-cf-big {
    white-space: nowrap;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    line-height: 1.1;
}

/* ── KPI hodnoty: nowrap ── */
.p4-kpi-val {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================================================
   940px BREAKPOINT — Analysis detail rozdelenie podobne ako mobile
   ============================================================================= */
@media (max-width: 940px) {

    /* Stack two-col layout */
    .p4-two-col {
        flex-direction: column !important;
        gap: 16px;
    }

    .p4-two-col>* {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* KPI: 2 stĺpce */
    .p4-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Input grid: 2 stĺpce */
    .p4-input-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* ROI panel: stack */
    .panel>div[style*="display:flex"][style*="flex-wrap:wrap"] {
        flex-direction: column;
    }

    .panel>div[style*="display:flex"][style*="flex-wrap:wrap"]>div[style*="background:#111"] {
        border-radius: 0 0 10px 10px !important;
    }

    /* Score ring: menší */
    .p4-score-ring,
    .detail-score-blur-ring {
        width: 58px !important;
        height: 58px !important;
    }

    .p4-score-num,
    .detail-score-blur-num {
        font-size: 1.25rem !important;
    }

    /* Compare grid: 1 stĺpec */
    .p4-cmp-grid {
        grid-template-columns: 1fr !important;
    }

    /* Sections: menší padding */
    .p4-section {
        padding: 14px !important;
    }

    /* Bonita stepper: scroll */
    .p4-stepper {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    /* Pick grid: scroll */
    .p4-pick-grid {
        overflow-x: auto;
        flex-wrap: nowrap !important;
    }

    .p4-pick-card {
        flex-shrink: 0;
    }

    /* CF big: menší */
    .p4-cf-big {
        font-size: 1.4rem !important;
    }

    /* PDF button: skrytý */
    #p4-btn-pdf {
        display: none;
    }

    /* Forecast KPI: 3 stĺpce */
    #det-forecast-kpi {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Forecast period toggle: môže sa zalomiť */
    #det-forecast-period {
        flex-wrap: wrap;
    }

    /* Action buttons v sekcii Porovnanie: môžu sa zalomiť */
    #p4-btn-portfolio,
    #p4-btn-hypo {
        flex-wrap: wrap;
    }
}

/* =============================================================================
   ANALÝZA — RESPONZIVITA 600px
   ============================================================================= */
@media (max-width: 600px) {

    /* Forecast KPI: 2 stĺpce */
    #det-forecast-kpi {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Všetky toggle buttony môžu sa zalomiť */
    .p4-toggle {
        flex-wrap: wrap;
    }

    /* Action buttons: zmenšiť */
    #p4-btn-portfolio,
    #p4-btn-hypo {
        font-size: 0.72rem !important;
        padding: 6px 10px !important;
    }

    /* Detail header: obrázok + titul + score ring — wrap na malých obrazovkách */
    #analysisDetailContent > .panel:first-child {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
    }

    #analysisDetailContent > .panel:first-child > img,
    #analysisDetailContent > .panel:first-child > div:first-child {
        width: 100% !important;
        height: 160px !important;
        border-radius: 8px !important;
    }

    #analysisDetailContent > .panel:first-child > div:nth-child(2) {
        min-width: 0;
        width: 100% !important;
    }

    /* Prognóza toggle: wrap */
    #det-forecast-period .p4-toggle-btn {
        flex: 1 1 auto;
    }
}

/* =============================================================================
   ANALÝZA — RESPONZIVITA 480px (najmenšie obrazovky)
   ============================================================================= */
@media (max-width: 480px) {

    /* Input grid: 1 stĺpec */
    .p4-input-grid {
        grid-template-columns: 1fr !important;
    }

    /* Forecast KPI: zostatok 2 stĺpce */
    #det-forecast-kpi {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Analysis card stats: povolíme wrap */
    .analysis-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .analysis-stats > div {
        white-space: normal !important;
        flex: 1 1 40%;
    }

    /* Action buttons: full width + centered */
    #p4-btn-portfolio,
    #p4-btn-hypo {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =============================================================================
   MONETIZATION UI (LOCKED SECTIONS, BOTTOM BANNER)
   ============================================================================= */

/* ─── LOCKED SECTION ────────────────────────────────────────────────────────── */
.locked-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin: 40px auto;
    max-width: 500px;
    animation: fadeIn 0.4s ease;
}

.locked-section h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
}

.locked-section .btn-primary {
    background: #111;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.locked-section .btn-primary:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ─── UPGRADE BOTTOM BANNER ─────────────────────────────────────────────────── */
/* ─── UPGRADE BOTTOM BANNER ─────────────────────────────────────────────────── */
.upgrade-bottom-banner {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    /* nezakrýva sidebar */
    right: 0;
    background: #000;
    color: #fff;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.upgrade-bottom-banner.show {
    transform: translateY(0);
}

.banner-content-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 800px;
}

.banner-text .banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.banner-text .banner-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.upgrade-bottom-banner .btn-primary {
    background: #fff;
    color: #111;
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: 'Urbanist', sans-serif;
}

.upgrade-bottom-banner .btn-primary:hover {
    background: #f0f0f0;
}

/* X tlačidlo — ľavý horný roh bannera */
.banner-close-btn {
    position: absolute;
    top: -12px;
    left: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: 'Urbanist', sans-serif;
}

.banner-close-btn:hover {
    background: #555;
}

@media (max-width: 768px) {
    .upgrade-bottom-banner {
        left: 0;
        /* na mobile sidebar nie je viditeľný */
        bottom: 0;
        padding: 14px 16px;
    }

    .banner-content-container {
        gap: 12px;
    }
}

/* =============================================================================
   PROMOTIONAL MODAL (APPLE-STYLE)
   ============================================================================= */

@keyframes precMIn {
    from {
        transform: scale(.88);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.promo-apple-card {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    max-width: 480px;
    width: 90%;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.promo-close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.promo-close.pfy-dismiss:hover {
    background: #f4f5f7;
    color: #111;
}

.promo-card-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.promo-logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
    color: #fff;
}

.promo-logo.pro {
    gap: 12px;
}

.promo-logo.pro::after {
    content: 'PRO';
    background: #fff;
    color: #111;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 0;
    letter-spacing: 0.04em;
    display: inline-block;
}

.promo-badge {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    align-self: center;
}

.promo-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    flex: 1;
}

.promo-features li {
    font-size: 0.95rem;
    color: #e0e0e0;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

.promo-features li::before {
    content: "•";
    color: #888;
}

.btn-apple-white {
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: block;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    font-family: 'Urbanist', sans-serif;
}

.btn-apple-white:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
}

.btn-apple-white:active {
    transform: scale(0.98);
}

/* ─── SEGMENTED CONTROL ────────────────────────────────────────────────────── */
.segmented-control {
    background-color: #f4f5f7;
    border-radius: 8px;
    padding: 4px;
    display: inline-flex;
    gap: 4px;
}

.segmented-item {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.segmented-item:hover {
    color: var(--text-dark);
}

.segmented-item.active {
    background-color: #ffffff;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ─── HYPOTÉKY DASHBOARD LAYOUT & RESPONSIVITY ─── */
/* DEFAULT (Desktop) */
.hypo-grid-card {
    display: flex;
    height: 100px;
}

.hypo-card-img {
    width: 140px; 
    flex-shrink: 0;
}

.hypo-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hypo-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
}

.hypo-indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.hypo-chart-container {
    display: flex;
    align-items: center;
}

/* MOBILE RESPONSIVITY */
@media (max-width: 768px) {
    .hypo-grid-card {
        flex-direction: column;
        height: auto;
    }
    
    .hypo-card-img {
        width: 100%;
        height: 160px;
    }
    
    .hypo-card-img {
        height: 140px;
    }

    .hypo-card-img img {
        border-radius: 12px 12px 0 0;
    }

    .hypo-card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Titulok: zalamovanie namiesto orezávania (prekonáva inline white-space:nowrap) */
    .hypo-grid-card .prop-title a {
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        text-overflow: unset !important;
    }

    /* Adresa: zalamovanie */
    .hypo-grid-card .prop-address {
        white-space: normal !important;
    }
    
    .hypo-card-content > div:last-child {
        width: 100%;
        display: block;
    }

    .btn-calc-hypo {
        display: block !important;
        width: 90% !important;
        margin: 0 auto !important;
        padding: 12px 0 !important;
        font-size: 0.9rem !important;
        text-align: center;
    }
    
    .hypo-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .hypo-indicators-grid {
        grid-template-columns: 1fr;
    }
    
    .hypo-chart-container {
        flex-direction: column;
        gap: 24px;
    }
    
    .hypo-sticky-panel {
        position: static !important;
        margin-top: 24px;
    }
}

/* ─── BANK COMPARISON BANNERS (NEW) ───────────────────────────────────────── */
.bank-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
}

.bank-banner {
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 28px 36px;
    display: flex;
    align-items: center;
    gap: 32px;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
}

.bank-banner:hover {
    background: #ffffff;
    border-color: #d0d5dd;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.bank-banner.top-choice {
    border: 2px solid #00c853;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0,200,83,0.08);
}

.top-choice-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: #00c853;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,200,83,0.25);
    z-index: 5;
}

.bank-banner-logo {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #f2f4f7;
    flex-shrink: 0;
}

.bank-banner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bank-banner-info {
    flex: 1;
    min-width: 180px;
}

.bank-banner-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #101828;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.bank-banner-product {
    font-size: 0.88rem;
    color: #667085;
    font-weight: 600;
}

.bank-banner-metrics {
    display: flex;
    gap: 56px;
    flex-shrink: 0;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #98a2b3;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: #101828;
    line-height: 1;
}

.metric-value.highlight-green {
    color: #00c853;
}

.metric-subvalue {
    font-size: 0.78rem;
    color: #98a2b3;
    margin-top: 8px;
    font-weight: 600;
}

.bank-banner-status {
    width: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.bank-banner-action {
    flex-shrink: 0;
}

.bank-cta-btn {
    background: #000;
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    appearance: none;
}

.bank-cta-btn:hover {
    background: #1d2939;
    transform: scale(1.02) translateX(4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Status Badges V2.1 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.dti-ok { background: #ecfdf3; color: #039855; }
.status-badge.dti-warn { background: #fff7ed; color: #c2410c; }
.status-badge.dti-bad { background: #fef3f2; color: #d92d20; }

@media (max-width: 1200px) {
    .bank-banner {
        flex-wrap: wrap;
        padding: 24px;
        gap: 20px;
    }
    .bank-banner-metrics {
        width: 100%;
        order: 3;
        justify-content: space-between;
        gap: 16px;
        padding-top: 24px;
        border-top: 1px solid #f2f4f7;
    }
    .bank-banner-status { order: 2; width: auto; }
    .bank-banner-action { order: 2; margin-left: auto; }
}

@media (max-width: 600px) {
    .bank-banner-metrics { flex-direction: column; gap: 20px; }
    .metric-value { font-size: 1.5rem; }
    .bank-banner-name { font-size: 1.2rem; }
}

/* ─── BANK RATES (flex card layout — matches bank-banner design) ─────────────── */
.bank-rates-grid-wrap { overflow-x: auto; margin-bottom: 4px; }

/* Header labels row */
.bank-rates-header {
    display: flex;
    align-items: center;
    padding: 0 24px 4px;
}

.brc-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #98a2b3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Grid of card rows */
.bank-rates-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 580px;
}

/* Individual card row — same DNA as .bank-banner */
.bank-rates-row {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    padding: 12px 24px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.bank-rates-row:hover {
    background: #ffffff;
    border-color: #d0d5dd;
    box-shadow: 0 4px 14px rgba(16,24,40,0.09);
}

.bank-rates-row.top-rates-row {
    background: #ffffff;
    border: 2px solid #00c853;
}

.bank-rates-row.top-rates-row:hover {
    box-shadow: 0 4px 20px rgba(0,200,83,0.16);
}

/* Column widths — shared between header and rows */
.brc-logo      { width: 80px;  flex-shrink: 0; }
.brc-name      { flex: 1; min-width: 0; padding-right: 16px; overflow: hidden; }
.brc-rate      { width: 190px; flex-shrink: 0; }
.brc-rate-label { display: none; }   /* na desktope popisuje stĺpec hlavička */
.brc-sparkline { flex: 1; min-width: 0; padding-right: 16px; }
.brc-metrics   { width: 280px; flex-shrink: 0; display: flex; gap: 40px; }
.brc-status              { flex: 1; min-width: 80px; display: flex; align-items: center; justify-content: center; padding-right: 100px; }
.brc-status.brc-label   { justify-content: center; text-align: center; }
.brc-action              { width: 140px; flex-shrink: 0; display: flex; justify-content: flex-end; }

/* Badge — mirrors top-choice-badge */
.top-rates-badge {
    display: inline-block;
    background: #00c853;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* Logo — matches bank-banner-logo */
.bank-rates-logo {
    height: 56px;
    width: 64px;
    object-fit: contain;
    display: block;
}

/* Name — matches bank-banner-name */
.bank-rates-name { white-space: nowrap; }

.bank-rates-name a {
    display: block;
    color: #101828;
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
}

.bank-rates-name a:hover { color: #1570ef; }

/* Rate — matches metric-value */
.bank-rates-rate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 2rem;
    font-weight: 800;
    color: #101828;
    white-space: nowrap;
}

.bank-rate-trend-icon { display: inline-flex; flex-shrink: 0; }
.bank-rate-trend-up    .bank-rate-trend-icon { color: #f04438; }
.bank-rate-trend-down  .bank-rate-trend-icon { color: #12b76a; }
.bank-rate-trend-stable .bank-rate-trend-icon { color: #98a2b3; }

.bank-sparkline-wrap {
    position: relative;
    display: block;
    width: 100%;
    cursor: crosshair;
}

.sparkline-tooltip {
    position: absolute;
    top: 4px;
    left: 0;
    background: #101828;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}

.sparkline-tooltip .stt-rate {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.sparkline-tooltip .stt-date {
    display: block;
    font-size: 0.78rem;
    color: #98a2b3;
}

.bank-section-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px 0;
    padding-top: 24px;
    border-top: 1px solid #eaecf0;
}

@media (max-width: 1700px) {
    /* žiadny horizontálny scroll — riadky narastú na výšku */
    .bank-rates-grid-wrap { overflow-x: visible; }
    .bank-rates-grid      { min-width: 0; }
    .bank-rates-header    { display: none; }

    .bank-rates-row {
        flex-wrap: wrap;
        gap: 12px 16px;
        padding: 16px 20px;
    }

    /* 1. riadok: logo + názov + sadzba (s popisom „Aktuálna sadzba") */
    .brc-logo { width: 56px; order: 1; }
    .brc-name { flex: 1 1 auto; padding-right: 0; order: 2; }
    .brc-rate {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        order: 3;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    .brc-rate-label { display: block; margin-bottom: 6px; }

    /* 2. riadok: sparkline cez celú šírku */
    .brc-sparkline { flex: 1 1 100%; padding-right: 0; order: 5; }

    /* 3. riadok: Splátka / Preplatenie */
    .brc-metrics {
        flex: 1 1 100%;
        gap: 32px;
        padding-top: 12px;
        border-top: 1px solid #eaecf0;
        order: 6;
    }

    /* tlačidlo Požiadať — úplne na spodku, vlastný plný riadok, 90% šírky */
    .brc-action { flex: 1 1 100%; width: auto; margin-left: 0; order: 7; justify-content: center; }
    .brc-action .bank-cta-btn { width: 90%; justify-content: center; }
}

@media (max-width: 600px) {
    .bank-rates-rate { font-size: 1.5rem; }
    .brc-sparkline   { display: none; }   /* graf na telefóne vypustíme */
    .brc-metrics     { gap: 24px; }
}

@media (max-width: 450px) {
    /* Sadzba: presun na vlastný riadok pod logo+názov, zarovnanie vľavo */
    .brc-rate {
        flex: 1 1 100%;
        margin-left: 0;
        align-items: flex-start;
        order: 4;
        padding-top: 4px;
        border-top: 1px solid #f2f4f7;
    }
    .brc-rate-label {
        font-size: 0.6rem;
    }
    .bank-rates-rate {
        font-size: 1.4rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ✦ PRISPÔSOBENÉ PRE VÁS — Banner & Advanced Onboarding Modal
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Banner card ── */
.pfy-banner {
    margin-bottom: 20px;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pfy-banner-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

/* Pseudo background decoration removed for light theme */

.pfy-banner-icon {
    font-size: 1.6rem;
    color: #111;
    flex-shrink: 0;
    line-height: 1;
}

.pfy-banner-content {
    flex: 1;
    min-width: 0;
}

.pfy-banner-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.pfy-banner-desc {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
    font-weight: 400;
}

.pfy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pfy-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.pfy-dismiss {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pfy-dismiss:hover {
    background: #f4f5f7;
    color: #111;
}

/* ── Advanced Onboarding Modal ── */
#advancedOnboardingModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

#advancedOnboardingModal.ao-visible {
    display: block;
    pointer-events: auto;
}

.ao-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#advancedOnboardingModal.ao-visible .ao-backdrop {
    opacity: 1;
}

.ao-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 680px;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.ao-panel.ao-panel-in {
    transform: translateX(0);
}

.ao-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 28px 32px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.ao-panel-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 4px;
}

.ao-panel-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.02em;
}

.ao-close-btn {
    background: #f4f5f7;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ao-close-btn:hover {
    background: #eee;
    color: #111;
}

/* Block progress tabs */
.ao-block-progress {
    display: flex;
    gap: 0;
    padding: 0 32px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ao-block-progress::-webkit-scrollbar { display: none; }

.ao-block-tab {
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #bbb;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.ao-block-tab.active {
    color: #111;
    border-bottom-color: #111;
}

.ao-block-tab.done {
    color: #555;
}

/* Top progress bar */
.ao-progress-track {
    height: 3px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.ao-progress-fill {
    height: 100%;
    background: #111;
    transition: width 0.4s ease;
}

/* Body (scrollable question area) */
.ao-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px 32px 16px;
    scroll-behavior: smooth;
}

.ao-body.ao-body-enter {
    animation: ao-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ao-slide-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.ao-q-block {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
}

.ao-q-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.ao-q-subtitle {
    font-size: 0.88rem;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ao-q-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.ao-grid {
    display: grid;
    gap: 10px;
}

.ao-grid.cols-1 { grid-template-columns: 1fr; }
.ao-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.ao-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.ao-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Option buttons */
.ao-option {
    padding: 12px 16px;
    border: 1.5px solid #eaeaea;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    line-height: 1.3;
}

.ao-option:hover {
    border-color: #111;
    color: #111;
    background: #fafafa;
}

.ao-option.selected {
    border-color: #111;
    background: #f4f5f7;
    color: #111;
    box-shadow: 0 0 0 1px #111;
}

.ao-option.multiple::before {
    content: '□ ';
    color: #ccc;
}

.ao-option.multiple.selected::before {
    content: '☑ ';
    color: #111;
}

/* Slider */
.ao-slider-wrap {
    padding: 8px 0;
}

.ao-slider-value {
    font-size: 2rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 16px;
}

.ao-slider-suffix {
    font-size: 1rem;
    font-weight: 500;
    color: #888;
    margin-left: 4px;
}

.ao-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #eee;
    outline: none;
    cursor: pointer;
}

.ao-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}

.ao-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.ao-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 8px;
    font-weight: 600;
}

/* Number inputs */
.ao-number-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #eaeaea;
    border-radius: 8px;
    background: #fff;
    padding: 12px 16px;
    transition: border-color 0.2s ease;
    max-width: 280px;
}

.ao-number-wrap:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.ao-number-input {
    border: none;
    outline: none;
    flex: 1;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 700;
    color: #111;
    background: transparent;
    min-width: 0;
}

.ao-number-suffix {
    font-size: 1.1rem;
    font-weight: 700;
    color: #aaa;
    margin-left: 8px;
}

.ao-dual-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ao-dual-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ao-dual-field .ao-number-wrap {
    max-width: 100%;
}

/* Region grid */
.ao-region-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 0;
}

/* Footer nav */
.ao-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}

.ao-footer-info {
    font-size: 0.8rem;
    color: #bbb;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ao-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ao-btn-back {
    background: transparent;
    border: 1.5px solid #eaeaea;
    color: #888;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ao-btn-back:hover:not(:disabled) {
    border-color: #ccc;
    color: #555;
}

.ao-btn-back:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ao-btn-next {
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    letter-spacing: 0.01em;
}

.ao-btn-next:hover:not(:disabled) {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ao-btn-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* @keyframes spin (for loaders) */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive banner ── */
@media (max-width: 768px) {
    .pfy-banner-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    .pfy-banner-content {
        width: 100%;
        order: 2;
    }
    .pfy-banner-icon { order: 1; }
    .pfy-btn { order: 3; width: 100%; justify-content: center; }
    .pfy-dismiss { order: 1; margin-left: auto; }

    .ao-panel { max-width: 100%; }
    .ao-grid.cols-3,
    .ao-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .ao-region-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AOV — Advanced Onboarding v2 (Full-Screen B&W Minimalist Overlay)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Root container ── */
#aovRoot {
    position: fixed;
    inset: 0;
    z-index: 10001;
    pointer-events: none;
    font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#aovRoot.aov-open {
    pointer-events: auto;
}

/* ── Full screen white panel ── */
.aov-screen {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

#aovRoot.aov-open .aov-screen {
    transform: translateY(0);
}

/* ── Header ── */
.aov-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    gap: 16px;
}

.aov-header-left {
    flex: 1;
}

.aov-block-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #999;
    padding: 4px 10px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    background: #fafafa;
}

/* ── Brand centre ── */
.aov-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    flex-shrink: 0;
}

.aov-brand-icon {
    width: 18px;
    height: 18px;
    fill: #111;
}

/* ── Right side of header ── */
.aov-header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.aov-step-counter {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #aaa;
}

.aov-exit-btn {
    background: #f4f5f7;
    border: none;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aov-exit-btn:hover {
    background: #eee;
    color: #111;
}

/* ── Progress bar ── */
.aov-progress-track {
    height: 2px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.aov-progress-fill {
    height: 100%;
    background: #111;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Main scrollable area ── */
.aov-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 24px 40px;
    scroll-behavior: smooth;
}

.aov-main::-webkit-scrollbar { width: 4px; }
.aov-main::-webkit-scrollbar-track { background: transparent; }
.aov-main::-webkit-scrollbar-thumb { background: #e5e5e5; border-radius: 2px; }

/* ── Question wrapper (centred, max-width) ── */
.aov-question-wrap {
    width: 100%;
    max-width: 640px;
}

/* ── Question label ── */
.aov-q-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bbb;
    margin-bottom: 16px;
}

/* ── Question title ── */
.aov-q-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0a0a0a;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

/* ── Question subtitle ── */
.aov-q-subtitle {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 28px;
    line-height: 1.6;
    font-weight: 400;
}

/* ── Option body wrapper ── */
.aov-q-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
}

/* ── Option card (radio / multi) ── */
.aov-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    background: #fff;
    user-select: none;
}

.aov-option:hover {
    border-color: #ccc;
    background: #fafafa;
}

.aov-option-sel {
    border-color: #111 !important;
    background: #fafafa !important;
    box-shadow: 0 0 0 1px #111;
}

/* ── Radio circle ── */
.aov-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #d0d0d0;
    flex-shrink: 0;
    transition: all 0.18s ease;
    position: relative;
    background: #fff;
}

.aov-radio-sel {
    border-color: #111;
    background: #111;
    box-shadow: inset 0 0 0 4px #fff;
}

/* ── Checkbox (multi-select) ── */
.aov-check {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1.5px solid #d0d0d0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    background: #fff;
}

.aov-check-sel {
    border-color: #111;
    background: #111;
}

/* ── Option text ── */
.aov-option-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.aov-option-sel .aov-option-text {
    color: #0a0a0a;
    font-weight: 700;
}

/* ── Chip grid (regions) ── */
.aov-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.aov-chip {
    padding: 10px 18px;
    border: 1.5px solid #e8e8e8;
    border-radius: 99px;
    background: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.18s ease;
}

.aov-chip:hover {
    border-color: #bbb;
    color: #111;
    background: #fafafa;
}

.aov-chip-sel {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

/* ── Slider ── */
.aov-slider-wrap {
    margin-top: 8px;
}

.aov-slider-display {
    font-size: 3rem;
    font-weight: 800;
    color: #0a0a0a;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.aov-slider-suf {
    font-size: 1.2rem;
    font-weight: 500;
    color: #aaa;
    letter-spacing: 0;
}

.aov-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: #e8e8e8;
    outline: none;
    cursor: pointer;
}

.aov-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: transform 0.15s ease;
}

.aov-slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

.aov-slider-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ccc;
}

/* ── Number input ── */
.aov-number-field {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 20px;
    background: #fff;
    max-width: 320px;
    transition: border-color 0.2s ease;
    margin-top: 8px;
}

.aov-number-field:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.aov-number-input {
    border: none;
    outline: none;
    flex: 1;
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    background: transparent;
    min-width: 0;
}

/* Hide spinners */
.aov-number-input::-webkit-inner-spin-button,
.aov-number-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.aov-number-input[type=number] { -moz-appearance: textfield; }

.aov-number-unit {
    font-size: 1rem;
    font-weight: 600;
    color: #bbb;
    flex-shrink: 0;
}

/* ── Dual number grid ── */
.aov-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.aov-dual-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aov-dual-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.aov-dual-item .aov-number-field {
    max-width: 100%;
    padding: 12px 16px;
}

.aov-dual-item .aov-number-input {
    font-size: 1.2rem;
}

/* ── Footer ── */
.aov-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
    gap: 16px;
}

/* ── Badges ── */
.aov-badges {
    display: flex;
    align-items: center;
    gap: 20px;
}

.aov-badge-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ccc;
}

/* ── Nav buttons ── */
.aov-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aov-btn-back {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: #bbb;
    cursor: pointer;
    padding: 10px 4px;
    transition: color 0.18s ease;
}

.aov-btn-back:hover:not(:disabled) {
    color: #555;
}

.aov-btn-back:disabled {
    opacity: 0;
    pointer-events: none;
}

.aov-btn-next {
    background: #111;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 99px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    min-width: 120px;
    text-align: center;
}

.aov-btn-next:hover:not(:disabled) {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.aov-btn-next:disabled {
    background: #e5e5e5;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Saving spinner dot */
.aov-saving-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    animation: aov-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes aov-pulse {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* ── Success screen ── */
.aov-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 0;
    max-width: 480px;
}

.aov-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    animation: aov-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes aov-pop {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.aov-success-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #0a0a0a;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    line-height: 1.1;
}

.aov-success-sub {
    font-size: 1rem;
    color: #888;
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 400;
    max-width: 380px;
}

.aov-done-btn {
    background: #111;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 99px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.aov-done-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .aov-header { padding: 16px 20px; }
    .aov-footer { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
    .aov-badges { display: none; }
    .aov-main { padding: 36px 20px 24px; }
    .aov-q-title { font-size: 1.5rem; }
    .aov-slider-display { font-size: 2.2rem; }
    .aov-dual-grid { grid-template-columns: 1fr; }
    .aov-block-badge { display: none; }
    .aov-success-title { font-size: 1.8rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PSL — Personalized Search Links
   Used in: advanced-onboarding success screen, dashboard recommended panel
   ═══════════════════════════════════════════════════════════════════════════ */

.aov-links-section {
    width: 100%;
    margin-top: 20px;
}

.aov-links-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bbb;
    margin-bottom: 14px;
}

.psl-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 520px;
}

/* ── Single link card ── */
.psl-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    color: inherit;
}

.psl-card:hover {
    border-color: #111;
    background: #fafafa;
    transform: translateX(3px);
}

.psl-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    flex-shrink: 0;
}

.psl-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.psl-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psl-sub {
    font-size: 0.78rem;
    color: #aaa;
    font-weight: 500;
}

.psl-arrow {
    font-size: 1rem;
    color: #ccc;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.psl-card:hover .psl-arrow {
    color: #111;
}

/* Dark variant (for use inside dark category search modal) */
.psl-card.psl-dark {
    border-color: #2a2a2a;
    background: #1a1a1a;
}

.psl-card.psl-dark .psl-title { color: #fff; }
.psl-card.psl-dark .psl-sub   { color: #666; }
.psl-card.psl-dark .psl-arrow { color: #444; }
.psl-card.psl-dark:hover { border-color: #555; background: #222; }
.psl-card.psl-dark:hover .psl-arrow { color: #fff; }

@media (max-width: 640px) {
    .psl-list { max-width: 100%; }
}

/* ─── Mortgage Contact Modal (mcm-*) ─────────────────────────────────────────── */
.mcm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.mcm-dialog {
    background: #fff;
    border-radius: 18px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    animation: mcm-in 0.2s ease;
}

@keyframes mcm-in {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.mcm-close-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}
.mcm-close-x:hover { background: #e5e7eb; }

.mcm-header {
    text-align: center;
    margin-bottom: 24px;
}

.mcm-icon-wrap {
    background: #111;
    color: #fff;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    margin: 0 auto 16px;
}

.mcm-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 4px;
}

.mcm-subtitle {
    font-size: 0.84rem;
    color: #777;
    margin: 0;
}

.mcm-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    margin: 0 0 20px;
    text-align: center;
}

.mcm-field { margin-bottom: 14px; }

.mcm-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
}

.mcm-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #aaa;
}

.mcm-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
    outline: none;
    color: #111;
}
.mcm-input:focus { border-color: #111; }

.mcm-error-msg {
    font-size: 0.82rem;
    color: #dc2626;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.mcm-contact-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mcm-preview-item {
    font-size: 0.9rem;
    color: #222;
    font-weight: 500;
}

.mcm-change-link {
    text-align: center;
    margin: 0 0 20px;
}

.mcm-link-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
}
.mcm-link-btn:hover { color: #1d4ed8; }

.mcm-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.mcm-actions .mcm-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
}

.mcm-btn {
    padding: 11px 22px;
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, opacity 0.15s;
}
.mcm-btn-primary           { background: #111; color: #fff; }
.mcm-btn-primary:hover     { background: #333; }
.mcm-btn-primary:disabled  { background: #999; cursor: not-allowed; }
.mcm-btn-secondary         { background: #f3f4f6; color: #444; }
.mcm-btn-secondary:hover   { background: #e5e7eb; }

.mcm-success-wrap { text-align: center; padding: 8px 0 4px; }

.mcm-success-icon {
    width: 64px;
    height: 64px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #16a34a;
}

.mcm-success-msg {
    font-size: 0.92rem;
    color: #333;
    line-height: 1.55;
    margin: 0 0 24px;
}

@media (max-width: 480px) {
    .mcm-dialog { padding: 24px 20px; }
    .mcm-actions { flex-direction: column-reverse; }
    .mcm-btn { width: 100%; text-align: center; }
}

/* ─── PROGNÓZA (Forecast) ─────────────────────────────────────────────────── */

.forecast-period-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.forecast-period-btn {
    padding: 7px 18px;
    border-radius: 8px;
    border: 1.5px solid #3a3a3a;
    background: #1e1e1e;
    color: #aaa;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s, border-color .15s;
}

.forecast-period-btn:hover:not(.forecast-period-btn--active) {
    background: #2a2a2a;
    color: #eee;
}

.forecast-period-btn--active {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.forecast-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.forecast-kpi {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 18px 16px;
}

.forecast-kpi-lbl {
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
}

.forecast-kpi-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f0f0f0;
    line-height: 1.1;
}

.forecast-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

.forecast-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .88rem;
}

.forecast-th {
    padding: 11px 16px;
    text-align: right;
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: #666;
    background: #1a1a1a;
    white-space: nowrap;
}

.forecast-th:first-child {
    text-align: left;
}

.forecast-td {
    padding: 12px 16px;
    text-align: right;
    color: #ccc;
    font-weight: 600;
    border-bottom: 1px solid #1e1e1e;
}

.forecast-td-year {
    text-align: left;
    color: #888;
    font-weight: 700;
}

.forecast-tr:last-child .forecast-td {
    border-bottom: none;
}

.forecast-tr:nth-child(even) {
    background: #161616;
}

.forecast-tr:hover {
    background: #1f1f1f;
}

.forecast-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: #555;
    gap: 16px;
}

.forecast-empty p {
    font-size: .9rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
    max-width: 340px;
}

.forecast-empty strong {
    color: #aaa;
}

/* Simple forecast block inside AI analysis detail */
.det-simple-forecast-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .83rem;
    margin-top: 10px;
}

.det-simple-forecast-table th {
    padding: 7px 10px;
    text-align: right;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 700;
    color: #aaa;
    border-bottom: 2px solid #f0f0f0;
}

.det-simple-forecast-table th:first-child {
    text-align: left;
}

.det-simple-forecast-table td {
    padding: 8px 10px;
    text-align: right;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #f5f5f5;
}

.det-simple-forecast-table td:first-child {
    text-align: left;
    color: #999;
    font-weight: 700;
}

.det-simple-forecast-table tr:last-child td {
    border-bottom: none;
}

.det-simple-forecast-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 9px 18px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s;
}

.det-simple-forecast-cta:hover {
    opacity: .8;
}

/* Responsive forecast grid */
@media (max-width: 900px) {
    .forecast-kpi-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .forecast-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .forecast-kpi-val {
        font-size: 1.1rem;
    }
}