/* ── App styles (tokens in tokens.css) ─────────────────────── */

/* ?? Reset ?????????????????????????????????????????????????????????????????? */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font-family: inherit; font-size: 1rem; }
img { max-width: 100%; display: block; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    background: var(--maroon);
    display: flex; align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(212,175,55,.15);
}
.nav-brand { display: flex; align-items: center; flex: 1; }

/* Brand link: icon + wordmark */
.brand-link {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none !important;
}
.brand-icon-img {
    height: 40px; width: 40px; display: block; flex-shrink: 0;
}
.brand-text {
    display: flex; flex-direction: column; line-height: 1;
}
.brand-name-en {
    font-family: var(--font-serif);
    font-size: 1.05rem; font-weight: 400;
    color: var(--gold); letter-spacing: .22em;
}
.brand-name-sub {
    font-family: var(--font-serif);
    font-size: .48rem; font-weight: 400;
    color: rgba(212,175,55,.75); letter-spacing: .3em;
    margin-top: 2px;
}

/* legacy (keep so nothing breaks) */
.brand-icon { font-size: 1.6rem; }
.brand-name { font-size: 1.4rem; font-weight: 700; color: #fff; letter-spacing: 1px; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link { color: rgba(255,255,255,.9); font-size: .95rem; cursor: pointer; transition: color .2s; }
.nav-link:hover { color: #fff; text-decoration: none; }
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
    border-radius: 50%; width: 18px; height: 18px; font-size: .65rem; font-weight: 700;
}
.hamburger {
    display: none; background: none; border: none;
    color: #fff; font-size: 1.5rem; cursor: pointer; padding: .25rem;
}

/* Role badge in the navbar */
.role-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    white-space: nowrap;
}
.role-badge.role-admin   { background: var(--accent); color: #fff; border-color: var(--accent); }
.role-badge.role-broker  { background: rgba(255,255,255,.25); }
.role-badge.role-user    { background: rgba(255,255,255,.12); }

/* Broker caste switcher in the navbar */
.nav-caste { display: flex; align-items: center; gap: .35rem; }
.nav-caste-label { color: rgba(255,255,255,.85); font-size: .8rem; }
.nav-caste-select {
    padding: .3rem .5rem;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 6px;
    background: #fff; color: var(--text);
    font-size: .85rem; max-width: 170px; cursor: pointer;
}
.field-hint { display: block; margin-top: .3rem; color: var(--text-light); font-size: .78rem; }

/* ── Registration captcha ────────────────────────────────────── */
.captcha-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.captcha-question {
    flex: 0 0 auto;
    padding: .55rem .9rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #F8F4EF, #EFE7DC);
    border: 1px dashed var(--primary, #6A2E24);
    font-weight: 600;
    letter-spacing: .04em;
    user-select: none;
}
.captcha-answer { flex: 1 1 110px; min-width: 90px; }
.captcha-refresh {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border, #DDD3C7);
    background: #fff;
    font-size: 1.05rem; line-height: 1;
    cursor: pointer;
}
.captcha-refresh:hover { background: #F8F4EF; }

/* ── Guest free-browsing gate on search results ──────────────── */
.sp-guest-gate {
    grid-column: 1 / -1;
    margin-top: .5rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 14px;
    border: 1px solid var(--border, #DDD3C7);
    background: linear-gradient(160deg, #FFFFFF, #F8F4EF);
}
.sp-guest-gate h3 { margin: 0 0 .4rem; color: var(--primary, #6A2E24); }
.sp-guest-gate p  { margin: 0 0 1rem; color: var(--text-light); font-size: .9rem; }
.sp-guest-gate .btn { margin: 0 .25rem; }

/* ?? Main Content ??????????????????????????????????????????????????????????? */
#appMain { margin-top: var(--nav-h); min-height: calc(100vh - var(--nav-h)); }
.page { display: none; }
.page.active { display: block; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
    background: var(--maroon);
    color: #fff;
    padding: 7rem 3rem 6rem;
    min-height: calc(100vh - var(--nav-h));
    display: flex; align-items: center;
}

/* Two-column layout */
.hero-inner {
    max-width: 1100px; margin: 0 auto; width: 100%;
    display: flex; align-items: center;
    justify-content: space-between; gap: 5rem;
}

/* Left column: vertical logo */
.hero-logo-col {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
}
.hero-full-logo {
    width: 380px; max-width: 100%; display: block;
}

/* Right column: content */
.hero-content { flex: 1; max-width: 480px; }

/* Small eyebrow label */
.hero-eyebrow {
    font-family: var(--font-serif);
    font-size: .72rem; font-weight: 400;
    letter-spacing: .28em; text-transform: uppercase;
    color: rgba(212,175,55,.7);
    margin-bottom: 1.8rem;
}

.hero h1 {
    font-size: 2.8rem; font-weight: 700; line-height: 1.2; margin-bottom: 1.4rem;
    letter-spacing: -.3px;
}
.hero-accent { color: var(--gold); display: block; }

.hero-tamil {
    font-family: var(--font-tamil);
    font-size: 1rem; color: rgba(212,175,55,.75);
    letter-spacing: .02em; margin-bottom: .6rem;
}

.hero-body {
    font-size: 1.05rem; color: rgba(255,255,255,.72); line-height: 1.7; margin-bottom: 2.8rem;
}

.hero p { margin-bottom: 0; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.5rem; }

/* Solid gold button */
.btn-gold {
    background: var(--gold); color: var(--maroon);
    border: 1.5px solid var(--gold); font-weight: 600;
    font-family: var(--font-serif); letter-spacing: .08em;
}
.btn-gold:hover { background: #c9a62f; border-color: #c9a62f; }

/* Ghost button */
.btn-ghost {
    background: transparent; color: rgba(255,255,255,.85);
    border: 1.5px solid rgba(212,175,55,.4); font-weight: 400;
    font-family: var(--font-serif); letter-spacing: .06em;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Stat row */
.hero-stats {
    display: flex; align-items: center; gap: 2rem;
    border-top: 1px solid rgba(212,175,55,.15);
    padding-top: 2rem;
}
.hero-stat { display: flex; flex-direction: column; gap: .2rem; }
.hero-stat span { font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold); letter-spacing: .02em; }
.hero-stat small { font-size: .72rem; color: rgba(255,255,255,.5); letter-spacing: .05em; text-transform: uppercase; }
.hero-stat-sep { width: 1px; height: 2.4rem; background: rgba(212,175,55,.2); }

/* Tamil sub-heading used inline after English headings */
.tamil-sub {
    display: inline-block; font-size: .6em; font-weight: 400;
    color: var(--primary); opacity: .75; margin-left: .5rem;
    font-style: italic; letter-spacing: .02em; vertical-align: middle;
}

/* ── Legacy art (kept for non-home pages) ────────────────── */
.hero-art {
    flex: 0 0 auto; width: 370px;
    position: relative; display: flex; align-items: center; justify-content: center;
}
.hero-art-logo { width: 420px; flex-direction: column; gap: 1.4rem; align-items: center; }
/* Orbital ring behind figures */
.art-orbit {
    position: absolute; width: 330px; height: 330px;
    border-radius: 50%; border: 1.5px solid rgba(245,166,35,.18);
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
}
.art-orbit::before {
    content: ''; position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.08);
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 0;
}
/* Couple image styling */
.couple-image {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}
/* Couple wrapper */
.art-couple {
    display: flex; align-items: flex-end; justify-content: center;
    gap: .25rem; position: relative; z-index: 1;
}
.figure-bride, .figure-groom {
    height: 215px; width: auto;
    filter: drop-shadow(0 10px 28px rgba(0,0,0,.22));
}
/* Pulsing heart between figures */
.art-heart {
    font-size: 1.7rem; padding-bottom: 2.2rem; flex-shrink: 0;
    animation: heartbeat 1.9s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255,100,100,.4));
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.18); }
}
/* Subtle dot-grid overlay on illustration area */
.art-dots {
    position: absolute; inset: 0; pointer-events: none; opacity: .35;
    background-image: radial-gradient(circle, rgba(255,255,255,.18) 1.5px, transparent 1.5px);
    background-size: 22px 22px; border-radius: 50%;
}

/* Art stats bubbles (hero section counters) */
.art-stats {
    position: absolute; bottom: -1rem; right: -2rem;
    display: flex; flex-direction: column; gap: .6rem; z-index: 10;
}
/* When logo is the hero art, stats sit below it in a row */
.hero-art-logo .art-stats {
    position: static; flex-direction: row; justify-content: center;
    gap: .8rem; margin-top: .4rem;
}
.stat-bubble {
    background: #fff; border-radius: 12px; padding: .5rem .9rem;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 90px;
}
.stat-bubble span { font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.stat-bubble small { font-size: .7rem; color: var(--text-light); margin-top: .1rem; }
.sb-1 { border-left: 4px solid var(--primary); }
.sb-1 span { color: var(--primary); }
.sb-2 { border-left: 4px solid var(--success); }
.sb-2 span { color: var(--success); }
.sb-3 { border-left: 4px solid #e74c3c; }
.sb-3 span { color: #e74c3c; }

/* ?? Stats Bar ?????????????????????????????????????????????????????????????? */
.stats-bar {
    display: flex; justify-content: center; flex-wrap: wrap;
    background: var(--bg-card);
    box-shadow: 0 4px 24px rgba(100,50,10,.09);
    border-bottom: 3px solid var(--accent);
}
.stat-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.75rem 3rem;
    border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-icon { font-size: 2.1rem; flex-shrink: 0; line-height: 1; }
.stat-text { display: flex; flex-direction: column; }
.stat-num  { display: block; font-size: 2.1rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-text span:last-child { font-size: .86rem; color: var(--text-light); margin-top: .2rem; }

/* ?? Steps Grid ????????????????????????????????????????????????????????????? */
.section-container { max-width: 1060px; margin: 3.5rem auto; padding: 0 1.5rem; }
.section-eyebrow {
    text-align: center; font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2.5px;
    color: var(--primary); margin-bottom: .5rem;
}
.section-title { font-size: 1.9rem; font-weight: 800; color: var(--text); text-align: center; margin-bottom: 2.5rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem; }
.step-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 1.75rem 1.5rem 1.5rem;
    text-align: center; box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
    position: relative; overflow: hidden; border-top: 3px solid var(--primary-lt);
}
.step-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-top-color: var(--primary); }
/* Large faint number watermark */
.step-num-label {
    position: absolute; top: .5rem; right: .75rem;
    font-size: 3rem; font-weight: 900; color: var(--primary);
    opacity: .07; line-height: 1; user-select: none; font-family: monospace;
}
.step-icon { font-size: 2.6rem; margin-bottom: .85rem; display: block; }
.step-card h3 { font-size: 1.05rem; margin-bottom: .5rem; font-weight: 700; color: var(--primary); }
.step-card p  { font-size: .88rem; color: var(--text-light); line-height: 1.55; }

/* ?? Buttons ???????????????????????????????????????????????????????????????? */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .65rem 1.4rem; border-radius: var(--radius-sm);
    border: 2px solid transparent; cursor: pointer;
    font-weight: 600; font-size: .95rem; transition: all .2s; white-space: nowrap;
    font-family: var(--font-body);
}
.btn-primary  { background: var(--gold); color: var(--maroon-dk); border-color: var(--gold); }
.btn-primary:hover  { background: var(--gold-dk); color: #fff; border-color: var(--gold-dk); transform: translateY(-1px); }
.btn-outline  { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover  { background: var(--primary-lt); color: var(--maroon-dk); }
.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn-lg  { padding: .85rem 2rem; font-size: 1.05rem; border-radius: 10px; }
.btn-sm  { padding: .35rem .8rem; font-size: .82rem; border-radius: 6px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-eye { background: none; border: none; cursor: pointer; padding: .25rem; font-size: 1rem; }
.btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.btn-whatsapp:hover { background: #1ead50; border-color: #1ead50; }

/* ?? Forms ?????????????????????????????????????????????????????????????????? */
#page-login,
#page-register,
#page-set-caste {
    min-height: calc(100vh - var(--nav-h));
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201,162,39,.08) 0%, transparent 60%),
        var(--color-bg);
}
.form-container {
    max-width: 480px; margin: 3rem auto; padding: 0 1rem;
}
.form-container.wide { max-width: 760px; }
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.form-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-lt), var(--gold));
}
.form-card h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: .25rem;
}
.form-subtitle { color: var(--text-light); margin-bottom: 1.5rem; font-size: .95rem; }
.form-group { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
    font-size: .75rem; font-weight: 600; color: var(--text-light);
    text-transform: uppercase; letter-spacing: .06em;
}
.form-group input, .form-group select, .form-group textarea,
.form-input {
    padding: .7rem .95rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,.14);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input-password { position: relative; }
.input-password input { padding-right: 2.5rem; }
.input-password .btn-eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); }
.form-footer { text-align: center; margin-top: 1.5rem; font-size: .9rem; color: var(--text-light); }

