/* ================================================
   GREEENY - UNIFIED STYLESHEET
   Version 1.0
   
   Sections:
   1. CSS Variables & Reset
   2. Typography & Base
   3. Common Components
   4. MVP App Styles (body.app-body)
   5. Landing Page Styles (body.landing-body)
   6. Dashboard Styles (body.dashboard-body)
   7. Responsive
   ================================================ */

/* ================================================
   1. CSS VARIABLES & RESET
   ================================================ */

:root {
    /* Primary - Forest Fresh */
    --primary: #7CB342;
    --primary-light: #9ACD32;
    --primary-dark: #3A6B1C;
    
    /* Accent */
    --accent: #F59E0B;
    --accent-light: #FCD34D;
    --accent-dark: #D97706;
    
    /* Backgrounds */
    --bg-main: #F0FDF4;
    --bg-soft: #DCFCE7;
    --bg-card: #FFFFFF;
    
    /* Text */
    --text-dark: #064E3B;
    --text-primary: #065F46;
    --text-muted: #6B7280;
    
    /* Borders */
    --border: #D1FAE5;
    --border-medium: #A7F3D0;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(124, 179, 66, 0.08);
    --shadow-md: 0 4px 20px rgba(124, 179, 66, 0.12);
    --shadow-lg: 0 8px 40px rgba(124, 179, 66, 0.16);
    
    /* Dashboard Pro Theme */
    --pro-primary: #6366F1;
    --pro-primary-light: #818CF8;
    --pro-primary-dark: #4338CA;
    --pro-bg-dark: #1E1B4B;
    --pro-bg-soft: #312E81;
    --pro-text-light: #F8F7FF;
    --pro-text-muted: #A5B4FC;
    --pro-border: rgba(167, 139, 250, 0.2);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

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

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

/* ================================================
   2. TYPOGRAPHY & BASE
   ================================================ */

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-main);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ================================================
   3. COMMON COMPONENTS
   ================================================ */

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--bg-soft);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
}

.lang-btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.lang-btn:hover {
    color: var(--text-dark);
    background: rgba(124, 179, 66, 0.1);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.3);
}

/* --- Status Badge --- */
.status-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Premium Tag --- */
.premium-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: var(--space-sm);
}

/* --- Success Message --- */
.success-message {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 1000;
    max-width: 90%;
    text-align: center;
}

.success-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.success-message.error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}


/* ================================================
   4. MVP APP STYLES (body.app-body)
   ================================================ */

body.app-body {
    background: var(--bg-main);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- App Header --- */
body.app-body .app-header {
    flex-shrink: 0;
    background: var(--bg-card);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-md);
    border-bottom: 2px solid var(--border);
}

body.app-body .header-logo-link {
    display: inline-flex;
    align-items: center;
}

body.app-body .app-logo-img {
    height: 36px;
    width: auto;
    margin: 0 auto;
}

/* --- App Main --- */
body.app-body .app-main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

body.app-body .section {
    padding: var(--space-lg) var(--space-md);
}

/* --- App Language Switcher --- */
body.app-body .lang-switcher {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
    background: transparent;
    border: none;
    gap: var(--space-sm);
}

body.app-body .lang-btn {
    padding: 12px 24px;
    border: 2px solid #A7F3D0;
    border-radius: var(--radius-md);
    background-color: #FFFFFF;
    min-width: 60px;
    color: #064E3B;
    font-size: 1rem;
    font-weight: 700;
    -webkit-appearance: none;
    appearance: none;
}

body.app-body .lang-btn.active {
    border-color: #7CB342;
    background-color: #7CB342;
    color: #FFFFFF;
}

