/* ========== RESET & TOKENS ========== */
:root {
    --navy: #001F3A;
    --navy-light: #0a2e4d;
    --navy-muted: #1a3a5c;
    --blue: #A2D2FF;
    --blue-light: #c4e2ff;
    --blue-bg: #F2F9FF;
    --blue-ring: rgba(162,210,255,0.35);
    --blue-glow: rgba(162,210,255,0.25);
    --bg: #FFFFFF;
    --bg-secondary: #F2F9FF;
    --surface: #FFFFFF;
    --text: #001F3A;
    --text-secondary: #4a6a8a;
    --text-tertiary: #8a9fb5;
    --line: #d6e4f0;
    --line-light: #e8f1f8;
    --gold: #D4AF6A;
    --gold-light: rgba(212,175,106,0.1);
    --success: #34c77b;
    --danger: #e05252;
    --radius: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 1px 2px rgba(0,31,58,0.04);
    --shadow: 0 2px 8px rgba(0,31,58,0.07), 0 1px 2px rgba(0,31,58,0.04);
    --shadow-lg: 0 8px 32px rgba(0,31,58,0.09), 0 2px 8px rgba(0,31,58,0.04);
    --shadow-xl: 0 16px 48px rgba(0,31,58,0.12), 0 4px 12px rgba(0,31,58,0.05);
    --transition: 0.2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--navy); text-decoration: none; transition: color var(--transition); font-weight: 500; }
a:hover { color: var(--navy-muted); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font: inherit; }

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.9375rem;
    border: none; cursor: pointer;
    transition: all var(--transition);
    text-decoration: none; letter-spacing: 0.01em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); box-shadow: 0 4px 16px rgba(0,31,58,0.25); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #c9a45f; box-shadow: 0 4px 16px rgba(212,175,106,0.3); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--blue-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c94545; }
.btn-success { background: var(--success); color: #fff; }
.btn-secondary { background: var(--bg-secondary); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--line-light); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.375rem; color: var(--text); }
.form-input {
    width: 100%; padding: 0.75rem 1rem;
    border: 1.5px solid var(--line); border-radius: var(--radius);
    font-size: 0.9375rem; background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-ring); }
