/* =====================================================================
   Matrimony — shared design system (admin + member UIs)
   Reusable component classes used by both admin and member-facing screens:
     .admin-card            card surface (white, rounded, subtle border)
     .stat-card             dashboard metric tile (label / value / icon)
     .admin-table           clean table: light header, row hover
     .badge-pill            status pill base; modifiers:
                              .is-success .is-warning .is-danger .is-neutral
     .btn-admin / .btn-admin-soft   primary + secondary buttons
     .empty-state           centered icon + muted message for empty lists
     .page-header           title + optional actions row at top of content
     .quick-action          quick-action anchor tile (no underline, block layout)
     .quick-action-label    tile primary label (semibold, token colour)
     .quick-action-sub      tile secondary line (smaller, muted colour)
   Form controls: use Bootstrap .form-control / .form-select / .form-label
   (restyled below for the shared focus ring + spacing).
   ===================================================================== */

:root {
    --ad-bg:        #f1f5f9;   /* slate-100 canvas             */
    --ad-surface:   #ffffff;   /* card surface                */
    --ad-sidebar:   #0f172a;   /* slate-900 sidebar           */
    --ad-sidebar-2: #1e293b;   /* slate-800 hover/active fill */
    --ad-border:    #e2e8f0;   /* slate-200 borders           */
    --ad-text:      #0f172a;   /* slate-900 primary text      */
    --ad-muted:     #64748b;   /* slate-500 muted text        */
    --ad-faint:     #94a3b8;   /* slate-400 faint text        */
    --ad-primary:   #4f46e5;   /* indigo-600 accent (admin-overridable)   */
    --ad-primary-d: #4338ca;   /* indigo-700 hover                        */
    --ad-primary-l: #eef2ff;   /* indigo-50 soft fill                     */
    --ad-primary-2: #7c3aed;   /* gradient end (violet); brand-overridable */
    --ad-success:   #16a34a;
    --ad-success-l: #dcfce7;
    --ad-warning:   #d97706;
    --ad-warning-l: #fef3c7;
    --ad-danger:    #dc2626;
    --ad-danger-l:  #fee2e2;
    --ad-purple:    #9333ea;
    --ad-purple-l:  #fdf4ff;
    --ad-radius:    12px;
    --ad-radius-sm: 8px;
    --ad-shadow:    0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --ad-shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
    --ad-sidebar-w: 244px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--ad-bg);
    color: var(--ad-text);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* ---- Sidebar -------------------------------------------------------- */
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ad-sidebar-w);
    background: var(--ad-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1045;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.35rem 1.4rem;
    color: #fff;
    text-decoration: none;
}
.admin-brand .brand-mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--ad-primary), var(--ad-primary-2));
    color: #fff; font-size: 1.05rem;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ad-primary) 45%, transparent);
}
.admin-brand .brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.admin-brand .brand-tag {
    font-size: .62rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ad-faint);
    border: 1px solid #334155; border-radius: 5px;
    padding: .08rem .35rem; margin-left: .15rem;
}
.admin-nav {
    padding: .5rem .65rem 1rem;
    overflow-y: auto;
    flex: 1;
}
.admin-nav .nav-section {
    font-size: .66rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: #475569;
    padding: .9rem .85rem .4rem;
}
.admin-nav a {
    position: relative;
    display: flex; align-items: center; gap: .7rem;
    padding: .58rem .85rem;
    margin: .12rem 0;
    border-radius: var(--ad-radius-sm);
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.admin-nav a i { font-size: 1.05rem; width: 1.1rem; text-align: center; color: #94a3b8; transition: color .15s ease; }
.admin-nav a:hover { background: var(--ad-sidebar-2); color: #fff; }
.admin-nav a:hover i { color: #cbd5e1; }
.admin-nav a.active {
    background: var(--ad-sidebar-2);
    color: #fff;
}
.admin-nav a.active i { color: #a5b4fc; }
.admin-nav a.active::before {
    content: "";
    position: absolute; left: -.65rem; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 1.35rem;
    border-radius: 0 3px 3px 0;
    background: var(--ad-primary);
}

/* ---- Shell / layout ------------------------------------------------- */
.admin-shell { margin-left: var(--ad-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
    position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; gap: 1rem;
    padding: .85rem 1.6rem;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--ad-border);
}
.admin-topbar .topbar-context { font-weight: 600; font-size: .95rem; color: var(--ad-text); }
.admin-topbar .topbar-crumb { color: var(--ad-faint); font-size: .8rem; }
.topbar-user { display: flex; align-items: center; gap: .55rem; color: var(--ad-muted); font-size: .85rem; }
.topbar-user .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--ad-primary-l); color: var(--ad-primary);
    display: grid; place-items: center; font-weight: 700; font-size: .8rem;
}
.sidebar-toggle {
    display: none; border: 1px solid var(--ad-border);
    background: #fff; border-radius: var(--ad-radius-sm);
    width: 38px; height: 38px; color: var(--ad-text);
}
.admin-content { padding: 1.8rem 1.6rem 2.5rem; flex: 1; }
.admin-container { max-width: 1180px; margin: 0 auto; width: 100%; }

/* ---- Page header ---------------------------------------------------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-header .page-subtitle { color: var(--ad-muted); margin: .25rem 0 0; font-size: .9rem; }

/* ---- Cards ---------------------------------------------------------- */
.admin-card {
    background: var(--ad-surface);
    border: 1px solid var(--ad-border);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
}
.admin-card .card-body { padding: 1.4rem 1.5rem; }
.admin-card-title { font-size: .95rem; font-weight: 600; margin: 0 0 1rem; }

/* ---- Stat card (dashboard metrics — populated in a later task) ------ */
.stat-card {
    background: var(--ad-surface);
    border: 1px solid var(--ad-border);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
    padding: 1.25rem 1.35rem;
    display: flex; align-items: flex-start; justify-content: space-between;
    transition: box-shadow .18s ease, transform .18s ease;
}
.stat-card:hover { box-shadow: var(--ad-shadow-md); transform: translateY(-1px); }
.stat-card .stat-label { color: var(--ad-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; margin-top: .25rem; line-height: 1.1; }
.stat-card .stat-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: grid; place-items: center; font-size: 1.2rem;
    background: var(--ad-primary-l); color: var(--ad-primary);
    flex-shrink: 0;
}

/* ---- Tables (users / plans / audit lists) --------------------------- */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; }
.admin-table thead th {
    background: #f8fafc; color: var(--ad-muted);
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
    text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--ad-border);
}
.admin-table tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--ad-border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background .12s ease; }
.admin-table tbody tr:hover { background: #f8fafc; }

/* ---- Status badges / pills ------------------------------------------ */
.badge-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .73rem; font-weight: 600; line-height: 1.4;
}
.badge-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pill.is-success { background: var(--ad-success-l); color: var(--ad-success); }
.badge-pill.is-warning { background: var(--ad-warning-l); color: var(--ad-warning); }
.badge-pill.is-danger  { background: var(--ad-danger-l);  color: var(--ad-danger); }
.badge-pill.is-neutral { background: #e2e8f0; color: #475569; }

/* ---- Buttons -------------------------------------------------------- */
.btn-admin {
    background: var(--ad-primary); color: #fff; border: 1px solid var(--ad-primary);
    border-radius: var(--ad-radius-sm); padding: .5rem .95rem; font-weight: 600; font-size: .85rem;
    display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.btn-admin:hover, .btn-admin:focus { background: var(--ad-primary-d); border-color: var(--ad-primary-d); color: #fff; text-decoration: none; }
.btn-admin-soft {
    background: #fff; color: var(--ad-text); border: 1px solid var(--ad-border);
    border-radius: var(--ad-radius-sm); padding: .5rem .95rem; font-weight: 600; font-size: .85rem;
    display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.btn-admin-soft:hover, .btn-admin-soft:focus { background: #f8fafc; border-color: #cbd5e1; color: var(--ad-text); text-decoration: none; }

/* No underline on any button-styled link, project-wide */
a.btn-admin, a.btn-admin-soft, .btn-admin span, .btn-admin-soft span,
.btn-admin strong, .btn-admin-soft strong { text-decoration: none; }

/* ---- Form controls -------------------------------------------------- */
.form-label { font-weight: 600; font-size: .82rem; color: var(--ad-text); margin-bottom: .3rem; }
.form-control, .form-select {
    border-color: var(--ad-border); border-radius: var(--ad-radius-sm);
    font-size: .88rem; padding: .5rem .7rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ad-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ad-primary) 15%, transparent);
}

/* ---- Empty state (queue / list pages with no rows) ------------------ */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--ad-muted); }
.empty-state .empty-icon {
    width: 56px; height: 56px; margin: 0 auto 1rem;
    display: grid; place-items: center; border-radius: 14px;
    background: var(--ad-primary-l); color: var(--ad-primary); font-size: 1.6rem;
}
.empty-state h3 { font-size: 1.05rem; font-weight: 600; color: var(--ad-text); margin: 0 0 .35rem; }
.empty-state p { margin: 0; font-size: .88rem; }

/* ---- Alerts (flash messages — later tasks rely on these) ------------ */
.admin-alert {
    border-radius: var(--ad-radius-sm); border: 1px solid transparent;
    padding: .75rem 1rem; font-size: .88rem; font-weight: 500;
    display: flex; align-items: center; gap: .55rem; margin-bottom: 1.2rem;
}
.admin-alert.is-success { background: var(--ad-success-l); color: #15803d; border-color: #bbf7d0; }
.admin-alert.is-danger  { background: var(--ad-danger-l);  color: #b91c1c; border-color: #fecaca; }
.admin-alert.is-warning { background: var(--ad-warning-l); color: #b45309; border-color: #fde68a; }
.admin-alert.is-info    { background: var(--ad-primary-l, #eef2ff); color: #3730a3; border-color: #c7d2fe; }

/* ---- Responsive: collapse sidebar into an offcanvas ----------------- */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--ad-shadow-md); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-shell { margin-left: 0; }
    .sidebar-toggle { display: grid; place-items: center; }
    .sidebar-backdrop {
        display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 1040;
    }
    .sidebar-backdrop.open { display: block; }
}

/* =====================================================================
   Member layout — top-navbar shell
   Used by resources/views/layouts/app.blade.php
   ===================================================================== */

/* Body + page canvas */
.member-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top navbar */
.member-nav {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--ad-border);
    padding: .6rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--ad-shadow);
}
.member-nav-container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Brand */
.member-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: var(--ad-text);
    padding: 0;
}
.member-brand:hover { color: var(--ad-text); }
.member-brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ad-primary), var(--ad-primary-2));
    color: #fff;
    font-size: .9rem;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--ad-primary) 40%, transparent);
    flex-shrink: 0;
}
.member-brand-name {
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: -.01em;
    color: var(--ad-text);
}

