/********** Template CSS **********/

:root {
    --primary: #EB1616;
    --secondary: #191C24;
    --light: #9f9fa2;
    --dark: linear-gradient(135deg, #470707 0%, #2e0f0f 50%, #000000 100%);
    --card-bg: linear-gradient(45deg, #4f0000, #000000);
    --card-bg-2: linear-gradient(135deg, #3e0e0e, #3c1111, #000000);
    --card-border: 1px solid rgba(255, 255, 255, 0.1);
    --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    --card-shadow-hover: 0 10px 28px rgba(235, 22, 22, 0.35);
    --content-bg: linear-gradient(45deg, rgb(0, 0, 0), rgb(29, 9, 9));
}

/*** Back to top ***/
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    background: var(--primary) !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
    border-radius: 50px;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: #a80f0f !important;
    color: #ffffff !important;
    transform: scale(1.1) !important;
}


/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a1a2f;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #9d0000, #ff4757);
    border-radius: 4px;
    border: 2px solid #1a1a2f;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff4757, #9d0000);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #631f1f #343a40;
}

/* Global scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a2f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #9d0000, #ff4757);
    border-radius: 6px;
    border: 3px solid #1a1a2f;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff4757, #9d0000);
}

/* Content scrollbar */
.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: #1a1a2f;
}

.content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #9d0000, #ff4757);
    border-radius: 4px;
}

.content {
    scrollbar-width: thin;
    scrollbar-color: #631f1f #1a1a2f;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Buttons ***/
.btn {
    transition: .5s;
    border-radius: 24px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: #a80f0f;
    border-color: #a80f0f;
    color: #ffffff;
}

.btn-secondary {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-secondary:hover {
    background: var(--card-bg-2);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-success {
    background: #1e8e3e;
    border-color: #1e8e3e;
    color: #ffffff;
}

.btn-success:hover {
    background: #166b2f;
    border-color: #166b2f;
    color: #ffffff;
}

.btn-warning {
    background: #f9ab00;
    border-color: #f9ab00;
    color: #202124;
}

.btn-warning:hover {
    background: #e09a00;
    border-color: #e09a00;
    color: #202124;
}

.btn-danger {
    background: #d93025;
    border-color: #d93025;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b3261e;
    border-color: #b3261e;
    color: #ffffff;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}

/*** Layout ***/
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    background: var(--card-bg);
    transition: 0.5s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.content {
    margin-left: 250px;
    min-height: 100vh;
    background: var(--content-bg);
    transition: 0.5s;
}

@media (min-width: 992px) {
    .sidebar {
        margin-left: 0;
    }
    .sidebar.open {
        margin-left: -250px;
    }
    .content {
        width: calc(100% - 250px);
    }
    .content.open {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 60px;
        left: -250px;
        width: 250px;
        height: calc(100vh - 60px);
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 999;
    }
    .sidebar.open {
        left: 0;
    }
    .content {
        width: 100%;
        margin-left: 0;
    }
}

/*** Navbar (Sidebar) ***/
.sidebar .navbar .navbar-nav .nav-link {
    padding: 7px 20px;
    color: var(--light);
    font-weight: 500;
    border-left: 3px solid transparent;
    border-radius: 0 30px 30px 0;
    outline: none;
    margin: 2px 0;
    transition: 0.3s;
    text-decoration: none !important;
}

.sidebar .navbar .navbar-nav .nav-link:hover,
.sidebar .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    background: var(--dark);
    border-color: var(--primary);
    text-decoration: none !important;
}

.sidebar .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 40px;
    color: var(--light);
    transition: all 0.3s ease;
}

.sidebar .navbar .navbar-nav .nav-link:hover i,
.sidebar .navbar .navbar-nav .nav-link.active i {
    background: var(--secondary);
    color: var(--primary);
    transform: scale(1.1);
}

.sidebar .navbar .dropdown-toggle::after {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
    color: var(--light);
}

.sidebar .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

.sidebar .navbar .dropdown-item {
    padding-left: 25px;
    border-radius: 0 30px 30px 0;
    color: var(--light);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.sidebar .navbar .dropdown-item:hover,
.sidebar .navbar .dropdown-item.active {
    background: var(--dark);
    color: var(--primary);
    text-decoration: none !important;
}

/*** Navbar (Content) ***/
.content .navbar {
    background: var(--card-bg) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.content .navbar .navbar-nav .nav-link {
    margin-left: 25px;
    padding: 12px 0;
    color: var(--light);
    outline: none;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.content .navbar .navbar-nav .nav-link:hover,
.content .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    text-decoration: none !important;
}

.content .navbar .sidebar-toggler,
.content .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 40px;
    color: var(--light);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.content .navbar .sidebar-toggler:hover {
    background: var(--secondary);
    transform: scale(1.1);
    text-decoration: none !important;
}

.content .navbar .sidebar-toggler:hover i {
    color: var(--primary);
}

.content .navbar .dropdown-item {
    color: var(--light);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.content .navbar .dropdown-item:hover,
.content .navbar .dropdown-item.active {
    background: var(--dark);
    color: var(--primary);
    padding-left: 28px !important;
    text-decoration: none !important;
}

.content .navbar .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.content .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

@media (max-width: 575.98px) {
    .content .navbar .navbar-nav .nav-link {
        margin-left: 15px;
    }
}

/*** Date Picker ***/
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 12px;
    background: #1a0b0b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}

#calender .bootstrap-datetimepicker-widget {
    color: #ffffff;
}

#calender .bootstrap-datetimepicker-widget table td {
    color: #ffffff;
}

#calender .bootstrap-datetimepicker-widget table td.old,
#calender .bootstrap-datetimepicker-widget table td.new {
    color: #6b6b6b;
}

/*** Testimonial ***/
.progress .progress-bar {
    width: 0px;
    transition: 2s;
}

.progress {
    background: #1a0b0b;
    border-radius: 8px;
}

.progress-bar {
    background: var(--primary);
    border-radius: 8px;
}

.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 5px solid var(--primary);
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--dark);
    border-color: var(--primary);
}