.form-input::placeholder { color: var(--text-tertiary); }
textarea.form-input { resize: vertical; min-height: 6rem; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a6a8a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
.form-error { color: var(--danger); font-size: 0.8125rem; margin-top: 0.25rem; }
.form-hint { color: var(--text-secondary); font-size: 0.8125rem; margin-top: 0.25rem; }
.validation-summary-errors ul { list-style: none; color: var(--danger); font-size: 0.875rem; margin-bottom: 1rem; }
.field-validation-error { color: var(--danger); font-size: 0.8125rem; }
.char-count { text-align: right; font-size: 0.75rem; color: var(--text-secondary); }

/* ========== NAV ========== */
.nav {
    background: var(--navy);
    position: sticky; top: 0; z-index: 100;
}
.nav-inner {
    max-width: 1024px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem; height: 4rem;
}
.nav-brand { font-weight: 700; font-size: 1.25rem; color: #fff; letter-spacing: -0.01em; }
.nav-brand:hover { text-decoration: none; color: #fff; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
    display: flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 0.875rem; border-radius: var(--radius);
    font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.6);
    transition: all var(--transition);
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.nav-link.active { color: #fff; background: rgba(162,210,255,0.2); font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; display: none; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-upgrade { color: #fff; background: rgba(162,210,255,0.2); font-weight: 600; }
.nav-upgrade:hover { background: rgba(162,210,255,0.35); color: #fff; text-decoration: none; }

/* ========== MAIN CONTENT ========== */
.main-content {
    max-width: 1024px; margin: 0 auto;
    padding: 2rem 1.5rem;
    animation: fadeUp 0.4s ease;
}

/* ========== CARDS ========== */
.card {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden; border: 1px solid var(--line-light);
}
.card-body { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line-light); font-weight: 600; }

/* ========== TOAST ========== */
.toast {
    padding: 0.875rem 1.25rem; border-radius: var(--radius);
    font-size: 0.875rem; margin-bottom: 1.25rem; font-weight: 500;
    animation: toast-in 0.4s ease;
}
.toast-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.toast-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }

/* ========== AUTH PAGES ========== */
.auth-body {
    background: var(--navy);
    display: flex; min-height: 100vh;
}
.auth-container { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 2rem 1.5rem; }
.auth-brand { font-size: 1.75rem; font-weight: 700; color: #fff; margin-bottom: 2rem; letter-spacing: -0.02em; }
.auth-brand:hover { color: #fff; }
.auth-card {
    position: relative;
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); padding: 2.5rem;
    width: 100%; max-width: 420px;
    animation: fadeUp 0.5s ease;
}
.auth-close {
    position: absolute; top: 1rem; right: 1rem;
    font-size: 1.5rem; line-height: 1; color: var(--text-secondary);
    text-decoration: none; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all 0.2s;
}
.auth-close:hover {
    background: var(--blue-bg); color: var(--navy); text-decoration: none;
}
.auth-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.375rem; letter-spacing: -0.01em; color: var(--navy); }
.auth-subtitle { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 1.75rem; line-height: 1.5; }
.auth-footer { text-align: center; margin-top: 1.75rem; font-size: 0.875rem; color: var(--text-secondary); }

/* ========== CODE INPUT ========== */
.code-input-group { display: flex; gap: 0.625rem; justify-content: center; margin-bottom: 1.25rem; }
.code-input-group input {
    width: 3.25rem; height: 3.75rem; text-align: center; font-size: 1.5rem; font-weight: 700;
    border: 2px solid var(--line); border-radius: var(--radius);
    background: var(--blue-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.code-input-group input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-ring); }

/* ========== LANDING / HERO ========== */
.hero {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 3rem 1.5rem;
    background: var(--navy);
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
    width: 140%; height: 80%;
    background: radial-gradient(ellipse, rgba(162,210,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-brand {
    font-size: 3rem; font-weight: 700; color: #fff;
    margin-bottom: 0.75rem; letter-spacing: -0.03em;
    position: relative;
}
.hero-tagline {
    font-size: 1.25rem; color: var(--blue-light);
    margin-bottom: 0.75rem; max-width: 32rem;
    line-height: 1.6; position: relative;
}
.hero-subtitle {
    font-size: 1rem; color: rgba(255,255,255,0.5);
    margin-bottom: 2.5rem; position: relative;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; position: relative; }
.hero-actions .btn-primary { background: var(--blue); color: var(--navy); font-weight: 700; }
.hero-actions .btn-primary:hover { background: var(--blue-light); box-shadow: 0 4px 20px var(--blue-glow); }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.3); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }
.hero .text-muted { color: rgba(255,255,255,0.4); }

/* ========== SWIPE CARD ========== */
.swipe-container { display: flex; flex-direction: column; align-items: center; }
.swipe-card {
    width: 100%; max-width: 420px; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--surface); box-shadow: var(--shadow-lg);
    border: 1px solid var(--line-light);
    transition: box-shadow var(--transition);
}
.swipe-card:hover { box-shadow: var(--shadow-xl); }
.swipe-card-photo-wrap { position: relative; }
.swipe-card-img { width: 100%; height: 480px; object-fit: cover; background: var(--bg-secondary); }
.swipe-card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,31,58,0.6) 100%);
    padding: 1.5rem; color: #fff;
}
.swipe-card-overlay .swipe-card-name { font-size: 1.5rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.swipe-card-overlay .swipe-card-meta { color: rgba(255,255,255,0.85); font-size: 0.9375rem; margin-top: 0.125rem; }
.swipe-card-info { padding: 1.25rem 1.5rem; }
.swipe-card-name { font-size: 1.25rem; font-weight: 700; }
.swipe-card-meta { color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.25rem; }
.swipe-card-headline { font-size: 0.9375rem; margin-top: 0.5rem; color: var(--text-secondary); line-height: 1.5; }
.swipe-card-interests { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.swipe-card-interests span {
    background: var(--blue-bg); color: var(--navy);
    font-size: 0.75rem; padding: 0.3rem 0.625rem;
    border-radius: 2rem; font-weight: 500;
    border: 1px solid var(--line);
}

.swipe-actions { display: flex; gap: 1.25rem; margin-top: 1.25rem; justify-content: center; }
.swipe-btn {
    width: 4rem; height: 4rem; border-radius: 50%; border: 2px solid;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.375rem; cursor: pointer; background: var(--surface);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.swipe-btn:hover { transform: scale(1.12); }
.swipe-btn-pass { border-color: #FCA5A5; color: var(--danger); }
.swipe-btn-pass:hover { background: #FEF2F2; box-shadow: 0 0 16px rgba(224,82,82,0.2); }
.swipe-btn-like { border-color: var(--blue); color: var(--navy); }
.swipe-btn-like:hover { background: var(--blue-bg); box-shadow: 0 0 16px var(--blue-ring); }
.swipe-btn-super { border-color: var(--gold); color: var(--gold); }
.swipe-btn-super:hover { background: var(--gold-light); box-shadow: 0 0 16px rgba(212,175,106,0.25); }
.swipe-counter { text-align: center; font-size: 0.8125rem; color: var(--text-tertiary); margin-top: 0.75rem; }

/* ========== MATCH OVERLAY ========== */
.match-overlay {
    position: fixed; inset: 0; background: rgba(0,31,58,0.5);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; animation: fade-in 0.3s;
}
.match-overlay-card {
    background: var(--surface); border-radius: var(--radius-lg); padding: 2.5rem;
    text-align: center; max-width: 340px; width: 90%;
    box-shadow: var(--shadow-xl);
    animation: fadeUp 0.4s ease;
}
.match-overlay-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 0.75rem; }
.match-overlay-photo { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; box-shadow: 0 0 0 4px var(--blue-ring); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 4rem 1.5rem; }
.empty-state-icon { font-size: 3.5rem; margin-bottom: 1.25rem; }
.empty-state-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state-text { color: var(--text-secondary); margin-bottom: 2rem; max-width: 24rem; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* ========== FILTER PAGE ========== */
.filter-section { margin-bottom: 1.5rem; }
.filter-section-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.875rem; }
.filter-row { display: flex; gap: 1rem; }
.filter-row .form-group { flex: 1; }
.premium-badge {
    display: inline-block; background: var(--gold); color: #fff;
    font-size: 0.625rem; padding: 0.125rem 0.5rem;
    border-radius: 1rem; vertical-align: middle; margin-left: 0.375rem;
    font-weight: 600; letter-spacing: 0.03em;
}

/* Filter accordion */
.filter-accordion { border-top: 1px solid var(--line-light); }
.filter-accordion-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 1rem 0; border: none; background: none;
    font-weight: 600; font-size: 1rem; color: var(--text);
    cursor: pointer; font-family: inherit;
}
.filter-accordion-toggle:hover { color: var(--navy-muted); }
.filter-accordion-chevron {
    width: 18px; height: 18px; transition: transform 0.25s ease;
    color: var(--text-secondary); flex-shrink: 0;
}
.filter-accordion.open .filter-accordion-chevron { transform: rotate(180deg); }
.filter-accordion-content { display: none; padding-bottom: 1.5rem; }
.filter-accordion.open .filter-accordion-content { display: block; }

/* Filter columns (side by side) */
.filter-cols { display: flex; gap: 1.5rem; }
.filter-cols > * { flex: 1; min-width: 0; }

/* Filter sub-title */
.filter-sub-title {
    font-weight: 600; font-size: 0.875rem; color: var(--text-secondary);
    margin-bottom: 0.75rem; margin-top: 0.25rem;
    padding-top: 0.75rem; border-top: 1px solid var(--line-light);
}

/* Disabled chip group (non-premium) */
.chip-group.disabled .chip {
    opacity: 0.45; cursor: not-allowed; pointer-events: none;
}

/* Intent cards */
.intent-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.intent-card {
    flex: 1; min-width: 110px; max-width: 180px;
    padding: 1.25rem 0.75rem; border: 2px solid var(--line);
    border-radius: var(--radius); text-align: center;
    cursor: pointer; transition: all var(--transition);
    position: relative; user-select: none;
}
.intent-card:hover { border-color: var(--blue); background: var(--blue-bg); }
.intent-card.selected { border-color: var(--navy); background: var(--blue-bg); }
.intent-card-icon { font-size: 1.75rem; margin-bottom: 0.375rem; display: block; }
.intent-card-label { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; }
.intent-card input { display: none; }
.intent-card-check {
    position: absolute; top: -0.375rem; right: -0.375rem;
    width: 1.25rem; height: 1.25rem; border-radius: 50%;
    background: var(--blue); color: var(--navy); font-size: 0.6875rem;
    display: none; align-items: center; justify-content: center;
    font-weight: 700;
}
.intent-card.selected .intent-card-check { display: flex; }
.intent-grid.disabled .intent-card {
    opacity: 0.45; cursor: not-allowed; pointer-events: none;
}

/* ========== BROWSE PAGE ========== */
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; letter-spacing: -0.01em; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.grid-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 3/4; background: var(--bg-secondary);
    box-shadow: var(--shadow); transition: all var(--transition);
}
.grid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.grid-card img { width: 100%; height: 100%; object-fit: cover; }
.grid-card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,31,58,0.65));
    padding: 1rem; color: #fff;
}
.grid-card-name { font-weight: 600; font-size: 0.9375rem; }
.grid-card-meta { font-size: 0.75rem; opacity: 0.85; }
.blurred { filter: blur(8px); }