/* Hamburger toggler */
.member-toggler {
    border: 1px solid var(--ad-border);
    background: #fff;
    border-radius: var(--ad-radius-sm);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--ad-text);
    font-size: 1.2rem;
    padding: 0;
    box-shadow: none;
}
.member-toggler:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ad-primary) 15%, transparent); outline: none; }

/* Nav links */
.member-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 500;
    font-size: .85rem;
    color: var(--ad-muted);
    padding: .42rem .7rem;
    border-radius: var(--ad-radius-sm);
    transition: color .15s ease, background .15s ease;
    text-decoration: none;
}
.member-nav-link i { font-size: 1rem; }
.member-nav-link:hover {
    color: var(--ad-primary);
    background: var(--ad-primary-l);
}
.member-nav-link.active {
    color: var(--ad-primary);
    background: var(--ad-primary-l);
    font-weight: 600;
}

/* Admin link — distinct indigo filled pill */
.member-admin-link {
    color: var(--ad-primary);
    border: 1px solid var(--ad-primary);
    border-radius: 999px;
    padding: .3rem .75rem;
}
.member-admin-link:hover {
    background: var(--ad-primary);
    color: #fff;
}

/* Logout button */
.member-logout-btn {
    font-size: .82rem;
    padding: .38rem .8rem;
}

