/*
 * Mayam Aesthetics admin theme overrides (Metronic-compatible).
 * Load AFTER style.bundle*.css. Remove / disable include to restore default.
 *
 * Intentionally does NOT:
 * - recolor menu icons (keep text-info / success / warning / …)
 * - recolor status switches / checkboxes
 * - flatten colored stats cards (bg-primary, bg-success, …)
 */
@import url('mayam-variables.css');

body.mayam-theme {
    color: var(--mayam-ink);
    background-color: var(--mayam-cream) !important;
}

/* ── Brand / Aside ── */
body.mayam-theme .aside,
body.mayam-theme .aside-menu,
body.mayam-theme #kt_aside {
    background-color: var(--mayam-aside) !important;
}

body.mayam-theme .brand {
    background-color: var(--mayam-aside) !important;
    border-bottom: 1px solid rgba(177, 151, 96, 0.25);
}

body.mayam-theme .brand .brand-logo h3,
body.mayam-theme .brand .brand-logo,
body.mayam-theme .brand-logo h3 {
    color: var(--mayam-gold-light) !important;
    letter-spacing: 0.12em;
    font-weight: 600;
}

body.mayam-theme .brand .brand-logo,
.brand .brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.mayam-theme .brand .elite-care-logo,
.brand .elite-care-logo {
    height: 28px;
    width: auto;
    display: block;
    margin: 0;
    background: none;
    padding: 0;
}

