/* DeepCrown Mobile - Celebrity Tracker */
/* Modern, luxurious dark theme for tracking public figures */

:root {
    /* Rich dark palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-elevated: #1c1c28;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);

    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);

    /* Accent gradient - gold/purple luxury feel */
    --accent-gold: #fbbf24;
    --accent-purple: #a855f7;
    --accent-cyan: #22d3ee;
    --accent-pink: #ec4899;
    --gradient-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #fbbf24 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    --gradient-card: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(168, 85, 247, 0.4);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.3);
    --shadow-gold: 0 0 30px rgba(251, 191, 36, 0.2);

    /* Spacing */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-height: 70px;
    --header-height: 60px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* App Container */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(236, 72, 153, 0.1), transparent),
        var(--bg-primary);
}

/* Status Bar Spacer */
.status-bar-spacer {
    height: var(--safe-top);
    background: transparent;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: var(--header-height);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
    animation: logoShimmer 4s ease-in-out infinite;
}

@keyframes logoShimmer {
    0%, 100% { filter: brightness(1); background: linear-gradient(135deg, #FFD700, #FFA500); }
    50% { filter: brightness(1.2); background: linear-gradient(135deg, #FF6B6B, #FF8E53); }
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text .tagline {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.header-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-action:active {
    transform: scale(0.95);
    background: var(--bg-glass-hover);
}

/* ============================================
   PERIOD SELECTOR
   ============================================ */
.period-selector {
    padding: 12px 0;
    overflow: hidden;
}

.period-scroll {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.period-scroll::-webkit-scrollbar {
    display: none;
}

.period-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    scroll-snap-align: start;
}

.period-btn:active {
    transform: scale(0.97);
}

.period-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.period-icon {
    font-size: 1rem;
}

/* ============================================
   ENTITY TYPE SELECTOR
   ============================================ */
.entity-type-selector {
    padding: 0 0 8px;
    overflow: hidden;
}

.entity-type-scroll {
    display: flex;
    gap: 6px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.entity-type-scroll::-webkit-scrollbar {
    display: none;
}

.entity-type-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-type-btn:active {
    transform: scale(0.97);
}

.entity-type-btn.active {
    background: var(--gradient-purple);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    margin: 0 16px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    padding: 0 16px;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    overflow-y: auto;
}

/* JavaScript-off explanation (mobile.html <noscript>) — never rendered in a
   normal browser; styled so crawlers' renders / no-JS visitors get a clean box */
.noscript-intro {
    margin: 12px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.noscript-intro p + p {
    margin-top: 6px;
}

.noscript-intro strong {
    color: var(--text-primary);
}

.noscript-intro a {
    color: var(--accent-purple);
    text-decoration: none;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 24px;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-ring {
    position: absolute;
    inset: 0;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-crown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
    text-align: center;
    padding: 24px;
}

.error-icon {
    color: var(--accent-pink);
    opacity: 0.6;
}

.error-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.error-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   CELEBRITY GRID
   ============================================ */
.celeb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Large featured card (first item) */
.celeb-card.featured {
    grid-column: span 2;
}

.celeb-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.celeb-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.celeb-card:active {
    transform: scale(0.98);
}

.celeb-card:active::before {
    opacity: 1;
}

.celeb-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px;
    z-index: 1;
}

.celeb-card.featured .celeb-card-inner {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

/* Ranking Badge */
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    z-index: 2;
}

.rank-badge.gold {
    background: var(--gradient-gold);
    color: #000;
    box-shadow: var(--shadow-gold);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    color: #1e293b;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
}

.rank-badge.regular {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Favorite Button on Cards */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 3;
    transition: all var(--transition-fast);
}

.favorite-btn:active {
    transform: scale(0.9);
}

.favorite-btn.active {
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.2);
}

.favorite-btn.active svg {
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

/* Tracked entities — the desktop bubble's look: a gold crown on the avatar,
   a soft gold ring, and the period score in a pill above the name. */
.celeb-card.custom-tracked {
    border-color: rgba(252, 211, 77, 0.35);
}

/* Room for the crown above the avatar */
.celeb-card.custom-tracked .celeb-card-inner {
    padding-top: 26px;
}

.celeb-card.custom-tracked.featured .celeb-card-inner {
    padding-top: 30px;
}

/* The rank moves to the right corner so it never sits under the crown */
.celeb-card.custom-tracked .rank-badge {
    left: auto;
    right: 12px;
}

.celeb-card.custom-tracked .celeb-avatar {
    position: relative;
    box-shadow: 0 0 0 1.5px rgba(252, 211, 77, 0.8), 0 0 8px rgba(251, 191, 36, 0.4);
}

/* Sits on the avatar's rim: its band sinks a fifth of its height into it */
.avatar-crown {
    position: absolute;
    left: 50%;
    top: -17px;
    width: 24px;
    height: 21px;
    transform: translateX(-50%);
    filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, 0.55));
    pointer-events: none;
}

.avatar-crown svg {
    display: block;
    width: 100%;
    height: 100%;
}

.celeb-card.featured .avatar-crown {
    top: -21px;
    width: 30px;
    height: 27px;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 22px;
    padding: 0 9px;
    margin-bottom: 6px;
    border-radius: var(--radius-full);
    background: rgba(10, 10, 15, 0.72);
    border: 1.3px solid var(--tone);
    color: var(--tone);
    font-size: 12.5px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    -webkit-text-stroke: 0.25px var(--tone);
}

.score-pill.positive { --tone: #4ade80; }
.score-pill.negative { --tone: #f87171; }
.score-pill.neutral { --tone: #cbd5e1; }

/* Pending ('în verificare') submission: locked, dimmed, inert card at the
   end of the trending grid — visible but not interactive until approval. */
.celeb-card.pending-card {
    opacity: 0.55;
    cursor: default;
}

.celeb-card.pending-card:active {
    transform: none;
}

.celeb-card.pending-card:active::before {
    opacity: 0;
}

.pending-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Avatar */
.celeb-avatar {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-purple);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}

.celeb-card.featured .celeb-avatar {
    width: 72px;
    height: 72px;
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* Celebrity Info */
.celeb-info {
    flex: 1;
    min-width: 0;
}

.celeb-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.celeb-card.featured .celeb-name {
    font-size: 1.1rem;
    white-space: normal;
}

.celeb-mentions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-purple);
}

.celeb-card.featured .celeb-mentions {
    font-size: 0.85rem;
    padding: 6px 12px;
}

/* Trending indicator */
.trending-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.trending-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ============================================
   BOTTOM SHEET
   ============================================ */
.bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.bottom-sheet.open {
    pointer-events: auto;
    opacity: 1;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    padding-bottom: var(--safe-bottom);
}

.bottom-sheet.open .sheet-content {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.person-avatar {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.person-info {
    flex: 1;
    min-width: 0;
}

.person-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mention-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-purple);
}

.sheet-favorite-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sheet-favorite-btn:active {
    transform: scale(0.9);
}

.sheet-favorite-btn.active {
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}

.sheet-favorite-btn.active svg {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.sheet-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.articles-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Article cards — every article complete: tone, title, analysis, date,
   source and a link (the "Briefing" rows, same as the desktop panel). */
.article-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.article-card:active {
    background: var(--bg-glass-hover);
}

/* Tone heading: icon, tone word and score in the tone colour (--tone) */
.article-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tone);
}

/* Fixed slot, so the tone words line up whatever the icon size */
.article-kicker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0;
}

/* A stronger score gets a bigger icon (the score pills' steps) */
.article-kicker-icon.strength-2 { font-size: 1.1rem; }
.article-kicker-icon.strength-3 { font-size: 1.3rem; }

.article-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    text-decoration: none;
}

/* The analysis, always visible, in the original quote box */
.article-reason {
    margin-top: 4px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.article-reason::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 3.5rem;
    font-family: Georgia, serif;
    color: rgba(139, 92, 246, 0.15);
    line-height: 1;
    pointer-events: none;
}

.reason-content {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.65;
    font-style: italic;
    padding-left: 20px;
    position: relative;
    letter-spacing: 0.01em;
}

.reason-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.article-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.article-source {
    padding: 2px 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    text-transform: capitalize;
}

.article-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #b49cff;
    text-decoration: none;
    background: rgba(139, 92, 246, 0.12);
}

.article-open:active {
    background: rgba(139, 92, 246, 0.22);
}

/* ============================================
   SETTINGS MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal.open {
    pointer-events: auto;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    padding-bottom: var(--safe-bottom);
}

.modal.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.sources-heading {
    display: flex;
    align-items: center;
}

.btn-toggle-sources {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
}

.btn-toggle-sources:active {
    background: var(--bg-glass-hover);
}

/* Toggle List */
.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 232px; /* Show max 4 items (~52px each + 8px gap) */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-elevated) transparent;
}

.toggle-list::-webkit-scrollbar {
    width: 4px;
}

.toggle-list::-webkit-scrollbar-track {
    background: transparent;
}

.toggle-list::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 2px;
}