/* --- Scan Button --- */
.scan-button {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.scan-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.scan-button:active {
    transform: translateY(0);
}

.scan-button.stop {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.btn-icon,
.btn-icon-small {
    flex-shrink: 0;
}

/* --- QR Scanner (stile gestito dal modale) --- */

/* --- Scanner Modal Overlay --- */
.scanner-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.scanner-modal.open {
    display: flex;
}

.scanner-modal-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.scanner-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#qr-reader {
    border-radius: 0;
    margin: 0;
    border: none;
    display: block !important;
}

.qr-result {
    background: rgba(124, 179, 66, 0.1);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    display: none;
    word-break: break-all;
}

.qr-result strong {
    color: var(--primary-dark);
    display: block;
    margin-bottom: var(--space-sm);
}

/* --- Loading Overlay --- */
#loading,
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

.spinner {
    border: 4px solid rgba(124, 179, 66, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

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

.loading-content p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- ESG Card Section --- */
#esg-card-section {
    display: none;
}

.reset-button {
    margin-bottom: var(--space-lg);
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.reset-button:hover {
    background: var(--primary-dark);
}

.company-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border);
}

.company-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.company-legal {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.company-year-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
}

/* --- Category Titles --- */
.category-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: var(--space-lg) 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.category-icon {
    color: var(--primary);
    flex-shrink: 0;
}

/* --- Indicator Cards --- */
.indicator-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.indicator-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.indicator-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.indicator-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary);
}

.indicator-value {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.data-value {
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 700;
}

.data-unit {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.trend-badge {
    background: rgba(124, 179, 66, 0.15);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
}

.trend-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
}

.no-data {
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-lg);
    font-style: italic;
}

/* --- Submit Button --- */
.submit-button {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feedback-btn {
    margin-top: var(--space-xl);
}

/* --- Survey Section --- */
#survey-section {
    display: none;
}

.survey-section {
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
}

.survey-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
}

