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

:root {
    --background: oklch(0.16 0.015 160);
    --foreground: oklch(0.98 0 0);
    --card: oklch(0.2 0.02 160);
    --card-foreground: oklch(0.98 0 0);
    --popover: oklch(0.15 0.015 160);
    --popover-foreground: oklch(0.98 0 0);
    --primary: oklch(0.75 0.18 145);
    --primary-foreground: oklch(0.12 0.01 160);
    --secondary: oklch(0.24 0.02 160);
    --secondary-foreground: oklch(0.98 0 0);
    --muted: oklch(0.24 0.02 160);
    --muted-foreground: oklch(0.65 0.02 160);
    --accent: oklch(0.2 0.02 160);
    --accent-foreground: oklch(0.98 0 0);
    --destructive: oklch(0.577 0.245 27.325);
    --destructive-foreground: oklch(0.98 0 0);
    --border: oklch(0.3 0.02 160);
    --input: oklch(0.3 0.02 160);
    --ring: oklch(0.75 0.18 145);
    --radius: 0.625rem;
    --sidebar: oklch(0.985 0 0);
    --sidebar-foreground: oklch(0.145 0 0);
    --sidebar-primary: oklch(0.205 0 0);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.97 0 0);
    --sidebar-accent-foreground: oklch(0.205 0 0);
    --sidebar-border: oklch(0.922 0 0);
    --sidebar-ring: oklch(0.708 0 0);
    --recycling-color: #2D9CDB;
    --compost-color: #22C55E;
    --landfill-color: #6B7280;
    --ewaste-color: #E4572E;
    --primary-green: #22C55E;
    --light-green: #34D399;
    --bg-color: #143228;
    --card-bg: #18352B;
    --text-dark: #FAFAFA;
    --text-light: #9AA6A0;
    --shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.35);
    --shadow-tight: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.dark {
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.145 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.145 0 0);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.985 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.637 0.237 25.331);
    --border: oklch(0.269 0 0);
    --input: oklch(0.269 0 0);
    --ring: oklch(0.439 0 0);
    --chart-1: oklch(0.488 0.243 264.376);
    --chart-2: oklch(0.696 0.17 162.48);
    --chart-3: oklch(0.769 0.188 70.08);
    --chart-4: oklch(0.627 0.265 303.9);
    --chart-5: oklch(0.645 0.246 16.439);
    --sidebar: oklch(0.205 0 0);
    --sidebar-foreground: oklch(0.985 0 0);
    --sidebar-primary: oklch(0.488 0.243 264.376);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.269 0 0);
    --sidebar-accent-foreground: oklch(0.985 0 0);
    --sidebar-border: oklch(0.269 0 0);
    --sidebar-ring: oklch(0.439 0 0);
}

body {
    font-family: "Inter", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 197, 94, 0.12), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(34, 197, 94, 0.08), transparent 40%),
        var(--bg-color);
    min-height: 100vh;
    color: var(--foreground);
}

#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.access-bar {
    position: fixed;
    top: 0;
    right: 0;
    padding: 14px 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: rgba(20, 42, 34, 0.7);
    border-bottom-left-radius: 18px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    z-index: 2;
}

.access-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.access-btn.user-access {
    background: var(--primary-green);
    color: #07130e;
}

.access-btn.mgmt-access {
    background: #0C2C22;
    color: white;
}

.access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 60px;
}

header {
    text-align: center;
    padding: 30px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.leaf-icon {
    font-size: 2.5rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--foreground);
}

.tagline {
    color: var(--text-light);
    margin-top: 10px;
    font-size: 1.1rem;
}

section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    animation: fadeUp 0.5s ease both;
}

h2 {
    color: var(--foreground);
    margin-bottom: 20px;
    text-align: center;
}

.welcome-section {
    text-align: center;
}

.welcome-section p {
    color: var(--muted-foreground);
    margin-bottom: 30px;
}

.access-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.access-card {
    background: linear-gradient(135deg, #0F1F1A, #122823);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 250px;
    min-width: 200px;
}

.access-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-tight);
    border-color: var(--primary-green);
}