/* ========== INBOX ========== */
.inbox-list { display: flex; flex-direction: column; }
.inbox-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--line-light);
    text-decoration: none; color: inherit;
    transition: background var(--transition);
    border-radius: var(--radius);
}
.inbox-item:hover { background: var(--blue-bg); text-decoration: none; }
.inbox-avatar {
    width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover;
    flex-shrink: 0; background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}
.inbox-info { flex: 1; min-width: 0; }
.inbox-name { font-weight: 600; font-size: 1rem; }
.inbox-preview { font-size: 0.875rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-meta { text-align: right; flex-shrink: 0; }
.inbox-time { font-size: 0.75rem; color: var(--text-tertiary); }
.inbox-badge {
    display: inline-block; background: var(--navy); color: #fff;
    font-size: 0.6875rem; padding: 0.175rem 0.5rem;
    border-radius: 1rem; margin-top: 0.25rem; font-weight: 600;
}
.inbox-search { margin-bottom: 1.25rem; }

/* ========== CHAT THREAD ========== */
/* When a chat thread is shown, make main fill viewport so messages scroll */
.main-content:has(.chat-header) {
    display: flex; flex-direction: column;
    height: calc(100vh - 4rem);
    padding: 0;
    overflow: hidden;
    padding-top: 0.375rem;
}
.chat-header {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
    background: var(--navy); color: #fff;
    flex-shrink: 0; z-index: 50;
}
.chat-header-avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.chat-header-name { font-weight: 600; font-size: 1.0625rem; color: #fff; flex: 1; }
.chat-header-action {
    display: flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: rgba(255,255,255,0.12); transition: background 0.2s;
    text-decoration: none;
}
.chat-header-action:first-of-type { margin-left: auto; }
.chat-header-action:hover { background: rgba(255,255,255,0.25); }
.inbox-item-wrap { position: relative; }
.inbox-item-wrap .inbox-item { padding-right: 3.5rem; }
.inbox-delete-form { position: absolute; top: 50%; right: 0.75rem; transform: translateY(-50%); z-index: 2; }
.inbox-delete-btn {
    display: flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%; border: none; cursor: pointer;
    background: transparent; color: var(--muted, #888); transition: color 0.2s, background 0.2s;
    padding: 0;
}
.inbox-delete-btn:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.chat-messages {
    display: flex; flex-direction: column; gap: 0.625rem;
    padding: 1.5rem;
    background: var(--blue-bg);
}
.chat-bubble {
    max-width: 75%; padding: 0.75rem 1rem; border-radius: var(--radius);
    font-size: 0.9375rem; line-height: 1.5;
}
.chat-bubble-sent {
    background: var(--blue); color: var(--navy);
    align-self: flex-end; border-bottom-right-radius: 0.25rem;
}
.chat-bubble-received {
    background: var(--surface); color: var(--text);
    align-self: flex-start; border-bottom-left-radius: 0.25rem;
    border: 1px solid var(--line);
}
.chat-bubble-time { font-size: 0.6875rem; opacity: 0.6; margin-top: 0.25rem; }
.chat-system-msg {
    text-align: center; font-size: 0.8125rem; color: var(--text-tertiary);
    padding: 0.375rem 0; margin: 0.25rem 0;
}
.chat-system-time { font-size: 0.6875rem; opacity: 0.6; margin-left: 0.375rem; }
.chat-call-card {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.75rem 1rem; margin: 0.375rem auto; max-width: 360px;
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.chat-call-active { border-color: var(--blue); background: var(--blue-bg); }
.chat-call-info { flex: 1; font-size: 0.8125rem; line-height: 1.4; }
.chat-call-info strong { display: block; color: var(--text-primary); }
.chat-bubble-media { max-width: 220px; border-radius: var(--radius); }
.chat-input-bar {
    display: flex; gap: 0.625rem; padding: 1rem 1.25rem;
    border-top: 1px solid var(--line); background: var(--bg);
    flex-shrink: 0;
}
.chat-input-bar input { flex: 1; }
.chat-input-bar .btn { flex-shrink: 0; }
.chat-media-btn {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    color: var(--navy); background: var(--blue-bg);
    cursor: pointer; flex-shrink: 0;
    transition: all var(--transition);
}
.chat-media-btn:hover {
    background: var(--blue);
    box-shadow: 0 0 12px var(--blue-ring);
}

/* ========== VIDEO CALL PANEL ========== */
.chat-body-wrapper {
    display: flex; flex-direction: column;
    flex: 1; min-height: 0;
    overflow: hidden;
}
.chat-body-wrapper .chat-messages {
    flex: 1; overflow-y: auto;
    min-height: 0;
}

.vc-panel.hidden { display: none !important; }

/* Desktop: side-by-side with messages */
@media (min-width: 641px) {
    .chat-body-wrapper.vc-active {
        flex-direction: row;
    }
    .chat-body-wrapper.vc-active .chat-messages {
        flex: 1; min-width: 0;
    }
    .chat-body-wrapper.vc-active .vc-panel {
        width: 420px; flex-shrink: 0;
        display: flex; flex-direction: column;
        border-left: 1px solid var(--line);
        background: #111; color: #fff;
    }
}

/* Mobile: full-screen overlay */
@media (max-width: 640px) {
    .vc-panel {
        position: fixed; inset: 0; z-index: 1000;
        display: flex; flex-direction: column;
        background: #111; color: #fff;
    }
}

.vc-videos {
    flex: 1; position: relative; overflow: hidden;
    background: #000; min-height: 300px;
}
.vc-remote-video {
    width: 100%; height: 100%;
}
.vc-remote-video video { width: 100%; height: 100%; object-fit: cover; }
.vc-local-video {
    position: absolute; bottom: 1rem; right: 1rem;
    width: 120px; height: 90px;
    border-radius: 0.5rem; overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    background: #222; z-index: 2;
}
.vc-local-video video { width: 100%; height: 100%; object-fit: cover; }

.vc-toolbar {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.85);
}
.vc-status { font-size: 0.875rem; font-weight: 500; }
.vc-duration { font-size: 0.8125rem; opacity: 0.7; }
.vc-buttons { display: flex; gap: 0.5rem; margin-left: auto; }
.vc-btn {
    display: flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    border: none; cursor: pointer;
    background: rgba(255,255,255,0.15); color: #fff;
    transition: background 0.2s;
}
.vc-btn:hover { background: rgba(255,255,255,0.3); }
.vc-btn.vc-btn-active { background: #ef4444; }
.vc-btn-end { background: #ef4444; }
.vc-btn-end:hover { background: #dc2626; }

/* ========== PROFILE VIEW ========== */
.profile-hero {
    position: relative; width: 100%; max-height: 500px; overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.profile-hero img { width: 100%; aspect-ratio: 3/4; max-height: 500px; object-fit: cover; }
.profile-hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,31,58,0.55) 100%);
    padding: 2rem 1.5rem 1.5rem; color: #fff;
}
.profile-hero-overlay .profile-name { font-size: 1.75rem; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.profile-hero-overlay .profile-meta { color: rgba(255,255,255,0.85); font-size: 1rem; margin-top: 0.125rem; }
.profile-header { text-align: center; padding: 2rem; }
.profile-photo { width: 8rem; height: 8rem; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; background: var(--bg-secondary); box-shadow: var(--shadow); }
.profile-name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.profile-meta { color: var(--text-secondary); margin-top: 0.25rem; }
.profile-bio { margin-top: 1rem; color: var(--text-secondary); line-height: 1.7; }
.profile-section { padding: 1.25rem 1.5rem; border-top: 1px solid var(--line-light); }
.profile-section-title {
    font-weight: 600; font-size: 0.8125rem; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.625rem;
}
.profile-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.profile-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.profile-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profile-tag {
    background: var(--blue-bg); padding: 0.375rem 0.75rem;
    border-radius: 2rem; font-size: 0.8125rem; color: var(--navy);
    border: 1px solid var(--line);
}
.profile-attr { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9375rem; }
.profile-attr-label { color: var(--text-secondary); }

/* ========== ACCOUNT HUB ========== */
.account-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.account-avatar { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; background: var(--bg-secondary); box-shadow: var(--shadow); }
.account-name { font-size: 1.375rem; font-weight: 700; }
.account-email { font-size: 0.875rem; color: var(--text-secondary); }
.progress-bar { height: 0.5rem; background: var(--line-light); border-radius: 1rem; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--blue); border-radius: 1rem; transition: width 0.4s ease; }
.account-links { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 1.25rem; }
.account-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); color: inherit; font-size: 0.9375rem;
    transition: all var(--transition);
}
.account-link:hover { background: var(--blue-bg); text-decoration: none; box-shadow: var(--shadow-sm); }
.account-link-arrow { color: var(--text-tertiary); }
.account-link-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.125rem; }

/* ========== SUBSCRIPTION CARD ========== */
.sub-card {
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem;
    text-align: center; transition: all var(--transition);
    background: var(--surface);
}
.sub-card:hover { border-color: var(--blue); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.sub-card.popular { border-color: var(--navy); border-width: 2px; position: relative; box-shadow: 0 0 32px rgba(0,31,58,0.12); }
.sub-card-badge {
    position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%);
    background: var(--navy); color: #fff; font-size: 0.6875rem;
    padding: 0.25rem 0.75rem; border-radius: 2rem; font-weight: 600;
    letter-spacing: 0.03em;
}
.sub-card-name { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.375rem; }
.sub-card-price { font-size: 2.25rem; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.sub-card-period { font-size: 0.875rem; color: var(--text-secondary); }
.sub-card-features { list-style: none; margin: 1.5rem 0; font-size: 0.9375rem; text-align: left; }
.sub-card-features li { padding: 0.375rem 0; }
.sub-card-features li::before { content: "\2713 "; color: var(--success); font-weight: 600; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }

/* ========== REGISTRATION WIZARD ========== */
.reg-progress { display: flex; gap: 0.375rem; margin-bottom: 2rem; }
.reg-progress-step { flex: 1; height: 0.3rem; background: var(--line-light); border-radius: 1rem; transition: background var(--transition); }
.reg-progress-step.done { background: var(--navy); }
.reg-progress-step.current { background: var(--blue); }
.reg-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.375rem; letter-spacing: -0.01em; }
.reg-subtitle { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 1.75rem; line-height: 1.5; }

/* ========== CHIP SELECT ========== */
.chip-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    padding: 0.5rem 1rem; border: 1.5px solid var(--line); border-radius: 2rem;
    font-size: 0.875rem; cursor: pointer; background: var(--bg);
    transition: all var(--transition); user-select: none;
}
.chip:hover { border-color: var(--blue); background: var(--blue-bg); }
.chip.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip input[type="checkbox"] { display: none; }

