/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES
   ========================================================================== */
:root {
    --font-primary: 'Outfit', 'Sarabun', sans-serif;
    
    /* Elegant Dark Green Eco Theme */
    --bg-darkest: #040d0a;
    --bg-darker: #081612;
    --bg-card: rgba(14, 30, 25, 0.65);
    --bg-card-hover: rgba(20, 43, 36, 0.8);
    --border-color: rgba(16, 185, 129, 0.18);
    --border-hover: rgba(16, 185, 129, 0.35);
    
    /* Accent Colors */
    --color-emerald: #10b981;
    --color-emerald-glow: rgba(16, 185, 129, 0.3);
    --color-cyan: #06b6d4;
    --color-cyan-glow: rgba(6, 182, 212, 0.3);
    --color-teal: #14b8a6;
    --color-blue: #3b82f6;
    --color-blue-glow: rgba(59, 130, 246, 0.3);
    --color-purple: #8b5cf6;
    --color-purple-glow: rgba(139, 92, 246, 0.3);
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Glassmorphism effects */
    --backdrop-blur: blur(14px);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-darkest);
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.app-header {
    background: rgba(8, 22, 18, 0.8);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (min-width: 992px) {
    .app-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 4%;
    }
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px var(--color-emerald));
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, var(--color-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.app-main-content {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 4%;
}

/* ==========================================================================
   ROLE SELECTOR BAR
   ========================================================================== */
.role-selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

@media (min-width: 992px) {
    .role-selector-container {
        width: auto;
    }
}

.role-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    display: none;
}

@media (min-width: 576px) {
    .role-label {
        display: inline;
    }
}

.role-pills {
    display: flex;
    gap: 6px;
    background: rgba(4, 13, 10, 0.6);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none; /* Firefox */
}

.role-pills::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.role-pill {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.role-pill:hover {
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.08);
}

.role-pill.active {
    color: #ffffff;
    background: var(--color-emerald);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   APP VIEWS CONTROLLER
   ========================================================================== */
.app-view {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.app-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.view-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    border-left: 4px solid var(--color-emerald);
    padding-left: 15px;
}

@media (min-width: 768px) {
    .view-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.view-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.view-actions {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   CARDS & CONTAINERS (GLASSMORPHISM)
   ========================================================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

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

.card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.4;
}

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

.card-header-flex h3 {
    margin-bottom: 0;
}

/* Glow Effects */
.glow-emerald {
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}
.glow-cyan {
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.15);
}
.glow-blue {
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.15);
}
.glow-purple {
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.15);
}
.glow-success {
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   KPI DASHBOARD GRID
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (min-width: 576px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.kpi-icon {
    font-size: 1.3rem;
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0;
    letter-spacing: -1px;
}

.kpi-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 2px;
}

.kpi-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.text-emerald {
    color: var(--color-emerald);
}
.text-cyan {
    color: var(--color-cyan);
}
.text-warning {
    color: var(--color-warning);
}
.text-danger {
    color: var(--color-danger);
}

/* ==========================================================================
   CHARTS & DETAILS
   ========================================================================== */
.dashboard-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .dashboard-details-grid {
        grid-template-columns: 3fr 2fr;
    }
}

.chart-card {
    min-height: 350px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

/* ==========================================================================
   FORMS & INPUT CONTROLS
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    background: rgba(4, 13, 10, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--color-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    background: rgba(4, 13, 10, 0.7);
}

.form-control.inline-select {
    width: auto;
    display: inline-block;
}

.form-help {
    display: block;
    font-size: 0.78rem;
    margin-top: 6px;
    color: var(--text-secondary);
}

/* Checkbox customizations */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    user-select: none;
    line-height: 1.4;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(4, 13, 10, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--color-emerald);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-emerald);
    border-color: var(--color-emerald);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.checkbox-subtext {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-left: 30px;
    margin-top: -8px;
    margin-bottom: 15px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    outline: none;
}