.access-card:last-child {
    background: linear-gradient(135deg, #0F1F1A, #152F27);
}

.access-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.access-card h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.access-card p {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-bottom: 0;
}

.login-section {
    max-width: 400px;
    margin: 0 auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--foreground);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #0B1713;
    color: var(--foreground);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.submit-btn {
    padding: 15px;
    background: var(--primary-green);
    color: #07130e;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #36E178;
}

.back-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #0B1713;
    border: 2px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: all 0.3s ease;
}

.back-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.demo-hint {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.85rem;
    margin-top: 10px;
}

.user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, #0E241C, #123227);
    color: var(--foreground);
}

.user-header h2 {
    color: var(--foreground);
    margin-bottom: 5px;
    text-align: left;
}

.user-header p {
    opacity: 0.9;
}

.points-display {
    text-align: center;
    background: rgba(15, 31, 26, 0.6);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.points-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.points-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.points-impact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.impact-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    font-size: 0.75rem;
    color: var(--foreground);
}

.impact-icon {
    font-size: 0.9rem;
}

.redeem-btn {
    padding: 6px 16px;
    border-radius: 18px;
    border: none;
    background: var(--primary-green);
    color: #07130e;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.redeem-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.logout-btn {
    padding: 8px 20px;
    background: rgba(15, 31, 26, 0.6);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--primary-green);
}

.weekly-summary {
    background: linear-gradient(135deg, #152F26, #1A3B2F);
}

.weekly-summary h3 {
    color: var(--foreground);
    text-align: center;
    margin-bottom: 20px;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.summary-stat {
    text-align: center;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-green);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.pickup-schedule h4 {
    text-align: center;
    color: var(--foreground);
    margin-bottom: 15px;
}

.schedule-days {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.schedule-day {
    text-align: center;
}

.day-name {
    display: block;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 5px;
}

.day-bag {
    display: block;
    padding: 5px 12px;
    border-radius: 15px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.feedback-section {
    background: rgba(34, 197, 94, 0.08);
    border-left: 4px solid rgba(34, 197, 94, 0.6);
}

.feedback-section h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

.feedback-item {
    background: #0B1713;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.feedback-item p {
    margin-bottom: 5px;
}

.feedback-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.feedback-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    font-size: 0.75rem;
    color: var(--foreground);
}

.feedback-tag.type-green {
    background: rgba(34, 197, 94, 0.2);
    color: var(--compost-color);
}

.feedback-tag.type-blue {
    background: rgba(45, 156, 219, 0.2);
    color: var(--recycling-color);
}

.feedback-tag.type-white {
    background: rgba(148, 163, 184, 0.2);
    color: #DCE3EF;
}

.feedback-tag.points {
    background: rgba(15, 31, 26, 0.75);
    color: var(--foreground);
}

.point-change {
    font-weight: 600;
    font-size: 0.9rem;
}

.point-change.positive {
    color: var(--compost-color);
}

.point-change.negative {
    color: var(--ewaste-color);
}

.field-hint {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 6px 0 10px;
}

.feedback-bag-options {
    margin-top: 8px;
}

.feedback-bag-options .bag-option {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.feedback-bag-options .bag-option.disabled,
.feedback-bag-options .bag-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(19, 42, 34, 0.4);
    box-shadow: none;
    transform: none;
}

.feedback-bag-options .bag-option.disabled .bag-color-dot,
.feedback-bag-options .bag-option:disabled .bag-color-dot {
    filter: grayscale(1);
    opacity: 0.6;
}

.reason-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.reason-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 31, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
}

.reason-item input {
    accent-color: var(--primary-green);
}

.reason-empty {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.85rem;
    grid-column: 1 / -1;
    text-align: center;
}

.user-tabs {
    margin-bottom: 0;
}

.intro {
    background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.28), transparent 55%),
        linear-gradient(135deg, #143026, #1A3B2F);
    color: var(--foreground);
}

.intro h2 {
    color: var(--foreground);
}

.steps {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: rgba(34, 197, 94, 0.2);
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 10px;
}

.step p {
    font-size: 0.95rem;
}

.upload-area {
    border: 2px dashed rgba(34, 197, 94, 0.35);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #132A22;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-green);
    background: #173427;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.or-text {
    color: var(--muted-foreground);
    margin: 10px 0;
}


.file-label {
    background: var(--primary-green);
    color: #07130e;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.file-label:hover {
    background: #36E178;
}

.preview-container {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.preview-container img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
}

.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--ewaste-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.remove-btn:hover {
    transform: scale(1.1);
}

.classify-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    padding: 15px 30px;
    background: var(--primary-green);
    color: #07130e;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.classify-btn:hover:not(:disabled) {
    background: #36E178;
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}

