/* Dark mode overrides for Metronic v7 (Bootstrap 4-based) content areas.
   Metronic v7 only ships dark skins for the header/aside/brand chrome, so
   everything below hand-rolls a dark palette for the page content: cards,
   tables, forms, modals, dropdowns, and the wizard used on Registration/New.
   Scoped entirely under body.theme-dark so it's a no-op otherwise. */

body.theme-dark {
    background-color: #1a1a27;
    color: #b5b5c3;
}

body.theme-dark .content,
body.theme-dark .container-fluid {
    background-color: #1a1a27;
}

body.theme-dark .footer {
    background-color: #1a1a27 !important;
    border-top: 1px solid #2b2b40;
}

/* Text utilities that assume a light background */
body.theme-dark .text-dark,
body.theme-dark .text-dark-75 {
    color: #f3f6f9 !important;
}

body.theme-dark .text-muted {
    color: #80808f !important;
}

body.theme-dark a.text-dark-75:hover,
body.theme-dark a.text-hover-primary:hover {
    color: #3699ff !important;
}

/* Cards / portlets */
body.theme-dark .card,
body.theme-dark .card-custom {
    background-color: #1e1e2d;
    border-color: #2b2b40;
    color: #b5b5c3;
}

body.theme-dark .card-header {
    background-color: transparent;
    border-bottom-color: #2b2b40;
}

body.theme-dark .card-footer {
    background-color: transparent;
    border-top-color: #2b2b40;
}

body.theme-dark .separator,
body.theme-dark .separator-dashed,
body.theme-dark hr {
    border-color: #2b2b40 !important;
}

/* Forms */
body.theme-dark .form-control,
body.theme-dark .form-control.form-control-solid,
body.theme-dark .custom-select {
    background-color: #2b2b40;
    border-color: #2b2b40;
    color: #f3f6f9;
}

body.theme-dark .form-control::placeholder {
    color: #6a6a83;
}

body.theme-dark .form-control:focus,
body.theme-dark .custom-select:focus {
    background-color: #2b2b40;
    border-color: #3699ff;
    color: #f3f6f9;
}

body.theme-dark .form-control:disabled,
body.theme-dark .form-control[readonly] {
    background-color: #23233a;
    color: #6a6a83;
}

body.theme-dark .custom-file-label {
    background-color: #2b2b40;
    border-color: #2b2b40;
    color: #f3f6f9;
}

body.theme-dark .custom-file-label::after {
    background-color: #323248;
    color: #f3f6f9;
}

body.theme-dark .checkbox > span,
body.theme-dark .radio > span {
    background-color: #2b2b40;
}

/* Tables */
body.theme-dark .table {
    color: #b5b5c3;
}

body.theme-dark .table th,
body.theme-dark .table td {
    border-color: #2b2b40;
}

body.theme-dark .table thead th {
    color: #80808f;
    border-bottom-color: #2b2b40;
}

body.theme-dark .table-hover tbody tr:hover {
    background-color: #23233a;
    color: #f3f6f9;
}