/* Step Wizard */
.steps-indicator {
    display: flex; align-items: center; justify-content: center; gap: 0;
    margin-bottom: 2rem;
}
.step-dot {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--border); color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; transition: all .3s; cursor: default;
    border: 2px solid transparent;
}
.step-dot.active  {
    background: var(--primary); color: #fff;
    box-shadow: 0 0 0 3px rgba(201,162,39,.25);
}
.step-dot.done    { background: var(--success); color: #fff; }
.step-line { flex: 1; height: 3px; background: var(--border); max-width: 60px; transition: background .3s; border-radius: 2px; }
.step-line.done { background: var(--success); }
.step-progress { display: flex; align-items: center; margin-bottom: 1.5rem; }
.form-step { display: none; }
.form-step.active { display: block; }
.form-step h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}
.form-navigation {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 1.5rem; gap: .75rem;
}

/* ?? Alerts ????????????????????????????????????????????????????????????????? */
.alert { padding: .75rem 1rem; border-radius: 8px; font-size: .9rem; margin-bottom: 1rem; }
.alert-error   { background: #fdecea; color: #c0392b; border-left: 4px solid var(--danger); }
.alert-success { background: #eafaf1; color: #1e8449; border-left: 4px solid var(--success); }

/* ?? Search Layout ?????????????????????????????????????????????????????????? */
.search-layout { display: flex; gap: 0; min-height: calc(100vh - var(--nav-h)); }
.filter-panel {
    width: 280px; min-width: 280px;
    background: var(--bg-card); padding: 1.5rem;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.filter-header h3 { font-size: 1.1rem; font-weight: 700; }
.filter-group { margin-bottom: 1rem; }
.filter-group > label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; margin-bottom: .35rem; }
.filter-group select, .filter-group input[type="number"], .filter-group input[type="text"] { width: 100%; padding: .55rem .75rem; border: 1.5px solid var(--border); border-radius: 7px; background: var(--bg); }
.filter-check-label { display: flex !important; align-items: center; gap: .5rem; font-size: .84rem; font-weight: 400; color: var(--text); text-transform: none !important; margin-bottom: .3rem; cursor: pointer; }
.filter-check-label input[type="checkbox"] { width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; accent-color: var(--primary); }
.range-row { display: flex; align-items: center; gap: .5rem; }
.range-row input { width: 70px; }
.results-area { flex: 1; padding: 1.5rem; overflow-y: auto; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; color: var(--text-light); }
.filter-toggle { display: none; }

/* ?? Profile Cards ?????????????????????????????????????????????????????????? */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.profile-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden; cursor: pointer;
    transition: transform .22s, box-shadow .22s, border-color .22s;
    position: relative;
}
.profile-card::before { display: none; }
.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201,162,39,.28);
}
.profile-card.match-card .card-body { padding: 1.1rem 1.15rem 1.15rem; }
.card-header {
    padding: .75rem 1rem;
    display: flex; align-items: center; gap: .6rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%);
}
.card-header::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(201,162,39,.45), transparent);
    opacity: .85;
}
.card-header-bride,
.card-header-groom,
.card-header-neutral {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%);
}
.card-gender-icon { font-size: 1.5rem; line-height: 1; opacity: .9; }
.card-type-label {
    font-weight: 600; font-size: .82rem; flex: 1;
    color: var(--text-light);
    letter-spacing: .03em;
    text-transform: uppercase;
}
.card-code {
    font-size: .72rem; color: var(--maroon-dk);
    background: #fff;
    border: 1px solid var(--border);
    padding: .15rem .5rem; border-radius: var(--radius-pill);
    font-weight: 600; letter-spacing: .02em;
}
.card-body { padding: 1rem; background: #fff; }
.card-name {
    font-family: var(--font-body);
    font-size: 1.05rem; font-weight: 700;
    margin-bottom: .35rem; color: var(--text);
    letter-spacing: -.01em;
}
.card-meta {
    font-size: .8rem; color: var(--text-light);
    margin-bottom: .28rem; line-height: 1.45;
}
.card-created-by {
    margin-top: .4rem; font-size: .78rem; color: var(--text-light);
    border-top: 1px solid rgba(200,150,40,.18); padding-top: .35rem;
}
.card-time-ago { font-size: .75rem; color: var(--text-light); margin-top: .15rem; }
.role-badge { display: inline-block; font-size: .68rem; font-weight: 600; padding: .12rem .45rem; border-radius: var(--radius-pill); margin-left: .3rem; text-transform: uppercase; letter-spacing: .04em; border: 1px solid transparent; }
.role-admin        { background: #fff; color: #c62828; border-color: rgba(198,40,40,.2); }
.role-profileadmin { background: #fff; color: #1a56c4; border-color: rgba(26,86,196,.18); }
.role-user         { background: #fff; color: #2e7d32; border-color: rgba(46,125,50,.18); }
.card-actions { display: flex; gap: .5rem; margin-top: .85rem; flex-wrap: wrap; }

/* Admin-only action strip below the main action row */
.card-admin-actions {
    display: flex; gap: .4rem; margin-top: .4rem;
    padding-top: .4rem;
    border-top: 1px dashed rgba(200,150,40,.2);
}
.card-admin-btn {
    flex: 1; padding: .3rem .5rem; font-size: .74rem; font-weight: 600;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: #fff; color: var(--text-light);
    cursor: pointer; transition: all .15s; text-align: center;
}
.card-admin-btn:hover { background: var(--primary-lt); border-color: rgba(201,162,39,.3); color: var(--primary); }
.card-admin-btn-danger { border-color: rgba(192,87,63,.25); color: var(--danger); background: #fff; }
.card-admin-btn-danger:hover { background: #fdf5f3; border-color: var(--danger); }
.card-admin-btn-login-on {
    background: #2e7d32; border-color: #2e7d32; color: #fff;
}
.card-admin-btn-login-on:hover {
    background: #1b5e20; border-color: #1b5e20; color: #fff;
}

/* AI Match button — refined light luxury */
.btn-ai-match {
    width: 100%; padding: .62rem .85rem; font-size: .8rem; font-weight: 600;
    background: #fff;
    color: var(--maroon);
    border: 1.5px solid rgba(201,162,39,.45);
    border-radius: var(--radius-pill);
    cursor: pointer;
    letter-spacing: .02em;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
    box-shadow: var(--shadow-sm);
}
.btn-ai-match:hover {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(201,162,39,.22);
    transform: translateY(-1px);
    color: var(--maroon-dk);
}
.btn-ai-match:active { transform: translateY(0); }

/* ── AI Match Analysis Modal ────────────────────────────────────────────── */
.ai-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: radial-gradient(ellipse at 50% 0%, rgba(80,33,26,.55), rgba(20,8,4,.78));
    backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 1rem;
}
.ai-modal-box {
    position: relative;
    background: linear-gradient(165deg, #fffefb 0%, #fdf6e9 55%, #fbeed2 100%);
    border: 1px solid rgba(201,162,39,.3);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(50,20,10,.35), 0 0 0 1px rgba(255,255,255,.4) inset,
                0 0 60px rgba(201,162,39,.08);
    width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
    animation: aiModalIn .25s cubic-bezier(.2,.9,.3,1.1);
}
.ai-modal-box::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--maroon) 0%, var(--gold) 50%, var(--maroon) 100%);
    border-radius: 22px 22px 0 0;
}
.ai-modal-box::-webkit-scrollbar { width: 8px; }
.ai-modal-box::-webkit-scrollbar-thumb { background: rgba(201,162,39,.35); border-radius: 8px; }
.ai-modal-box::-webkit-scrollbar-track { background: transparent; }
@keyframes aiModalIn {
    from { opacity: 0; transform: translateY(22px) scale(.96); }
    to   { opacity: 1; transform: none; }
}
.ai-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 1.5rem 1.6rem .9rem;
    border-bottom: 1px solid rgba(201,162,39,.2);
}
.ai-modal-header h3 {
    margin: 0; font-family: var(--font-head); font-weight: 700;
    font-size: 1.3rem; color: var(--maroon-dk); letter-spacing: .01em;
}
.ai-modal-sub {
    font-size: .84rem; color: var(--text-light); margin: .3rem 0 0; font-weight: 500;
}
.ai-close-btn {
    background: #fff; border: 1px solid rgba(201,162,39,.35);
    color: var(--maroon); border-radius: 50%; width: 2.1rem; height: 2.1rem;
    font-size: .85rem; cursor: pointer; flex-shrink: 0; line-height: 1;
    box-shadow: 0 2px 8px rgba(80,33,26,.1); transition: all .15s;
}
.ai-close-btn:hover { background: var(--maroon); color: #fff; transform: rotate(90deg); }

/* Score rings row */
.ai-scores-row {
    display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap;
    padding: 1.4rem 1rem .6rem;
}
.ai-ring-wrap {
    text-align: center; padding: .6rem .5rem; border-radius: 14px;
    transition: transform .15s;
}
.ai-ring-wrap:hover { transform: translateY(-2px); }
.ai-ring-label { font-size: .82rem; font-weight: 700; color: var(--maroon-dk); margin-top: .4rem; font-family: var(--font-tamil); }
.ai-ring-sub   { font-size: .68rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .04em; }

/* Compatibility badge */
.ai-compat-badge {
    margin: .2rem 1.6rem 1rem;
    padding: .6rem 1.2rem; border-radius: 30px;
    font-weight: 700; font-size: .92rem; text-align: center;
    font-family: var(--font-tamil);
    box-shadow: 0 4px 16px rgba(80,33,26,.08);
}

/* Stars & Rasi row */
.ai-stars-row {
    display: flex; align-items: stretch; gap: .85rem;
    padding: .4rem 1.6rem; margin-bottom: .5rem;
}
.ai-star-box {
    flex: 1; background: #fff;
    border: 1px solid rgba(201,162,39,.28); border-radius: 14px;
    padding: .85rem .9rem; text-align: center;
    box-shadow: 0 6px 18px rgba(80,33,26,.06);
    position: relative; overflow: hidden;
}
.ai-star-box::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--maroon));
}
.ai-star-label {
    font-size: .7rem; color: var(--text-light); margin-bottom: .3rem;
    text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}
