@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-primary: #2E7D32;
    --color-primary-dark: #1B5E20;
    --color-primary-light: #E8F5E9;
    --color-primary-accent: #4CAF50;
    --color-secondary: #0288D1;
    --color-secondary-light: #E1F5FE;
    --color-accent-amber: #FF9800;
    --color-accent-amber-light: #FFF3E0;
    --color-accent-purple: #7E57C2;
    
    --color-background: #F4F7F4;
    --color-surface: #FFFFFF;
    --color-surface-translucent: rgba(255, 255, 255, 0.88);
    --color-border: #E0E7E0;
    
    --color-text: #1E2923;
    --color-text-secondary: #52635A;
    --color-muted: #7D8F85;
    
    --shadow-sm: 0 2px 8px rgba(30, 70, 40, 0.06);
    --shadow-md: 0 4px 16px rgba(30, 70, 40, 0.10);
    --shadow-lg: 0 10px 30px rgba(30, 70, 40, 0.14);
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    height: -webkit-fill-available;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(76, 175, 80, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(2, 136, 209, 0.05) 0%, transparent 40%);
    height: 100%;
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior-y: none;
    touch-action: manipulation;
}

/* App Shell Layout */
#app-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    max-width: 560px;
    margin: 0 auto;
    background-color: var(--color-surface);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* Header */
#header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: white;
    padding: 12px 18px;
    padding-top: max(12px, env(safe-area-inset-top, 12px));
    padding-left: max(16px, env(safe-area-inset-left, 16px));
    padding-right: max(16px, env(safe-area-inset-right, 16px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 20;
    flex-shrink: 0;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.brand-icon {
    font-size: 1.6rem;
    animation: leaf-sway 4s ease-in-out infinite;
}

#header-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-xp-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

#lang-switcher {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

#lang-switcher option {
    color: var(--color-text);
    background: white;
}

.btn-header-ai {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-header-ai:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.35);
}

/* Main Content */
#main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    scroll-behavior: smooth;
}

/* Cards & Containers */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hero {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 50%, #E1F5FE 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.card-hero::before {
    content: "🌱";
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 5rem;
    opacity: 0.15;
    pointer-events: none;
}

.card-glass {
    background: var(--color-surface-translucent);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-accent) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
    transition: all 0.2s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.35);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-primary-dark);
    border: 1.5px solid var(--color-primary);
    box-shadow: none;
}

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

.btn-accent {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    width: auto;
}

/* Score Dial & Gauges */
.score-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.general-score-card {
    text-align: center;
    padding: 20px 16px;
    background: radial-gradient(circle at center, #FFFFFF 0%, #F1F8E9 100%);
    border: 2px solid #C8E6C9;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.score-number-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 8px 0;
}

.score-big {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    line-height: 1;
}

.score-max {
    font-size: 1.5rem;
    color: var(--color-muted);
    font-weight: 600;
    margin-left: 2px;
}

.level-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid #A5D6A7;
    margin-top: 4px;
}

/* Dual Axes Grid */
.axes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.axis-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.axis-card.bio {
    border-top: 4px solid var(--color-primary-accent);
}

.axis-card.sus {
    border-top: 4px solid var(--color-secondary);
}

.axis-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.axis-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.axis-score {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 2px 0;
}

/* Component Breakdown Bars */
.component-bar-item {
    margin-bottom: 10px;
}