.toggle-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Dot COLORS live in css/source-dots.css (single source of truth, shared
   with the desktop sidebar) — only surface-specific layout is kept here. */

/* Ruby (locked sources): the rows keep the glass-card look but aren't a
   control — no switch, not clickable; two chips per row. The last chip is
   "and more" (gradient dot), styled exactly like a source so it reads as
   part of the list: more sources exist, just not shown. */
.toggle-list.sources-locked {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 300px;
}

.toggle-row.source-row-locked {
    cursor: default;
    padding: 10px 12px;
}

.source-row-locked .toggle-label {
    font-size: 0.85rem;
    gap: 8px;
}

.toggle-row input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 48px;
    height: 28px;
    background: var(--bg-elevated);
    border-radius: 14px;
    position: relative;
    transition: background var(--transition-normal);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--text-muted);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all var(--transition-normal);
}

.toggle-row input:checked + .toggle-switch {
    background: var(--accent-purple);
}

.toggle-row input:checked + .toggle-switch::after {
    transform: translateX(20px);
    background: white;
}

/* Search Input Group */
.search-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.btn-add {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add:active {
    transform: scale(0.95);
}

/* Custom List */
.custom-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.custom-item-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.custom-item-count {
    font-size: 0.8rem;
    color: var(--accent-purple);
    padding: 2px 10px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: var(--radius-full);
}

.custom-item-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    margin-left: 8px;
}

