/* ═══════════════════════════════════════════════════
   ReviewIntell — Premium Design System
   ═══════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --primary-glow: rgba(79, 70, 229, 0.35);
    --secondary: #10B981;
    --accent: #818CF8;
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --surface-hover: #F1F5F9;
    --surface-glass: rgba(255, 255, 255, 0.7);
    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-subtle: #94A3B8;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --success: #10B981;
    --success-light: #ECFDF5;
    --info: #3B82F6;
    --info-light: #EFF6FF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --sidebar-w: 240px;
    --sidebar-collapsed-w: 64px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px var(--primary-glow);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

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

.animated { animation: fadeInUp 0.5s ease forwards; }
.animated-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animated-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animated-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animated-delay-4 { animation-delay: 0.4s; opacity: 0; }

.spinning { animation: spin 0.8s linear infinite; }

/* ═══════════════════════════════════════════════════
   SIDEBAR — Dashboard Layout
   ═══════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-collapsed-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.sidebar:hover { width: var(--sidebar-w); }

.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    margin-left: 1rem;
    transition: opacity var(--transition);
}

.sidebar:hover .sidebar-logo { opacity: 1; }

.sidebar-icon {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav-menu { padding: 1rem 0; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.nav-item:hover .sidebar-icon,
.nav-item.active .sidebar-icon { color: var(--primary); }

.nav-label {
    margin-left: 1rem;
    opacity: 0;
    transition: opacity var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
}

.sidebar:hover .nav-label { opacity: 1; }

/* ── Main Content Area ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-collapsed-w);
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--background);
}

.content-header {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ═══════════════════════════════════════════════════
   UI COMPONENTS
   ═══════════════════════════════════════════════════ */

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* ── Glass Card ── */
.glass-card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ── Forms ── */
.form-group { margin-bottom: 1.5rem; }

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input, textarea, select {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

input::placeholder, textarea::placeholder {
    color: var(--text-subtle);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-danger {
    background: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

.btn-danger:hover {
    background: #FEE2E2;
    transform: translateY(-1px);
}

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--background);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.data-table tr { transition: background var(--transition); }
.data-table tr:hover td { background: #FAFBFF; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Tabs ── */
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-risk-low { background: #ECFDF5; color: #065F46; }
.badge-risk-high { background: #FEF2F2; color: #991B1B; }
.badge-repeater { background: #FFF7ED; color: #9A3412; }
.badge-similar { background: #EFF6FF; color: #1E40AF; }

.badge-status-new { background: #3B82F6; color: #FFFFFF; font-weight: bold; box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }
.badge-status-processed { background: #10B981; color: #FFFFFF; font-weight: bold; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.badge-status-analyzed { background: #ECFDF5; color: #065F46; }
.badge-status-pending { background: #FEF3C7; color: #92400E; }
.badge-status-posted { background: #D1FAE5; color: #065F46; }
.badge-status-approved { background: #D1FAE5; color: #065F46; }

.highlight-review {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 4px 16px var(--primary-glow) !important;
}

/* ── Review List ── */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

/* ── AI Insight Box ── */
.ai-insight-box {
    background: linear-gradient(135deg, #F8FAFF 0%, #F1F5FE 100%);
    border: 1px solid #E0E7FF;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.75rem;
}

/* ── Action Button Group ── */
.action-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.action-btn-group .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* ── Refresh Button ── */
.refresh-btn {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: all var(--transition);
}

.refresh-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════
   ACCORDION REVIEW CARDS
   ═══════════════════════════════════════════════════ */
.review-accordion {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.review-accordion:hover {
    box-shadow: var(--shadow-md);
    border-color: #CBD5E1;
}

.review-accordion.expanded {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    gap: 1rem;
    transition: background var(--transition);
}

.accordion-header:hover {
    background: var(--background);
}

.accordion-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.accordion-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.accordion-chevron {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: all var(--transition);
    flex-shrink: 0;
}

.review-accordion.expanded .accordion-chevron {
    background: var(--primary-light);
    color: var(--primary);
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-accordion.expanded .accordion-body {
    max-height: 2000px;
}

.accordion-body-inner {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.review-preview-text {
    color: var(--text-muted);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.rating-stars-sm {
    color: #FBBC04;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════
   AUTH SCREENS — Login & OTP
   ═══════════════════════════════════════════════════ */
.auth-bg {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #4F46E5, #7C3AED, #6366F1, #818CF8);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px; right: -100px;
    animation: float 8s ease-in-out infinite;
}

.auth-bg::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -50px; left: -50px;
    animation: float 10s ease-in-out infinite 2s;
}

.login-container {
    max-width: 420px;
    width: 100%;
    padding: 1rem;
    z-index: 10;
}

.login-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    color: white;
}

.login-card label { color: rgba(255, 255, 255, 0.7); }

.login-card input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--radius-sm);
}

.login-card input::placeholder { color: rgba(255, 255, 255, 0.4); }

.login-card input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.login-card .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.login-card .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.auth-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════ */

/* Nav */
.nav-landing {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition);
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo ion-icon { color: var(--primary); }

/* Hero */
.hero {
    padding: 7rem 2rem 6rem;
    text-align: center;
    background: linear-gradient(160deg, #F8FAFC 0%, #EEF2FF 40%, #E0E7FF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
    top: -200px; right: -100px;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.06) 0%, transparent 70%);
    bottom: -100px; left: -50px;
    border-radius: 50%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.08;
    position: relative;
    z-index: 1;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), #7C3AED, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-item {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-item:hover::before { opacity: 1; }

.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

/* ═══════════════════════════════════════════════════
   PUBLIC REVIEW PAGE (light-review-page)
   ═══════════════════════════════════════════════════ */
body.light-review-page {
    background: #F8FAFC !important;
    color: #1E293B !important;
    min-height: 100vh;
    display: block;
}

.light-review-page .container {
    max-width: 500px;
    margin: 0 auto;
}

.light-review-page .card {
    background: white;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-md);
}

.light-review-page label {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
}

.light-review-page input,
.light-review-page textarea {
    background: #FFFFFF !important;
    border: 1.5px solid #E2E8F0 !important;
    color: #1E293B !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.75rem 1rem !important;
}

.light-review-page input:focus,
.light-review-page textarea:focus {
    border-color: #4F46E5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.06) !important;
}

/* Star Rating */
.light-review-page .star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.75rem;
}

.light-review-page .star-rating input { display: none; }

.light-review-page .star-rating label {
    font-size: 2.25rem;
    color: #E2E8F0;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
    text-transform: none;
    letter-spacing: 0;
}

.light-review-page .star-rating label:hover { transform: scale(1.15); }

.light-review-page .star-rating label:hover,
.light-review-page .star-rating label:hover~label,
.light-review-page .star-rating input:checked~label {
    color: #FBBC04;
}

.light-review-page .google-stars {
    color: #FBBC04;
    display: flex;
    gap: 2px;
}

/* Distribution Bars */
.light-review-page .distribution-row,
.distribution-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.light-review-page .dist-label,
.dist-label {
    font-size: 0.7rem;
    width: 14px;
    color: #64748B;
    font-weight: 600;
}

.light-review-page .dist-bar-bg,
.dist-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    overflow: hidden;
}

.light-review-page .dist-bar-fill,
.dist-bar-fill {
    height: 100%;
    background: #FBBC04;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.light-review-page .btn-primary {
    background: linear-gradient(135deg, #4F46E5, #6366F1) !important;
    color: white !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 0.875rem 1.5rem !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25) !important;
}

.light-review-page .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35) !important;
}

/* Summary Header Card */
.summary-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid #E2E8F0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.rating-big-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1E293B;
    line-height: 1;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    position: relative;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1.25rem;
    font-size: 1.5rem;
    color: var(--text-subtle);
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.modal-close:hover { color: var(--text-main); }

/* ═══════════════════════════════════════════════════
   PLUGIN PAGE (Embeddable Reviews)
   ═══════════════════════════════════════════════════ */
.plugin-container {
    max-width: 720px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.header-minimal {
    text-align: center;
    margin-bottom: 2.5rem;
}

.review-card-static {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.review-card-static:hover {
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════ */
.google-stars {
    color: #FBBC04;
    display: flex;
    gap: 2px;
}

.author-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   PREMIUM DASHBOARD COMPONENTS
   ═══════════════════════════════════════════════════ */

/* ── Page Section Header ── */
.page-section {
    margin-bottom: 2rem;
}

.page-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.page-section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.04;
    transform: translate(30%, -30%);
    transition: opacity var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::after { opacity: 0.08; }

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.stat-card-icon.primary {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    color: var(--primary);
}

.stat-card-icon.success {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    color: var(--success);
}

.stat-card-icon.warning {
    background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
    color: var(--warning);
}

.stat-card-icon.info {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: var(--info);
}

.stat-card-icon.danger {
    background: linear-gradient(135deg, #FEF2F2, #FECACA);
    color: var(--danger);
}

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

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-top: 0.15rem;
}

/* ── Business Cards ── */
.business-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.business-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.business-card:hover {
    border-color: #CBD5E1;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.business-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

.business-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.business-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.business-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Pricing Cards ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    transition: background var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.12);
}

.pricing-card.featured::before {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    height: 4px;
}

.pricing-badge {
    position: absolute;
    top: 16px;
    right: -28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.25rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transform: rotate(45deg);
}

.pricing-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.pricing-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.pricing-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pricing-per-credit {
    font-size: 0.75rem;
    color: var(--text-subtle);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: left;
}

.pricing-features li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features li ion-icon {
    color: var(--success);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Hero Balance Card ── */
.balance-hero {
    background: linear-gradient(135deg, var(--primary), #7C3AED, var(--accent));
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.25);
}

.balance-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    top: -100px;
    right: -80px;
}

.balance-hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -60px;
    left: -40px;
}

.balance-hero-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.balance-hero-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.balance-hero-sub {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.75rem;
    position: relative;
    z-index: 1;
}

/* ── Settings Groups ── */
.settings-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.settings-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.settings-group-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.settings-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.settings-group-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Color Swatches ── */
.color-swatches {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--text-main);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text-muted);
}

/* ── Empty States ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 auto 1.25rem;
    animation: float 4s ease-in-out infinite;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.9rem;
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Content Header Upgrade ── */
.content-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
    opacity: 0.4;
}

/* ── Filter Chips ── */
.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── Danger Zone ── */
.danger-zone {
    background: var(--danger-light);
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
}

.danger-zone-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 0.5rem;
}

.danger-zone-text {
    font-size: 0.8rem;
    color: #991B1B;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ── Info Cards ── */
.info-card {
    background: var(--info-light);
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-card-icon {
    color: var(--info);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.info-card-text {
    font-size: 0.85rem;
    color: #1E40AF;
    line-height: 1.5;
}

/* ── Success Toast ── */
.success-toast {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--success-light);
    color: #065F46;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: fadeInUp 0.3s ease;
}

/* ── Risk Bar (left edge indicator) ── */
.risk-indicator {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    transition: background var(--transition);
}

.risk-indicator.low { background: var(--success); }
.risk-indicator.medium { background: var(--warning); }
.risk-indicator.high { background: var(--danger); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.25rem; }
    .hero { padding: 5rem 1.5rem 4rem; }
    .feature-grid { padding: 3rem 1rem; gap: 1rem; }
    .nav-landing { padding: 0 1.5rem; }
    .summary-header-card { flex-direction: column; gap: 1.5rem; text-align: center; }
    .container { padding: 1.5rem; }
}