/* ========== PHOTO UPLOAD ========== */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.875rem; }
.photo-slot {
    aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden;
    position: relative; background: var(--blue-bg);
    border: 2px dashed var(--line);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}
.photo-slot:hover { border-color: var(--blue); background: rgba(162,210,255,0.15); }
.photo-slot.filled { border-style: solid; border-color: transparent; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot-add { font-size: 1.5rem; color: var(--text-tertiary); }
.photo-slot-remove {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: rgba(0,31,58,0.6); color: #fff; border: none;
    font-size: 0.75rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.photo-slot-remove:hover { background: rgba(0,31,58,0.8); }
.photo-slot-primary {
    position: absolute; bottom: 0.5rem; right: 0.5rem;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: rgba(0,31,58,0.6); color: #FFD700; border: none;
    font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.photo-slot-primary:hover { background: rgba(0,31,58,0.8); }
.photo-slot-badge {
    position: absolute; bottom: 0.5rem; left: 0.5rem;
    background: var(--blue); color: #fff; font-size: 0.625rem;
    padding: 0.125rem 0.5rem; border-radius: 1rem;
    font-weight: 600;
}

/* ========== GENDER / RADIO CARDS ========== */
.radio-cards { display: flex; gap: 0.875rem; }
.radio-card {
    flex: 1; padding: 1.25rem; border: 2px solid var(--line); border-radius: var(--radius);
    text-align: center; cursor: pointer; transition: all var(--transition);
}
.radio-card:hover { border-color: var(--blue); background: var(--blue-bg); }
.radio-card.selected { border-color: var(--navy); background: var(--blue-bg); }
.radio-card input[type="radio"] { display: none; }
.radio-card-label { font-weight: 600; font-size: 0.9375rem; }

/* ========== CHECKOUT STUB ========== */
.checkout-form { max-width: 420px; margin: 0 auto; }
.paypal-logo { text-align: center; padding: 1.25rem; margin-bottom: 1.25rem; }
.paypal-logo span { font-size: 1.5rem; font-weight: 700; color: #003087; }

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .nav-inner { padding: 0 0.5rem; height: 3rem; }
    .nav-icon { display: block; width: 20px; height: 20px; }
    .nav-label { display: none; }
    .nav-link { padding: 0.5rem; }
    .nav-brand { font-size: 1rem; }
    .nav-actions .btn { padding: 0.375rem 0.625rem; font-size: 0.75rem; }
    .main-content { padding: 1.25rem 1rem; }
    .swipe-card-img { height: 340px; }
    .hero-brand { font-size: 2rem; }
    .hero-tagline { font-size: 1.0625rem; }
    .grid-3 { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .sub-grid { grid-template-columns: 1fr; }
    .filter-row { flex-direction: column; gap: 0; }
    .filter-cols { flex-direction: column; gap: 0; }
    .intent-grid { justify-content: center; }
    .intent-card { min-width: 90px; }
    .radio-cards { flex-direction: column; }
    .auth-card { padding: 1.75rem; }
    .profile-hero-overlay { padding: 1.25rem; }
    .profile-hero-overlay .profile-name { font-size: 1.375rem; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== LAZY LOAD ========== */
img[loading="lazy"] { opacity: 0; transition: opacity 0.4s ease; }
img[loading="lazy"].loaded, img[loading="lazy"][src] { opacity: 1; }

/* ========== LIGHTBOX ========== */
.lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,31,58,0.9);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    cursor: zoom-out;
}
.lightbox img {
    max-width: 95vw; max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
}
.lightbox.hidden { display: none; }
img.zoomable { cursor: zoom-in; }