/* Main content */
.member-main {
    flex: 1;
    padding: 2rem 0 3rem;
}
.member-container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Footer */
.member-footer {
    background: var(--ad-surface);
    border-top: 1px solid var(--ad-border);
    padding: .85rem 0;
    font-size: .8rem;
    color: var(--ad-faint);
    text-align: center;
}

/* Responsive: stack nav items at small viewports */
@media (max-width: 991.98px) {
    .member-nav .navbar-collapse {
        border-top: 1px solid var(--ad-border);
        margin-top: .5rem;
        padding-top: .5rem;
    }
    .member-nav-link {
        padding: .55rem .85rem;
    }
}

/* =====================================================================
   Pricing cards (plans/index)
   ===================================================================== */

/* Large rupee price figure inside a pricing card */
.plan-price {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--ad-text);
    line-height: 1.1;
}
.plan-price-currency {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: super;
    color: var(--ad-muted);
}
.plan-duration {
    font-size: .8rem;
    color: var(--ad-muted);
    font-weight: 500;
}

/* Feature row inside a plan card */
.plan-feature {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: var(--ad-muted);
    margin-bottom: .3rem;
}
.plan-feature i { color: var(--ad-success); font-size: .9rem; }

/* Current-plan card accent — indigo left border + soft background tint */
.plan-card-current {
    border-color: var(--ad-primary);
    border-left-width: 3px;
    background: var(--ad-primary-l);
}

