/* VelocityPanel - Matching demo.html style */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.3);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.auth-card h2 {
    color: #00d4ff;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.auth-card p {
    color: #888;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background: #00d4ff;
    color: #0f0f23;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #00b8e6;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    height: 100vh;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #00d4ff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-right: 2px solid #00d4ff;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.sidebar-header h1 {
    color: #00d4ff;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.sidebar-header .version {
    color: #888;
    font-size: 0.75rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    padding: 1rem 1.5rem 0.5rem;
    color: #888;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #888;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.nav-item.active {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border-left-color: #00d4ff;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-info span {
    color: #888;
    font-size: 0.85rem;
}

.btn-logout {
    padding: 0.5rem;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    padding: 1.5rem 2rem;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #00d4ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h2 {
    color: #00d4ff;
    font-size: 1.5rem;
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Cards - matching demo style */
.card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    color: #00d4ff;
    margin-bottom: 1rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Stat Cards - matching demo */
.stat-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #00d4ff;
}

.stat-card .value {
    font-size: 2rem;
    color: #00d4ff;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: #888;
    font-size: 0.9rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    text-align: left;
    color: #888;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

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

.badge-error {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.badge-warning {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .content-header {
        padding: 1rem;
    }
    
    .content-header h2 {
        font-size: 1.2rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Mobile overflow fixes */
@media (max-width: 768px) {
    .card {
        overflow-x: auto;
    }
    
    .card h3 {
        font-size: 1.1rem;
        word-wrap: break-word;
    }
    
    .card p {
        font-size: 0.9rem;
        word-wrap: break-word;
    }
    
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .stat-card .value {
        font-size: 1.5rem;
    }
    
    .stat-card .label {
        font-size: 0.8rem;
        word-wrap: break-word;
    }
    
    /* Better spacing for mobile */
    .content-area {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    /* Make buttons full width on mobile */
    .btn {
        width: 100%;
    }
    
    /* Better table on mobile */
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}