.question-block {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.question-text {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: var(--space-md);
    line-height: 1.5;
    font-size: 1rem;
}

.question-hint {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.radio-group-inline {
    flex-direction: row;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 16px;
    background: rgba(124, 179, 66, 0.05);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: rgba(124, 179, 66, 0.1);
    border-color: var(--primary);
}

.radio-option input[type="radio"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.radio-label {
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1rem;
}

.radio-group-inline .radio-option {
    flex: 1;
    justify-content: center;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: var(--space-md);
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="text"] {
    width: 100%;
    padding: var(--space-md);
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}


/* ================================================
   4b. BOTTOM NAV & TAB SYSTEM (body.app-body)
   ================================================ */

/* --- Tab Panels --- */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* --- Bottom Navigation --- */
/* Flex item sul body — niente position:fixed, niente flicker su Safari iOS */
.bottom-nav {
    flex-shrink: 0;
    width: 100%;
    height: 64px;
    background: var(--bg-card);
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active svg {
    transform: scale(1.1);
}

/* Spazio sotto il contenuto dentro app-main (nav non è più fixed) */
body.app-body .app-main {
    padding-bottom: 16px;
}

body.app-body .footer-disclaimer {
    margin-bottom: 16px;
}

/* --- Quick Stats --- */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-md) 0;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 36px;
    height: 36px;
    background: rgba(124, 179, 66, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    color: var(--primary);
}

.stat-icon.accent {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
}

.stat-icon.streak {
    background: rgba(99, 102, 241, 0.12);
    color: #6366F1;
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.2;
}

/* --- Recent Scans --- */
.recent-scans {
    padding: var(--space-lg) var(--space-md);
}

.recent-scans-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

.recent-scans-empty {
    background: var(--bg-card);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
}

.recent-scans-empty svg {
    margin: 0 auto var(--space-sm);
    display: block;
}

.recent-scans-empty p {
    font-size: 0.9rem;
}

/* --- Tab Placeholder --- */
.tab-placeholder {
    padding: var(--space-2xl) var(--space-md);
    text-align: center;
}

.tab-placeholder-icon {
    width: 80px;
    height: 80px;
    background: rgba(124, 179, 66, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: var(--primary);
}

.tab-placeholder-icon.accent {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.tab-placeholder-icon.profile {
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
}

.tab-placeholder-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.tab-placeholder-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

.tab-placeholder-coming {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

/* --- WIP Overlay --- */
.tab-panel.wip {
    position: relative;
}

.tab-panel.wip::after {
    content: 'In sviluppo';
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.45);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    pointer-events: none;
    border-radius: 0;
}

/* --- Placeholder Cards (Learn tab) --- */
.placeholder-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 400px;
    margin: 0 auto;
}

.placeholder-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: left;
}

.placeholder-card-badge {
    display: inline-block;
    background: rgba(124, 179, 66, 0.15);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.placeholder-card-line {
    height: 10px;
    background: var(--bg-soft);
    border-radius: 5px;
    margin-bottom: var(--space-sm);
}

.placeholder-card-line.long { width: 100%; }
.placeholder-card-line.medium { width: 75%; }
.placeholder-card-line.short { width: 50%; margin-bottom: 0; }

/* --- Placeholder Badges (Rewards tab) --- */
.placeholder-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.placeholder-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-badge.locked {
    background: var(--bg-soft);
    color: var(--text-muted);
    border: 2px dashed var(--border-medium);
    opacity: 0.6;
}

/* --- Placeholder Menu (Profile tab) --- */
.placeholder-menu {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.placeholder-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
}

.placeholder-menu-item span {
    flex: 1;
    text-align: left;
}

.placeholder-menu-item svg:first-child {
    color: var(--primary);
    flex-shrink: 0;
}

.placeholder-menu-item svg:last-child {
    color: var(--text-muted);
    flex-shrink: 0;
}


/* ================================================
   4c. REWARDS / GAMIFICATION (body.app-body)
   ================================================ */

/* --- Rewards Header --- */
.rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-md) var(--space-md);
}

.rewards-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
}

.rewards-points-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.rewards-points-badge svg {
    flex-shrink: 0;
}

/* --- Badge Row --- */
.rewards-badges-row {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rewards-badges-row::-webkit-scrollbar {
    display: none;
}

.rewards-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    scroll-snap-align: center;
    transition: transform 0.3s ease;
}

.rewards-badge-img-wrap {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rewards-badge-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.rewards-badge-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
}

.rewards-badge-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Locked state */
.rewards-badge.locked .rewards-badge-img {
    filter: grayscale(100%);
    opacity: 0.5;
}

.rewards-badge.locked .rewards-badge-lock {
    display: flex;
}

/* Unlocked state */
.rewards-badge.unlocked .rewards-badge-img-wrap {
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(124, 179, 66, 0.25);
}

.rewards-badge.unlocked .rewards-badge-img {
    filter: none;
    opacity: 1;
}

.rewards-badge.unlocked .rewards-badge-lock {
    display: none;
}

.rewards-badge.unlocked .rewards-badge-name {
    color: var(--primary-dark);
    font-weight: 700;
}

/* Next badge to unlock - pulsing dashed border */
.rewards-badge.next .rewards-badge-img-wrap {
    border: 3px dashed var(--primary);
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

.rewards-badge.next .rewards-badge-img {
    filter: grayscale(50%);
    opacity: 0.7;
}

.rewards-badge.next .rewards-badge-lock {
    display: none;
}

.rewards-badge.next .rewards-badge-name {
    color: var(--primary);
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 179, 66, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(124, 179, 66, 0); }
}

/* --- Progress Card --- */
.rewards-progress-card {
    margin: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.rewards-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.rewards-progress-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.rewards-progress-badge-name {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.rewards-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.rewards-progress-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-soft);
    border-radius: 5px;
    overflow: hidden;
}

.rewards-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 5px;
    transition: width 0.6s ease;
}

.rewards-progress-percent {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 36px;
    text-align: right;
}

.rewards-progress-counters {
    display: flex;
    justify-content: space-around;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

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

.rewards-counter-icon {
    font-size: 1.2rem;
}

.rewards-counter-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
}

.rewards-counter-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.rewards-progress-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.rewards-progress-hint strong {
    color: var(--primary);
}

/* --- How to Earn Points --- */
.rewards-earn-section {
    padding: 0 var(--space-md) var(--space-md);
}

.rewards-earn-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