.ai-star-name  { font-weight: 700; font-size: .92rem; color: var(--maroon-dk); font-family: var(--font-head); }
.ai-star-tamil { font-size: .84rem; color: var(--gold-dk); font-family: var(--font-tamil); font-weight: 600; }
.ai-star-arrow { font-size: 1.3rem; flex-shrink: 0; display: flex; align-items: center; color: var(--gold); opacity: .7; }
.ai-value-unset { color: var(--text-light) !important; font-style: italic; font-weight: 500 !important; font-family: var(--font) !important; }

/* AI Insight box */
.ai-insight-box {
    margin: .5rem 1.6rem 1rem;
    background: linear-gradient(135deg, var(--maroon-dk) 0%, var(--maroon) 60%, #7c3318 100%);
    color: #fef3dc; border-radius: 14px; padding: 1.1rem 1.2rem;
    display: flex; gap: .85rem; align-items: flex-start; font-size: .86rem;
    line-height: 1.6; position: relative;
    box-shadow: 0 10px 30px rgba(80,33,26,.25);
    border-left: 3px solid var(--gold);
}
.ai-insight-icon {
    font-size: 1.3rem; flex-shrink: 0; line-height: 1;
    width: 2.2rem; height: 2.2rem; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); border-radius: 50%;
}