.custom-item-remove:active {
    color: var(--accent-pink);
}

/* Pending submission row: locked, greyed, no count/remove (matches the
   desktop sidebar's .pending-entity treatment). */
.custom-item.pending {
    opacity: 0.45;
    cursor: default;
}

.custom-item.pending .pending-lock {
    color: var(--text-muted);
    display: inline-flex;
    flex-shrink: 0;
    margin-left: 8px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.last-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(17, 17, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 100;
}

/* Visitor mode: sign-up / login take the bottom nav's place — same box,
   same layer (the article sheet at 200 and Settings at 300 still cover it).
   Button colors match the desktop visitor buttons. */
.visitor-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding: 0 16px var(--safe-bottom);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(17, 17, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 100;
}

.visitor-btn {
    flex: 1;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.visitor-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
}

.visitor-btn-secondary {
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.55);
}

/* Visitor mode: the tracker's sign-up card in Settings (desktop's "empty slot") */
.visitor-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px dashed rgba(139, 92, 246, 0.45);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.4;
    text-decoration: none;
}

.visitor-cta strong {
    color: var(--text-primary);
    font-weight: 600;
}

.visitor-cta-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.35));
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-item svg {
    transition: all var(--transition-normal);
}

.nav-item.active {
    color: var(--accent-purple);
}

.nav-item.active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.nav-item:active {
    transform: scale(0.95);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-glow);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-logout:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   CONFIRM DIALOG (account.html pattern; Logout)
   ============================================ */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-md);
}