.rewards-earn-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.rewards-earn-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
}

.rewards-earn-icon {
    width: 44px;
    height: 44px;
    background: rgba(124, 179, 66, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.rewards-earn-icon.survey {
    background: rgba(99, 102, 241, 0.12);
    color: #6366F1;
}

.rewards-earn-icon.article {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
}

.rewards-earn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rewards-earn-text strong {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.rewards-earn-text span {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- Rewards Banner --- */
.rewards-banner {
    margin: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(124, 179, 66, 0.1), rgba(154, 205, 50, 0.08));
    border: 2px solid rgba(124, 179, 66, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.rewards-banner-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.rewards-banner p {
    font-size: 0.9rem;
    color: var(--primary-dark);
    line-height: 1.5;
    font-weight: 500;
}

/* --- Badge Toast Notification --- */
.badge-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: 0 8px 30px rgba(124, 179, 66, 0.35);
    z-index: 1100;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    opacity: 0;
    max-width: 90%;
}

.badge-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.badge-toast-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
}

.badge-toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-toast-text strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.badge-toast-text span {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}


/* ================================================
   4d. LEARN / ARTICLES (body.app-body)
   ================================================ */

/* --- Learn Header --- */
.learn-header {
    padding: var(--space-lg) var(--space-md) var(--space-sm);
}

.learn-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.learn-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Category Filters --- */
.learn-filters {
    display: flex;
    gap: 6px;
    padding: var(--space-sm) var(--space-md);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.learn-filters::-webkit-scrollbar {
    display: none;
}

.learn-filter {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.learn-filter:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

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

/* --- Article Cards --- */
.learn-articles {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
}

.learn-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.learn-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Category badge colors */
.learn-card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--space-sm);
}

.learn-card-badge.env {
    background: rgba(124, 179, 66, 0.15);
    color: #3A6B1C;
}

.learn-card-badge.soc {
    background: rgba(59, 130, 246, 0.12);
    color: #1D4ED8;
}

.learn-card-badge.gov {
    background: rgba(139, 92, 246, 0.12);
    color: #6D28D9;
}

.learn-card-badge.news {
    background: rgba(107, 114, 128, 0.12);
    color: #4B5563;
}

.learn-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.learn-card-summary {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.learn-card-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: #94A3B8;
    margin-bottom: var(--space-md);
}

.learn-card-source {
    font-weight: 600;
}

.learn-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(124, 179, 66, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.learn-card-btn:hover {
    background: rgba(124, 179, 66, 0.2);
}

/* --- Empty State --- */
.learn-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
}

.learn-empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(124, 179, 66, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: var(--primary);
}

.learn-empty-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

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

/* --- Article Modal --- */
.learn-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 950;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.learn-modal.open {
    opacity: 1;
    visibility: visible;
}

.learn-modal-content {
    background: var(--bg-main);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.learn-modal-header {
    position: sticky;
    top: 0;
    background: var(--bg-main);
    padding: var(--space-md) var(--space-md) 0;
    display: flex;
    justify-content: flex-end;
    z-index: 5;
}

.learn-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s;
}

.learn-modal-close:hover {
    background: var(--border-medium);
    color: var(--text-dark);
}

.learn-modal-body {
    padding: var(--space-md) var(--space-lg) var(--space-2xl);
}

.learn-modal-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

.learn-modal-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: #94A3B8;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.learn-modal-meta span:first-child {
    font-weight: 600;
}

/* Article rendered content */
.learn-article-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.learn-article-content p {
    margin-bottom: var(--space-md);
}

.learn-article-content strong {
    color: var(--primary-dark);
}

.learn-article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.learn-article-content a:hover {
    color: var(--primary-dark);
}

.learn-article-content h2,
.learn-article-content h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.learn-article-content ul,
.learn-article-content ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.learn-article-content li {
    margin-bottom: var(--space-xs);
}

.learn-article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: var(--space-md) var(--space-lg);
    background: rgba(124, 179, 66, 0.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--space-md) 0;
    font-style: italic;
    color: var(--text-primary);
}

/* --- Learn Responsive --- */
@media (min-width: 640px) {
    .learn-articles {
        grid-template-columns: repeat(2, 1fr);
    }

    .learn-modal-content {
        max-height: 85vh;
        border-radius: var(--radius-xl);
        margin: auto;
    }

    .learn-modal {
        align-items: center;
        padding: var(--space-lg);
    }
}


/* ================================================
   5. LANDING PAGE STYLES (body.landing-body)
   ================================================ */

body.landing-body {
    background: var(--bg-main);
}

/* --- Landing Header --- */
body.landing-body .header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

body.landing-body .header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.landing-body .header-logo img {
    height: 50px;
    width: auto;
}

body.landing-body .header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

/* --- Hero Section --- */
body.landing-body .hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-main) 100%);
}