.btn-primary {
    background: var(--color-emerald);
    color: #ffffff;
}

.btn-primary:hover {
    background: #059669;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.btn-success {
    background: var(--color-teal);
    color: #ffffff;
}

.btn-success:hover {
    background: #0d9488;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
    transform: translateY(-1px);
}

.btn-outline-success {
    background: transparent;
    color: var(--color-teal);
    border-color: rgba(20, 184, 166, 0.4);
}

.btn-outline-success:hover {
    background: var(--color-teal);
    color: #ffffff;
    border-color: var(--color-teal);
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-emerald);
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-outline-primary:hover {
    background: var(--color-emerald);
    color: #ffffff;
    border-color: var(--color-emerald);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: 6px;
}

/* ==========================================================================
   TABLES (PREMIUM STYLING)
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.data-table th, .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(4, 13, 10, 0.4);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   BADGES & CHIPS
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: var(--color-cyan);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   1. DASHBOARD VIEW SPECIFICS
   ========================================================================== */
.full-width-card {
    width: 100%;
}

/* ==========================================================================
   2. STUDENT VIEW SPECIFICS
   ========================================================================== */
.student-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .student-layout {
        grid-template-columns: 2fr 3fr;
    }
}

.student-profile-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Wallet Card Details */
.wallet-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(14, 30, 25, 0.8) 100%);
}

.wallet-icon {
    font-size: 2.2rem;
    position: absolute;
    right: 20px;
    top: 15px;
    opacity: 0.2;
    transform: rotate(15deg);
}

.wallet-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-points {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 5px;
}

.points-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-emerald);
}

.wallet-visual-progress {
    margin-top: 15px;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-teal), var(--color-emerald));
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.progress-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* QR Code Simulator Card */
.qr-card {
    text-align: center;
}