/* Three-pillar cards (Natchathiram & Rasi / Traditional / Other Properties) */
.ai-pillars-grid {
    display: flex; flex-direction: column; gap: .8rem;
    padding: .2rem 1.6rem 1.2rem;
}
.ai-pillar-card {
    background: #fff; border: 1px solid rgba(201,162,39,.22);
    border-radius: 14px; padding: .9rem 1.05rem;
    box-shadow: 0 6px 20px rgba(80,33,26,.05);
    transition: box-shadow .15s;
}
.ai-pillar-card:hover { box-shadow: 0 10px 28px rgba(80,33,26,.1); }
.ai-pillar-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ai-pillar-head h4 {
    margin: 0; font-size: .92rem; line-height: 1.4; color: var(--maroon-dk);
    font-family: var(--font-tamil); font-weight: 700;
}
.ai-pillar-head h4 small { font-weight: 500; color: var(--text-light); font-family: var(--font); font-size: .74rem; }
.ai-pillar-score {
    font-weight: 800; font-size: 1rem; padding: .15rem .65rem; border-radius: 20px;
    background: var(--primary-lt);
}
.ai-pillar-sub {
    font-size: .74rem; color: var(--gold-dk); margin: .35rem 0 .6rem; font-weight: 600;
    padding-bottom: .5rem; border-bottom: 1px dashed rgba(201,162,39,.25);
}
.ai-pillar-good, .ai-pillar-caution {
    list-style: none; padding: 0; margin: 0; font-size: .8rem; line-height: 1.8;
}
.ai-pillar-good li, .ai-pillar-caution li { padding-left: 1.3rem; position: relative; }
.ai-pillar-good li::before {
    content: '✓'; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 800;
}
.ai-pillar-caution li::before {
    content: '!'; position: absolute; left: .18rem; top: 0; color: var(--danger); font-weight: 800;
}
.ai-pillar-good { color: #205c3d; }
.ai-pillar-caution { color: #963e26; margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed rgba(150,62,38,.2); }

.ai-modal-footer {
    display: flex; gap: .6rem; padding: 1rem 1.6rem 1.4rem;
    border-top: 1px solid rgba(201,162,39,.18); flex-wrap: wrap;
}
.ai-modal-footer .btn { border-radius: 30px; font-weight: 600; }

/* Loading spinner */
.ai-modal-loading { padding: 3.5rem 2rem; text-align: center; color: var(--text-light); font-family: var(--font-tamil); }
.ai-spinner {
    width: 44px; height: 44px; margin: 0 auto 1.2rem;
    border: 4px solid rgba(201,162,39,.18);
    border-top-color: var(--maroon);
    border-right-color: var(--gold);
    border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ?? Matches Layout ????????????????????????????????????????????????????????? */
.matches-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.matches-grid   { flex: 1; min-width: 0; }

/* Match card extras */
.card-header-neutral { background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%); }
.match-score-pill {
    font-size: .72rem; font-weight: 700;
    background: #fff;
    color: var(--maroon);
    border: 1px solid rgba(201,162,39,.32);
    padding: .2rem .55rem;
    border-radius: var(--radius-pill);
    margin-left: auto;
    letter-spacing: .02em;
}
.match-star-row  { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; flex-wrap: wrap; }
.star-tag {
    font-size: .75rem;
    background: #fff;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: .15rem .55rem;
}

/* Star compatibility badges */
.star-compat-badge       { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 12px; white-space: nowrap; }
.star-badge-excellent    { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.star-badge-good         { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.star-badge-neutral      { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.star-badge-avoid        { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Star Guide Panel ───────────────────────────────────────────────── */
.star-guide-panel {
    width: 280px; min-width: 260px; max-width: 300px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem;
    position: sticky; top: 5rem;
    max-height: calc(100vh - 7rem); overflow-y: auto;
    border: 1px solid var(--border);
}
.star-guide-empty {
    text-align: center; padding: 1rem .25rem .25rem;
}
.star-guide-empty-icon {
    width: 2.6rem; height: 2.6rem; margin: 0 auto .7rem;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    color: var(--gold-dk);
    border: 1px solid rgba(201,162,39,.25);
    border-radius: 50%; font-size: 1.2rem;
}
.star-guide-title {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 700; color: var(--primary);
}
.star-guide-empty .star-guide-note {
    line-height: 1.55; margin-bottom: .9rem;
}
.star-guide-empty .btn { border-radius: var(--radius-pill); }
.star-guide-header { margin-bottom: .75rem; }
.star-guide-note   { font-size: .82rem; color: var(--text-light); }
.star-guide-profile { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-bottom: .85rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); font-size: .88rem; }
.star-tag-sm { font-size: .72rem; background: var(--primary-lt, #fce4ec); color: var(--primary); border-radius: 10px; padding: .1rem .4rem; }

.star-guide-section { margin-bottom: .85rem; }
.star-guide-section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.guide-excellent .star-guide-section-title { color: #2e7d32; }
.guide-good      .star-guide-section-title { color: #1565c0; }
.guide-neutral   .star-guide-section-title { color: #e65100; }
.guide-avoid     .star-guide-section-title { color: #c62828; }

.star-guide-item { display: flex; align-items: center; gap: .35rem; padding: .25rem 0; font-size: .82rem; border-bottom: 1px dotted var(--border); }
.sgi-name  { flex: 1; line-height: 1.3; }
.sgi-tamil { display: block; font-size: .75rem; color: var(--primary); font-weight: 500; }
.sgi-score { font-size: .72rem; font-weight: 700; color: var(--text-light); white-space: nowrap; }
.sgi-flag  { font-size: .65rem; background: #fdecea; color: #c62828; border-radius: 4px; padding: .05rem .3rem; font-weight: 600; white-space: nowrap; }
.sgs-tamil { font-weight: 400; font-size: .75rem; opacity: .75; margin-left: .3rem; }

.match-card .card-actions .btn-primary {
    background: #fff;
    color: var(--maroon);
    border: 1.5px solid rgba(201,162,39,.4);
    font-weight: 600;
    box-shadow: none;
}
.match-card .card-actions .btn-primary:hover {
    background: var(--gold);
    color: var(--maroon-dk);
    border-color: var(--gold);
}
.match-card .card-actions .btn-outline {
    background: #fff;
    border-color: var(--border);
    color: var(--text-light);
    font-weight: 600;
}
.match-card .card-actions .btn-outline:hover {
    background: var(--primary-lt);
    border-color: rgba(201,162,39,.3);
    color: var(--primary);
}

/* ?? Profile Detail ????????????????????????????????????????????????????????? */
.profile-detail-container { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.detail-header {
    display: flex; gap: 1.5rem; align-items: flex-start;
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.5rem; box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem; flex-wrap: wrap;
    border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.detail-header::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-lt), var(--gold));
}
.detail-photo { width: 200px; height: 200px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; background: var(--primary-lt); border: 1px solid var(--border); }
.detail-info { flex: 1; }
.detail-info h2 { font-family: var(--font-display); font-size: var(--text-3xl); color: var(--primary); margin-bottom: .25rem; }
.detail-code { color: var(--text-light); font-size: .9rem; margin-bottom: 1rem; }
.detail-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag { background: var(--primary-lt); color: var(--primary); padding: .3rem .75rem; border-radius: var(--radius-pill); font-size: .82rem; font-weight: 600; }
.detail-section {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.5rem; box-shadow: var(--shadow-sm);
    margin-bottom: 1rem; border: 1px solid var(--border);
}
.detail-section h3 {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 700;
    color: var(--primary); margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-lt); padding-bottom: .5rem;
}
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem 1.5rem; }
.detail-field label { font-size: .78rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; }
.detail-field span { font-size: .95rem; font-weight: 500; display: block; margin-top: .1rem; }
.photos-gallery { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; }
.gallery-img { width: 120px; height: 120px; border-radius: 8px; object-fit: cover; border: 2px solid var(--border); }

/* ?? Dashboard ?????????????????????????????????????????????????????????????? */
#page-dashboard,
#page-notifications,
#page-create-profile,
#page-profile-detail {
    background: var(--color-bg);
    min-height: calc(100vh - var(--nav-h));
}
.dashboard-container { max-width: var(--max-w); margin: 2rem auto; padding: 0 1.5rem; }
.dashboard-container h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
#adminStats .stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    transition: transform .2s, box-shadow .2s;
}
#adminStats .stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
#adminStats .stat-card h3 { font-family: var(--font-display); font-size: 2rem; color: var(--primary); }
#adminStats .stat-card p  { font-size: .85rem; color: var(--text-light); }

/* Tabs */
.tabs {
    display: flex; gap: .35rem;
    margin-bottom: 1.5rem; overflow-x: auto;
    padding: .35rem;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.tab {
    background: transparent; border: none;
    padding: .65rem 1.15rem;
    cursor: pointer; font-size: .86rem; font-weight: 600;
    color: var(--text-light); border-radius: var(--radius-pill);
    white-space: nowrap; transition: all .2s;
    font-family: var(--font-body);
}
.tab.active {
    background: var(--primary-lt);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(201,162,39,.18);
}
.tab:hover:not(.active) { color: var(--primary); background: rgba(251,243,236,.5); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-toolbar {
    margin-bottom: 1.15rem;
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
/* Fix dropdown styles in Matches toolbar */
.tab-toolbar select {
    padding: .6rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg); color: var(--text);
    font-size: .92rem; font-family: var(--font);
    min-width: 220px; max-width: 340px;
    cursor: pointer; transition: border-color .2s, box-shadow .2s;
    appearance: auto;
}
.tab-toolbar select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,.14);
}
.tab-toolbar select:hover { border-color: var(--primary); }

/* Profile Login credentials table */
.pl-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border, #e8e0d0);
    border-radius: 10px;
    background: #fff;
}
.pl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.pl-table th,
.pl-table td {
    padding: .75rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border, #eee);
}
.pl-table th {
    background: #faf7f2;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-light);
    font-weight: 600;
}
.pl-table tr:last-child td { border-bottom: none; }
.pl-meta {
    display: block;
    margin-top: .2rem;
    font-size: .8rem;
    color: var(--text-light);
    font-weight: 400;
}
.pl-pwd {
    font-family: ui-monospace, Consolas, monospace;
    background: #fff8e1;
    padding: .15rem .45rem;
    border-radius: 4px;
    font-size: .95rem;
}
.pl-pwd-missing {
    font-size: .85rem;
    color: var(--text-light);
    font-style: italic;
}
.pl-actions {
    white-space: nowrap;
}
.pl-actions .btn {
    margin: .15rem .15rem .15rem 0;
}

@media (max-width: 720px) {
    .pl-table thead { display: none; }
    .pl-table tr {
        display: block;
        padding: .85rem 1rem;
        border-bottom: 1px solid var(--border, #eee);
    }
    .pl-table td {
        display: block;
        padding: .25rem 0;
        border: none;
    }
    .pl-actions { white-space: normal; }
}

/* Interests List */
.interests-list { display: flex; flex-direction: column; gap: .75rem; }
.interest-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    border: 1px solid var(--border);
    transition: box-shadow .2s;
}
.interest-item:hover { box-shadow: var(--shadow-md); }
.interest-name { font-weight: 700; flex: 1; }
.interest-date { font-size: .82rem; color: var(--text-light); }
.interest-status {
    padding: .2rem .7rem; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 700;
}
.status-pending  { background: #fef3dc; color: #a04000; }
.status-accepted { background: #e8f5e9; color: #2e7d32; }
.status-declined { background: #ffebee; color: #c62828; }

/* Notifications */
.container { max-width: 800px; margin: 2rem auto; padding: 0 1.5rem; }
.notif-list { display: flex; flex-direction: column; gap: .6rem; }
.notif-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex; gap: 1rem; align-items: flex-start; cursor: pointer;
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    transition: opacity .2s, box-shadow .2s;
}
.notif-item:hover { box-shadow: var(--shadow-md); }
.notif-item.read { border-left-color: var(--border); opacity: .75; }
.notif-content { flex: 1; }
.notif-title { font-weight: 700; margin-bottom: .25rem; }
.notif-msg { font-size: .9rem; color: var(--text-light); }
.notif-time { font-size: .78rem; color: var(--text-light); white-space: nowrap; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; flex-wrap: wrap; }
.page-btn {
    padding: .5rem .9rem; border-radius: 7px; border: 1.5px solid var(--border);
    background: var(--bg-card); cursor: pointer; font-size: .88rem;
    transition: all .2s;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Toast */
.toast {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    background: var(--bg-card); color: var(--text);
    padding: .85rem 1.5rem; border-radius: var(--radius-md);
    font-size: .92rem; z-index: 9999; opacity: 0; pointer-events: none;
    transition: opacity .3s, transform .3s; max-width: 90vw; text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }

/* Loading overlay */
.loading-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(252, 250, 247, .75);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Audit trail strip on profile detail */
.audit-trail {
    font-size: .8rem;
    color: var(--text-light);
    background: var(--primary-lt);
    border-left: 3px solid var(--primary);
    padding: .45rem .85rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1rem;
}
.audit-trail strong { color: var(--text); }

/* Admin User Table */
.data-table {
    width: 100%; border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.data-table th {
    background: var(--primary);
    color: #fff;
    padding: .85rem 1rem;
    text-align: left;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--primary-lt); }

/* Leads toolbar status badge */
.status-pending  { background: #fef3dc; color: #a04000; }

/* ?? Modals ????????????????????????????????????????????????????????????????? */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(58, 30, 20, .45);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(6px);
}
.modal-overlay.is-open {
    display: flex !important;
    z-index: 10000 !important;
}
.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 540px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: modalIn .2s ease;
    border: 1px solid var(--border);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--primary-lt);
}
.modal-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary-dk);
}
.modal-close {
    background: none; border: none; font-size: 1.5rem; line-height: 1;
    cursor: pointer; color: var(--text-light); padding: 0 .25rem;
    transition: color .2s;
}
.modal-close:hover { color: var(--danger); }
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0; /* allow scroll inside max-height flex modal (Plan field was clipping) */
}
.modal-footer {
    display: flex; justify-content: flex-end; gap: .75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--primary-lt);
    flex-shrink: 0;
}

.edit-profile-modal {
    overflow: hidden;
}
.edit-profile-modal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

/* ?? Upload Panels ?????????????????????????????????????????????????????????? */
.upload-tabs {
    display: flex; gap: .35rem; flex-wrap: wrap;
    border-bottom: 2px solid var(--border); margin-bottom: 1.25rem;
}
.upload-tab {
    background: none; border: none; padding: .6rem 1.1rem;
    cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--text-light);
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: all .2s; border-radius: 6px 6px 0 0;
}
.upload-tab:hover  { color: var(--primary); }
.upload-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-lt); }