body.landing-body .hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

body.landing-body .hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

body.landing-body .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
}

/* --- Hero CTAs --- */
body.landing-body .hero-ctas {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

body.landing-body .cta-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 20px 32px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 280px;
}

body.landing-body .cta-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

body.landing-body .cta-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

body.landing-body .cta-secondary {
    background: var(--bg-card);
    color: var(--text-dark);
    border: 2px solid var(--border-medium);
}

body.landing-body .cta-secondary:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

body.landing-body .cta-secondary .cta-icon {
    color: var(--primary);
}

body.landing-body .cta-icon {
    flex-shrink: 0;
}

body.landing-body .cta-text {
    text-align: left;
}

body.landing-body .cta-label {
    display: block;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

body.landing-body .cta-desc {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* --- Sections Base --- */
body.landing-body .section {
    padding: 80px 0;
}

body.landing-body .section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

body.landing-body .section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

body.landing-body .section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

body.landing-body .section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* --- Steps Section --- */
body.landing-body .steps-section {
    background: var(--bg-card);
    padding: 60px 0;
}

body.landing-body .steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

body.landing-body .step-card {
    text-align: center;
    padding: var(--space-xl);
}

body.landing-body .step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-md);
}

body.landing-body .step-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

body.landing-body .step-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Benefits Section --- */
body.landing-body .benefits-section {
    background: var(--bg-main);
}

body.landing-body .benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

body.landing-body .benefit-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all 0.3s ease;
    position: relative;
}

body.landing-body .benefit-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

body.landing-body .benefit-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-soft);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: var(--space-lg);
}

body.landing-body .benefit-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

body.landing-body .benefit-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- CTA Section --- */
body.landing-body .cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    text-align: center;
}

body.landing-body .cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
}

body.landing-body .cta-text {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

body.landing-body .launch-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* --- Landing Footer --- */
body.landing-body .footer {
    background: var(--text-dark);
    color: white;
    padding: var(--space-2xl) 0 var(--space-xl);
    text-align: center;
}

body.landing-body .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

body.landing-body .footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

body.landing-body .footer-logo {
    height: 80px;
    width: auto;
}

body.landing-body .footer-message {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

body.landing-body .footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-bottom: var(--space-lg);
}

body.landing-body .footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

body.landing-body .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

body.landing-body .footer-links a:hover {
    color: white;
}

body.landing-body .footer-copy {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}


/* ================================================
   6. DASHBOARD STYLES (body.dashboard-body)
   Greeeny Insight - Blue Theme
   ================================================ */

/* Dashboard Color Variables */
body.dashboard-body {
    --dash-primary: #0EA5E9;
    --dash-primary-light: #38BDF8;
    --dash-primary-dark: #0369A1;
    --dash-accent: #06B6D4;
    --dash-bg-dark: #0F172A;
    --dash-bg-card: #1E293B;
    --dash-text-light: #F1F5F9;
    --dash-text-muted: #94A3B8;
    --dash-border: rgba(14, 165, 233, 0.2);
    
    background: var(--dash-bg-dark);
    color: var(--dash-text-light);
    min-height: 100vh;
    padding: var(--space-lg);
}

/* --- Dashboard Container --- */
body.dashboard-body .dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Dashboard Header --- */
body.dashboard-body .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--dash-border);
    flex-wrap: wrap;
    gap: var(--space-md);
}