.classify-btn:disabled {
    background: #334040;
    cursor: not-allowed;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(34, 197, 94, 0.2);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-card {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.result-card.recycling {
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.15), rgba(45, 156, 219, 0.05));
    border: 2px solid var(--recycling-color);
}

.result-card.compost {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    border: 2px solid var(--compost-color);
}

.result-card.landfill {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(107, 114, 128, 0.05));
    border: 2px solid var(--landfill-color);
}

.result-card.e-waste {
    background: linear-gradient(135deg, rgba(228, 87, 46, 0.18), rgba(228, 87, 46, 0.05));
    border: 2px solid var(--ewaste-color);
}

.bin-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.bin-recommendation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.bin-label {
    color: var(--muted-foreground);
}

.bin-name {
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
}

.bin-name.recycling { background: var(--recycling-color); }
.bin-name.compost { background: var(--compost-color); }
.bin-name.landfill { background: var(--landfill-color); }
.bin-name.e-waste { background: var(--ewaste-color); }

.confidence {
    margin-top: 15px;
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

.sustainability-card {
    background: linear-gradient(135deg, #152F26, #1A3B2F);
    border-radius: 12px;
    padding: 25px;
}

.sustainability-card h3 {
    color: var(--foreground);
    margin-bottom: 20px;
    text-align: center;
}

.impact-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-green);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.new-scan-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    padding: 15px 30px;
    background: var(--primary-green);
    color: #07130e;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-scan-btn:hover {
    background: #36E178;
}

.bin-guide {
    padding-bottom: 30px;
}

.bins {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.bin {
    text-align: center;
    padding: 20px 15px;
    border-radius: 12px;
    color: white;
}

.bin.recycling { background: var(--recycling-color); }
.bin.compost { background: var(--compost-color); }
.bin.landfill { background: var(--landfill-color); }
.bin.e-waste { background: var(--ewaste-color); }

.bin-guide-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.bin h4 {
    margin-bottom: 8px;
}

.bin p {
    font-size: 0.8rem;
    opacity: 0.9;
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}

.feature-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    border: 2px solid var(--border);
    background: #0B1713;
    color: var(--foreground);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.tab-btn.active {
    background: var(--primary-green);
    color: #07130e;
}

.section-subtitle {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 20px;
}

.bag-type-selector {
    text-align: center;
    margin-bottom: 25px;
}

.bag-type-selector label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--foreground);
}

.bag-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bag-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: #1C3A2F;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--foreground);
}

.bag-option:hover {
    border-color: var(--primary-green);
    background: #204236;
}

.bag-option.active {
    border-color: var(--primary-green);
    background: #1F4B3A;
    color: var(--foreground);
}

