

:root {
    --er-bg: #f3f6fb;
    --er-card: #ffffff;
    --er-text: #111827;
    --er-muted: #6b7280;
    --er-border: #e5e7eb;
    --er-input: #ffffff;
    --er-input-border: #d1d5db;
    --er-font-scale: 100%;
}

html {
    font-size: var(--er-font-scale);
}

body {
    background: var(--er-bg);
    color: var(--er-text);
}

.panel-card {
    background: var(--er-card);
    color: var(--er-text);
    border: 1px solid var(--er-border);
    border-radius: 18px;
}

body.dark-mode {
    --er-bg: #0f172a;
    --er-card: #111827;
    --er-text: #e5e7eb;
    --er-muted: #94a3b8;
    --er-border: #334155;
    --er-input: #1e293b;
    --er-input-border: #475569;

    background: var(--er-bg) !important;
    color: var(--er-text) !important;
}

body.dark-mode .page-wrapper,
body.dark-mode .container-fluid,
body.dark-mode main,
body.dark-mode aside {
    background: var(--er-bg) !important;
    color: var(--er-text) !important;
}

body.dark-mode .panel-card,
body.dark-mode .card,
body.dark-mode .modal-content,
body.dark-mode .dropdown-menu {
    background: var(--er-card) !important;
    color: var(--er-text) !important;
    border-color: var(--er-border) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode label,
body.dark-mode .fw-bold,
body.dark-mode strong {
    color: #f8fafc !important;
}

body.dark-mode .text-muted,
body.dark-mode small,
body.dark-mode .small {
    color: var(--er-muted) !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode textarea,
body.dark-mode input,
body.dark-mode select {
    background-color: var(--er-input) !important;
    color: #f8fafc !important;
    border-color: var(--er-input-border) !important;
}

body.dark-mode .form-control::placeholder,
body.dark-mode textarea::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus,
body.dark-mode textarea:focus {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 .2rem rgba(96, 165, 250, .20) !important;
}

body.dark-mode .table {
    color: var(--er-text) !important;
    --bs-table-bg: transparent;
    --bs-table-color: var(--er-text);
    --bs-table-border-color: var(--er-border);
    --bs-table-hover-bg: #1e293b;
    --bs-table-hover-color: #ffffff;
}

body.dark-mode .table thead th {
    background: #020617 !important;
    color: #cbd5e1 !important;
    border-color: var(--er-border) !important;
}

body.dark-mode .table tbody td,
body.dark-mode .table tbody th {
    background: transparent !important;
    color: var(--er-text) !important;
    border-color: var(--er-border) !important;
}

body.dark-mode .table-hover tbody tr:hover td {
    background: #1e293b !important;
    color: #ffffff !important;
}

body.dark-mode .dataTables_wrapper,
body.dark-mode .dt-container,
body.dark-mode .dataTables_wrapper .dataTables_length,
body.dark-mode .dataTables_wrapper .dataTables_filter,
body.dark-mode .dataTables_wrapper .dataTables_info,
body.dark-mode .dt-length,
body.dark-mode .dt-search,
body.dark-mode .dt-info,
body.dark-mode .dt-paging {
    color: var(--er-text) !important;
}

body.dark-mode .dataTables_wrapper input,
body.dark-mode .dataTables_wrapper select,
body.dark-mode .dt-container input,
body.dark-mode .dt-container select {
    background: var(--er-input) !important;
    color: #f8fafc !important;
    border: 1px solid var(--er-input-border) !important;
}

body.dark-mode .page-link {
    background: #111827 !important;
    border-color: var(--er-border) !important;
    color: #e5e7eb !important;
}

body.dark-mode .page-item.active .page-link {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

body.dark-mode .menu-title {
    color: #94a3b8 !important;
}

body.dark-mode .menu-link,
body.dark-mode .list-group-item {
    background: transparent !important;
    color: #e5e7eb !important;
    border-color: transparent !important;
}

body.dark-mode .menu-link:hover,
body.dark-mode .list-group-item:hover {
    background: #1e293b !important;
    color: #ffffff !important;
}

body.dark-mode .menu-link.active,
body.dark-mode .list-group-item.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

body.dark-mode .menu-section {
    border-color: #1e293b !important;
}

body.dark-mode .bg-light {
    background: #1e293b !important;
    color: #e5e7eb !important;
}

body.dark-mode pre {
    background: #020617 !important;
    color: #cbd5e1 !important;
    border: 1px solid #1e293b !important;
}

.account-floating-btn {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(0,0,0,.25);
    background: #111827;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    transition: .2s;
}

.account-floating-btn:hover {
    transform: translateY(-2px);
    background: #2563eb;
    color: #ffffff !important;
}

.account-floating-icon {
    font-size: 18px;
    line-height: 1;
}

.account-floating-text {
    font-size: 14px;
}

body.dark-mode .account-floating-btn {
    background: #f8fafc;
    color: #111827 !important;
}

body.dark-mode .account-floating-btn:hover {
    background: #93c5fd;
    color: #111827 !important;
}

@media (max-width: 768px) {
    .account-floating-text {
        display: none;
    }

    .account-floating-btn {
        padding: 13px 15px;
    }
}
