:root {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --sidebar-hover: rgba(14, 165, 233, 0.15);
    --accent-cyan: #0284c7;
    --accent-orange: #ea580c;
    --accent-cyan-glow: rgba(14, 165, 233, 0.2);
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-gold: #d97706;
    --accent-gold-glow: rgba(217, 119, 6, 0.2);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --sidebar-text: #f8fafc;
    --sidebar-text-muted: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(226, 232, 240, 0.9);
    --glass-glow: rgba(14, 165, 233, 0.1);
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --inner-glow: inset 0 0 20px rgba(14, 165, 233, 0.04);
}

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

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Base Layout Structure */
.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
    border-right: 1px solid var(--glass-border);
}

.admin-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.admin-nav-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 2px 8px rgba(14, 165, 233, 0.4));
}

.admin-nav-logo i {
    font-size: 1.8rem;
    color: var(--accent-orange);
}

.admin-nav-menu {
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--sidebar-text-muted);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: var(--sidebar-hover);
    color: var(--accent-cyan);
    border-left: 4px solid var(--accent-cyan);
}

.nav-logout {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: #ff6b6b;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: auto;
    margin-bottom: 2rem;
}

.nav-logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Content Wrapper */
.admin-content-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: calc(100vw - 260px);
    overflow-x: hidden;
    transition: var(--transition);
}

/* Topbar */
.admin-topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid var(--glass-border);
    z-index: 900;
    position: sticky;
    top: 0;
}

.topbar-left h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: #f1f5f9;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 250px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: #555;
}

.notifications .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #dc3545;
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
}

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

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-role {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-cyan-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

/* Main Content Area */
.admin-main {
    padding: 2rem;
    background-color: var(--bg-dark);
    flex: 1;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-section {
    display: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-color: rgba(15, 91, 91, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-cyan-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.8rem;
    transition: var(--transition);
}

.stat-icon.pending {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.stat-icon.revenue {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Utilities */
.text-center { text-align: center; }
.text-danger { color: #ef4444; }
.text-accent { color: var(--accent-cyan); font-weight: bold; }
.font-bold { font-weight: bold; }

.activity-section.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

/* Activity Section / Cards */
.activity-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.activity-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.activity-card h3, .card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-card h3 i, .card h3 i {
    color: var(--text-primary);
}

.card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    box-sizing: border-box;
}

/* Analytics & Chart Containers */
.analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chart-card,
.card.chart-container {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chart-header {
    margin-bottom: 1.25rem;
}

.chart-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.chart-header h3 i {
    color: var(--accent-cyan);
}

.chart-wrapper,
.card.chart-container .chart-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    max-height: 420px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Fallback for canvas directly inside .chart-container */
.chart-container {
    position: relative;
    width: 100%;
    height: 380px;
    max-height: 420px;
    box-sizing: border-box;
    overflow: hidden;
}

.chart-wrapper canvas,
.chart-container canvas {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f1f5f9;
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active, .status-badge.completed, .status-badge.delivered {
    background: #e6f4ea;
    color: #1e8e3e;
}

.status-badge.pending, .status-badge.in-transit {
    background: #fef7e0;
    color: #f29900;
}

.status-badge.rejected, .status-badge.cancelled {
    background: #fce8e6;
    color: #d93025;
}

/* Forms & Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.settings-form .form-group {
    margin-bottom: 1.2rem;
}

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

.form-control {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #ffffff;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--bg-sidebar);
    color: #fff;
}

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

/* Futuristic Background Effects */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: var(--bg-dark);
    overflow: hidden;
}

.mesh-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    animation: blobFloat 25s infinite alternate;
}

.blob-1 { background: var(--accent-cyan); top: -10%; left: -10%; }
.blob-2 { background: var(--accent-blue); bottom: -10%; right: -10%; animation-delay: -5s; }
.blob-3 { background: var(--accent-purple); top: 50%; left: 50%; transform: translate(-50%, -50%); animation: blobFloat 30s infinite alternate-reverse; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10%, 15%) scale(1.1); }
    66% { transform: translate(-15%, 5%) scale(0.9); }
    100% { transform: translate(5%, -10%) scale(1.05); }
}

.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(2px);
    animation: bubbleRise 15s infinite linear;
}

@keyframes bubbleRise {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.2; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-120vh) translateX(50px); opacity: 0; }
}

.admin-login-page {
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.admin-login-container {
    max-width: 450px;
    width: 100%;
}

.admin-login-card {
    background: var(--bg-card);
    padding: 3.5rem 2.5rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(32px);
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: var(--inner-glow);
}

.admin-login-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
}

.admin-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.admin-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 4px 12px rgba(2, 132, 199, 0.35));
}

.admin-login-header h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.admin-login-header p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.admin-login-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(24px);
    box-shadow: var(--inner-glow);
}

.info-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
}

.info-card ul {
    list-style: none;
    display: grid;
    gap: 1.2rem;
}

.info-card li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.info-card li i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.forgot-password:hover {
    text-shadow: 0 0 10px var(--accent-cyan-glow);
}

.admin-login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #020617;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.admin-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--accent-cyan-glow);
}