.bag-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.bag-color-dot.green { background: var(--compost-color); }
.bag-color-dot.blue { background: var(--recycling-color); }
.bag-color-dot.white { background: #F8FAFC; }

.score-card {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #152F26, #1A3B2F);
    border-radius: 12px;
    margin-bottom: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #132A22;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.score-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-green);
}

.score-label {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.score-card.grade-a .score-circle { border: 4px solid var(--compost-color); }
.score-card.grade-b .score-circle { border: 4px solid var(--recycling-color); }
.score-card.grade-c .score-circle { border: 4px solid #FFC107; }
.score-card.grade-d .score-circle { border: 4px solid #FF9800; }
.score-card.grade-f .score-circle { border: 4px solid var(--ewaste-color); }

.grade-badge {
    display: inline-block;
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: white;
}

.score-card.grade-a .grade-badge { background: var(--compost-color); }
.score-card.grade-b .grade-badge { background: var(--recycling-color); }
.score-card.grade-c .grade-badge { background: #FFC107; color: #333; }
.score-card.grade-d .grade-badge { background: #FF9800; }
.score-card.grade-f .grade-badge { background: var(--ewaste-color); }

.verdict {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.verdict-icon {
    font-size: 1.5rem;
}

.verdict.pass { color: var(--compost-color); }
.verdict.fail { color: var(--ewaste-color); }

.analysis-card,
.issues-card,
.explanation-card,
.suggestions-card {
    background: #132A22;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.analysis-card h3,
.issues-card h3,
.explanation-card h3,
.suggestions-card h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.item-tag {
    background: rgba(34, 197, 94, 0.2);
    color: var(--foreground);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.issues-card {
    background: rgba(228, 87, 46, 0.1);
}

.issues-card h3 {
    color: var(--ewaste-color);
}

.issues-list,
.suggestions-list {
    padding-left: 20px;
}

.issues-list li {
    color: var(--ewaste-color);
    margin-bottom: 8px;
}

.suggestions-list li {
    color: var(--foreground);
    margin-bottom: 8px;
}

.confidence-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(34, 197, 94, 0.12);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--primary-green);
}

.notice-icon {
    font-size: 1.2rem;
}

.limitations-notice {
    background: #132A22;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-bottom: 20px;
    border-left: 4px solid var(--border);
}

.bag-queue-section .section-subtitle {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 20px;
}

.bag-queue-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.bag-queue-empty {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.bag-queue-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #132A22;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    position: relative;
}

.bag-queue-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 31, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bag-queue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bag-queue-placeholder {
    font-size: 0.7rem;
    color: var(--muted-foreground);
    text-align: center;
    padding: 0 6px;
}

.bag-queue-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bag-queue-title {
    font-weight: 600;
    color: var(--foreground);
}

.bag-queue-score {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.bag-queue-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(12, 26, 21, 0.8);
    color: var(--foreground);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.bag-queue-remove:hover {
    background: rgba(228, 87, 46, 0.2);
}

.submit-batch-btn {
    margin-top: 18px;
    width: 100%;
}

.points-earned-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.05));
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    border: 2px solid rgba(34, 197, 94, 0.4);
}

.points-earned-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.points-earned-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-green);
}

.points-earned-label {
    font-size: 1.1rem;
    color: var(--muted-foreground);
}

.points-breakdown {
    background: #132A22;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.points-breakdown h4 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

.points-breakdown ul {
    padding-left: 20px;
}

.points-breakdown li {
    margin-bottom: 8px;
    color: var(--muted-foreground);
}

.mgmt-header {
    background: linear-gradient(135deg, #143026, #1A3B2F);
    color: var(--foreground);
    text-align: center;
}

.mgmt-header h2 {
    color: var(--foreground);
    margin-bottom: 5px;
}

.mgmt-header p {
    opacity: 0.9;
    margin-bottom: 15px;
}

.household-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #152F26, #1A3B2F);
}

.mgmt-stat {
    text-align: center;
    padding: 15px;
}

.mgmt-stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-green);
}

.mgmt-stat-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.households-section h3 {
    color: var(--foreground);
    margin-bottom: 20px;
}

.household-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.household-card {
    position: relative;
    padding: 16px 18px 24px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #162E26, #1C3A2F);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    overflow: hidden;
}

.household-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.08), transparent 45%);
    pointer-events: none;
}