/* Modals */
body.theme-dark .modal-content {
    background-color: #1e1e2d;
    border-color: #2b2b40;
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer {
    border-color: #2b2b40;
}

body.theme-dark .modal-backdrop.show {
    opacity: .7;
}

/* Dropdowns */
body.theme-dark .dropdown-menu {
    background-color: #1e1e2d;
    border-color: #2b2b40;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, .4);
}

body.theme-dark .dropdown-menu .navi-link:hover,
body.theme-dark .dropdown-item:hover {
    background-color: #23233a;
}

body.theme-dark .navi-item .navi-text {
    color: #b5b5c3;
}

/* Tabs */
body.theme-dark .nav-tabs {
    border-bottom-color: #2b2b40;
}

body.theme-dark .nav-tabs .nav-link {
    color: #80808f;
}

body.theme-dark .nav-tabs .nav-link.active {
    background-color: transparent;
    color: #f3f6f9;
    border-color: #2b2b40 #2b2b40 transparent;
}

/* Registration wizard */
body.theme-dark .wizard-1 .wizard-nav {
    background-color: #1e1e2d;
    border-color: #2b2b40;
}

body.theme-dark .wizard-1 .wizard-nav .wizard-steps .wizard-step .wizard-label .wizard-title {
    color: #f3f6f9;
}

body.theme-dark .wizard-1 .wizard-nav .wizard-steps .wizard-step .wizard-label .wizard-desc {
    color: #80808f;
}

body.theme-dark .wizard-1 .wizard-body {
    background-color: #1e1e2d;
}

/* Symbols */
body.theme-dark .symbol.symbol-light-primary .symbol-label {
    background-color: rgba(54, 153, 255, .15);
}

/* Offcanvas / aside panels that reuse light backgrounds */
body.theme-dark .offcanvas-mobile {
    background-color: #1e1e2d;
}

/* Registration wizard step circles */
body.theme-dark .wizard-circle { background: #1e1e2d; border-color: #3f4254; color: #6d6d80; }
body.theme-dark .wizard-circle-step:not(:last-child)::after { background: #3f4254; }
body.theme-dark .wizard-circle-step[data-wizard-state="done"]:not(:last-child)::after { background: #3699FF; }
body.theme-dark .wizard-circle-step[data-wizard-state="done"] .wizard-circle,
body.theme-dark .wizard-circle-step[data-wizard-state="current"] .wizard-circle { background: #3699FF; border-color: #3699FF; color: #fff; }
body.theme-dark .wizard-circle-step[data-wizard-state="current"] .wizard-circle { box-shadow: 0 0 0 5px rgba(54, 153, 255, .2); }
body.theme-dark .wizard-circle-label { color: #6d6d80; }
body.theme-dark .wizard-circle-step[data-wizard-state="done"] .wizard-circle-label { color: #a2a3b7; }
body.theme-dark .wizard-circle-step[data-wizard-state="current"] .wizard-circle-label { color: #ffffff; }

/* Alerts: Metronic's solid variants (alert-primary/-danger/-warning/-success) already read fine on
   dark, but the grey and soft "light" variants stay bright. Tone them down. */
body.theme-dark .alert-secondary {
    background-color: #2b2b40; border-color: #323248; color: #cdcdde;
}
body.theme-dark .alert.alert-custom.alert-light-warning { background-color: rgba(255, 168, 0, .12); border-color: rgba(255, 168, 0, .25); }
body.theme-dark .alert.alert-custom.alert-light-warning .alert-text { color: #ffc861; }
body.theme-dark .alert.alert-custom.alert-light-primary { background-color: rgba(54, 153, 255, .12); border-color: rgba(54, 153, 255, .25); }
body.theme-dark .alert.alert-custom.alert-light-primary .alert-text { color: #8fc4ff; }
body.theme-dark .alert.alert-custom.alert-light-danger { background-color: rgba(246, 78, 96, .12); border-color: rgba(246, 78, 96, .25); }
body.theme-dark .alert.alert-custom.alert-light-danger .alert-text { color: #ff8a97; }
body.theme-dark .alert.alert-custom.alert-light-success { background-color: rgba(27, 197, 189, .12); border-color: rgba(27, 197, 189, .25); }
body.theme-dark .alert.alert-custom.alert-light-success .alert-text { color: #5fe0d8; }

/* Navigation ribbon */
body.theme-dark .nav-ribbon-wrap { background: #1e1e2d; border-bottom-color: #2b2b40; }
body.theme-dark .nav-ribbon-item { color: #a2a3b7; }
body.theme-dark .nav-ribbon-item i { color: #6d6d80; }
body.theme-dark .nav-ribbon-item:hover, body.theme-dark .nav-ribbon-item:hover i,
body.theme-dark .nav-ribbon-item.active, body.theme-dark .nav-ribbon-item.active i { color: #3699FF; }
body.theme-dark .nav-ribbon-divider { background: #2b2b40; }
body.theme-dark .nav-ribbon-fade-left { background: linear-gradient(90deg, #1e1e2d 20%, rgba(30, 30, 45, 0)); }
body.theme-dark .nav-ribbon-fade-right { background: linear-gradient(270deg, #1e1e2d 20%, rgba(30, 30, 45, 0)); }
