:root {
    --peach: #fde2d2;
    --peach-deep: #f5c4a8;
    --coral: #ff7a21;
    --coral-soft: #ff9a5c;
    --ink: #1a1a2e;
    --ink-soft: #4a4a68;
    --white: #ffffff;
    --lavender: #e8e0f5;
    --sky: #d4ecff;
    --gold: #f7d76b;
    --pink: #ffd6e8;
    --mint: #a9e28a;
    --dark: #000000;
    --dark-card: #1a1a24;
    --radius: 20px;
    --radius-pill: 999px;
    --shadow: 0 8px 32px rgba(26, 26, 46, 0.12);
    --nav-h: 72px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--ink);
    background: var(--peach);
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.dark-page { background: #000; color: var(--white); }

body.dark-page .app-shell { background: #000; }

body.dark-page.light-shell .app-shell {
    background: #fff;
    color: var(--ink);
}

body.dark-page.light-shell .match-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-page.light-shell .match-row .preview,
body.dark-page.light-shell .empty-state {
    color: var(--ink-soft);
}

body.dark-page.light-shell .profile-page {
    background: #fff;
    color: var(--ink);
}

body.dark-page.light-shell .profile-meta,
body.dark-page.light-shell .profile-bio {
    color: var(--ink-soft);
    opacity: 1;
}

body.dark-page.light-shell .profile-bio:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.dark-page.light-shell .settings-group {
    background: #f5f5f5;
}

body.dark-page.light-shell .settings-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-page.light-shell .settings-row .label {
    color: var(--ink-soft);
}

body.dark-page.light-shell .settings-row .chevron {
    color: rgba(0, 0, 0, 0.25);
}

body.dark-page.light-shell .settings-row.editable:active,
body.dark-page.light-shell .settings-row.editing {
    background: rgba(0, 0, 0, 0.04);
}

body.dark-page.light-shell .inline-input,
body.dark-page.light-shell .inline-bio {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--ink);
}

body.dark-page.light-shell .btn-logout {
    background: #f5f5f5;
    color: var(--ink);
}

body.dark-page .empty-state { color: rgba(255,255,255,0.55); }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

button, input, select, textarea {
    font: inherit;
    border: none;
    outline: none;
    background: none;
}

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
    display: flex;
    flex-direction: column;
}

.app-shell > .search-header,
.app-shell > .search-page > .search-header {
    flex-shrink: 0;
}

.app-shell > .profile-page {
    flex: 1;
    min-height: auto;
}

/* Landing */
.landing {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(180deg, #fdf0e9 0%, var(--peach) 55%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.landing-logo .at {
    width: 42px; height: 42px;
    background: var(--coral);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
}

.landing-logo span { color: #405b91; }

.landing h1 {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 700;
    max-width: 18ch;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.landing .counter {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-bottom: 2rem;
}

.landing .counter strong { color: var(--coral); font-weight: 700; }

.landing-hero {
    width: 120px;
    height: 120px;
    margin: 1rem auto 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.landing-waves {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 180px;
    pointer-events: none;
}

.landing-waves svg { width: 100%; height: 100%; }

.landing .btn-start {
    position: relative;
    z-index: 2;
    width: min(100%, 340px);
    padding: 1.1rem 2rem;
    background: var(--ink);
    color: white;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.25);
}

.landing .btn-start:active { transform: scale(0.98); }

.landing .login-link {
    margin-top: 1rem;
    color: var(--coral);
    font-weight: 600;
    position: relative;
    z-index: 2;
}

/* Auth & onboarding */
.auth-page, .onboard-page {
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.auth-page.bg-peach { background: var(--peach); }
.auth-page.bg-lavender { background: var(--lavender); }
.auth-page.bg-gold { background: var(--gold); }
.auth-page.bg-pink { background: var(--pink); }
.auth-page.bg-sky { background: var(--sky); }
.auth-page.bg-mint { background: var(--mint); }

.top-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-btn {
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s;
}

.back-btn:hover { background: rgba(0,0,0,0.06); }

.progress-wave {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.12);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-wave span {
    display: block;
    height: 100%;
    background: var(--ink);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.page-sub {
    color: var(--ink-soft);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.field {
    margin-bottom: 1rem;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.85);
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-pill);
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255,122,33,0.15);
}

.field label {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 0.35rem;
    padding-left: 0.5rem;
}

.dob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 0.75rem;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.1rem 1.25rem;
    background: rgba(255,255,255,0.85);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    transition: border-color 0.15s, transform 0.15s;
}

.choice-btn:hover { border-color: rgba(0,0,0,0.1); }
.choice-btn.selected { border-color: var(--coral); background: white; }
.choice-btn .icon { font-size: 1.5rem; }

.btn-primary {
    width: 100%;
    padding: 1.1rem;
    background: var(--ink);
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    margin-top: auto;
}

.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary:not(:disabled):active { transform: scale(0.98); }

.btn-outline {
    width: 100%;
    padding: 1.1rem;
    border: 2px solid var(--ink);
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.75rem;
}

.btn-circle {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
    transition: transform 0.15s;
}

.btn-circle:disabled { opacity: 0.35; cursor: not-allowed; }

.onboard-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 2rem;
}

.age-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--coral);
    line-height: 1;
}