.household-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.house-number {
    font-weight: 700;
    color: var(--foreground);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.household-icon {
    font-size: 1.8rem;
    text-align: center;
    margin-top: 2px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.household-name {
    font-weight: 600;
    text-align: center;
    color: var(--foreground);
    position: relative;
    z-index: 1;
}

.household-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.metric {
    background: rgba(34, 197, 94, 0.16);
    border-radius: 12px;
    padding: 6px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
}

.metric-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 4px;
    color: var(--foreground);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-ok {
    background: rgba(34, 197, 94, 0.18);
    color: var(--compost-color);
}

.status-review {
    background: rgba(245, 127, 23, 0.2);
    color: #F57F17;
}

.status-attention {
    background: rgba(228, 87, 46, 0.18);
    color: var(--ewaste-color);
}

.status-nodata {
    background: rgba(148, 163, 184, 0.2);
    color: var(--muted-foreground);
}

.household-card.status-ok {
    border-color: rgba(47, 191, 113, 0.35);
}

.household-card.status-review {
    border-color: rgba(245, 127, 23, 0.35);
}

.household-card.status-attention {
    border-color: rgba(228, 87, 46, 0.35);
}

.household-card.status-nodata {
    border-color: rgba(120, 120, 120, 0.2);
}

.feedback-btn {
    padding: 6px 15px;
    background: var(--primary-green);
    color: #07130e;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s ease;
    position: relative;
    z-index: 1;
}

.household-card .feedback-btn {
    width: 100%;
    margin-top: auto;
    padding: 8px 15px;
}

.bag-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.bag-thumbs-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    padding: 8px 0;
}

.bag-thumb {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: rgba(12, 26, 21, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--foreground);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.bag-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 12px;
}

.bag-thumb-score {
    position: absolute;
    left: 6px;
    bottom: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    color: #f8fafc;
    background: rgba(7, 17, 13, 0.82);
    border-radius: 999px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.bag-thumb-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: rgba(19, 42, 34, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: var(--muted-foreground);
    text-align: center;
    padding: 10px;
}

.bag-thumb:hover {
    transform: translateY(-1px);
    border-color: var(--primary-green);
}

.bag-thumb.type-green { border-color: rgba(34, 197, 94, 0.4); }
.bag-thumb.type-blue { border-color: rgba(45, 156, 219, 0.4); }
.bag-thumb.type-white { border-color: rgba(148, 163, 184, 0.4); }
.bag-thumb.type-unknown { border-color: rgba(148, 163, 184, 0.2); }

.bag-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 6, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
}

.bag-detail-content {
    position: relative;
    width: min(1000px, 95vw);
    max-height: 90vh;
    overflow: auto;
    background: #10241c;
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

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

.bag-detail-meta {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-top: 6px;
}

.bag-type-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(148, 163, 184, 0.2);
    color: var(--foreground);
}

.bag-type-pill.type-green {
    background: rgba(34, 197, 94, 0.2);
    color: var(--compost-color);
}

.bag-type-pill.type-blue {
    background: rgba(45, 156, 219, 0.2);
    color: var(--recycling-color);
}

.bag-type-pill.type-white {
    background: rgba(148, 163, 184, 0.25);
    color: #DCE3EF;
}

.bag-detail-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
}

.bag-detail-photo {
    background: #132A22;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.bag-detail-photo img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 10px;
    display: none;
}

.bag-detail-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: rgba(20, 42, 34, 0.75);
    color: var(--muted-foreground);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(19, 42, 34, 0.9);
    color: var(--foreground);
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.modal-close:hover {
    background: rgba(34, 197, 94, 0.2);
}

.item-tag.muted {
    background: rgba(148, 163, 184, 0.2);
    color: var(--muted-foreground);
}

.feedback-btn:hover {
    background: #36E178;
}

.no-data-msg {
    text-align: center;
    color: var(--muted-foreground);
    padding: 30px;
    display: none;
}

.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #162E26;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    border: 1px solid var(--border);
    max-height: 85vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-content h3 {
    color: var(--foreground);
    margin-bottom: 20px;
}

.feedback-confirmation-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2050;
}

.feedback-confirmation-content {
    background: #162E26;
    padding: 28px;
    border-radius: 16px;
    width: min(420px, 90vw);
    border: 1px solid var(--border);
    text-align: center;
}

.feedback-confirmation-content p {
    color: var(--muted-foreground);
    margin: 0 0 20px;
}

.redeem-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
}

.redeem-content {
    position: relative;
    width: min(800px, 94vw);
    max-height: 90vh;
    overflow: auto;
    background: #10241c;
    padding: 26px;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.redeem-header h3 {
    color: var(--foreground);
    margin-bottom: 8px;
    text-align: left;
}

.redeem-header p {
    color: var(--muted-foreground);
    margin-bottom: 16px;
}

.redeem-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.18);
    color: var(--foreground);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.redeem-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.redeem-option {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(18, 42, 34, 0.95), rgba(20, 54, 43, 0.9));
    color: var(--foreground);
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.redeem-option:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.5);
}