.admin-login-footer {
    margin-top: 2.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.admin-login-footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.back-to-website {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.back-to-website:hover {
    color: var(--accent-cyan);
}

/* Responsive Login */
@media (max-width: 850px) {
    .admin-login-container {
        grid-template-columns: 1fr;
    }
    .admin-login-info {
        display: none;
    }
}

/* Animations & Utilities */
.shake {
    animation: shake 0.5s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Notifications */
.admin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}
.admin-notification-success { background: rgba(30, 142, 62, 0.9); }
.admin-notification-error { background: rgba(217, 48, 37, 0.9); }

.input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.2rem 1rem 3rem;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input:focus {
    border-color: var(--accent-cyan);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
    outline: none;
}

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-content-wrapper {
        margin-left: 0;
        max-width: 100vw;
    }
}

/* Super Admin UI Additions */
.super-admin-banner {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.super-admin-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.super-admin-banner h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
}

.super-admin-banner h1 i {
    color: var(--accent-gold);
    filter: drop-shadow(0 0 10px var(--accent-gold-glow));
}

.super-admin-banner p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.action-btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-sm-action {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-status-toggle.suspend {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-status-toggle.suspend:hover {
    background: #ef4444;
    color: #fff;
}

.btn-status-toggle.activate {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-status-toggle.activate:hover {
    background: #10b981;
    color: #fff;
}

.btn-delete-action {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-delete-action:hover {
    background: #ef4444;
    color: #fff;
}

.btn-add-business {
    background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
    color: #ffffff;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 15px var(--accent-gold-glow);
}

.btn-add-business:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-gold);
}

.section-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 0 30px var(--accent-gold-glow);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-body {
    padding: 2rem 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

/* Map Styling */
.map-card-container {
    height: 350px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
}

#stationMap {
    height: 100%;
    width: 100%;
    background: #0b0f19;
}

/* Rider Card & Grid Styling */
.riders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.rider-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.rider-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 40px var(--accent-cyan-glow);
}

.rider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.rider-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.rider-info {
    flex: 1;
}

.rider-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.rider-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.rider-status {
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.rider-status.online, .rider-status.available {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.rider-status.offline, .rider-status.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.rider-status.busy {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.rider-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-item i {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    margin-right: 0.8rem;
    transition: var(--transition);
}

/* Accent colors for different detail icons to make them pop */
.detail-item i.fa-phone {
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
}

.detail-item i.fa-shopping-cart {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
}

.detail-item i.fa-star {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

.detail-item i.fa-peso-sign, .detail-item i.fa-money-bill-wave, .detail-item i.fa-wallet {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.detail-item i.fa-calendar-day {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.08);
}

.rider-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.rider-actions .btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Action button styles in directory tables */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.action-btn.view {
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.action-btn.view:hover {
    background: var(--accent-cyan-glow);
}

.action-btn.edit {
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.action-btn.edit:hover {
    background: rgba(59, 130, 246, 0.1);
}

.action-btn.delete {
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

.btn-sm-action i {
    color: #ffffff !important;
}

/* ==================== ANALYTICS & INVENTORY UPGRADES ==================== */
.analytics-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analytics-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-analytics-export {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.25);
}

.btn-analytics-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 211, 238, 0.4);
    color: #fff;
}

.btn-analytics-export.secondary {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-analytics-export.outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    box-shadow: none;
}

.btn-analytics-export.outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.analytics-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 1.2rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.3);
}

.analytics-grid-multi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.pie-wrapper {
    height: 280px;
    position: relative;
}

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

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-accent {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
}

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

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Inventory Management Cards */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.inventory-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.inventory-card:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.inventory-card.low-stock {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

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

.inventory-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.inventory-card-body h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.inventory-category {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.inventory-stock-counter {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stock-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stock-unit {
    font-size: 0.9rem;
    color: #94a3b8;
}

.inventory-threshold {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1.2rem;
}

.inventory-card-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-stock-adjust {
    flex: 1;
    padding: 0.45rem 0.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.btn-stock-adjust:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-stock-adjust.primary {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.25);
    color: #22d3ee;
}

.btn-stock-adjust.primary:hover {
    background: rgba(34, 211, 238, 0.25);
    color: #fff;
}

/* Printable Report View */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .admin-sidebar, .admin-topbar, .analytics-actions, .analytics-filter-bar, .inventory-card-actions, .btn-stock-adjust {
        display: none !important;
    }
    .admin-content-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card, .activity-card, .inventory-card {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    .admin-table th, .admin-table td {
        color: #000 !important;
        border-bottom: 1px solid #ddd !important;
    }
}

/* Rider Cards Grid & Fallbacks */
.riders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.rider-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.rider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.rider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--glass-border);
}

.rider-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.rider-info {
    flex: 1;
}

.rider-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.rider-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.rider-status {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.rider-status.active,
.rider-status.online {
    background: #dcfce7;
    color: #15803d;
}

.rider-status.inactive,
.rider-status.offline {
    background: #f1f5f9;
    color: #64748b;
}

.rider-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.detail-item i {
    width: 18px;
    color: var(--accent-cyan);
    text-align: center;
}

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

/* Empty State / No Data */
.no-data {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-card);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    width: 100%;
}

.no-data i {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 0.8rem;
}

.no-data p, .no-data h3 {
    margin: 0.3rem 0;
    color: var(--text-secondary);
}

.no-data-cell {
    text-align: center !important;
    padding: 2rem !important;
}