.confirm-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 18px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
}

/* strictly equal halves ("Da, deconectează-mă" fits one line in the app
   fonts; min-width:0 keeps the long label from skewing the split) */
.confirm-actions button {
    flex: 0 0 calc(50% - 5px);
    min-width: 0;
    padding: 12px 6px;
    font-size: 0.85rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.confirm-actions button:active {
    transform: scale(0.97);
}

.confirm-actions .confirm-ok {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 2px;
}

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

.celeb-card {
    animation: fadeInUp 0.4s ease backwards;
}

.celeb-card:nth-child(1) { animation-delay: 0ms; }
.celeb-card:nth-child(2) { animation-delay: 50ms; }
.celeb-card:nth-child(3) { animation-delay: 100ms; }
.celeb-card:nth-child(4) { animation-delay: 150ms; }
.celeb-card:nth-child(5) { animation-delay: 200ms; }
.celeb-card:nth-child(6) { animation-delay: 250ms; }
.celeb-card:nth-child(7) { animation-delay: 300ms; }
.celeb-card:nth-child(8) { animation-delay: 350ms; }
.celeb-card:nth-child(9) { animation-delay: 400ms; }
.celeb-card:nth-child(10) { animation-delay: 450ms; }

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-glass) 25%,
        var(--bg-glass-hover) 50%,
        var(--bg-glass) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Count spinner for loading states */
.count-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   SENTIMENT ANALYSIS STYLES
   ============================================ */