.redeem-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.redeem-title {
    font-weight: 600;
    font-size: 1rem;
}

.redeem-cost {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.2);
    color: var(--primary-green);
    font-size: 0.8rem;
    font-weight: 600;
}

.redeem-footnote {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.celebration-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 16, 12, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200;
}

.celebration-content {
    position: relative;
    width: min(680px, 92vw);
    max-height: 90vh;
    overflow: hidden;
    background: linear-gradient(160deg, #123427, #0E241C);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.celebration-content h3 {
    color: var(--foreground);
    margin-bottom: 8px;
}

.celebration-subtitle {
    color: var(--muted-foreground);
    margin-bottom: 16px;
}

.celebration-total {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 18px;
}

.celebration-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.celebration-item {
    background: rgba(15, 31, 26, 0.7);
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.celebration-bag {
    font-weight: 600;
    color: var(--foreground);
}

.celebration-meta {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.celebration-points {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-green);
}

.celebration-dismiss {
    width: 100%;
}

.confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.confetti span {
    position: absolute;
    top: -12px;
    opacity: 0.9;
    animation-name: confetti-fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(520px) rotate(220deg);
        opacity: 0;
    }
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cancel-btn {
    flex: 1;
    padding: 12px;
    background: #132A22;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    color: var(--foreground);
}

.cancel-btn:hover {
    background: rgba(34, 197, 94, 0.2);
}

.modal-actions .submit-btn {
    flex: 1;
}

.mgmt-legend {
    background: #132A22;
}

.mgmt-legend h4 {
    color: var(--foreground);
    margin-bottom: 15px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-item span:last-child {
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    font-style: italic;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

@media (max-width: 900px) {
    .bag-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .access-bar {
        position: static;
        justify-content: center;
        padding: 10px;
        background: rgba(10, 22, 18, 0.9);
        box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    }
    
    .container {
        padding-top: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .access-options {
        flex-direction: column;
    }
    
    .access-card {
        max-width: none;
    }
    
    .user-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-header h2 {
        text-align: center;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .steps {
        flex-direction: column;
    }

    .bag-thumbs {
        gap: 8px;
    }

    .bag-thumb {
        width: 90px;
        height: 90px;
    }

    .bag-thumb-score {
        font-size: 0.66rem;
        padding: 4px 6px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .bag-options {
        flex-direction: column;
    }
    
    .bag-option {
        justify-content: center;
    }
    
    .impact-stats {
        flex-direction: column;
    }
    
    .stat {
        padding: 15px;
        background: rgba(20, 42, 34, 0.85);
        border-radius: 10px;
    }
    
    .bins {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .household-card {
        aspect-ratio: auto;
    }
    
    .household-stats {
        flex-direction: column;
        gap: 15px;
    }

    .reason-list {
        grid-template-columns: 1fr;
    }

    .redeem-content {
        padding: 20px;
    }

    .bag-queue-list {
        grid-template-columns: 1fr;
    }
}

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

.scanner-login-card {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, #10231d, #173129);
}

.scanner-login-card h3 {
    margin-bottom: 10px;
    color: var(--foreground);
    font-size: 1rem;
}

.scanner-login-fields {
    display: grid;
    gap: 10px;
}

.scanner-login-fields input {
    width: 100%;
    border: 1px solid var(--input);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(10, 24, 19, 0.7);
    color: var(--foreground);
}

.scanner-login-fields input::placeholder {
    color: var(--muted-foreground);
}

.scanner-login-fields .classify-btn,
.scanner-login-actions .classify-btn {
    max-width: 220px;
    margin: 4px 0 0;
    padding: 10px 16px;
    font-size: 0.95rem;
}

.scanner-login-message {
    min-height: 20px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.scanner-login-message.error {
    color: #ff9090;
}

.scanner-login-message.success {
    color: #8cf0a0;
}
