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

:root {
    --bg-dark: #f8fafc;
    --bg-panel: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-glass: rgba(0, 0, 0, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --primary: #7c3aed;
    --primary-grad: linear-gradient(135deg, #7c3aed, #4f46e5);
    --accent: #fbbf24;
    --success: #10b981;
    --error: #ef4444;
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Gradients */
body::before {
    content: '';
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, rgba(255,255,255,0) 70%);
    top: -10%;
    right: -10%;
    z-index: -1;
    pointer-events: none;
}

/* Admin Login Layout */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

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

.login-header .logo {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #0f172a, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

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

.alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #991b1b;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand span {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-badge {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #c084fc;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-logout {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-logout:hover {
    color: var(--error);
}

/* Main Dashboard Panel */
.main-content {
    flex-grow: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

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

.dashboard-header h1 {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

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

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.metric-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-val {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-purple {
    background: rgba(124, 58, 237, 0.15);
    color: #c084fc;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Table Card */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-title {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
}

.search-box {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.12);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: auto;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    cursor: pointer;
    white-space: nowrap;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-export:active {
    transform: translateY(0);
}

/* Table View */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

.custom-table th,
.custom-table td {
    white-space: nowrap;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.custom-table td {
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.95rem;
    color: #334155;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr {
    transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

.row-num {
    color: var(--text-secondary);
    font-weight: 600;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-grad);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    margin-right: 0.8rem;
}

.user-name-cell {
    display: flex;
    align-items: center;
}

/* Badges for Visitor and Exhibitor */
.user-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-visitor {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.badge-exhibitor {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
}

/* Business Info Styling in Table */
.business-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

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

.business-address {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: normal;
    word-break: break-word;
    max-width: 280px;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: rgba(0, 0, 0, 0.05);
}

.empty-state p {
    font-size: 0.95rem;
}

/* Footer style for admin */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: auto;
}

/* Responsive Queries */
@media (max-width: 1024px) {
    .main-content {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .table-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .toolbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        padding: 1rem;
        text-align: center;
    }
    
    .navbar-actions {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .login-header {
        margin-bottom: 1.5rem;
    }
    
    .login-header .logo {
        font-size: 1.75rem;
    }
    
    .table-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .custom-table th {
        padding: 0.8rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .custom-table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        margin-right: 0.5rem;
    }
    
    .metric-card {
        padding: 1.2rem;
    }
    
    .metric-val {
        font-size: 1.8rem;
    }
}
