/* CSS Design System for Smart – Eco Life - Green Campus Action (Green & White Theme) */

:root {
    --bg-primary: #f5f8f6;           /* Clean soft green-tinted off-white background */
    --bg-secondary: #ffffff;         /* Pure white for cards and sidebars */
    --bg-glass: rgba(255, 255, 255, 0.88); /* Crisp white card background with slight transparency for mesh reveal */
    --bg-glass-hover: rgba(250, 252, 251, 0.95);
    --border-glass: rgba(16, 185, 129, 0.14); /* Soft green borders */
    --border-glass-focus: rgba(16, 185, 129, 0.4);
    
    /* Brand Theme Colors */
    --color-primary: #10b981;       /* Emerald */
    --color-primary-glow: rgba(16, 185, 129, 0.12);
    --color-secondary: #059669;     /* Darker Emerald for text contrast */
    --color-dark-green: #065f46;    /* Forest green for headers */
    --color-light-green: #e6f7ef;   /* Light green wash for active stats */
    
    /* Text Colors */
    --text-main: #1e293b;           /* Slate 800 - dark readable text */
    --text-muted: #64748b;          /* Slate 500 - secondary text */
    --text-dark: #0f172a;           /* Slate 900 - headers */
    
    /* Status Colors */
    --color-success: #10b981;
    --color-warning: #d97706;       /* Darker orange/yellow for contrast on white */
    --color-danger: #ef4444;
    --color-info: #2563eb;          /* Readable blue */
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dotted Grid Mesh & Clean Blobs */
body {
    font-family: 'Outfit', 'Inter', 'Sarabun', sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(rgba(16, 185, 129, 0.12) 1.5px, transparent 1.5px),
        radial-gradient(circle at 15% 15%, rgba(52, 211, 153, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.04) 0%, transparent 45%);
    background-size: 24px 24px, 100% 100%, 100% 100%;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ambient Floating Blobs */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.55;
    pointer-events: none;
}

.blob-1 {
    top: -100px;
    left: -100px;
    width: 450px;
    height: 450px;
    background-color: rgba(52, 211, 153, 0.25);
    animation: float-slow 22s infinite alternate ease-in-out;
}

.blob-2 {
    bottom: -150px;
    right: -100px;
    width: 550px;
    height: 550px;
    background-color: rgba(16, 185, 129, 0.18);
    animation: float-slow-reverse 26s infinite alternate ease-in-out;
}

.blob-3 {
    top: 40%;
    left: 45%;
    width: 300px;
    height: 300px;
    background-color: rgba(52, 211, 153, 0.1);
    animation: float-slow 30s infinite alternate ease-in-out;
    animation-delay: -3s;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.08); }
    100% { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes float-slow-reverse {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-70px, -50px) scale(0.92); }
    100% { transform: translate(40px, 40px) scale(1.05); }
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styling */
.app-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.logo-icon i {
    width: 1.35rem;
    height: 1.35rem;
    stroke-width: 2.5px;
}

.logo-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--color-dark-green), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.header-slogan {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-secondary);
    background: var(--color-light-green);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.header-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile-badge {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Role Tags */
.role-tag {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
}

.role-tag.student {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--color-info);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.role-tag.staff {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.role-tag.admin {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Panel Design System (Clean White Cards with Top Accent Line) */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.03);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    opacity: 0.85;
    z-index: 10;
}

.glass-panel:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 36px rgba(16, 185, 129, 0.06);
    transform: translateY(-2px);
}

/* App Main Container */
.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.view-section {
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

/* UTILITY CLASSES */
.hidden {
    display: none !important;
}

.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-primary { color: var(--color-info) !important; }
.mt-3 { margin-top: 1rem !important; }
.font-weight-bold { font-weight: 700 !important; }
.btn-block { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-success:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-icon-text {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-icon-text:hover {
    color: var(--text-main);
}

.btn-icon-text.text-danger:hover {
    color: var(--color-danger) !important;
}

/* Forms General Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.4rem;
}

.form-group label i {
    width: 14px;
    height: 14px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.7rem 0.95rem;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-group select option {
    background-color: #ffffff;
    color: var(--text-dark);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* AUTHENTICATION VIEW */
#auth-view {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 2.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.auth-form-container h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
    color: var(--color-dark-green);
}

.auth-form-container .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
}

.form-actions-link {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1.25rem;
}

.form-actions-link a {
    color: var(--color-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.form-actions-link a:hover {
    text-decoration: underline;
    color: var(--color-dark-green);
}

.auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-fast);
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--color-dark-green);
}