body.dashboard-body .dashboard-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

body.dashboard-body .dashboard-logo {
    height: 60px;
    width: auto;
}

body.dashboard-body .dashboard-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dash-text-light);
}

body.dashboard-body .dashboard-subtitle {
    font-size: 0.85rem;
    color: var(--dash-text-muted);
}

body.dashboard-body .dashboard-meta {
    text-align: right;
}

body.dashboard-body .dashboard-update {
    font-size: 0.8rem;
    color: #64748B;
}

/* --- KPI Cards --- */
body.dashboard-body .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

body.dashboard-body .kpi-card {
    background: linear-gradient(135deg, var(--dash-bg-card) 0%, #334155 100%);
    border: 1px solid var(--dash-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

body.dashboard-body .kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--dash-primary) 0%, var(--dash-primary-dark) 100%);
}

body.dashboard-body .kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.2);
    border-color: var(--dash-primary);
}

body.dashboard-body .kpi-icon {
    width: 48px;
    height: 48px;
    background: rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--dash-primary);
}

body.dashboard-body .kpi-value {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dash-text-light);
    margin-bottom: var(--space-xs);
    line-height: 1;
}

body.dashboard-body .kpi-label {
    font-size: 0.9rem;
    color: var(--dash-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

body.dashboard-body .kpi-trend {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

body.dashboard-body .kpi-trend.positive {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

body.dashboard-body .kpi-trend.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* --- Chart Grid --- */
body.dashboard-body .chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

body.dashboard-body .chart-card {
    background: var(--dash-bg-card);
    border: 1px solid var(--dash-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.3s ease;
}

body.dashboard-body .chart-card:hover {
    border-color: var(--dash-primary);
}

body.dashboard-body .chart-card.full-width {
    grid-column: 1 / -1;
}

body.dashboard-body .chart-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dash-text-light);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

body.dashboard-body .chart-title-icon {
    width: 32px;
    height: 32px;
    background: rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dash-primary);
}

body.dashboard-body .chart-container {
    position: relative;
    height: 280px;
}

body.dashboard-body .chart-container.large {
    height: 350px;
}

body.dashboard-body .chart-container.small {
    height: 220px;
}

/* --- Map --- */
body.dashboard-body #map {
    height: 450px;
    border-radius: var(--radius-md);
    border: 1px solid var(--dash-border);
}

body.dashboard-body .leaflet-popup-content-wrapper {
    background: var(--dash-bg-card);
    color: var(--dash-text-light);
    border: 1px solid var(--dash-primary);
    border-radius: var(--radius-md);
}

body.dashboard-body .leaflet-popup-tip {
    background: var(--dash-bg-card);
}

/* --- City List --- */
body.dashboard-body .city-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

body.dashboard-body .city-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--dash-primary);
    transition: all 0.2s ease;
}

body.dashboard-body .city-item:hover {
    background: rgba(14, 165, 233, 0.1);
    transform: translateX(4px);
}

body.dashboard-body .city-name {
    font-weight: 600;
    color: var(--dash-text-light);
}

body.dashboard-body .city-region {
    font-size: 0.8rem;
    color: #64748B;
}

body.dashboard-body .city-count {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dash-primary);
}

/* --- Suggestion List --- */
body.dashboard-body .suggestion-list {
    max-height: 400px;
    overflow-y: auto;
}

body.dashboard-body .suggestion-item {
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--dash-accent);
    transition: all 0.2s ease;
}

body.dashboard-body .suggestion-item:hover {
    background: rgba(6, 182, 212, 0.08);
}

body.dashboard-body .suggestion-text {
    color: #E2E8F0;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
    font-style: italic;
}

