/* ============================
   BASE STYLE CHUNG CHO CẢ 2 THEME
   ============================ */

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

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, #1565c0, #1e88e5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    padding: 1rem 0;
}

.navbar-brand {
    letter-spacing: 0.5px;
    color: #fff !important;
}

.navbar .nav-link {
    color: #e0e0e0 !important;
    margin-right: .75rem;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: #ffffff !important;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 0.4rem;
    transition: all 0.15s ease;
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.btn-primary {
    background: linear-gradient(90deg, #1e88e5, #42a5f5);
    border: none;
}

.btn-success {
    background: linear-gradient(90deg, #2e7d32, #43a047);
    border: none;
}

/* Cards */
.card {
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.06);
}

/* Toast */
#toastContainer {
    z-index: 9999;
}

.toast {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Modal */
.modal-content {
    border-radius: 0.75rem;
}

/* Table */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Footer */
.site-footer {
    font-size: 0.9rem;
}

/* Links */
a {
    text-decoration: none;
}

/* ==========================================
   DARK THEME
   ========================================== */

html[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #f0f0f0;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4 {
    color: #ffffff;
}

html[data-bs-theme="dark"] .card {
    background: linear-gradient(135deg, #1c1c1c, #2e2e2e);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
}

html[data-bs-theme="dark"] .modal-content {
    background: #1c1c1c;
    color: #f9f9f9;
}

html[data-bs-theme="dark"] .accordion-button {
    color: #f0f0f0 !important;
    background-color: #1c1c1c !important;
}

html[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #263238 !important;
}

html[data-bs-theme="dark"] .table {
    color: #f0f0f0;
    background-color: #111;
}

html[data-bs-theme="dark"] .table thead {
    background-color: #222;
}

html[data-bs-theme="dark"] .text-muted {
    color: #9ca3af !important;
}

/* Footer dark */
html[data-bs-theme="dark"] .site-footer {
    background: transparent;
    color: #b0bec5;
}

/* ==========================================
   LIGHT THEME OVERRIDES
   ========================================== */

html[data-bs-theme="light"] body {
    background: #f8f9fa;
    color: #212529;
}

html[data-bs-theme="light"] h1,
html[data-bs-theme="light"] h2,
html[data-bs-theme="light"] h3,
html[data-bs-theme="light"] h4 {
    color: #212529;
}

/* Navbar light */
html[data-bs-theme="light"] .navbar {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15,23,42,0.08);
}

html[data-bs-theme="light"] .navbar-brand {
    color: #0f172a !important;
}

html[data-bs-theme="light"] .navbar .nav-link {
    color: #6b7280 !important;
}

html[data-bs-theme="light"] .navbar .nav-link.active,
html[data-bs-theme="light"] .navbar .nav-link:hover {
    color: #111827 !important;
}

/* Card light */
html[data-bs-theme="light"] .card {
    background: #ffffff;
    color: #212529;
    border-color: rgba(15,23,42,0.08);
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}

/* Modal light */
html[data-bs-theme="light"] .modal-content {
    background: #ffffff;
    color: #212529;
}

/* Accordion light */
html[data-bs-theme="light"] .accordion-button {
    color: #212529 !important;
    background-color: #ffffff !important;
}

html[data-bs-theme="light"] .accordion-button:not(.collapsed) {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

/* Table light */
html[data-bs-theme="light"] .table {
    color: #212529;
    background-color: #ffffff;
}

/* Text-muted light */
html[data-bs-theme="light"] .text-muted {
    color: #6c757d !important;
}

/* Toast light */
html[data-bs-theme="light"] .toast {
    background-color: #ffffff;
    color: #212529;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Footer light */
html[data-bs-theme="light"] .site-footer {
    background: #ffffff;
    color: #6b7280;
    border-top: 1px solid rgba(0,0,0,0.04);
}