/* Global Theme Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Orbitron:wght@400;700&display=swap');

.animated-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(64, 224, 208, 0.3), transparent);
    height: 1px;
    animation: lineMove 15s linear infinite;
}

.line:nth-child(1) { top: 20%; width: 100%; animation-delay: 0s; }
.line:nth-child(2) { top: 50%; width: 100%; animation-delay: 5s; }
.line:nth-child(3) { top: 80%; width: 100%; animation-delay: 10s; }

@keyframes lineMove {
    0% { transform: translateX(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.star {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, rgba(64, 224, 208, 0.3), rgba(32, 178, 170, 0.3));
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

body {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%) !important;
    color: #e0e0e0 !important;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
}

/* Card Styling */
.card, .pt-5 > div {
    background: rgba(15, 20, 40, 0.85) !important;
    backdrop-filter: blur(15px);
    border-radius: 20px !important;
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.2), rgba(32, 178, 170, 0.2)) !important;
    padding: 20px !important;
    border-bottom: 2px solid rgba(64, 224, 208, 0.4) !important;
}

.card-header h1, .card-header h5, .card-title {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(90deg, #40e0d0, #20b2aa, #00ced1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.card-body {
    padding: 30px !important;
    background: rgba(20, 25, 50, 0.7) !important;
    color: #e0e0e0 !important;
}

/* Form Elements */
.form-group label {
    color: #ffffff !important;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.form-control, .form-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(64, 224, 208, 0.3) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    padding: 12px !important;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #40e0d0 !important;
    box-shadow: 0 0 0 0.25rem rgba(64, 224, 208, 0.25) !important;
}

/* Buttons */
.btn {
    border-radius: 12px !important;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.btn-xs-outline-secondary, .btn-primary {
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.2), rgba(32, 178, 170, 0.2)) !important;
    border: 2px solid #40e0d0 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(64, 224, 208, 0.3);
}

.btn-xs-outline-secondary:hover, .btn-primary:hover {
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.3), rgba(32, 178, 170, 0.3)) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(64, 224, 208, 0.4);
}

.btn-muted, .btn-secondary {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.2), rgba(108, 117, 125, 0.2)) !important;
    border: 2px solid #6c757d !important;
    color: #ffffff !important;
}

.btn-xs-warning, .btn-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.2)) !important;
    border: 2px solid #ffc107 !important;
    color: #ffffff !important;
}

/* Navbar & Footer Overrides */
.navbar {
    background: rgba(15, 20, 40, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(64, 224, 208, 0.3);
}

footer {
    background: rgba(15, 20, 40, 0.9) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(64, 224, 208, 0.3) !important;
}

/* Table Styling */
.table {
    color: #e0e0e0 !important;
}

.table thead th {
    border-bottom: 2px solid rgba(64, 224, 208, 0.4) !important;
    color: #40e0d0 !important;
    font-family: 'Orbitron', sans-serif;
}

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

/* Dashboard Specific Styling */
.dash-count {
    background: rgba(15, 20, 40, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(64, 224, 208, 0.3);
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.dash-count:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(64, 224, 208, 0.2);
    border-color: #40e0d0;
}

.dash-count:nth-child(1) .dash-imgs svg { color: #40e0d0; }
.dash-count:nth-child(2) .dash-imgs svg { color: #28a745; }
.dash-count:nth-child(3) .dash-imgs svg { color: #ffc107; }
.dash-count:nth-child(4) .dash-imgs svg { color: #dc3545; }

.dash-counts h4 {
    color: #aaaaaa;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.dash-counts h5 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
}

.dash-imgs svg {
    width: 60px;
    height: 60px;
    opacity: 0.3;
}

/* DataTables Custom Styling */
.dataTables_wrapper {
    color: #ffffff !important;
}

.dataTables_filter input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 8px 15px;
}

.dataTables_length select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 5px;
}

.paginate_button {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    color: #ffffff !important;
    margin: 2px;
    border-radius: 8px !important;
}

.paginate_button.current {
    background: rgba(64, 224, 208, 0.3) !important;
    color: #ffffff !important;
}

.paginate_button:hover {
    background: rgba(64, 224, 208, 0.2) !important;
    color: #40e0d0 !important;
}

.alert-primary {
    background: rgba(64, 224, 208, 0.1) !important;
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    color: #40e0d0 !important;
}

a.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    margin: 2px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 8px;
    color: #40e0d0 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

a.btn-link:hover {
    background: rgba(64, 224, 208, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(64, 224, 208, 0.3);
}

/* Dropdown Menu Custom Styling */
.dropdown-menu {
    background: rgba(15, 20, 40, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(64, 224, 208, 0.4) !important;
    border-radius: 12px !important;
    z-index: 9999 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.dropdown-item {
    color: #e0e0e0 !important;
    padding: 12px 20px !important;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(64, 224, 208, 0.2) !important;
    color: #40e0d0 !important;
}

.dropdown-divider {
    border-top: 1px solid rgba(64, 224, 208, 0.2) !important;
}

/* Ensure navbar stays on top */
.navbar {
    z-index: 1030 !important;
}

/* Alert Custom Styling */
.alert {
    background: rgba(15, 20, 40, 0.85) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    border-radius: 15px !important;
    color: #e0e0e0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.alert-success {
    border-left: 5px solid #28a745 !important;
    background: rgba(40, 167, 69, 0.1) !important;
}

.alert-danger {
    border-left: 5px solid #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
}

.alert-primary {
    border-left: 5px solid #40e0d0 !important;
    background: rgba(64, 224, 208, 0.1) !important;
}

.alert-warning {
    border-left: 5px solid #ffc107 !important;
    background: rgba(255, 193, 7, 0.1) !important;
}

.alert strong, .alert b {
    color: #40e0d0 !important;
}

/* Fix for any remaining white backgrounds */
.bg-light, .bg-white {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #e0e0e0 !important;
}

.text-dark {
    color: #e0e0e0 !important;
}

.modal-content {
    background: rgba(15, 20, 40, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(64, 224, 208, 0.3) !important;
    color: #e0e0e0 !important;
}