/* ============================================
   CARDS - Dark red gradient
   ============================================ */
.bg-secondary {
    background: var(--card-bg) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: var(--card-shadow);
    border: var(--card-border);
    transition: all 0.3s ease;
    position: relative;
}

.bg-secondary:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.bg-secondary2 {
    background: var(--card-bg-2) !important;
    color: #ffffff !important;
    box-shadow: var(--card-shadow);
    border: var(--card-border);
}

/* All text in cards should be WHITE */
.bg-secondary h1,
.bg-secondary h2,
.bg-secondary h3,
.bg-secondary h4,
.bg-secondary h5,
.bg-secondary h6,
.bg-secondary p,
.bg-secondary span,
.bg-secondary small,
.bg-secondary .mb-0,
.bg-secondary .mb-2,
.bg-secondary .d-flex .ms-3 p,
.bg-secondary .d-flex .ms-3 h6,
.bg-secondary .d-flex .ms-3 span {
    color: #ffffff !important;
}

/* Dashboard card numbers */
.bg-secondary .ms-3 h6.mb-0,
.bg-secondary .d-flex .ms-3 h6.mb-0 {
    color: #ffffff !important;
    font-size: 1.25rem !important;
    font-weight: 600;
}

/* Dashboard card labels */
.bg-secondary .ms-3 p.mb-2,
.bg-secondary .d-flex .ms-3 p.mb-2 {
    color: var(--light) !important;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Icon colors in cards - Primary red with glow */
.bg-secondary .fa-3x,
.bg-secondary .fas.fa-3x,
.bg-secondary .fa-chart-line,
.bg-secondary .fa-user-slash,
.bg-secondary .fa-chart-bar,
.bg-secondary .fa-calendar-day,
.bg-secondary .fa-robot {
    color: var(--primary) !important;
    font-size: 2rem !important;
    filter: drop-shadow(0 0 8px rgba(235, 22, 22, 0.35));
    transition: all 0.3s ease;
}

.bg-secondary:hover .fa-3x,
.bg-secondary:hover .fas.fa-3x,
.bg-secondary:hover .fa-chart-line,
.bg-secondary:hover .fa-user-slash,
.bg-secondary:hover .fa-chart-bar,
.bg-secondary:hover .fa-calendar-day,
.bg-secondary:hover .fa-robot {
    filter: drop-shadow(0 0 15px rgba(235, 22, 22, 0.6));
    transform: scale(1.05);
}

/* ============================================
   Text & link colors
   ============================================ */
.text-primary {
    color: var(--primary) !important;
}

a {
    color: var(--primary);
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

a:hover {
    color: #a80f0f;
    text-decoration: none !important;
}

.text-title {
    color: var(--primary);
}

.premium {
    color: var(--primary);
    font-weight: 600;
}

.text-lime-purple {
    color: var(--primary) !important;
}

.text-light {
    color: var(--light) !important;
}

.text-muted {
    color: #8a8a8a !important;
}

/*** Sidebar polish ***/
.sidebar .navbar-brand h3 {
    color: #ffffff !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar .navbar-brand h3:hover {
    transform: scale(1.02);
    text-decoration: none !important;
}

.sidebar .navbar-brand h3 .text-primary {
    color: var(--primary) !important;
}

.sidebar .d-flex .ms-3 h6 {
    color: #ffffff !important;
}

/* Premium badge - shine rainbow */
.sidebar .d-flex .ms-3 .premium {
    font-weight: 700;
    text-shadow: none;
    position: relative;
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    background: linear-gradient(135deg, #EB1616 0%, #ff6b6b 25%, #ffb347 50%, #EB1616 75%, #EB1616 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine-premium-rainbow 3s ease-in-out infinite;
}

.sidebar .d-flex .ms-3 .premium:hover {
    transform: scale(1.15) rotate(-2deg);
    animation: shine-premium-rainbow-fast 1s ease-in-out infinite;
    text-decoration: none !important;
}

.sidebar .d-flex .ms-3 .premium,
.sidebar .d-flex .ms-3 .premium:hover,
.sidebar .d-flex .ms-3 .premium:active,
.sidebar .d-flex .ms-3 .premium:focus {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

@keyframes shine-premium-rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shine-premium-rainbow-fast {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/*** Header polish ***/
.navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

/*** Greatness branding ***/
.navbar-brand h3 {
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #EB1616, #ff6b6b, #EB1616);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine-brand 3s ease-in-out infinite;
    text-decoration: none !important;
}

@keyframes shine-brand {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (max-width: 768px) {
    .navbar-brand h3 {
        display: block;
        text-align: center;
        margin-top: 8px;
        font-size: 20px;
    }
}

/* ============================================
   Modals - Dark red gradient
   ============================================ */
.modal-content {
    border-radius: 12px;
    border: var(--card-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    background: var(--card-bg);
    color: #ffffff;
}

.modal-content.bg-secondary {
    background: var(--card-bg) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: var(--card-shadow);
    border: var(--card-border);
    transition: none;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.modal-body {
    color: #ffffff;
}

.modal-body pre {
    background: rgba(0, 0, 0, 0.35);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Close button visibility on dark bg */
.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Hover effect for non-modal .bg-secondary */
.bg-secondary.custom-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-secondary.custom-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

/* ============================================
   Form controls - dark theme
   ============================================ */
.form-control {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    padding: 0.6rem 0.8rem;
    transition: border 0.2s, box-shadow 0.2s;
    color: #ffffff;
}

.form-control::placeholder {
    color: #9f9fa2;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(235, 22, 22, 0.25);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.form-control.bg-dark {
    background: rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.form-control.bg-dark:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--primary) !important;
}

/* Select dropdown options */
select.form-control option {
    background: #1a0b0b;
    color: #ffffff;
}

/* ============================================
   Table - dark red theme
   ============================================ */
.table {
    color: #ffffff;
}

.table thead th {
    background: rgba(0, 0, 0, 0.35);
    color: var(--light);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table tbody td {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
}

.table-hover tbody tr:hover {
    background: rgba(235, 22, 22, 0.08);
}

.table-bordered {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.table thead th {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.table thead tr th {
    color: var(--light) !important;
    background: rgba(0, 0, 0, 0.35);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.alert-danger {
    background: #4a0d0d;
    color: #ffb3b3;
}

.alert-success {
    background: #0d3a1a;
    color: #a8e6b8;
}

/* ============================================
   Dropdown - dark red theme
   ============================================ */
.dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    padding: 6px 0;
    background: #1a0b0b;
}

.dropdown-item {
    padding: 8px 20px;
    color: var(--light);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.dropdown-item:hover {
    background: var(--dark);
    color: var(--primary);
    padding-left: 28px !important;
    text-decoration: none !important;
}

.dropdown-menu .dropdown-item {
    color: var(--light) !important;
    text-decoration: none !important;
}

.dropdown-menu .dropdown-item:hover {
    color: var(--primary) !important;
    background: var(--dark) !important;
    text-decoration: none !important;
}

.dropdown-menu .dropdown-item h6 {
    color: #ffffff !important;
}

.dropdown-menu .dropdown-item small {
    color: var(--light) !important;
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Badge
   ============================================ */
.badge {
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 16px;
}

/* ============================================
   Checkbox
   ============================================ */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   Pagination
   ============================================ */
.pagination .page-link {
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    margin: 0 2px;
    background: rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.pagination .page-link:hover {
    background: var(--dark);
    border-color: var(--primary);
    transform: translateY(-2px);
    color: var(--primary);
    text-decoration: none !important;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* ============================================
   Tooltip
   ============================================ */
.tooltip-inner {
    background: #1a0b0b;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   List group
   ============================================ */
.list-group-item {
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.list-group-item:hover {
    background: var(--dark);
    transform: translateX(5px);
    text-decoration: none !important;
}

.list-group-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* ============================================
   Card
   ============================================ */
.card {
    border-radius: 12px;
    border: var(--card-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    background: var(--card-bg);
    color: #ffffff;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    color: #ffffff;
}

.card-body {
    color: #ffffff;
}

/* ============================================
   Tabs
   ============================================ */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
    color: var(--light);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: transparent;
}

.nav-tabs .nav-link:hover {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none !important;
}

/* ============================================
   Responsive tables
   ============================================ */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* ============================================
   User agent box
   ============================================ */
.user-agent-box {
    font-size: 0.85rem;
    color: var(--light) !important;
    background-color: rgba(0, 0, 0, 0.35) !important;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 4px;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   Chart & map containers
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

#world_map {
    height: 350px;
    width: 100%;
}

/* ============================================
   Login page
   ============================================ */
.login-container .bg-secondary {
    max-width: 420px;
    margin: 0 auto;
}

/* ============================================
   Footer
   ============================================ */
.bg-secondary.rounded-top p,
.bg-secondary.rounded-top span,
.bg-secondary.rounded-top a {
    color: #ffffff !important;
}

.bg-secondary.rounded-top a:hover {
    color: var(--primary) !important;
    text-decoration: none !important;
}

/* ============================================
   Icons in navbar
   ============================================ */
.nav-link .fa-bell {
    color: var(--light) !important;
    transition: all 0.3s ease;
}

.nav-link:hover .fa-bell {
    color: var(--primary) !important;
    transform: scale(1.1);
}

.sidebar-toggler .fa-bars {
    color: var(--light) !important;
    transition: all 0.3s ease;
}

.sidebar-toggler:hover .fa-bars {
    color: var(--primary) !important;
}

/* Remove underlines globally */
.nav-link,
.nav-link:hover,
.nav-link:active,
.nav-link:focus,
.dropdown-item,
.dropdown-item:hover,
.dropdown-item:active,
.dropdown-item:focus {
    text-decoration: none !important;
}

.sidebar a,
.sidebar a:hover,
.sidebar a:active,
.sidebar a:focus {
    text-decoration: none !important;
}

/* ============================================
   Notification bell
   ============================================ */
.gmail-bell {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.gmail-bell .bell-icon {
    color: var(--light) !important;
    transition: all 0.3s ease;
}

.gmail-bell:hover .bell-icon {
    color: var(--primary) !important;
    transform: scale(1.1) rotate(-10deg);
}

.gmail-bell .notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
}

.badge-red {
    background: #EB1616;
    color: white;
    box-shadow: 0 2px 8px rgba(235, 22, 22, 0.5);
}

.badge-blue {
    background: #1a73e8;
    color: white;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}

.badge-yellow {
    background: #f9ab00;
    color: #202124;
    box-shadow: 0 2px 8px rgba(249, 171, 0, 0.4);
}

.badge-green {
    background: #1e8e3e;
    color: white;
    box-shadow: 0 2px 8px rgba(30, 142, 62, 0.4);
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes bell-ring {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.gmail-bell.ringing .bell-icon {
    animation: bell-ring 0.6s ease-in-out;
}

/* ============================================
   Navbar text visibility
   ============================================ */
.content .navbar .navbar-nav .nav-link {
    color: var(--light) !important;
    text-decoration: none !important;
}

.content .navbar .navbar-nav .nav-link:hover,
.content .navbar .navbar-nav .nav-link.active {
    color: var(--primary) !important;
    text-decoration: none !important;
}

.content .navbar .navbar-nav .nav-link .fa-bell {
    color: var(--light) !important;
}

.content .navbar .navbar-nav .nav-link:hover .fa-bell {
    color: var(--primary) !important;
}

.content .navbar .navbar-nav .nav-link span {
    color: var(--light) !important;
}

.content .navbar .navbar-nav .nav-link:hover span {
    color: var(--primary) !important;
}

.content .navbar a,
.content .navbar a:hover,
.content .navbar a:active,
.content .navbar a:focus {
    text-decoration: none !important;
}

/* ============================================
   DROPDOWN FIX
   ============================================ */
.nav-item.dropdown {
    position: relative !important;
}

.nav-item.dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 1000 !important;
    display: none !important;
    float: left !important;
    min-width: 10rem !important;
    padding: 0.5rem 0 !important;
    margin: 0.125rem 0 0 !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    text-align: left !important;
    list-style: none !important;
    background-color: #1a0b0b !important;
    background-clip: padding-box !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.6) !important;
}

.nav-item.dropdown .dropdown-menu.show {
    display: block !important;
}

.nav-item.dropdown .dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

.nav-item.dropdown.user-dropdown .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

.dropdown-toggle::after {
    display: inline-block !important;
    margin-left: 0.255em !important;
    vertical-align: 0.255em !important;
    content: "" !important;
    border-top: 0.3em solid !important;
    border-right: 0.3em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important;
}

.content .navbar .dropdown-menu {
    display: none !important;
}

.content .navbar .dropdown-menu.show {
    display: block !important;
}

.navbar-nav .dropdown {
    position: relative !important;
}

.navbar-nav .dropdown-menu {
    position: absolute !important;
}

.sidebar .nav-item.dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 1000 !important;
    display: none !important;
    min-width: 10rem !important;
    padding: 0.5rem 0 !important;
    margin: 0.125rem 0 0 !important;
    background-color: #1a0b0b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.6) !important;
}

.sidebar .nav-item.dropdown .dropdown-menu.show {
    display: block !important;
}

/* ============================================
   FIX: Prevent modal from moving on hover
   ============================================ */
.modal-content.bg-secondary:hover {
    transform: none !important;
    box-shadow: var(--card-shadow) !important;
}

/* ============================================
   POPUP GLITCH FIX
   ============================================ */
html, body {
    -webkit-tap-highlight-color: transparent;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 16px;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    animation: popupOverlayFade 0.2s ease-out;
}

.popup-overlay.show,
.popup-overlay[style*="display: flex"] {
    display: flex !important;
}

@keyframes popupOverlayFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.popup-overlay .popup-content {
    position: relative;
    margin: auto;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--card-bg);
    color: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    border: var(--card-border);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    animation: popupContentPop 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
    transition: none !important;
}

.popup-overlay .popup-content:hover {
    transform: translateZ(0) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}

@keyframes popupContentPop {
    from {
        transform: scale(0.94) translateY(8px) translateZ(0);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0) translateZ(0);
        opacity: 1;
    }
}

#loadingOverlay {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.popup-overlay .popup-content * {
    transition-property: background-color, border-color, color, box-shadow, opacity;
}

.popup-overlay .popup-content.bg-secondary,
.popup-overlay .popup-content.bg-secondary:hover {
    transform: translateZ(0) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}

@media (max-width: 768px) {
    .popup-overlay {
        padding: 16px 12px;
        align-items: flex-start;
    }
    .popup-overlay .popup-content {
        max-height: calc(100vh - 32px);
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .popup-overlay,
    .popup-overlay .popup-content {
        animation: none !important;
    }
}

/* ============================================
   FIX: Page-content wrapper hover glitch
   ============================================ */
.container-fluid .bg-secondary.text-center.rounded.p-4,
.container-fluid .bg-secondary.text-center.rounded.p-4:hover {
    transform: none !important;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3) !important;
}

.modal.show,
.modal.show .modal-dialog,
.modal.show .modal-content {
    transform: none !important;
}

/* ============================================
   Global font
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', 'Roboto', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background: var(--content-bg);
    color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #ffffff;
}

/* Text center muted */
.text-center .text-muted {
    color: var(--light) !important;
}