/* General Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}
main.container {
    padding-top: 40px;
    margin-top: 25px;
}
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: none;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
}

/* Button Styles */
.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #3a5ec0;
    border-color: #3a5ec0;
}
.admin-link {
  background-color: #ffc107; /* Bootstrap warning yellow */
  color: #000;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    padding: 10px 15px;
}

/* Dashboard Stats */
.card-stat {
    border-radius: 10px;
    color: white;
    padding: 15px;
    margin-bottom: 20px;
}

.card-stat h5 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.card-stat p {
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* Sidebar Styles */
.list-group-item {
    border: none;
    padding: 12px 15px;
}

.list-group-item.active {
    background-color: #4e73df;
    border-color: #4e73df;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-stat {
        margin-bottom: 15px;
    }
}

/* =====================
   Dark Theme (Improved)
   ===================== */
body.dark-theme {
    --bs-bg-opacity: 1; /* Bootstrap var for bg opacity */
    background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
    color: #e4e6eb;
    transition: background 0.3s, color 0.3s;
}
body.dark-theme .card-header.bg-gradient-primary {
    background: linear-gradient(135deg, #2c2f33 0%, #3a3b3c 100%) !important;
    color: #f1f1f1 !important;
}

/* Navbar */
body.dark-theme .navbar {
    background-color: #202225 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
body.dark-theme .navbar .nav-link,
body.dark-theme .navbar .navbar-brand {
    color: #e4e6eb !important;
}
body.dark-theme .navbar .nav-link:hover {
    color: #b0b3b8 !important;
}

/* Cards */
body.dark-theme .card {
    background-color: #242526 !important;
    color: #e4e6eb !important;
    border: 1px solid #2f3136 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
body.dark-theme .card-header {
    background-color: #2c2f33 !important;
    border-bottom: 1px solid #3a3b3c !important;
    color: #f1f1f1 !important;
}

/* Buttons */
body.dark-theme .btn-primary {
    background-color: #5865f2 !important;
    border-color: #5865f2 !important;
    color: #fff !important;
}
body.dark-theme .btn-primary:hover {
    background-color: #4752c4 !important;
    border-color: #4752c4 !important;
}

/* Tables */
body.dark-theme .table {
    background-color: #242526 !important;
    color: #e4e6eb !important;
}
body.dark-theme .table thead th {
    background-color: #2c2f33 !important;
    color: #f1f1f1 !important;
    border-bottom: 1px solid #3a3b3c !important;
}
body.dark-theme .table tbody tr:hover {
    background-color: #323436 !important;
}

/* Sidebar */
/* Sidebar - Dark Mode */
body.dark-theme .list-group-item,
body.dark-theme .list-group-item-action {
    border-bottom: none !important; /* remove underline */
    background-color: #242526 !important;
    color: #e4e6eb !important;
    text-decoration: none !important; /* remove any link underline */
}

/* Active item */
body.dark-theme .list-group-item.active,
body.dark-theme .list-group-item-action.active {
    background-color: #5865f2 !important;
    color: #fff !important;
}

/* Hover effect */
body.dark-theme .list-group-item:hover,
body.dark-theme .list-group-item-action:hover {
    background-color: #2c2f33 !important;
    text-decoration: none !important;
}




/* Forms */
body.dark-theme .form-control {
    background-color: #2c2f33 !important;
    border: 1px solid #3a3b3c !important;
    color: #e4e6eb !important;
}
body.dark-theme .form-control:focus {
    background-color: #323436 !important;
    border-color: #5865f2 !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(88,101,242,0.25);
}

/* Alerts */
body.dark-theme .alert {
    background-color: #242526 !important;
    border: 1px solid #3a3b3c !important;
    color: #e4e6eb !important;
}

/* Smooth transition */
body, .card, .navbar, .form-control, .alert, .list-group-item {
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Dark theme */
body.dark-theme .admin-link {
  background-color: #5865f2 !important; /* Discord-like purple/blue */
  color: #fff !important;
  border-radius: 6px;
}

/* =====================
   Mobile Footer Menu
   ===================== */
footer a:hover {
    color: #0d6efd !important;
    text-decoration: underline;
}

/* Default (Light Theme) */
.mobile-footer-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(var(--bs-primary-rgb), 1) !important;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-footer-menu .menu-item {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.mobile-footer-menu .menu-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.mobile-footer-menu .menu-item.active,
.mobile-footer-menu .menu-item.active i {
    color: #fff !important;
}

.mobile-footer-menu .menu-item:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 767.98px) {
    .mobile-footer-menu {
        display: flex;
    }
    body {
        padding-bottom: 60px;
    }
}
.card {
    border-radius: 1rem;
    background-color: var(--bs-body-bg); /* adapts to light/dark mode */
    color: var(--bs-body-color);         /* text adapts automatically */
}
.input-group-text {
    background-color: var(--bs-form-control-bg);
    color: var(--bs-body-color);
}
.form-control {
    background-color: var(--bs-form-control-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}
.captcha-code {
    background-color: var(--bs-form-control-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    text-decoration: line-through;
    font-family: monospace;
    letter-spacing: 3px;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}
body.dark-theme .card-header {
    background-color: #2c2f33 !important;
    color: #f1f1f1 !important;
}

body:not(.dark-theme) .card-header {
    background-color: #0d6efd;
    color: #fff;
}
.alert-danger {
    background-color: var(--bs-danger-bg);
    color: var(--bs-danger-text);
    border-color: var(--bs-danger-border);
}
body.dark-theme .captcha-code {
    color: #fff !important;
    background-color: #2c2f33 !important; /* optional: dark bg */
    border: 1px solid #3a3b3c;           /* match dark theme border */
}
/* Dark mode card overrides */
body.dark-theme .card.bg-success {
    background-color: #2e7d32 !important; /* darker green */
    color: #e4e6eb !important;
}
body.dark-theme .card.bg-danger {
    background-color: #c62828 !important; /* darker red */
    color: #e4e6eb !important;
}
body.dark-theme .card.bg-info {
    background-color: #1565c0 !important; /* darker blue */
    color: #e4e6eb !important;
}
body.dark-theme .card.bg-warning {
    background-color: #f9a825 !important; /* darker yellow/gold */
    color: #242526 !important; /* dark text for contrast */
}

/* Ensure links inside cards are visible in dark mode */
body.dark-theme .card a {
    color: #ffffff !important;
    text-decoration: underline;
}
/* Dark mode QR container */
body.dark-theme .qr-container {
    background-color: #242526; /* dark background */
    border: 1px solid #3a3b3c; /* subtle dark border */
}

#site-footer .footer-link {
    color: var(--footer-link);
    text-decoration: none; /* remove underline */
}

#site-footer .footer-link:hover {
    color: var(--footer-link-hover);
    text-decoration: none; /* ensure underline stays removed on hover */
}

#site-footer .social-link {
    color: var(--footer-social);
    font-size: 1.25rem;
    text-decoration: none; /* remove underline */
}

#site-footer .social-link:hover {
    color: var(--footer-link-hover);
    text-decoration: none;
}
/* Summernote dark mode fix */
body[data-bs-theme="dark"] .note-editor.note-frame {
    background-color: #1e1e2f;
    color: #f1f1f1;
}
body[data-bs-theme="dark"] .note-editor .note-editable {
    background-color: #1e1e2f;
    color: #f1f1f1;
}


/* =====================
   Dark Theme Footer
   ===================== */
.dark-theme .mobile-footer-menu {
    background-color: #202225 !important; /* Dark footer background */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.6);
}

.dark-theme .mobile-footer-menu .menu-item {
    color: rgba(228, 230, 235, 0.7); /* softer light gray */
}

.dark-theme .mobile-footer-menu .menu-item.active,
.dark-theme .mobile-footer-menu .menu-item:hover {
    color: #fff !important;
}