.qr-container-sim {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.sim-qr-code {
    background: #ffffff;
    width: 190px;
    height: 190px;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.qr-pattern {
    width: 100%;
    height: 135px;
    background-image: 
        radial-gradient(#000000 25%, transparent 25%),
        radial-gradient(#000000 25%, transparent 25%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    opacity: 0.85;
}

/* Place QR positioning corners */
.qr-pattern::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    border: 8px solid #000000;
    background: #ffffff;
}

.qr-pattern::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: 8px solid #000000;
    background: #ffffff;
}

.sim-qr-code::after {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 15px;
    width: 35px;
    height: 35px;
    border: 8px solid #000000;
    background: #ffffff;
}

.qr-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    background: #ffffff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.qr-uuid-text {
    font-family: monospace;
    font-size: 0.65rem;
    color: #475569;
    font-weight: 700;
}

.qr-tips {
    font-size: 0.78rem;
    color: var(--color-emerald);
    background: rgba(16, 185, 129, 0.08);
    padding: 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Portion menu options details */
.sim-menu-item-details {
    margin-bottom: 20px;
}

.menu-food-card {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.food-img-placeholder {
    width: 70px;
    height: 70px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.food-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.food-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-bottom: 8px;
}

.food-price-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-cyan);
}

.section-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.portion-selector-box {
    margin-bottom: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.portion-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .portion-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portion-opt-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.portion-opt-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.portion-card-content {
    background: rgba(4, 13, 10, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
}

.portion-opt-card:hover .portion-card-content {
    border-color: var(--border-hover);
    background: rgba(16, 185, 129, 0.05);
}

.portion-opt-card input[type="radio"]:checked + .portion-card-content {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--color-emerald);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.portion-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.portion-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.portion-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.3;
    flex-grow: 1;
    margin-bottom: 8px;
}

.portion-nudge {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 10px;
}

.special-options-box {
    margin-bottom: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.order-action-box {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .order-action-box {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.order-price-summary {
    display: flex;
    flex-direction: column;
}

.final-price {
    font-size: 1.6rem;
    color: var(--color-cyan);
}

.order-waste-saving {
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Green Rewards Items styles */
.rewards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .rewards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.reward-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 220px;
    transition: var(--transition-smooth);
}

.reward-item-card:hover {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.reward-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-emerald);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.reward-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.reward-item-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.reward-item-card p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 12px;
    flex-grow: 1;
}

/* ==========================================================================
   3. VENDOR VIEW SPECIFICS
   ========================================================================== */
.vendor-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .vendor-layout {
        grid-template-columns: 3fr 2fr;
    }
}

.vendor-shop-selector {
    font-size: 0.9rem;
}

.vendor-eod-input-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.vendor-input-label-area {
    display: flex;
    flex-direction: column;
}

.vendor-input-title {
    font-size: 0.88rem;
    font-weight: 600;
}

.vendor-input-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.unit-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.unit-input-group .form-control {
    padding-right: 40px;
    text-align: right;
}

.unit-addon {
    position: absolute;
    right: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* LINE order preview area */
.line-msg-preview-container {
    background: rgba(4, 13, 10, 0.6);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.line-textarea {
    width: 100%;
    height: 140px;
    background: transparent;
    border: none;
    resize: none;
    color: #e2e8f0;
    font-family: monospace, var(--font-primary);
    font-size: 0.82rem;
    outline: none;
    line-height: 1.4;
}

.copy-tip {
    font-size: 0.8rem;
    color: var(--color-emerald);
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    padding: 6px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.copy-tip.hidden {
    display: none;
}

/* Cooking Advice Card styles */
.advice-header-area {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.advice-badge-icon {
    font-size: 1.8rem;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.advice-header-text h3 {
    margin-bottom: 2px;
}

.advice-content {
    font-size: 0.85rem;
    line-height: 1.45;
}

.advice-content ul {
    margin-left: 20px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Shop KPI cards list */
.vendor-kpi-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

.vendor-kpi-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vkpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.vkpi-val {
    font-size: 1.25rem;
    font-weight: 700;
}

.vkpi-unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.vkpi-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.vkpi-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.bg-success {
    background-color: var(--color-emerald);
}
.bg-warning {
    background-color: var(--color-warning);
}
.bg-danger {
    background-color: var(--color-danger);
}

/* ==========================================================================
   4. STAFF VIEW SPECIFICS
   ========================================================================== */
.staff-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .staff-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.waste-rating-box {
    margin: 20px 0;
}

.rating-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 576px) {
    .rating-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.rating-opt {
    position: relative;
    cursor: pointer;
    display: block;
}

.rating-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.rating-content {
    background: rgba(4, 13, 10, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
}

.rating-opt:hover .rating-content {
    background: rgba(255, 255, 255, 0.03);
}

/* Glow Border colors for selections */
.glow-success-border input[type="radio"]:checked + .rating-content {
    border-color: var(--color-emerald);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.glow-warning-border input[type="radio"]:checked + .rating-content {
    border-color: var(--color-warning);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.glow-danger-border input[type="radio"]:checked + .rating-content {
    border-color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.rating-emoji {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.rating-lbl {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.25;
}

.rating-points-earn {
    font-size: 0.72rem;
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.waste-separation-box {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 15px;
    border-radius: 8px;
}

/* Scan logs list */
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.78rem;
    border-left: 3px solid var(--text-muted);
}

.log-item.log-success {
    border-left-color: var(--color-emerald);
}

.log-item.log-warning {
    border-left-color: var(--color-warning);
}

.log-info-group {
    display: flex;
    flex-direction: column;
}

.log-user {
    font-weight: 600;
}

.log-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.log-points {
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================================================
   MODAL WINDOW & POPUPS
   ========================================================================== */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(8, 22, 18, 0.95);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.15rem;
}

.close-modal {
    color: var(--text-secondary);
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(14, 30, 25, 0.9);
    border: 1px solid var(--color-emerald);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.2);
    backdrop-filter: var(--backdrop-blur);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    transform: translateY(0);
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.hidden {
    transform: translateY(50px);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer-info {
    text-align: center;
    padding: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 40px;
}