.security-question-box {
    background: var(--bg-primary);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.question-box-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.question-box-title i {
    width: 16px;
    height: 16px;
}

/* Forgot Password Step 2 */
.security-reset-panel {
    background: var(--bg-primary);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.question-display {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.question-display span {
    color: var(--color-secondary);
    font-weight: 700;
}

/* USER DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Profile Card */
.profile-card {
    padding: 1.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    position: relative;
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    background: var(--color-light-green);
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.avatar-icon {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--color-secondary);
}

.profile-level-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: var(--color-primary);
    color: #ffffff;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.profile-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.profile-xp {
    width: 100%;
    margin-top: 0.25rem;
}

.xp-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.xp-bar-container {
    background-color: #e2e8f0;
    height: 8px;
    border-radius: 10px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.xp-bar-fill {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.xp-tip {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Leaderboard Design */
.leaderboard-card {
    padding: 1.5rem;
}

.card-header-flex h3 {
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dark);
}

.tabs-container {
    display: flex;
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 0.2rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.tab-btn.active {
    background-color: #ffffff;
    color: var(--color-secondary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leader-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition-fast);
}

.leader-item:hover {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.1);
}

.leader-rank {
    font-size: 0.85rem;
    font-weight: 800;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.rank-1 { background-color: rgba(217, 119, 6, 0.15); color: #b45309; border: 1px solid rgba(217, 119, 6, 0.25); }
.rank-2 { background-color: rgba(100, 116, 139, 0.15); color: #475569; border: 1px solid rgba(100, 116, 139, 0.2); }
.rank-3 { background-color: rgba(180, 83, 9, 0.15); color: #92400e; border: 1px solid rgba(180, 83, 9, 0.2); }
.rank-other { background-color: rgba(0, 0, 0, 0.04); color: var(--text-muted); }

.leader-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leader-username {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.leader-pts {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-secondary);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 1.4rem;
    height: 1.4rem;
}

.easy-color { background-color: rgba(16, 185, 129, 0.1); color: #047857; }
.medium-color { background-color: rgba(37, 99, 235, 0.08); color: #1d4ed8; }
.hard-color { background-color: rgba(239, 68, 68, 0.08); color: #b91c1c; }

.stat-info h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-info p {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* Missions Panel */
.missions-panel {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    background-color: #e2e8f0;
    color: var(--text-dark);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 0.5rem;
}

/* Mission card design */
.mission-card {
    background-color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
    transition: var(--transition-smooth);
}

.mission-card:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.08);
}

.mission-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mission-level-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.badge-easy { background-color: rgba(16, 185, 129, 0.1); color: #047857; border: 1px solid rgba(16, 185, 129, 0.15); }
.badge-medium { background-color: rgba(37, 99, 235, 0.08); color: #1d4ed8; border: 1px solid rgba(37, 99, 235, 0.15); }
.badge-hard { background-color: rgba(239, 68, 68, 0.08); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.15); }
.badge-special { background-color: rgba(139, 92, 246, 0.08); color: #6d28d9; border: 1px solid rgba(139, 92, 246, 0.15); }

.mission-pts {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-secondary);
}

.mission-card-body h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.mission-card-body p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mission-status-box {
    margin-top: auto;
}

.locked-icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--color-danger);
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.06);
    padding: 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.locked-icon-text i {
    width: 14px;
    height: 14px;
}

/* History table styling */
.history-panel {
    padding: 1.5rem;
}

.history-panel h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dark);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.history-table th, 
.history-table td {
    padding: 0.85rem;
    border-bottom: 1px solid #cbd5e1;
}

.history-table th {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    background-color: #f8fafc;
}

.history-table td {
    color: var(--text-main);
}

.history-table tbody tr {
    transition: var(--transition-fast);
}

.history-table tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.02);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
}

.status-pill i {
    width: 12px;
    height: 12px;
}

.status-pill.pending {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.status-pill.approved {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-pill.rejected {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.img-evidence-thumbnail {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    cursor: zoom-in;
    vertical-align: middle;
    margin-right: 0.5rem;
    transition: var(--transition-fast);
}

.img-evidence-thumbnail:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
}

/* ADMIN DASHBOARD VIEW */
.admin-dashboard-container {
    animation: fadeIn 0.4s ease-out forwards;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    margin-top: 0.5rem;
}

.admin-queue-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.admin-queue-card h3 {
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.queue-item {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.queue-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: rgba(16, 185, 129, 0.2);
}

.queue-evidence-preview {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
    cursor: zoom-in;
}

.queue-evidence-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.queue-evidence-preview:hover img {
    transform: scale(1.08);
}

.queue-evidence-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.queue-evidence-preview:hover .queue-evidence-preview-overlay {
    opacity: 1;
}

.queue-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.queue-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.queue-username {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.queue-mission-title {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--text-dark);
}

.queue-meta-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.queue-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin right columns */
.admin-management-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.add-mission-card {
    padding: 1.5rem;
}

.active-missions-card {
    padding: 1.5rem;
}

.admin-missions-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.admin-mission-item {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.admin-mission-item:hover {
    background-color: #fafbfc;
    border-color: rgba(239, 68, 68, 0.2);
}

.admin-mission-info {
    flex: 1;
    padding-right: 0.75rem;
}

.admin-mission-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

.admin-mission-title-row h5 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-dark);
}

.admin-mission-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-delete-mission {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.btn-delete-mission:hover {
    color: var(--color-danger);
    background-color: rgba(239, 68, 68, 0.05);
}

.btn-delete-mission i {
    width: 14px;
    height: 14px;
}

/* MODAL & LIGHTBOX OVERLAYS */
.modal-overlay, 
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.4); /* Dark translucent blur cover */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: var(--transition-fast);
}

.modal-content {
    width: 100%;
    max-width: 520px;
    padding: 1.75rem;
    position: relative;
    background: #ffffff !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dark);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

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

.modal-mission-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.modal-mission-badge-info {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.modal-actions-flex {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* File Upload drag area */
.file-upload-drag-area {
    border: 2px dashed rgba(16, 185, 129, 0.3);
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.file-upload-drag-area:hover {
    border-color: var(--color-primary);
    background-color: var(--color-light-green);
}

.drag-area-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.drag-icon {
    width: 2rem;
    height: 2rem;
    color: var(--color-secondary);
}

.drag-area-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.drag-area-content p span {
    color: var(--color-primary);
    font-weight: 700;
}

.drag-area-content small {
    font-size: 0.7rem;
    color: #94a3b8;
}

.drag-area-preview {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
}

.drag-area-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 180px;
}

.btn-remove-preview {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition-fast);
}

.btn-remove-preview:hover {
    background-color: var(--color-danger);
}

/* Lightbox overlay styling */
.lightbox-content {
    max-width: 85%;
    max-height: 85vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.lightbox-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
}

/* TOAST SYSTEM */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1100;
}

.toast {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.85rem 1.15rem;
    min-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 700;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.warning { border-left: 4px solid var(--color-warning); }
.toast.info { border-left: 4px solid var(--color-info); }

.toast i {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
}

/* Pulse animation for pending queue warning card */
.alert-pulse {
    animation: subtle-pulse 2s infinite ease-in-out;
}

/* KEYFRAMES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scale-up {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes subtle-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); border-color: var(--border-glass); }
    50% { box-shadow: 0 4px 20px rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.25); }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 1rem;
    }
    .header-slogan {
        display: none;
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
    .queue-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .queue-evidence-preview {
        width: 100%;
        height: 180px;
    }
    .queue-actions {
        justify-content: center;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    .app-main {
        padding: 1rem;
    }
}
