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

:root {
    /* Colors */
    --bg-dark: #0b0f19;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --danger-color: #ef4444;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --warning-color: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Spacing & Layout */
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glass Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #ffffff;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    border: none;
    padding: 0.6rem 1.5rem;
}

.btn-gradient-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.5);
    color: white;
}

.btn-gradient-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-gradient-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline-custom:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

/* Layout: Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;
    height: calc(100vh - 40px);
    border-radius: var(--border-radius-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
}

.sidebar .btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.sidebar .dropdown-menu, .submenu {
    background: rgba(20, 25, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 8px 0;
}

.sidebar .dropdown-item, .submenu .dropdown-item, .city-toggle {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 0 8px;
    width: calc(100% - 16px);
}

.sidebar .dropdown-item:hover, .submenu .dropdown-item:hover, .city-toggle:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Submenu specific fixes */
.submenu {
    position: fixed !important;
    display: none;
    min-width: 220px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-left: 10px; /* offset from sidebar slightly */
}

.submenu.show {
    display: block !important;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Breadcrumb & Top Bar */
.breadcrumb-bar {
    position: fixed;
    top: 20px;
    left: calc(var(--sidebar-width) + 40px);
    right: 20px;
    height: var(--navbar-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 0 25px;
    z-index: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--glass-shadow);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Main Content Area */
.content {
    margin-left: calc(var(--sidebar-width) + 40px);
    margin-top: calc(var(--navbar-height) + 40px);
    padding: 0 20px 40px 0;
    width: calc(100% - var(--sidebar-width) - 60px);
    min-height: calc(100vh - var(--navbar-height) - 60px);
}

/* Forms & Inputs */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
    color: #ffffff;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

/* Modals */
.modal-content {
    background: #111827; /* Solid dark for modals to avoid messy overlapping blurs */
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Tables (If used) */
.table {
    color: var(--text-primary);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}
.table th {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 600;
}
.table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom background effects */
.bg-gradient-circle {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0) 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
    pointer-events: none;
}

.bg-gradient-circle-left {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, rgba(139,92,246,0) 70%);
    bottom: -200px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}
