:root {
    --primary: #4e73df;
    --primary-dark: #2e59d9;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --dark: #5a5c69;
    --sidebar-width: 250px;
    --sidebar-bg: #2c3e50;
    --bg-light: #f8f9fc;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-light);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #5a5c69;
}

/* Auth Pages Background - Enhanced Science Theme */
.auth-bg {
    background: linear-gradient(rgba(30, 50, 100, 0.7), rgba(30, 50, 100, 0.7)), 
                url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'); /* Professional lab/workshop background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glass-card-dark {
    background: rgba(30, 50, 100, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-container {
    z-index: 1;
    width: 100%;
    max-width: 1100px;
}

.workshop-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.workshop-logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

/* Layout */
#wrapper {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    z-index: 1000;
}

#sidebar.toggled {
    margin-left: calc(-1 * var(--sidebar-width));
}

#sidebar .sidebar-heading {
    padding: 1.5rem 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    white-space: nowrap;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        height: 100%;
    }
    #sidebar.toggled {
        margin-left: 0;
    }
    #content-wrapper {
        width: 100%;
    }
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

#sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link.active {
    color: #fff;
    background: var(--primary);
}

#content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.auth-bg .topbar {
    background: transparent !important;
    box-shadow: none !important;
}

.topbar {
    height: 4.375rem;
    background: #fff;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
}

/* Cards & Components */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-header-gradient {
    background: linear-gradient(135deg, #1e3264 0%, #4e73df 100%) !important;
    color: white !important;
    border-bottom: none !important;
    padding: 1.25rem 1.5rem !important;
}

.card-header-gradient h1, 
.card-header-gradient h2, 
.card-header-gradient h3, 
.card-header-gradient h4, 
.card-header-gradient h5, 
.card-header-gradient h6 {
    color: white !important;
    margin-bottom: 0;
    font-weight: 700;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    font-weight: bold;
    color: var(--primary);
    padding: 1.25rem 1.5rem;
}

.btn-primary, .btn-success {
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
}

.btn-primary {
    background: var(--primary-gradient);
}

.btn-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
}

.btn-primary:hover, .btn-success:hover {
    transform: translateY(-2px);
    color: white;
    opacity: 0.9;
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.btn-success:hover {
    box-shadow: 0 5px 15px rgba(28, 200, 138, 0.4);
}

.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d3e2;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.1);
    border-color: var(--primary);
}

.stat-card {
    border-left: 0.25rem solid !important;
    transition: transform 0.2s;
}

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

.stat-card.primary { border-left-color: var(--primary) !important; }
.stat-card.success { border-left-color: var(--success) !important; }
.stat-card.info { border-left-color: var(--info) !important; }
.stat-card.warning { border-left-color: var(--warning) !important; }

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5a5c69;
}

.stat-icon {
    font-size: 2rem;
    color: #dddfeb;
}

/* Tables */
.table thead th {
    background-color: #f8f9fc;
    color: #4e73df;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-top: none;
}

.badge {
    padding: 0.5em 0.75em;
    font-weight: 700;
}

/* Utils */
.text-xs { font-size: 0.75rem; }
.font-weight-bold { font-weight: 700; }
.bg-gradient-primary {
    background: var(--primary-gradient);
}