/* =====================================================================
   Photo gallery — thumbnail wrapper (fixed 4:3 aspect, object-fit cover)
   Used by resources/views/photo/index.blade.php
   ===================================================================== */
.photo-thumb-wrap {
    aspect-ratio: 4 / 3;
    border-radius: var(--ad-radius-sm);
    overflow: hidden;
    background: var(--ad-bg);
}
.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Danger-tinted soft button (delete actions) */
.btn-danger-soft {
    color: var(--ad-danger);
    border-color: var(--ad-danger-l);
}
.btn-danger-soft:hover {
    background: var(--ad-danger-l);
    border-color: #fca5a5;
    color: var(--ad-danger);
}

/* =====================================================================
   Profile detail view — label/value pairs inside .admin-card sections
   ===================================================================== */
.profile-detail-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ad-muted);
    margin-bottom: .2rem;
}
.profile-detail-value {
    font-size: .9rem;
    font-weight: 500;
    color: var(--ad-text);
}

/* =====================================================================
   Shared utility classes — extracted from repeated inline styles
   ===================================================================== */

/* Uppercase muted label used in detail rows (members/show, profile/show) */
.detail-label {
    color: var(--ad-muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .6rem 0;
}

/* Body value text next to detail labels */
.detail-value {
    font-weight: 500;
    padding: .6rem 0;
}

/* Free-text "About" block — preserves newlines */
.about-text {
    white-space: pre-line;
    color: var(--ad-text);
    margin: 0;
    line-height: 1.6;
}

/* Inline form validation hint (smaller than Bootstrap's .invalid-feedback) */
.form-error {
    font-size: .82rem;
    color: var(--ad-danger);
    margin-top: .25rem;
}

/* Card-top media thumbnail — fixed height, object-fit cover */
.media-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--ad-radius) var(--ad-radius) 0 0;
    display: block;
}

/* Placeholder shown when no photo is available */
.media-thumb-placeholder {
    width: 100%;
    height: 180px;
    border-radius: var(--ad-radius) var(--ad-radius) 0 0;
    background: var(--ad-primary-l);
    display: grid;
    place-items: center;
    color: var(--ad-primary);
    font-size: 3rem;
}

/* Member photo thumbnails inside a detail card */
.member-photo-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--ad-radius-sm);
    display: block;
}

/* ---- Section heading (interests page sub-sections) ------------------ */
.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ad-text);
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .85rem;
}
.section-heading i { color: var(--ad-primary); }

/* ---- Interest avatar (person icon circle in interest rows) ----------- */
.interest-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ad-primary-l);
    color: var(--ad-primary);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* ---- Quick-action tiles (home dashboard) ----------------------------- */
.quick-action {
    text-decoration: none;
    display: block;
    text-align: center;
    padding: 1rem;
    border-radius: var(--ad-radius-sm);
}
.quick-action:hover { text-decoration: none; }

/* Icon chip inside a quick-action tile (the .stat-card sizing rule doesn't reach here). */
.quick-action .stat-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: grid; place-items: center; font-size: 1.2rem;
    background: var(--ad-primary-l); color: var(--ad-primary);
}

.quick-action-label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--ad-text);
}

.quick-action-sub {
    font-size: .78rem;
    color: var(--ad-muted);
}

/* =====================================================================
   Chat thread + conversation list
   ===================================================================== */

/* Scrollable bubble container */
.chat-thread {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 1.25rem;
    max-height: 420px;
    overflow-y: auto;
    background: var(--ad-bg);
    border-radius: var(--ad-radius-sm);
    border: 1px solid var(--ad-border);
    scroll-behavior: smooth;
}

/* Bubble base */
.chat-bubble {
    max-width: 72%;
    padding: .55rem .85rem;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}

