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

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131c31;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.3);
    
    --success: #10b981;
    --info: #06b6d4;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #d946ef;
    --orange: #f97316;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-family);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: var(--success);
    color: white;
    transform: translateY(-2px);
}

/* Container & Layout */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.25rem;
    background: linear-gradient(135deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Badge System */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-scheduled {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.badge-proposing {
    background: rgba(217, 70, 239, 0.15);
    color: var(--purple);
    border-color: rgba(217, 70, 239, 0.3);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.badge-in_service {
    background: rgba(6, 182, 212, 0.15);
    color: var(--info);
    border-color: rgba(6, 182, 212, 0.3);
}

.badge-awaiting_pickup {
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange);
    border-color: rgba(249, 115, 22, 0.3);
}

.badge-closed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

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

th {
    background: rgba(15, 23, 42, 0.8);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
}

/* Authentication Page specific */
.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    width: 100%;
    padding: 0 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.auth-logo span {
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: var(--transition);
}

.google-btn:hover {
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Simulator Switcher styling */
.simulator-box {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.simulator-box h4 {
    color: var(--warning);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.simulator-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.sim-user-btn {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.sim-user-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
}

/* Tabs & Dashboard layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Email Client Simulator Widget */
.email-widget-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.email-widget-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

.email-simulator {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
    transform: scale(0);
    transform-origin: bottom right;
}

.email-simulator.active {
    transform: scale(1);
}

.email-sim-header {
    background: #1e293b;
    padding: 1rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-sim-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-sim-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.email-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.email-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.email-recipient {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary);
}

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

.email-subject {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.email-body-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #131c31;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: modalSlide 0.3s ease-out;
}

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

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

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* QR Code Section */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.qr-caption {
    margin-top: 1rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Scanner styles */
.scanner-viewport {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--primary);
    margin: 0 auto 1.5rem;
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    top: 0;
    animation: scannerScan 2s linear infinite;
}

@keyframes scannerScan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* Simple tabs inside dashboard */
.tab-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    position: relative;
    font-family: var(--font-family);
    transition: var(--transition);
}

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

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 9999px;
}

.tab-content {
    display: none;
}

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

/* Form switch helper */
.student-only-fields {
    display: none;
}

.student-only-fields.active {
    display: block;
}

/* Admin lists styles */
.request-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.request-item:hover {
    transform: translateX(4px);
    background: rgba(255,255,255,0.04);
}

.request-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

/* Premium Light Theme Variables & Overrides */
.light-theme {
    --bg-primary: #f8fafc; /* Crisp cool gray-blue background */
    --bg-secondary: #ffffff; /* Crisp white */
    --bg-card: #ffffff; /* Crisp white cards */
    --border-color: #f1f5f9; /* Super faint separator border */
    --text-main: #0f172a; /* Deep dark slate */
    --text-muted: #64748b; /* Sleek medium gray-blue */
    --primary-glow: rgba(139, 92, 246, 0.05);
}

.light-theme body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
}

.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4 {
    color: #0f172a;
    background: none;
    -webkit-text-fill-color: initial;
}

.light-theme header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 4px 30px rgba(15, 23, 42, 0.02);
}

.light-theme .card {
    background: #ffffff;
    border: none; /* Frameless card design */
    box-shadow: 
        0 1px 3px rgba(15, 23, 42, 0.01),
        0 10px 30px rgba(15, 23, 42, 0.03),
        0 30px 60px rgba(15, 23, 42, 0.02);
}

.light-theme .form-control {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.01);
}

.light-theme .form-control:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.light-theme .modal-content {
    background: #ffffff;
    border: none; /* Frameless modal */
    color: #0f172a;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.18), 0 5px 20px rgba(15, 23, 42, 0.05);
}

.light-theme .request-item {
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.light-theme .request-item:hover {
    background: #f8fafc;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transform: translateY(-2px);
}

.light-theme .simulator-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.light-theme .sim-user-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.light-theme .sim-user-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.light-theme .btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.light-theme .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.light-theme table th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.light-theme table td {
    border-bottom: 1px solid #f8fafc !important;
    color: #334155;
}

.light-theme .tab-btn {
    color: #64748b;
}

.light-theme .tab-btn.active {
    color: var(--primary);
}

/* Custom boxes overrides in Light Theme */
.analytics-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition);
}