body.dashboard-body .suggestion-meta {
    font-size: 0.8rem;
    color: #64748B;
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

body.dashboard-body .suggestion-meta svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

/* --- No Data --- */
body.dashboard-body .no-data {
    text-align: center;
    padding: var(--space-2xl);
    color: #64748B;
    font-style: italic;
}

/* --- Scrollbar --- */
body.dashboard-body .city-list::-webkit-scrollbar,
body.dashboard-body .suggestion-list::-webkit-scrollbar {
    width: 6px;
}

body.dashboard-body .city-list::-webkit-scrollbar-track,
body.dashboard-body .suggestion-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

body.dashboard-body .city-list::-webkit-scrollbar-thumb,
body.dashboard-body .suggestion-list::-webkit-scrollbar-thumb {
    background: var(--dash-primary);
    border-radius: 10px;
}

/* --- Dashboard Responsive --- */
@media (max-width: 1024px) {
    body.dashboard-body .chart-grid {
        grid-template-columns: 1fr;
    }
    
    body.dashboard-body .chart-card.full-width {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    body.dashboard-body {
        padding: var(--space-md);
    }
    
    body.dashboard-body .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    body.dashboard-body .dashboard-meta {
        text-align: center;
    }
    
    body.dashboard-body .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    body.dashboard-body .kpi-value {
        font-size: 2rem;
    }
    
    body.dashboard-body #map {
        height: 350px;
    }
    
    body.dashboard-body .chart-container {
        height: 250px;
    }
}


/* ================================================
   7. RESPONSIVE
   ================================================ */

/* --- Desktop (min-width: 640px) - MVP --- */
@media (min-width: 640px) {
    body.app-body .app-header {
        padding: 0 var(--space-lg);
    }

    body.app-body .app-logo-img {
        height: 40px;
    }
    
    body.app-body .app-main {
        max-width: 600px;
        margin: 0 auto;
    }
    
    body.app-body .section {
        padding: var(--space-lg);
    }
    
    body.app-body .lang-btn {
        padding: 14px 28px;
        font-size: 1.1rem;
    }
    
    .scan-button {
        font-size: 1.2rem;
        padding: 20px 28px;
    }
    
    .company-name {
        font-size: 1.8rem;
    }
    
    .question-block {
        padding: var(--space-lg);
    }
}

/* --- Large Desktop (min-width: 1024px) - MVP --- */
@media (min-width: 1024px) {
    body.app-body .app-logo-img {
        height: 44px;
    }
}

/* --- Tablet (max-width: 1024px) - Landing --- */
@media (max-width: 1024px) {
    body.landing-body .hero-title {
        font-size: 2.5rem;
    }
    
    body.landing-body .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Mobile (max-width: 768px) - Landing --- */
@media (max-width: 768px) {
    body.landing-body .header-container {
        padding: 0 var(--space-md);
    }
    
    body.landing-body .header-logo img {
        height: 40px;
    }
    
    body.landing-body .status-badge {
        display: none;
    }
    
    body.landing-body .hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }
    
    body.landing-body .hero-container {
        padding: 0 var(--space-md);
    }
    
    body.landing-body .hero-title {
        font-size: 1.8rem;
    }
    
    body.landing-body .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--space-xl);
    }
    
    body.landing-body .hero-ctas {
        flex-direction: column;
        align-items: center;
    }
    
    body.landing-body .cta-card {
        width: 100%;
        max-width: 320px;
        min-width: auto;
    }
    
    body.landing-body .section {
        padding: var(--space-2xl) 0;
    }
    
    body.landing-body .section-container {
        padding: 0 var(--space-md);
    }
    
    body.landing-body .section-title {
        font-size: 1.6rem;
    }
    
    body.landing-body .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    body.landing-body .step-card {
        padding: var(--space-lg);
    }
    
    body.landing-body .benefits-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    body.landing-body .benefit-card {
        padding: var(--space-lg);
    }
    
    body.landing-body .cta-title {
        font-size: 1.5rem;
    }
    
    body.landing-body .cta-text {
        font-size: 1rem;
    }
    
    body.landing-body .footer {
        padding: var(--space-xl) 0 var(--space-lg);
    }
    
    body.landing-body .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}
