/* 
 * Modern Control Panel - "Cyber Slate" Theme
 * High Contrast, Neon Accents, Premium Feel
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Palette */
    --bg-body: #000205;
    /* Pitch Black/Blue */
    --bg-surface: #0b1120;
    /* Dark Navy Panel */
    --bg-input: #151e32;
    /* Lighter Navy for inputs */

    /* Accents */
    --primary: #3b82f6;
    /* Electric Blue */
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --secondary: #8b5cf6;
    /* Neon Purple */
    --accent-red: #ef4444;
    /* Bright Red */

    /* Text */
    --text-white: #ffffff;
    --text-gray: #94a3b8;

    /* Borders & Effects */
    --border-color: #1e293b;
    --card-radius: 16px;
    --btn-radius: 12px;
    --glow-primary: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* Base Reset */
body {
    background-color: var(--bg-body);
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: white;
}

a {
    text-decoration: none !important;
}

/* Layout & Sidebar */
.d-flex.wrapper {
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-width: 280px;
    max-width: 280px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    position: fixed;
    z-index: 1000;
    transition: all 0.3s ease;
}

#page-content-wrapper {
    width: 100%;
    margin-left: 280px;
    /* Width of sidebar */
    padding-bottom: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

/* Mobile Toggle State */
.toggled #sidebar-wrapper {
    margin-left: -280px;
}

.toggled #page-content-wrapper {
    margin-left: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -280px;
    }

    #page-content-wrapper {
        margin-left: 0;
    }

    .toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

.sidebar-branding {
    padding: 2.5rem 1rem;
    text-align: center;
    background: linear-gradient(to bottom, #0f172a, transparent);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 140px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    background: -webkit-linear-gradient(0deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    margin-top: 10px;
}

.sidebar-nav a {
    color: var(--text-gray);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: white;
    background: rgba(59, 130, 246, 0.1);
    border-right-color: var(--primary);
}

.sidebar-nav a i {
    width: 25px;
    font-size: 1.2rem;
    margin-right: 10px;
}

/* Navbar */
.navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    height: 80px;
}

/* Cards (Replacing Glass Card with Solid Tech Card) */
.glass-card,
.card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Add a cool top accent line to cards */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

/* Forms */
.form-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: white !important;
    padding: 12px 16px;
    border-radius: 10px;
    height: auto;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

label {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(59, 130, 246, 0.6);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: var(--bg-input);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #1e293b;
    border-color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.75rem;
}

/* Tables */
.table th {
    border: none;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 1.5rem 1rem;
    white-space: nowrap;
}

.table td {
    border-top: 1px solid var(--border-color);
    color: white;
    padding: 1.5rem 1rem;
    vertical-align: middle;
    white-space: nowrap;
    /* Prevent wrapping */
}

.table td .btn {
    margin-right: 5px;
    /* Spacing between buttons */
    display: inline-flex;
    /* Force inline */
}

.table td .btn:last-child {
    margin-right: 0;
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
}

.badge-light {
    background: var(--bg-input);
    color: white;
    border: 1px solid var(--border-color);
}

/* Modals - THE FIX */
.modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header,
.modal-footer {
    border-color: var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.modal-header .close {
    color: white;
    text-shadow: none;
    opacity: 0.8;
}

.modal-title {
    color: white;
}

/* Login Page specific */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 10;
}

.login-card {
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}

.login-logo {
    width: 150px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.4));
}

/* Utilities */
.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--text-gray) !important;
}

hr {
    border-color: var(--border-color);
}