.light-theme .analytics-box {
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}

.insight-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.light-theme .insight-box {
    background: linear-gradient(135deg, #fdfeff, #f8fafc);
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.01);
}

.proposal-time-box {
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .proposal-time-box {
    background: #f5f3ff;
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: #4c1d95;
}

.modal-detail-box {
    background: rgba(15, 23, 42, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .modal-detail-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

/* Custom Buttons overrides */
.btn-purple-outline {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: #c084fc;
}

.btn-purple-outline:hover {
    background: rgba(124, 58, 237, 0.16);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.light-theme .btn-purple-outline {
    background: #f5f3ff;
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #6d28d9;
}

.light-theme .btn-purple-outline:hover {
    background: #ede9fe;
    border-color: rgba(124, 58, 237, 0.5);
}

/* Flowchart Dynamic Node Styling */
.flow-node-purple {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(124, 58, 237, 0.3);
}
.flow-node-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.flow-node-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.flow-node-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Light Theme Flowchart Nodes */
.light-theme .flowchart-visual .flow-node {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03) !important;
}
.light-theme .flow-node-purple {
    background: #f5f3ff !important;
    border: 1px solid rgba(124, 58, 237, 0.25) !important;
}
.light-theme .flow-node-blue {
    background: #eff6ff !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}
.light-theme .flow-node-amber {
    background: #fffbeb !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}
.light-theme .flow-node-green {
    background: #ecfdf5 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}
.light-theme .flowchart-visual .flow-arrow {
    color: #94a3b8 !important;
}

/* KPI Cards overrides in Light Theme */
.light-theme .kpi-blue {
    background: #eff6ff !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}
.light-theme .kpi-green {
    background: #ecfdf5 !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}
.light-theme .kpi-purple {
    background: #f5f3ff !important;
    border: 1px solid rgba(124, 58, 237, 0.15) !important;
}
.light-theme .kpi-amber {
    background: #fffbeb !important;
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
}

/* Stat Cards Light Mode overrides & transition */
.stat-card {
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}
.light-theme .stat-card {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 
        0 1px 3px rgba(15, 23, 42, 0.01),
        0 4px 15px rgba(15, 23, 42, 0.02),
        0 10px 25px rgba(15, 23, 42, 0.01) !important;
}
.light-theme .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06) !important;
}

/* --- Mobile Responsiveness Updates --- */

/* Responsive grid for admin dashboard */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

/* Sidebar navigation transforming into responsive layout on mobile */
.admin-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 991px) {
    .admin-sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
    }
    .admin-sidebar-menu .tab-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
        text-align: center !important;
        font-size: 0.85rem !important;
        padding: 0.75rem 0.5rem !important;
        border-radius: 10px;
        border: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.02);
    }
    .light-theme .admin-sidebar-menu .tab-btn {
        background: #ffffff;
        border-color: #cbd5e1;
    }
    .admin-sidebar-menu .tab-btn.active::after {
        display: none; /* Hide bottom line bar on mobile layout grid */
    }
    .admin-sidebar-menu .tab-btn.active {
        background: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
    }
}

/* Smooth mobile-scrolling responsive table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
}

/* Header navbar responsive adjustments */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .nav-user {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    .user-badge {
        width: 100%;
        text-align: center;
    }
    .nav-user .btn {
        width: 100%;
    }
    
    /* Layout main container adjustments */
    main {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    /* Modal responsive fitting */
    .modal-content {
        padding: 1.25rem;
        border-radius: 16px;
        width: 100%;
        margin: 0;
    }
    
    /* Card padding reduction to maximize screen space */
    .card {
        padding: 1.25rem;
        border-radius: 16px;
        margin-bottom: 1.25rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    h2 {
        font-size: 1.4rem;
    }
}