.age-display .dot {
    width: 40px; height: 8px;
    background: var(--pink);
    border-radius: var(--radius-pill);
    margin-top: 0.25rem;
}

.link-text {
    color: var(--coral);
    font-weight: 600;
    text-align: center;
    display: block;
    margin-top: 1rem;
    cursor: pointer;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error { background: #ffe0e0; color: #c0392b; }
.alert-success { background: #d4edda; color: #155724; }

.consent-box {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.consent-box h1 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.consent-box p { color: var(--ink-soft); margin-bottom: 1rem; font-size: 0.95rem; }
.consent-box a { color: #405b91; }

.consent-box .btn-primary {
    border: 3px solid var(--pink);
    margin-top: 2rem;
}

/* App topbar */
.search-header {
    padding: 1rem 3.25rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 40;
    background: #000;
    color: white;
}

.search-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.topbar-back {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border: none;
    padding: 0;
    font-family: inherit;
}

.topbar-back:hover {
    background: rgba(255, 255, 255, 0.18);
}

.search-header .filter-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: rgba(255,255,255,0.1);
}

.filter-btn {
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
}

.card-stack {
    padding: 0.5rem 1.25rem 1rem;
    position: relative;
    height: calc(100dvh - var(--nav-h) - 80px);
    max-height: 560px;
    background: #fff;
}

.profile-card {
    position: absolute;
    inset: 0.5rem 1.25rem 1rem;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--dark-card);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: transform 0.1s linear;
}

.profile-card.dragging { cursor: grabbing; transition: none; }

.profile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--lavender), var(--peach));
    font-size: 4rem;
    font-weight: 700;
    color: var(--ink);
}

.profile-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.75) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
}