.upload-zone-label { display: block; cursor: pointer; }
.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 2rem 1rem; text-align: center;
    background: var(--bg); transition: border-color .2s, background .2s;
    margin-bottom: .75rem;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-lt); }
.upload-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.upload-zone p     { font-weight: 600; color: var(--text); margin-bottom: .25rem; }
.upload-zone small { color: var(--text-light); font-size: .82rem; }

.upload-check {
    display: flex; align-items: center; gap: .5rem;
    font-size: .9rem; color: var(--text-light); margin-bottom: .75rem; cursor: pointer;
}
.upload-check input { width: auto; cursor: pointer; }

.upload-panel { padding-top: .25rem; }

/* File list */
.file-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.no-files  { font-size: .88rem; color: var(--text-light); padding: .5rem 0; }

.file-item {
    display: flex; align-items: center; gap: .9rem;
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: 8px; padding: .6rem .9rem;
    transition: border-color .2s;
}
.file-item:hover { border-color: var(--primary); }
.file-thumb {
    width: 52px; height: 52px; border-radius: 6px;
    object-fit: cover; flex-shrink: 0; border: 1px solid var(--border);
}
.file-icon { font-size: 2rem; flex-shrink: 0; }
.file-info { flex: 1; overflow: hidden; }
.file-name {
    display: block; font-weight: 600; font-size: .88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-meta { display: block; font-size: .78rem; color: var(--text-light); margin-top: .15rem; }
.file-tag {
    display: inline-block; background: var(--primary-lt); color: var(--primary);
    border-radius: 20px; padding: .1rem .5rem; font-size: .75rem; font-weight: 600;
}

/* Leads / contact request cards */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: .75rem;
}