body.mayam-theme .brand .elite-care-name,
.brand .elite-care-name {
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

body.aside-minimize:not(.aside-minimize-hover) .elite-care-name {
    display: none;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-heading .menu-text,
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-text {
    color: rgba(245, 240, 230, 0.78) !important;
}

/* Smooth hover / active navigation */
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link {
    transition:
        background-color 0.28s ease,
        background 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s ease,
        padding 0.28s ease !important;
    will-change: background-color, transform;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-text,
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-bullet > span,
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i {
    transition:
        color 0.28s ease,
        background-color 0.28s ease,
        opacity 0.28s ease,
        transform 0.28s ease !important;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item:hover > .menu-link,
body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-hover > .menu-link {
    background-color: var(--mayam-aside-hover) !important;
}

body.mayam-theme[dir="rtl"] .aside-menu .menu-nav > .menu-item:not(.menu-item-active):hover > .menu-link,
body.mayam-theme .aside-menu .menu-nav > .menu-item:not(.menu-item-active):hover > .menu-link {
    transform: translateX(-3px);
}

body.mayam-theme[dir="ltr"] .aside-menu .menu-nav > .menu-item:not(.menu-item-active):hover > .menu-link {
    transform: translateX(3px);
}

body.mayam-theme .aside-menu .menu-nav > .menu-item:not(.menu-item-active):hover > .menu-link .menu-text {
    color: rgba(255, 248, 235, 0.95) !important;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item:not(.menu-item-active):hover > .menu-link .menu-bullet > span {
    background-color: var(--mayam-gold-light) !important;
    transform: scale(1.15);
}

body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link,
body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-open > .menu-link {
    background: linear-gradient(90deg, rgba(177, 151, 96, 0.28), transparent) !important;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link .menu-text,
body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-open > .menu-link .menu-text {
    color: var(--mayam-gold-bright) !important;
    font-weight: 700 !important;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link .menu-bullet.menu-bullet-dot > span,
body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link .menu-bullet.menu-bullet-line > span {
    background-color: var(--mayam-gold-bright) !important;
}

body.mayam-theme[dir="rtl"] .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link,
body.mayam-theme .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link {
    box-shadow: inset -3px 0 0 var(--mayam-gold-bright);
}

body.mayam-theme[dir="ltr"] .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link {
    box-shadow: inset 3px 0 0 var(--mayam-gold-bright);
    background: linear-gradient(90deg, rgba(177, 151, 96, 0.28), transparent) !important;
}

/* Keep original multi-color menu icons (do not force gold) */
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.text-info { color: #8950FC !important; }
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.text-success { color: #1BC5BD !important; }
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.text-primary { color: #3699FF !important; }
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.text-warning { color: #FFA800 !important; }
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.text-danger { color: #F64E60 !important; }
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.fa-ad,
body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon i.fas.fa-ad { color: #FFA800 !important; }

body.mayam-theme .aside-menu .menu-nav .menu-subnav .menu-item.menu-item-active > .menu-link .menu-text {
    color: var(--mayam-gold-light) !important;
}

body.mayam-theme .aside-menu .menu-nav > .menu-item > .menu-link .menu-arrow:before {
    color: rgba(200, 184, 136, 0.7) !important;
}

/* ── Header ── */
body.mayam-theme .header,
body.mayam-theme #kt_header {
    background: var(--mayam-white) !important;
    border-bottom: 1px solid var(--mayam-border) !important;
    box-shadow: 0 1px 0 rgba(177, 151, 96, 0.08);
}

body.mayam-theme .subheader {
    background: transparent !important;
}

/* ── Content cards (plain only — never wipe colored stats cards) ── */
body.mayam-theme .card.card-custom:not([class*="bg-"]) {
    border: 1px solid var(--mayam-border) !important;
    border-radius: var(--mayam-radius) !important;
    box-shadow: var(--mayam-shadow) !important;
    background: var(--mayam-white) !important;
}

body.mayam-theme .card.card-custom:not([class*="bg-"]) > .card-header {
    border-bottom: 1px solid var(--mayam-border) !important;
    background: linear-gradient(180deg, var(--mayam-cream) 0%, var(--mayam-white) 100%) !important;
}

body.mayam-theme .card.card-custom:not([class*="bg-"]) .card-title .card-label,
body.mayam-theme .card.card-custom:not([class*="bg-"]) .card-title h3 {
    color: var(--mayam-ink) !important;
}

/* Colored stats cards keep Metronic palette + readable text */
body.mayam-theme .card.card-custom[class*="bg-"] {
    border: 0 !important;
    box-shadow: var(--mayam-shadow) !important;
}
body.mayam-theme .card.card-custom.bg-primary { background-color: #3699FF !important; }
body.mayam-theme .card.card-custom.bg-success { background-color: #1BC5BD !important; }
body.mayam-theme .card.card-custom.bg-info { background-color: #8950FC !important; }
body.mayam-theme .card.card-custom.bg-warning { background-color: #FFA800 !important; }
body.mayam-theme .card.card-custom.bg-danger { background-color: #F64E60 !important; }
body.mayam-theme .card.card-custom.bg-dark { background-color: #181C32 !important; }
body.mayam-theme .card.card-custom.bg-secondary { background-color: #E4E6EF !important; color: #3F4254 !important; }

body.mayam-theme .card.card-custom.bg-primary,
body.mayam-theme .card.card-custom.bg-success,
body.mayam-theme .card.card-custom.bg-info,
body.mayam-theme .card.card-custom.bg-warning,
body.mayam-theme .card.card-custom.bg-danger,
body.mayam-theme .card.card-custom.bg-dark {
    color: #fff !important;
}
body.mayam-theme .card.card-custom[class*="bg-"] .text-white,
body.mayam-theme .card.card-custom[class*="bg-"] .card-title,
body.mayam-theme .card.card-custom[class*="bg-"] .font-weight-bolder,
body.mayam-theme .card.card-custom[class*="bg-"] i {
    color: inherit !important;
}

/* ── Primary action buttons only ── */
body.mayam-theme .btn-primary,
body.mayam-theme .btn.btn-primary {
    background-color: var(--mayam-gold) !important;
    border-color: var(--mayam-gold) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(177, 151, 96, 0.28) !important;
}

body.mayam-theme .btn-primary:hover,
body.mayam-theme .btn-primary:focus,
body.mayam-theme .btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--mayam-gold-dark) !important;
    border-color: var(--mayam-gold-dark) !important;
    color: #fff !important;
}

body.mayam-theme .btn-light-primary {
    background-color: rgba(177, 151, 96, 0.12) !important;
    color: var(--mayam-gold-dark) !important;
    border-color: transparent !important;
}

body.mayam-theme .btn-outline-primary {
    color: var(--mayam-gold-dark) !important;
    border-color: var(--mayam-gold) !important;
}

body.mayam-theme .btn-outline-primary:hover {
    background: var(--mayam-gold) !important;
    color: #fff !important;
}

/* Keep success / danger / info buttons natural */
body.mayam-theme .btn-success,
body.mayam-theme .btn.btn-success {
    background-color: #1BC5BD !important;
    border-color: #1BC5BD !important;
    color: #fff !important;
}

/* ── Forms: readable dark text on light fields ── */
body.mayam-theme .form-control,
body.mayam-theme input.form-control,
body.mayam-theme textarea.form-control,
body.mayam-theme select.form-control,
body.mayam-theme .dataTables_filter input,
body.mayam-theme .dataTables_length select,
body.mayam-theme .select2-container--default .select2-selection--single,
body.mayam-theme .select2-container--default .select2-selection--multiple {
    border-color: var(--mayam-border-strong) !important;
    border-radius: 0.5rem !important;
    background-color: #ffffff !important;
    color: #181C32 !important;
    -webkit-text-fill-color: #181C32;
}

body.mayam-theme .form-control::placeholder,
body.mayam-theme input::placeholder {
    color: #A1A5B7 !important;
    opacity: 1;
    -webkit-text-fill-color: #A1A5B7;
}

body.mayam-theme .select2-container--default .select2-selection--single .select2-selection__rendered,
body.mayam-theme .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: #181C32 !important;
}

body.mayam-theme .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #A1A5B7 !important;
}

body.mayam-theme .form-control:focus,
body.mayam-theme .select2-container--default.select2-container--focus .select2-selection--single,
body.mayam-theme .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--mayam-gold) !important;
    box-shadow: 0 0 0 0.15rem rgba(177, 151, 96, 0.2) !important;
    color: #181C32 !important;
    background-color: #fff !important;
}

body.mayam-theme .input-group-text {
    background-color: var(--mayam-cream-soft) !important;
    border-color: var(--mayam-border-strong) !important;
    color: var(--mayam-ink) !important;
}

body.mayam-theme label.required::after,
body.mayam-theme .control-label.required::after {
    color: #F64E60 !important;
}

body.mayam-theme .nav-tabs .nav-link.active {
    color: var(--mayam-gold-dark) !important;
    border-bottom-color: var(--mayam-gold) !important;
}

/* ── Tables / DataTables ── */
body.mayam-theme .table thead th {
    background: var(--mayam-cream-soft) !important;
    color: var(--mayam-ink) !important;
    border-color: var(--mayam-border) !important;
    font-weight: 700;
}

body.mayam-theme .table-bordered,
body.mayam-theme .table-bordered td,
body.mayam-theme .table-bordered th {
    border-color: var(--mayam-border) !important;
}

body.mayam-theme .table-hover tbody tr:hover {
    background-color: rgba(177, 151, 96, 0.06) !important;
}

body.mayam-theme .dataTables_wrapper .dataTables_paginate .pagination > .active > a,
body.mayam-theme .dataTables_wrapper .dataTables_paginate .pagination > .active > span,
body.mayam-theme .dataTables_wrapper .dataTables_paginate .paginate_button.active > a {
    border-color: var(--mayam-gold) !important;
    background: var(--mayam-gold) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(177, 151, 96, 0.3) !important;
}

body.mayam-theme .dataTables_wrapper .dataTables_filter label,
body.mayam-theme .dataTables_wrapper .dataTables_length label,
body.mayam-theme .dataTables_wrapper .dataTables_info {
    color: var(--mayam-ink) !important;
}

/* Soft primary labels only — leave success/info/danger natural */
body.mayam-theme .label-primary,
body.mayam-theme .badge-primary,
body.mayam-theme .label.label-primary {
    background-color: var(--mayam-gold) !important;
    color: #fff !important;
}

body.mayam-theme .label-light-primary,
body.mayam-theme .label.label-light-primary {
    background-color: rgba(177, 151, 96, 0.14) !important;
    color: var(--mayam-gold-dark) !important;
}

body.mayam-theme .text-primary {
    color: var(--mayam-gold-dark) !important;
}

/* Progress bars in tables: keep bootstrap colors unless primary */
body.mayam-theme .progress-bar.bg-primary {
    background-color: var(--mayam-gold) !important;
}

/* ── Alerts ── */
body.mayam-theme .alert-light-primary,
body.mayam-theme .alert-custom.alert-light-primary {
    background-color: rgba(177, 151, 96, 0.1) !important;
    border-color: rgba(177, 151, 96, 0.25) !important;
    color: var(--mayam-ink) !important;
}

/* ── Switches / checkboxes: leave Metronic defaults (no gold) ── */
/* intentionally empty — do not override .switch / .checkbox colors */

/* ── Modals ── */
body.mayam-theme .modal-header {
    border-bottom-color: var(--mayam-border) !important;
    background: var(--mayam-cream) !important;
}

body.mayam-theme .modal-title {
    color: var(--mayam-ink) !important;
}

body.mayam-theme .modal-footer {
    border-top-color: var(--mayam-border) !important;
    background: var(--mayam-cream-soft) !important;
}

body.mayam-theme code {
    color: var(--mayam-gold-deep);
    background: var(--mayam-cream-soft);
}

body.mayam-theme .spinner-border.text-primary {
    border-color: rgba(177, 151, 96, 0.25);
    border-right-color: var(--mayam-gold);
}

/* ── Footer credit ── */
body.mayam-theme #kt_footer {
    border-top: 1px solid var(--mayam-border);
    background: #fff !important;
}

body.mayam-theme .mayam-powered {
    color: var(--mayam-muted);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    line-height: 1.4;
}

body.mayam-theme .mayam-powered span {
    color: var(--mayam-gold-dark);
    font-weight: 700;
}

body.mayam-theme .mayam-powered:hover {
    color: var(--mayam-ink);
    text-decoration: none;
}

body.mayam-theme .mayam-powered:hover span {
    text-decoration: underline;
}

/* Co-branding layout for the sidebar now lives in cobrand.css
   so both themes (and the collapsed aside) keep Elite Care | Mayam visible. */