.profile-card .badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-card .name {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-card .meta {
    opacity: 0.85;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.profile-card .bio-snippet {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swipe-label {
    position: absolute;
    top: 2rem;
    padding: 0.5rem 1rem;
    border: 4px solid;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: rotate(-20deg);
    pointer-events: none;
}

.swipe-label.like { right: 1.5rem; color: #4cd964; border-color: #4cd964; transform: rotate(20deg); }
.swipe-label.nope { left: 1.5rem; color: #ff4458; border-color: #ff4458; }

.swipe-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 1rem 1rem;
    background: #fff;
}

.action-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.15s;
    background: white;
}

.action-btn:active { transform: scale(0.9); }
.action-btn.pass { color: #ff4458; font-size: 1.75rem; }
.action-btn.like { color: #4cd964; width: 68px; height: 68px; }
.action-btn.super { color: var(--coral); font-size: 1.25rem; width: 48px; height: 48px; }

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--ink-soft);
}

.empty-state .emoji { font-size: 3rem; margin-bottom: 1rem; }

/* Grid picks */
.picks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.pick-card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    background: var(--dark-card);
}

.pick-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pick-card .info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.pick-card .tag {
    position: absolute;
    top: 0.5rem; left: 0.5rem;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.pick-card .hi-btn {
    background: var(--coral-soft);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.pick-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    background: var(--dark-card);
}

.search-sentinel {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem 0 0.5rem;
    min-height: 2.5rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
}

/* Search */
.search-page { background: #fff; min-height: 100dvh; }
.boost-card {
    background: linear-gradient(135deg, #3d1f3d, #2a1a3a);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1rem 1rem 0.75rem;
    color: white;
}

.boost-card .boost-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.boost-card p { font-size: 0.85rem; opacity: 0.85; margin-bottom: 1rem; }
.boost-card .boost-btn {
    background: var(--peach);
    color: var(--ink);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

/* Matches */
.matches-list { padding: 0 1rem; }

.match-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.dark-page .match-row .preview {
    color: rgba(255,255,255,0.55);
}

.match-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--lavender);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--ink-soft);
    flex-shrink: 0;
}

.match-row .info { flex: 1; min-width: 0; }
.match-row .name { font-weight: 600; }
.match-row .preview { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.new-badge {
    background: var(--coral);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

/* Chat */
.chat-page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    color: var(--ink);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    background: #000;
    color: white;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}

.chat-header .topbar-back,
.chat-header .back-btn {
    color: white;
    flex-shrink: 0;
    position: static;
    transform: none;
}

.chat-header .topbar-back:hover,
.chat-header .back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chat-header .name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-header-profile {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: inherit;
}

.chat-header-profile:active {
    opacity: 0.7;
}

.chat-header-profile .name {
    flex: 1;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header .avatar,
.chat-header-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-header .avatar-initials,
.chat-header-profile .avatar-initials {
    display: grid;
    place-items: center;
    background: var(--dark-card);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.chat-block-form { margin-left: auto; flex-shrink: 0; }

.chat-block-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #888;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.chat-block-btn:hover {
    color: #ff4458;
    background: rgba(255, 68, 88, 0.08);
}

/* User profile view */
.user-view-page {
    background: var(--dark);
    min-height: 100dvh;
    color: white;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.user-view-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--dark);
}

.user-view-header h1 {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-view-page .profile-hero .avatar-lg {
    cursor: zoom-in;
}

.user-view-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.user-view-bio {
    cursor: default;
    margin-top: 0.75rem;
}

.user-view-bio:hover {
    background: transparent;
}

.btn-user-message {
    display: block;
    margin: 1.5rem 1rem 0;
    padding: 1rem;
    background: var(--coral);
    color: white;
    text-align: center;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-page > .profile-alert {
    flex-shrink: 0;
    margin: 0.5rem 1rem 0;
}

.chat-compose {
    position: sticky;
    bottom: 0;
    z-index: 50;
    flex-shrink: 0;
    background: white;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.chat-emoji-bar {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 1rem 0.25rem;
    overflow-x: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.chat-emoji-bar::-webkit-scrollbar {
    display: none;
}

.chat-emoji-group-label {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.62rem;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.02em;
    padding: 0 0.4rem;
    white-space: nowrap;
}

.chat-emoji-group-label:not(:first-child) {
    margin-left: 0.35rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e8e8e8;
}

.chat-emoji-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    line-height: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f5f5f5;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.chat-emoji-btn:hover {
    background: rgba(255, 122, 33, 0.12);
}

.chat-emoji-btn:active {
    transform: scale(0.92);
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem calc(0.75rem + var(--safe-bottom));
    background: white;
    flex-shrink: 0;
}

.msg {
    max-width: 78%;
    padding: 0.65rem 1rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.msg.sent { align-self: flex-end; background: var(--ink); color: white; border-bottom-right-radius: 4px; }
.msg.received { align-self: flex-start; background: white; border-bottom-left-radius: 4px; }

.msg .time { display: block; font-size: 0.7rem; opacity: 0.5; margin-top: 0.25rem; }

.chat-input input[type="text"],
.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border-radius: var(--radius-pill);
}

.chat-attach-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.chat-attach-btn:hover {
    color: var(--coral);
    background: rgba(255, 122, 33, 0.1);
}

.msg--photo {
    padding: 0;
    overflow: visible;
    background: transparent !important;
}

.msg--photo:has(.msg-text) {
    padding: 0.35rem;
    overflow: hidden;
}

.msg--photo:has(.msg-text).sent {
    background: var(--ink) !important;
}

.msg--photo:has(.msg-text).received {
    background: white !important;
}

.msg-image-btn {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.msg-image {
    display: block;
    width: auto;
    max-width: min(240px, 70vw);
    max-height: 320px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.msg--photo .time {
    margin-top: 0.25rem;
    padding: 0 0.15rem;
}

.msg--photo:not(:has(.msg-text)) .time {
    padding: 0;
}

.msg--photo.sent:not(:has(.msg-text)) .time,
.msg--photo.received:not(:has(.msg-text)) .time {
    color: rgba(0, 0, 0, 0.45);
}

.msg--photo.sent:not(:has(.msg-text)) .time {
    text-align: right;
}

.msg-text {
    display: block;
    padding: 0.35rem 0.65rem 0;
}

.chat-input button {
    width: 44px; height: 44px;
    background: var(--coral);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Profile / settings dark */
.profile-page { background: var(--dark); min-height: 100dvh; color: white; padding-bottom: calc(var(--nav-h) + var(--safe-bottom)); }

.profile-hero {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.profile-hero .avatar-lg {
    width: 100px; height: 100px;
    border-radius: 20px;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    background: var(--dark-card);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
}

.photo-upload-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
}

.photo-upload-inline .avatar-lg {
    cursor: zoom-in;
}

.photo-change-hint {
    font-size: 0.75rem;
    color: #5b9fd4;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.35rem;
}

.profile-toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--dark-card);
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.profile-toast.success { background: rgba(76, 217, 100, 0.2); color: #4cd964; }
.profile-toast.error { background: rgba(255, 107, 107, 0.2); color: #ff6b6b; }
.profile-toast.saving { background: rgba(91, 159, 212, 0.2); color: #5b9fd4; }

.settings-row.editable { cursor: pointer; }
.settings-row.editable:active { background: rgba(255,255,255,0.04); }
.settings-row.readonly { cursor: default; }
.settings-row.editing { background: rgba(255,255,255,0.04); }

.inline-input {
    flex: 1;
    margin-left: auto;
    max-width: 58%;
    padding: 0.45rem 0.65rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    text-align: right;
}

.profile-bio {
    margin: 1rem auto 0;
    max-width: 320px;
    font-size: 0.9rem;
    opacity: 0.75;
    line-height: 1.5;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
}
.profile-bio.empty { opacity: 0.4; font-style: italic; }
.profile-bio:hover { background: rgba(255,255,255,0.05); }

.inline-bio {
    width: 100%;
    min-height: 80px;
    padding: 0.65rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
}


.settings-group {
    background: var(--dark-card);
    border-radius: 16px;
    margin: 0 1rem 1rem;
    overflow: hidden;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
}

.settings-row:last-child { border-bottom: none; }
.settings-row .label { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.settings-row .value { font-weight: 500; text-align: right; max-width: 55%; }
.settings-row .chevron { color: rgba(255,255,255,0.3); margin-left: 0.5rem; }
.settings-row.danger .label { color: #ff6b6b; }

.btn-logout {
    display: block;
    margin: 1.5rem 1rem;
    padding: 1rem;
    background: var(--dark-card);
    color: white;
    text-align: center;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.profile-meta { opacity: 0.6; margin-top: 0.25rem; }

.profile-hero h1 { font-size: 1.5rem; }

.btn-edit {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.65rem 1.5rem;
    background: var(--coral);
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-alert {
    margin: 0 1rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
}
.profile-alert.success { background: rgba(76, 217, 100, 0.15); color: #4cd964; }
.profile-alert.error { background: rgba(255, 107, 107, 0.15); color: #ff6b6b; }

.profile-edit-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.5rem;
}
.profile-edit-header h1 { font-size: 1.1rem; font-weight: 600; }
.profile-edit-header .back-btn { color: #5b9fd4; }

.photo-upload {
    text-align: center;
    padding: 1rem 1rem 1.5rem;
}
.photo-upload-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}
.photo-upload .avatar-lg {
    width: 110px; height: 110px;
    border-radius: 20px;
    object-fit: cover;
    background: var(--dark-card);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
}
.photo-upload-btn {
    color: #5b9fd4;
    font-weight: 600;
    font-size: 0.9rem;
}
.photo-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.45;
}

.edit-fields { padding: 0.25rem 0; }
.edit-field {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.edit-field:last-child { border-bottom: none; }
.edit-field label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.4rem;
}
.edit-field input,
.edit-field select,
.edit-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
}
.edit-field textarea { resize: vertical; min-height: 90px; }
.edit-field select { cursor: pointer; }
.edit-field.readonly span { display: block; font-weight: 500; }
.edit-field.readonly small { display: block; margin-top: 0.25rem; font-size: 0.75rem; opacity: 0.4; }

.profile-edit-actions {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.btn-save {
    width: 100%;
    padding: 1rem;
    background: #5b9fd4;
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
}
.btn-cancel {
    width: 100%;
    padding: 0.85rem;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    cursor: pointer;
}

/* Filters */
.filters-page {
    padding: 0 0 1rem;
}

body.dark-page.light-shell .filters-page {
    color: var(--ink);
}

.filter-field {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-field:last-child {
    border-bottom: none;
}

.filter-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 0.9rem;
}

.filter-age-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-age-row .filter-input {
    flex: 1;
}

.filter-age-sep {
    color: var(--ink-soft);
    font-weight: 600;
}

.filters-submit {
    display: block;
    width: calc(100% - 2rem);
    margin: 1.5rem 1rem 0;
    padding: 1rem;
    background: var(--coral);
    color: white;
    text-align: center;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.filters-submit:hover {
    background: var(--coral-soft);
}

.app-shell > .filters-page {
    flex: 1;
}

/* Photo lightbox */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.photo-lightbox.show {
    display: flex;
    animation: fadeIn 0.2s;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.photo-lightbox-close {
    position: absolute;
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.75rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s;
}

.photo-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.photo-lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(calc(100% - 5rem), 480px);
    touch-action: pan-y;
}

.photo-lightbox-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.photo-lightbox-stage .photo-lightbox-img {
    position: relative;
    z-index: 1;
}

.photo-lightbox-stage .photo-lightbox-img.is-sliding {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 2;
}

.photo-lightbox-stage .photo-lightbox-img.is-sliding-out {
    z-index: 1;
}

@keyframes photoSlideInFromRight {
    from { transform: translateX(100%); opacity: 0.35; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes photoSlideInFromLeft {
    from { transform: translateX(-100%); opacity: 0.35; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes photoSlideOutToLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0.35; }
}

@keyframes photoSlideOutToRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0.35; }
}

.photo-slide-in-right {
    animation: photoSlideInFromRight 0.32s ease forwards;
}

.photo-slide-in-left {
    animation: photoSlideInFromLeft 0.32s ease forwards;
}

.photo-slide-out-left {
    animation: photoSlideOutToLeft 0.32s ease forwards;
}

.photo-slide-out-right {
    animation: photoSlideOutToRight 0.32s ease forwards;
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 2rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.photo-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.photo-lightbox-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.photo-lightbox-prev {
    left: calc(0.5rem + env(safe-area-inset-left, 0px));
}

.photo-lightbox-next {
    right: calc(0.5rem + env(safe-area-inset-right, 0px));
}

.photo-lightbox-counter {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
}

.photo-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 6rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform, opacity;
}

/* Match modal */
.match-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2rem;
    text-align: center;
    color: white;
}

.match-modal.show { display: flex; animation: fadeIn 0.3s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.match-modal h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--coral), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.match-modal .avatars {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.match-modal .avatars img {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--coral);
}

.match-modal .actions { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 280px; }
.match-modal .actions a, .match-modal .actions button {
    padding: 1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
}

.match-modal .btn-chat { background: var(--coral); color: white; }
.match-modal .btn-keep { background: transparent; color: rgba(255,255,255,0.7); }

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.4);
    z-index: 100;
}

.dark-page .bottom-nav { background: #000; }

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.65rem;
    color: #aaa;
    position: relative;
    padding: 0.25rem 0.5rem;
}

.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: white; }
.dark-page .nav-item.active { color: white; }

.nav-item .badge {
    position: absolute;
    top: -2px; right: 0;
    background: #ff4458;
    color: white;
    font-size: 0.6rem;
    font-style: normal;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.nav-item .badge[hidden] {
    display: none;
}

/* Admin panel */
.admin-page {
    background: #f0f2f5;
    color: var(--ink);
    min-height: 100dvh;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1.25rem;
    background: #000;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-brand {
    font-weight: 700;
    font-size: 1rem;
    color: white;
    white-space: nowrap;
}

.admin-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    flex: 1;
}

.admin-tabs a {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
}

.admin-tabs a:hover { color: white; background: rgba(255,255,255,0.08); }
.admin-tabs a.active { color: white; background: rgba(255,255,255,0.14); font-weight: 600; }

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.admin-user-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}

.admin-link-app {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--coral-soft);
}

.admin-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.admin-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.admin-back { margin-bottom: 1rem; }
.admin-back a { color: #5b9fd4; font-weight: 600; font-size: 0.9rem; }

.admin-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.admin-alert.success { background: #d4edda; color: #155724; }
.admin-alert.error { background: #ffe0e0; color: #c0392b; }

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.admin-stat-grid--compact { max-width: 480px; }

.admin-stat-card {
    background: white;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.admin-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 0.25rem;
}

.admin-panel {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-panel h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.admin-table-wrap {
    overflow-x: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    vertical-align: middle;
}

.admin-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    background: #fafafa;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: #5b9fd4; font-weight: 600; }
.admin-table .admin-meta { display: block; font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; }

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-thumb-initials {
    display: grid;
    place-items: center;
    background: var(--lavender);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    background: #eee;
    color: var(--ink-soft);
}
.admin-badge.ok { background: rgba(76,217,100,0.15); color: #2d8a3e; }
.admin-badge.pending { background: rgba(255,193,7,0.2); color: #9a7200; }

.admin-search {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-search input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: var(--radius-pill);
    background: white;
}

.admin-btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--coral);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    text-align: center;
}
.admin-btn:hover { background: var(--coral-soft); }
.admin-btn.secondary { background: #e8e8e8; color: var(--ink); }
.admin-btn.secondary:hover { background: #ddd; }
.admin-btn.danger { background: #ff4458; }
.admin-btn.danger:hover { background: #e63950; }
.admin-btn.small { padding: 0.35rem 0.75rem; font-size: 0.78rem; }

.admin-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.75rem; }

.admin-pagination {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-inline-form { display: inline; }

.admin-user-detail { max-width: 720px; }

.admin-user-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-user-photo {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-bio {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.admin-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
}
.admin-dl dt { color: var(--ink-soft); }
.admin-dl dd { font-weight: 500; }

.admin-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.admin-list li:last-child { border-bottom: none; }

.admin-msg-cell {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .admin-topbar { flex-direction: column; align-items: stretch; }
    .admin-topbar-actions { margin-left: 0; justify-content: space-between; }
    .admin-user-card { flex-direction: column; align-items: center; text-align: center; }
    .admin-dl { grid-template-columns: 1fr; }
}

@media (min-width: 481px) {
    body { background: #e8e0f0; }
    body.dark-page { background: #000; }
    .app-shell, .chat-page, .landing, .auth-page, .onboard-page, .consent-box {
        box-shadow: 0 0 60px rgba(0,0,0,0.08);
    }
}