/* My messages — right-aligned, indigo fill */
.chat-bubble.mine {
    align-self: flex-end;
    background: var(--ad-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Their messages — left-aligned, surface fill */
.chat-bubble.theirs {
    align-self: flex-start;
    background: var(--ad-surface);
    color: var(--ad-text);
    border: 1px solid var(--ad-border);
    border-bottom-left-radius: 4px;
}

/* Timestamp beneath bubble */
.chat-time {
    display: block;
    font-size: .7rem;
    margin-top: .2rem;
    color: var(--ad-faint);
    text-align: right;
}
.chat-bubble.theirs .chat-time {
    text-align: left;
}

/* Conversation list item row */
.chat-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: background .12s ease;
    border-radius: var(--ad-radius);
}
.chat-row:hover {
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}
.chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--ad-border);
    background: var(--ad-primary-l);
    display: grid;
    place-items: center;
    color: var(--ad-primary);
    font-size: 1.4rem;
    overflow: hidden;
}
.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.chat-row-meta {
    flex: 1;
    min-width: 0;
}
.chat-row-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--ad-text);
    margin: 0 0 .1rem;
}
.chat-row-preview {
    font-size: .82rem;
    color: var(--ad-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Chat show — header / send / nudge token classes */
.chat-header-icon { font-size: 1.2rem; color: var(--ad-primary); }
.chat-header-name { font-size: 1.05rem; }
.chat-send-btn    { align-self: flex-end; }
.chat-nudge-text  { color: var(--ad-muted); font-size: .9rem; margin: 0; }

/* Birth-chart partial — house grid */
.chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 420px; }
.chart-house { border: 1px solid var(--ad-border, #e5e7eb); border-radius: 6px; min-height: 56px; padding: 4px; font-size: .72rem; }
.chart-house-no { color: var(--ad-muted, #94a3b8); font-weight: 600; }
.chart-graha { display: inline-block; margin: 1px 2px; padding: 0 4px; background: #eef2ff; border-radius: 4px; }

/* ==========================================================================
   Member premium layer — scoped to .member-body so the admin panel is
   untouched. Lifts the logged-in app toward the marketing surface:
   gradient pill CTAs, softer/larger cards with hover lift, refined headers.
   ========================================================================== */
.member-body { background: #fbfcfe; }

.member-body .member-nav-container,
.member-body .member-container { max-width: 1080px; }

/* Brand mark a touch larger/rounder to match the marketing header */
.member-body .member-brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 1rem; }

/* Primary CTA -> gradient pill (member pages only) */
.member-body .btn-admin {
    background: linear-gradient(135deg, var(--ad-primary) 0%, var(--ad-primary-2) 100%);
    border-color: transparent;
    border-radius: 999px;
    padding: .58rem 1.15rem;
    box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--ad-primary) 60%, transparent);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.member-body .btn-admin:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px color-mix(in srgb, var(--ad-primary) 70%, transparent); filter: saturate(1.05); color: #fff; }
.member-body .btn-admin-soft {
    border-radius: 999px;
    padding: .55rem 1.1rem;
    border-color: #d6dae6;
    transition: transform .18s ease, border-color .18s ease, color .18s ease;
}
.member-body .btn-admin-soft:hover { transform: translateY(-1px); border-color: var(--ad-primary); color: var(--ad-primary-d); }

/* Compact action buttons inside match cards (denser 4-up grid) */
.member-body .match-actions .btn-admin,
.member-body .match-actions .btn-admin-soft {
    padding: .34rem .6rem;
    font-size: .8rem;
    box-shadow: none;
}
.member-body .match-actions .btn-admin i,
.member-body .match-actions .btn-admin-soft i { font-size: .85rem; }

/* Compatibility action: solid green with white text (any browse card) */
.member-body .btn-compat,
.member-body .btn-compat:visited {
    background: var(--ad-success, #16a34a);
    border-color: var(--ad-success, #16a34a);
    color: #fff;
}
.member-body .btn-compat i,
.member-body .btn-compat span,
.member-body .btn-compat strong { color: #fff; }
.member-body .btn-compat:hover,
.member-body .btn-compat:focus {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

/* Cards -> larger radius, softer shadow, subtle hover lift */
.member-body .admin-card {
    border-radius: 18px;
    border-color: #eceef4;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 30px -18px rgba(15, 23, 42, .18);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.member-body a.admin-card:hover,
.member-body .admin-card.is-hoverable:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--ad-primary) 28%, transparent); border-color: #ddd9f6; }

/* Page header — bigger, tighter heading to feel premium */
.member-body .page-header h1 { font-size: 1.7rem; letter-spacing: -.03em; }
.member-body .page-subtitle { font-size: .95rem; }

/* Pills a hair rounder */
.member-body .badge-pill { border-radius: 999px; }

/* Brand-gradient accent helper for member headings */
.member-body .text-grad {
    background: linear-gradient(135deg, var(--ad-primary), var(--ad-primary-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ----- Member detail hero + profile components (scoped) ----------------- */
.member-body .member-hero { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 720px) { .member-body .member-hero { grid-template-columns: 220px 1fr; } }
.member-body .member-hero-photo { width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; object-fit: cover; border: 1px solid #eceef4; box-shadow: 0 12px 30px -18px rgba(15, 23, 42, .25); }
.member-body .member-hero-photo-ph { display: grid; place-items: center; font-size: 3.4rem; color: var(--ad-primary); background: linear-gradient(135deg, #eef2ff, #faf5ff); }
.member-body .member-hero-name { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.member-body .member-hero-sub { color: var(--ad-muted); margin: .15rem 0 0; }
.member-body .member-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0; }
.member-body .member-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--ad-muted); font-size: .92rem; margin-bottom: .25rem; }
.member-body .member-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.member-body .member-meta i { color: var(--ad-primary); }
.member-body .member-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }

.member-body .detail-grid { margin: 0; }
.member-body .dl-row { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-bottom: 1px solid #eef0f5; }
.member-body .dl-row:last-child { border-bottom: 0; padding-bottom: 0; }
.member-body .dl-row dt { color: var(--ad-muted); font-size: .9rem; margin: 0; }
.member-body .dl-row dd { font-weight: 600; margin: 0; text-align: right; color: var(--ad-text); }

.member-body .photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.member-body .photo-tile { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; border: 1px solid #eceef4; transition: transform .2s ease, box-shadow .2s ease; cursor: zoom-in; }
.member-body .photo-tile:hover { transform: scale(1.03); box-shadow: var(--ad-shadow-md); }

/* Match card photo overlay (matches grid) */
.member-body .match-photo-wrap { position: relative; }
.member-body .match-photo-chip {
    position: absolute; top: .6rem; right: .6rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    border-radius: 999px; padding: .25rem .6rem;
    font-size: .78rem; font-weight: 700; color: var(--ad-primary-d);
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .25);
    display: inline-flex; align-items: center; gap: .3rem;
}
.member-body .match-photo-chip i { color: var(--ad-primary); }
.member-body .media-thumb { border-radius: 16px 16px 0 0; }

/* ----- Compatibility (scoped) ------------------------------------------ */
.member-body .compat-hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.member-body .compat-ring { width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: conic-gradient(var(--ad-primary) calc(var(--pct, 0) * 1%), #e9e7fb 0); }
.member-body .compat-ring-inner { width: 94px; height: 94px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.member-body .compat-ring-num { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.member-body .compat-ring-max { font-size: .72rem; color: var(--ad-muted); margin-top: .1rem; }
.member-body .koota-row { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid #eef0f5; }
.member-body .koota-row:last-child { border-bottom: 0; padding-bottom: 0; }
.member-body .koota-label { font-weight: 500; }
.member-body .koota-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.member-body .koota-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: #eef0f5; overflow: hidden; }
.member-body .koota-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ad-primary), var(--ad-primary-2)); }

/* ----- Plans premium (scoped) ------------------------------------------ */
.member-body .plan-card { position: relative; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.member-body .plan-card:hover { transform: translateY(-4px); }
.member-body .plan-card.is-featured { border-color: #c7c2f5; box-shadow: 0 18px 44px -22px color-mix(in srgb, var(--ad-primary) 40%, transparent); }
.member-body .plan-ribbon { position: absolute; top: 0; right: 1.1rem; transform: translateY(-50%);
    background: linear-gradient(135deg, var(--ad-primary), var(--ad-primary-2)); color: #fff; font-size: .68rem; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase; padding: .28rem .7rem; border-radius: 999px;
    box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--ad-primary) 70%, transparent); }
.member-body .plan-feat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.member-body .plan-feat-list li { display: flex; align-items: center; gap: .55rem; font-size: .9rem; }
.member-body .plan-feat-list .ok { color: var(--ad-success); }
.member-body .plan-feat-list .no { color: var(--ad-faint); }
.member-body .plan-feat-list li.off { color: var(--ad-faint); }

/* ----- Own-profile hero progress (scoped) ------------------------------ */
.member-body .profile-progress { height: 8px; border-radius: 999px; background: #eef0f5; overflow: hidden; max-width: 340px; margin-top: .35rem; }
.member-body .profile-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ad-primary), var(--ad-primary-2)); }

/* ==========================================================================
   Member sidebar shell — converts the member top-nav into a left sidebar
   (light/premium counterpart to the dark admin sidebar).
   ========================================================================== */
:root { --mem-sb-w: 252px; }

/* Sidebar layout replaces the old flex-column top-nav body */
.member-body { display: block; min-height: 100vh; }

.member-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--mem-sb-w);
    background: #fff; border-right: 1px solid var(--ad-border);
    display: flex; flex-direction: column; z-index: 1045;
}
.member-sb-brand {
    display: flex; align-items: center; gap: .6rem;
    padding: 1.15rem 1.25rem; text-decoration: none; color: var(--ad-text);
    border-bottom: 1px solid #f0f1f5; flex-shrink: 0;
}
.member-sb-nav { padding: .6rem .7rem 1rem; overflow-y: auto; flex: 1; }
.member-sb-section {
    font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ad-faint); padding: .9rem .8rem .35rem;
}
.member-sb-nav a {
    position: relative; display: flex; align-items: center; gap: .7rem;
    padding: .58rem .8rem; margin: .1rem 0; border-radius: 10px;
    color: var(--ad-muted); text-decoration: none; font-weight: 500; font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}
.member-sb-nav a i { font-size: 1.05rem; width: 1.25rem; text-align: center; color: var(--ad-faint); transition: color .15s ease; }
.member-sb-nav a:hover { background: var(--ad-primary-l); color: var(--ad-primary-d); }
.member-sb-nav a:hover i { color: var(--ad-primary); }
.member-sb-nav a.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--ad-primary) 12%, transparent), color-mix(in srgb, var(--ad-primary-2) 8%, transparent));
    color: var(--ad-primary-d); font-weight: 600;
}
.member-sb-nav a.active i { color: var(--ad-primary); }
.member-sb-nav a.active::before {
    content: ""; position: absolute; left: -.7rem; top: 50%; transform: translateY(-50%);
    width: 3px; height: 1.35rem; border-radius: 0 3px 3px 0;
    background: linear-gradient(var(--ad-primary), var(--ad-primary-2));
}
.member-sb-foot { padding: .7rem; border-top: 1px solid #f0f1f5; display: grid; gap: .35rem; flex-shrink: 0; }
.member-sb-admin, .member-sb-logout {
    display: flex; align-items: center; gap: .7rem; width: 100%;
    padding: .58rem .8rem; border-radius: 10px; font-weight: 600; font-size: .9rem;
    text-decoration: none; border: 0; cursor: pointer; text-align: left;
    transition: background .15s ease, color .15s ease;
}
.member-sb-admin { color: var(--ad-primary-d); background: var(--ad-primary-l); }
.member-sb-admin:hover { background: #e0e3ff; }
.member-sb-logout { color: var(--ad-danger); background: transparent; }
.member-sb-logout:hover { background: var(--ad-danger-l); }
.member-sb-admin i, .member-sb-logout i { font-size: 1.05rem; width: 1.25rem; text-align: center; }

/* Shell + topbar */
.member-shell { margin-left: var(--mem-sb-w); min-height: 100vh; display: flex; flex-direction: column; }
.member-topbar {
    position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; gap: 1rem; padding: .7rem 1.4rem;
    background: rgba(255, 255, 255, .8); backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--ad-border); min-height: 60px;
}
.member-sb-toggle {
    display: none; border: 1px solid var(--ad-border); background: #fff; border-radius: 10px;
    width: 40px; height: 40px; place-items: center; color: var(--ad-text); font-size: 1.2rem; padding: 0;
}
.member-topbar-link { position: relative; color: var(--ad-muted); font-size: 1.2rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; transition: background .15s, color .15s; }
.member-topbar-link:hover { background: var(--ad-primary-l); color: var(--ad-primary-d); }
.member-topbar-dot {
    position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px;
    background: var(--ad-danger); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center; line-height: 1;
}
.member-topbar-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--ad-primary), var(--ad-primary-2)); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}

/* Language switcher */
.member-lang .member-lang-btn { width: auto; gap: 6px; padding: 0 10px; font-size: 1.05rem; }
.member-lang-code { font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.member-lang-menu { min-width: 168px; padding: 6px; border-radius: 12px; border: 1px solid var(--ad-border); box-shadow: 0 12px 28px rgba(15,23,42,.12); }
.member-lang-item { display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 8px 10px; font-weight: 500; }
.member-lang-item:hover { background: var(--ad-primary-l); color: var(--ad-primary-d); }
.member-lang-item.is-active { color: var(--ad-primary-d); font-weight: 600; }
.member-lang-item .bi-check2 { color: var(--ad-primary); }

/* ===== AI help assistant ===== */
.assistant { position: fixed; right: 20px; bottom: 20px; z-index: 1080; }
.assistant-fab {
    width: 56px; height: 56px; border: none; border-radius: 50%; cursor: pointer;
    background: var(--ad-primary); color: #fff; font-size: 1.5rem;
    display: grid; place-items: center; box-shadow: 0 10px 26px color-mix(in srgb, var(--ad-primary) 45%, transparent);
    transition: transform .15s, background .15s;
}
.assistant-fab:hover { background: var(--ad-primary-d); transform: translateY(-2px); }
.assistant-fab[aria-expanded="true"] { transform: scale(.92); }

.assistant-panel {
    position: absolute; right: 0; bottom: 70px; width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--ad-border); border-radius: 16px; overflow: hidden;
    box-shadow: 0 18px 48px rgba(15,23,42,.22);
}
.assistant-head {
    display: flex; align-items: center; gap: 8px; padding: 12px 14px;
    background: var(--ad-primary); color: #fff;
}
.assistant-head-text { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.assistant-title { font-weight: 700; font-size: .98rem; }
.assistant-disclaimer { font-size: .68rem; opacity: .85; }
.assistant-icon-btn {
    border: none; background: transparent; color: inherit; cursor: pointer;
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1.05rem;
    transition: background .15s, color .15s;
}
.assistant-head .assistant-icon-btn:hover { background: rgba(255,255,255,.18); }
.assistant-head .assistant-icon-btn.is-on { background: rgba(255,255,255,.22); }

.assistant-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--ad-bg, #f8fafc); }
.assistant-msg {
    max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.45;
    white-space: pre-wrap; word-wrap: break-word;
}
.assistant-msg.is-bot { align-self: flex-start; background: #fff; border: 1px solid var(--ad-border); border-bottom-left-radius: 5px; color: var(--ad-text, #1e293b); }
.assistant-msg.is-user { align-self: flex-end; background: var(--ad-primary); color: #fff; border-bottom-right-radius: 5px; }

.assistant-status { padding: 0 14px 8px; font-size: .78rem; color: var(--ad-muted); font-style: italic; }

.assistant-input { display: flex; align-items: center; gap: 6px; padding: 10px; border-top: 1px solid var(--ad-border); background: #fff; }
.assistant-text {
    flex: 1; border: 1px solid var(--ad-border); border-radius: 999px; padding: 9px 14px; font-size: .9rem;
    outline: none; transition: border-color .15s;
}
.assistant-text:focus { border-color: var(--ad-primary); }
.assistant-input .assistant-icon-btn { color: var(--ad-muted); }
.assistant-input .assistant-icon-btn:hover { background: var(--ad-primary-l); color: var(--ad-primary-d); }
.assistant-send { color: var(--ad-primary) !important; }
.assistant-mic.is-live { background: var(--ad-danger); color: #fff !important; animation: assistant-pulse 1.2s infinite; }
@keyframes assistant-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ad-danger) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

@media (max-width: 575.98px) {
    .assistant { right: 14px; bottom: 14px; }
    .assistant-panel { bottom: 66px; }
}

/* Main + footer inside the shell */
.member-body .member-main { flex: 1; padding: 1.7rem 1.4rem 2.5rem; }
.member-body .member-main-guest { min-height: 100vh; display: grid; place-items: center; }
.member-body .member-container { max-width: 1080px; margin: 0 auto; width: 100%; padding-left: 0; padding-right: 0; }
.member-footer { background: transparent; border-top: 1px solid var(--ad-border); padding: 1.2rem 1.4rem; }
.member-footer .member-container { text-align: center; color: var(--ad-faint); font-size: .82rem; }

/* Mobile: off-canvas sidebar */
.member-sb-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1040; opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.member-sb-backdrop.open { opacity: 1; visibility: visible; }
@media (max-width: 991.98px) {
    .member-sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(15, 23, 42, .2); }
    .member-sidebar.open { transform: none; }
    .member-shell { margin-left: 0; }
    .member-sb-toggle { display: grid; }
}
@media (min-width: 992px) { .member-sb-backdrop { display: none; } }