.container h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* Form navigation row */
.form-navigation,
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: .75rem;
}

/* ?? Responsive ????????????????????????????????????????????????????????????? */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        display: none; flex-direction: column; position: absolute;
        top: var(--nav-h); left: 0; right: 0;
        background: var(--primary); padding: 1rem; gap: .5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,.2);
    }
    .nav-links.open { display: flex; }

    .hero { padding: 4rem 1.5rem 3.5rem; min-height: auto; }
    .hero-inner { flex-direction: column; text-align: center; gap: 2.5rem; }
    .hero-content { max-width: 100%; }
    .hero-eyebrow { margin-bottom: 1.2rem; }
    .hero h1 { font-size: 2rem; }
    .hero-body { font-size: .95rem; margin-bottom: 2rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-stats { justify-content: center; }
    .hero-full-logo { width: 260px; }
    .hero-art { width: 300px; }
    .art-orbit { width: 270px; height: 270px; }
    .figure-bride, .figure-groom { height: 175px; }
    .brand-name-sub { display: none; }
    .stat-item { padding: 1.25rem 1.75rem; }
    .stat-icon { font-size: 1.6rem; }

    .filter-panel { display: none; position: fixed; top: var(--nav-h); left: 0; bottom: 0; z-index: 900; overflow-y: auto; width: 85%; max-width: 320px; transform: translateX(-100%); transition: transform .3s; }
    .filter-panel.open { display: block; transform: translateX(0); }
    .filter-toggle { display: flex; }
    .results-area { padding: 1rem; }

    .form-row { grid-template-columns: 1fr; }
    .detail-header { flex-direction: column; }
    .detail-photo { width: 100%; height: 220px; }
    .form-navigation { flex-wrap: wrap; }

    .tabs { gap: 0; }
    .tab { padding: .6rem .85rem; font-size: .82rem; }
}

@media (max-width: 480px) {
    .form-card { padding: 1.5rem 1rem; }
    .profile-grid { grid-template-columns: 1fr; }
    .stats-bar { gap: 1.5rem; }
    .stat-num { font-size: 1.8rem; }
}