/* Crown display in sheet header */
.crown-display {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.crown-icon {
    font-size: 1.1rem;
}

.crown-count {
    font-size: 1rem;
    font-weight: 700;
}

.crown-count.positive {
    color: #10b981;
}

.crown-count.negative {
    color: #ef4444;
}

.avg-sentiment {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 2px 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    margin-left: 4px;
}

/* Sentiment section in sheet body */
.sentiment-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.sentiment-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breakdown-icon-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.breakdown-icon-item.very-positive,
.breakdown-icon-item.positive,
.breakdown-icon-item.slightly-positive {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.breakdown-icon-item.neutral {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
}

.breakdown-icon-item.slightly-negative,
.breakdown-icon-item.negative {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.breakdown-icon-item.very-negative {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.breakdown-icon {
    font-size: 1rem;
}

.breakdown-calc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Selected score pill (several can be selected; the others' articles hide) */
.breakdown-icon-item {
    cursor: pointer;
}

.breakdown-icon-item.active {
    background: rgba(168, 85, 247, 0.28);
    border-color: var(--accent-purple);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.toxic {
    filter: hue-rotate(-50deg) saturate(2);
}

/* Crown spinner in custom persons list */
.person-crowns {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.person-crowns.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.person-crowns.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.person-crowns.neutral {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.person-crowns.analyzing {
    color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.15);
}

.crown-emoji {
    font-size: 0.9rem;
}

.crown-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Crown loading state in bottom sheet */
.crown-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.crown-loading .crown-emoji {
    font-size: 1.2rem;
    opacity: 0.7;
    animation: pulse 1.5s ease-in-out infinite;
}

.crown-loading .loading-text {
    color: var(--text-muted);
}

/* Breakdown loading state */
.breakdown-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    color: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ===== WhatsApp notifications (onboarding) — mobile =====
   Mirrors the desktop wa-* component (frontend/css/style.css) but uses mobile.css's
   own design tokens. Driven by /static/js/whatsapp.js via shared element IDs. */
.wa-notif { font-size: 0.9rem; }
.wa-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.wa-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.wa-switch-slider {
    position: relative; width: 38px; height: 22px; background: var(--bg-glass);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
    transition: background var(--transition-fast); flex: 0 0 auto;
}
.wa-switch-slider::before {
    content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
    background: var(--text-secondary); border-radius: 50%; transition: transform var(--transition-fast);
}
.wa-switch input:checked + .wa-switch-slider { background: #25D366; border-color: #25D366; }
.wa-switch input:checked + .wa-switch-slider::before { transform: translateX(16px); background: #fff; }
.wa-switch-label { color: var(--text-secondary); }
.wa-notif-hint { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }

.wa-modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    padding: 20px; padding-bottom: calc(20px + var(--safe-bottom));
}
.wa-modal {
    position: relative; background: var(--bg-card); color: var(--text-primary);
    width: 100%; max-width: 420px; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg);
}
.wa-modal-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 14px; }
.wa-modal-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; margin: 0 0 14px; }
.wa-modal-text.muted { color: var(--text-muted); font-size: 0.82rem; }
.wa-modal-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin: 8px 0 6px; }
.wa-modal-err { color: #f87171; font-size: 0.82rem; min-height: 1em; margin: 8px 0; }
.wa-modal .btn-primary { margin-top: 6px; width: 100%; }
.wa-modal-close {
    position: absolute; top: 14px; right: 16px; width: 32px; height: 32px;
    background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: 50%;
    font-size: 1.2rem; line-height: 1; color: var(--text-secondary); cursor: pointer;
}
.wa-modal-close:active { background: var(--bg-glass-hover); color: var(--text-primary); }

/* Phone field — ONE seamless box (border/bg/focus on the .iti wrapper; selector + input
   transparent and same font, so "+40" and the number read as one continuous field). */
.wa-modal .iti {
    width: 100%; display: block; background: var(--bg-elevated);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.wa-modal .iti:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
#waPhoneInput {
    width: 100%; height: 46px; line-height: 46px; padding-block: 0; padding-right: 14px;
    background: transparent; border: none; outline: none; color: var(--text-primary);
    font-size: 1rem; font-weight: 400; font-family: inherit;
}
#waPhoneInput::placeholder { color: var(--text-muted); }

/* intl-tel-input v29 dark theme (mobile copy — only mobile.css loads on /m). v29 is
   variable-driven; override the --iti-* vars + set list bg/text so the dropdown is
   readable on the dark page. */
:root {
    --iti-country-selector-bg: var(--bg-elevated);
    --iti-hover-color: rgba(168, 85, 247, 0.25);
    --iti-border-color: var(--border-subtle);
    --iti-icon-color: var(--text-secondary);
}
.iti__country-list { background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-md); }
.iti__country { color: var(--text-primary); }
.iti__country .iti__dial-code { color: var(--text-muted); }
.iti__selected-country, .iti__selected-country-primary { background: transparent; border: none; box-shadow: none; }
.iti__selected-dial-code { color: var(--text-primary); font-size: 1rem; font-weight: 400; font-family: inherit; }
.iti__search-input { background: var(--bg-elevated); color: var(--text-primary); }
.iti__search-input::placeholder { color: var(--text-muted); }

/* QR / Link segmented toggle in the invite step */
.wa-seg {
    display: inline-flex; gap: 2px; margin-bottom: 14px;
    background: var(--bg-glass); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full); padding: 3px;
}
.wa-seg-btn {
    border: none; background: transparent; color: var(--text-secondary);
    padding: 8px 20px; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600;
    font-family: inherit; cursor: pointer; transition: all var(--transition-fast);
}
.wa-seg-btn.active { background: var(--gradient-purple); color: #fff; }

.wa-invite-btn {
    display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff;
    text-decoration: none; padding: 13px 24px; border-radius: var(--radius-full); font-weight: 700; margin: 6px 0;
}
.wa-invite-btn:active { filter: brightness(1.1); }
.wa-invite-qr { margin: 14px 0; }
.wa-invite-qr img {
    width: 200px; height: 200px; border-radius: var(--radius-sm); background: #fff; padding: 8px;
}

/* Two stacked full-width buttons in the settings footer (Contul meu + Logout). */
.settings-section .btn-logout + .btn-logout { margin-top: 10px; }

/* Under the score pills when the list holds only the latest articles. */
.breakdown-scope {
    flex-basis: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