.component-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.progress-track {
    background: #E8EDE8;
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-accent), var(--color-primary));
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.sus {
    background: linear-gradient(90deg, #4FC3F7, var(--color-secondary));
}

/* XP Bar */
.xp-container {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
}

.xp-track {
    background: #E0E0E0;
    height: 10px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.xp-fill {
    background: linear-gradient(90deg, #FFB300, #FF6F00);
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* Question Wizard */
.question-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.question-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.question-badge {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.question-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.question-help {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    background: #F9FBF9;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary-accent);
    margin-bottom: 18px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: #F8FAF8;
    border: 2px solid var(--color-border);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

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

.option-btn.selected {
    background: #E8F5E9;
    border-color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

/* Discoveries & Photo Grid */
.discoveries-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.discovery-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.discovery-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: #E8EDE8;
}

.discovery-img-placeholder {
    height: 110px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.discovery-body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.discovery-species {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2px;
}

.discovery-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
}

.discovery-role {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

/* Missions Cards */
.mission-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary-accent);
}

.mission-card.completed {
    border-left-color: #9E9E9E;
    opacity: 0.75;
    background: #FAFAFA;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.mission-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

.mission-xp-tag {
    background: #FFF3E0;
    color: #E65100;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.mission-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

/* Nature Guide Cards */
.guide-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.guide-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.guide-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.guide-short {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

/* Badges Showcase */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.badge-item {
    background: #FAFAFA;
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    border: 1px dashed var(--color-border);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.badge-item.unlocked {
    background: #FFFFFF;
    border: 1.5px solid #FFD54F;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
    opacity: 1;
}

.badge-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.badge-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Bottom Navigation */
#bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 30;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-muted);
    padding: 4px 2px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    gap: 1px;
}

.nav-item .icon {
    font-size: 1.3rem;
    line-height: 1.2;
    transition: transform 0.15s ease;
}

.nav-item .label {
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    line-height: 1.1;
    margin-top: 1px;
}

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

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

.nav-item.active .label {
    font-weight: 700;
    color: var(--color-primary-dark);
}

/* Modals & Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 30, 20, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.modal-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-close {
    background: #E8EDE8;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Assistant Voice Floating Modal */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 480px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F8FAF8;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.chat-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: var(--color-surface);
    border: 1px solid #C8E6C9;
    color: var(--color-text);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.typing-cursor {
    display: inline-block;
    color: var(--color-primary, #2E7D32);
    font-weight: bold;
    margin-left: 2px;
    animation: blink-cursor 0.75s infinite ease-in-out;
    vertical-align: baseline;
}

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

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    font-size: 0.95rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--color-primary);
}

.btn-mic {
    background: var(--color-accent-amber);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-mic.listening {
    background: #E53935;
    animation: pulse-ring 1.5s infinite;
}

/* Prompt Pills */
.prompt-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.pill-btn {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid #C8E6C9;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.pill-btn:hover {
    background: #C8E6C9;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-border);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.form-control:focus {
    border-color: var(--color-primary);
}

/* Toast Notification */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #1B5E20;
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: toast-in 0.3s ease forwards;
}

/* Animations */
@keyframes leaf-sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(14deg); }
}

@keyframes pulse-ring {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7); }
    70% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(229, 57, 53, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: white;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(27, 94, 32, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 50;
    animation: toast-in 0.4s ease forwards;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-install-icon {
    font-size: 2rem;
}

.pwa-install-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.pwa-install-text p {
    font-size: 0.78rem;
    opacity: 0.9;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pwa-install {
    background: #FFB300;
    color: #1E2923;
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease;
}

.btn-pwa-install:hover {
    transform: scale(1.04);
}

.btn-pwa-dismiss {
    background: transparent;
    color: white;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
}

.btn-pwa-dismiss:hover {
    opacity: 1;
}

/* -------------------------------------------------------------
   ADMIN DASHBOARD STYLES
------------------------------------------------------------- */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
}

.admin-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.admin-tab-btn:hover {
    background: #E8F5E9;
    color: var(--color-primary-dark);
}

.admin-tab-btn.active {
    background: var(--color-primary);
    color: white;
}

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-metric-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.admin-metric-card.highlight {
    border-color: #81C784;
    background: linear-gradient(145deg, #FFFFFF, #F1F8F2);
}

.admin-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-metric-value {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-text);
}

.admin-metric-sub {
    font-size: 0.78rem;
    color: var(--color-muted);
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
    justify-content: space-between;
}

.admin-search-input {
    flex: 1;
    min-width: 200px;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
}

.admin-filter-select {
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    background: white;
}

.admin-table-container {
    overflow-x: auto;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

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

.admin-table th {
    background: #F4F8F4;
    padding: 10px 12px;
    font-weight: 700;
    color: var(--color-primary-dark);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #EEF2EE;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #FAFDFB;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-admin {
    background: #EDE7F6;
    color: #512DA8;
    border: 1px solid #D1C4E9;
}

.badge-user {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-danger {
    background: #FFEBEE;
    color: #C62828;
}

.badge-warning {
    background: #FFF8E1;
    color: #F57F17;
}

.btn-action-icon {
    background: #F0F4F0;
    border: 1px solid var(--color-border);
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.btn-action-icon:hover {
    background: #E0EDE0;
}

.btn-action-icon.danger:hover {
    background: #FFCDD2;
    border-color: #EF9A9A;
}

