/* Modern Dark Theme - OLS Tuning */
:root {
    --primary-red: #ef233c;
    --secondary-red: #d90429;
    --dark-red: #8d0801;
    --success-green: #2ecc71;
    --dark-bg: #0d0d0d;
    --dark-bg-2: #1a1a1a;
    --dark-bg-3: #242424;
    --dark-bg-4: #2d2d2d;
    --text-light: #ffffff;
    --text-muted: #9ca3af;
    --accent-glow: rgba(239, 35, 60, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gradient-red: linear-gradient(135deg, #ef233c 0%, #d90429 100%);
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--dark-bg);
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(239, 35, 60, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(217, 4, 41, 0.06) 0%, transparent 50%);
    animation: bgShift 25s ease infinite;
}

@keyframes bgShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-5%, -5%) rotate(3deg); }
    66% { transform: translate(5%, 5%) rotate(-3deg); }
}

/* Grid Lines */
.grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(239, 35, 60, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(239, 35, 60, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Modern Cards */
.card {
    background: var(--dark-bg-3) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red) !important;
    box-shadow: 0 20px 40px rgba(239, 35, 60, 0.15);
}

.card-header {
    background: var(--dark-bg-4) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 1.5rem !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4 {
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.form-control {
    background: var(--dark-bg-2) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--dark-bg-3) !important;
    border-color: var(--primary-red) !important;
    box-shadow: 0 0 0 0.25rem rgba(239, 35, 60, 0.15) !important;
    color: var(--text-light) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.form-select {
    background: var(--dark-bg-2) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.form-select:focus {
    border-color: var(--primary-red) !important;
    box-shadow: 0 0 0 0.25rem rgba(239, 35, 60, 0.15) !important;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-red) !important;
    color: white !important;
    box-shadow: 0 4px 15px var(--accent-glow);
    border: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 204, 113, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    color: white !important;
}

.btn-outline-light {
    border: 2px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    background: transparent !important;
}

.btn-outline-light:hover {
    background: var(--primary-red) !important;
    border-color: var(--primary-red) !important;
    color: white !important;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: 1px solid;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1) !important;
    border-color: rgba(46, 204, 113, 0.3) !important;
    color: #2ecc71 !important;
}

.alert-danger {
    background: rgba(239, 35, 60, 0.1) !important;
    border-color: rgba(239, 35, 60, 0.3) !important;
    color: #ef233c !important;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1) !important;
    border-color: rgba(52, 152, 219, 0.3) !important;
    color: #3498db !important;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1) !important;
    border-color: rgba(243, 156, 18, 0.3) !important;
    color: #f39c12 !important;
}

/* Tables */
.table {
    color: var(--text-light) !important;
}

.table-dark {
    --bs-table-bg: var(--dark-bg-3);
    --bs-table-striped-bg: var(--dark-bg-2);
    --bs-table-hover-bg: var(--dark-bg-4);
    border-color: var(--glass-border) !important;
}

.table-dark thead {
    background: var(--dark-bg-4);
}

.table-dark th {
    border-color: var(--glass-border) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-dark td {
    border-color: var(--glass-border) !important;
}

/* DataTables */
.dataTables_wrapper {
    color: var(--text-light) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: transparent !important;
    color: white !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 6px;
    padding: 0.4em 1em;
    margin: 0 3px;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--gradient-red) !important;
    border-color: var(--primary-red) !important;
    color: white !important;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--dark-bg-4) !important;
    border-color: var(--primary-red) !important;
    color: white !important;
}

/* Text Colors */
.text-muted {
    color: var(--text-muted) !important;
}

.text-info {
    color: #3498db !important;
}

.text-white {
    color: var(--text-light) !important;
}

/* Links */
a {
    color: var(--primary-red);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-red);
    text-decoration: none;
}

/* Logo */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
}

/* Loading Spinner */
.spinner-border {
    border-color: rgba(255, 255, 255, 0.2);
    border-right-color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg-2);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-bg-4);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}