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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.card-accent-cyan::before,
.card-accent-green::before,
.card-accent-yellow::before,
.card-accent-purple::before,
.card-accent-orange::before,
.card-accent-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}

.card-accent-cyan::before { background: linear-gradient(90deg, #00d9ff, #0099cc); }
.card-accent-green::before { background: linear-gradient(90deg, #00ff88, #00cc6a); }
.card-accent-yellow::before { background: linear-gradient(90deg, #ffd93d, #f0c929); }
.card-accent-purple::before { background: linear-gradient(90deg, #c084fc, #a855f7); }
.card-accent-orange::before { background: linear-gradient(90deg, #fb923c, #f97316); }
.card-accent-red::before { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* Icon backgrounds */
.icon-bg-cyan { background: linear-gradient(135deg, #00d9ff, #0099cc); }
.icon-bg-green { background: linear-gradient(135deg, #00ff88, #00cc6a); }
.icon-bg-yellow { background: linear-gradient(135deg, #ffd93d, #f0c929); }
.icon-bg-purple { background: linear-gradient(135deg, #c084fc, #a855f7); }
.icon-bg-orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.icon-bg-red { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Inputs */
input, select, textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #00d9ff;
    background: rgba(255, 255, 255, 0.08);
}

input::placeholder, textarea::placeholder {
    color: #64748b;
}

select option {
    background: #1a1a2e;
    color: #fff;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #64748b;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Role selector buttons */
.role-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.role-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 217, 255, 0.3);
}

.role-btn.active {
    background: rgba(0, 217, 255, 0.1);
    border-color: #00d9ff;
    color: #fff;
}

.role-btn.active i {
    color: #00d9ff;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

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

.nav-item.active {
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
    border-color: rgba(0, 217, 255, 0.3);
}

/* Main content */
.main-content {
    margin-left: 0;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: 280px;
    }
}

.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stats cards */
.stat-card {
    padding: 20px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card.cyan {
    background: rgba(0, 217, 255, 0.15);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.stat-card.green {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.stat-card.yellow {
    background: rgba(255, 217, 61, 0.15);
    border: 1px solid rgba(255, 217, 61, 0.3);
}

.stat-card.purple {
    background: rgba(192, 132, 252, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.3);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th {
    background: rgba(0, 217, 255, 0.15);
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #00d9ff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.95rem;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-green {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.badge-yellow {
    background: rgba(255, 217, 61, 0.2);
    color: #ffd93d;
}

.badge-red {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-cyan {
    background: rgba(0, 217, 255, 0.2);
    color: #00d9ff;
}

.badge-purple {
    background: rgba(192, 132, 252, 0.2);
    color: #c084fc;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00ff88;
    color: #00ff88;
    font-weight: 500;
    z-index: 9999;
    animation: fadeInUp 0.3s ease;
}

/* Mobile overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* QR Code container */
.qr-container {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-fill.cyan { background: linear-gradient(90deg, #00d9ff, #0099cc); }
.progress-bar-fill.green { background: linear-gradient(90deg, #00ff88, #00cc6a); }
.progress-bar-fill.yellow { background: linear-gradient(90deg, #ffd93d, #f0c929); }

/* Tabs */
.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

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

.tab-btn.active {
    color: #00d9ff;
    background: rgba(0, 217, 255, 0.15);
}

/* Utility classes */
.hidden { display: none !important; }
.text-cyan { color: #00d9ff; }
.text-green { color: #00ff88; }
.text-yellow { color: #ffd93d; }
.text-purple { color: #c084fc; }
.text-red { color: #ef4444; }
