/**
 * Mai Ige brand color overrides for Backpack theme-tabler.
 *
 * Source palette: maiige-frontend/src/app/globals.css (@theme block).
 * Loaded via config/backpack/ui.php styles[] array, AFTER the default
 * tabler skin, so only the variables declared here are overridden —
 * vendor updates to other tokens still apply.
 */

:root,
[data-bs-theme="light"],
[data-menu-theme="light"] {
    /* Brand */
    --tblr-primary: #0e9bc4;
    --tblr-primary-rgb: 14, 155, 196;
    --tblr-primary-text-emphasis: #062832;
    --tblr-primary-bg-subtle: #e0f3f9;
    --tblr-primary-border-subtle: #b3e0ec;

    --tblr-info: #20b7e2;
    --tblr-info-rgb: 32, 183, 226;
    --tblr-info-text-emphasis: #0c4c5f;
    --tblr-info-bg-subtle: #d9f2fa;
    --tblr-info-border-subtle: #aee2f2;

    --tblr-success: #399865;
    --tblr-success-rgb: 57, 152, 101;
    --tblr-success-text-emphasis: #1a4a3c;
    --tblr-success-bg-subtle: #dbf0e4;
    --tblr-success-border-subtle: #b1dec4;

    --tblr-warning: #fe852f;
    --tblr-warning-rgb: 254, 133, 47;
    --tblr-warning-text-emphasis: #c65301;
    --tblr-warning-bg-subtle: #ffeadb;
    --tblr-warning-border-subtle: #ffcfa6;

    --tblr-danger: #eb4755;
    --tblr-danger-rgb: 235, 71, 85;
    --tblr-danger-text-emphasis: #7a1820;
    --tblr-danger-bg-subtle: #fbdde0;
    --tblr-danger-border-subtle: #f5b3b9;

    /* Surfaces & body */
    --tblr-body-bg: #f5f4f6;
    --tblr-body-bg-rgb: 245, 244, 246;
    --tblr-body-color: #1b1b1c;
    --tblr-body-color-rgb: 27, 27, 28;
    --tblr-secondary-color: rgba(27, 27, 28, .75);
    --tblr-secondary-color-rgb: 27, 27, 28;
    --tblr-tertiary-color: rgba(27, 27, 28, .5);
    --tblr-tertiary-color-rgb: 27, 27, 28;
    --tblr-secondary-bg: #d4d1dc;
    --tblr-secondary-bg-rgb: 212, 209, 220;
    --tblr-tertiary-bg: #f5f4f6;
    --tblr-tertiary-bg-rgb: 245, 244, 246;
    --tblr-border-color: #d4d1dc;

    /* Links */
    --tblr-link-color: #0e9bc4;
    --tblr-link-color-rgb: 14, 155, 196;
    --tblr-link-hover-color: #12718c;
    --tblr-link-hover-color-rgb: 18, 113, 140;

    /* Tabler accent (used by various components) */
    --tblr-tabler: #0e9bc4;
    --tblr-tabler-rgb: 14, 155, 196;
}

body[bp-layout="embedded"]::before {
    display: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.45)),
        url('/erp-background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
}

:root:not([data-bs-theme="dark"]) main.container-fluid,
:root:not([data-bs-theme="dark"]) .auth-logo-container {
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
    /* box-shadow: 0 0 5px 3px rgba(255, 255, 255, 0.65); */
}

:root:not([data-bs-theme="dark"]) .auth-logo-container {
    padding: 1.5rem 0;
}

:root:not([data-bs-theme="dark"]) .card,
:root:not([data-bs-theme="dark"]) .navbar,
:root:not([data-bs-theme="dark"]) .navbar-vertical,
:root:not([data-bs-theme="dark"]) .footer {
    background-color: #fff !important;
}

[data-bs-theme="dark"],
[data-menu-theme="dark"] {
    --tblr-primary: #20b7e2;
    --tblr-primary-rgb: 32, 183, 226;
    --tblr-primary-text-emphasis: #aee2f2;
    --tblr-primary-bg-subtle: #0c4c5f;
    --tblr-primary-border-subtle: #12718c;

    --tblr-info: #20b7e2;
    --tblr-info-rgb: 32, 183, 226;

    --tblr-success: #399865;
    --tblr-success-rgb: 57, 152, 101;

    --tblr-warning: #fe852f;
    --tblr-warning-rgb: 254, 133, 47;

    --tblr-danger: #eb4755;
    --tblr-danger-rgb: 235, 71, 85;

    --tblr-body-bg: #1f1944;
    --tblr-body-bg-rgb: 31, 25, 68;
    --tblr-body-color: #f5f4f6;
    --tblr-body-color-rgb: 245, 244, 246;
    --tblr-secondary-bg: #302668;
    --tblr-secondary-bg-rgb: 48, 38, 104;
    --tblr-tertiary-bg: #302668;
    --tblr-tertiary-bg-rgb: 48, 38, 104;
    --tblr-border-color: #41348e;

    --tblr-link-color: #20b7e2;
    --tblr-link-color-rgb: 32, 183, 226;
    --tblr-link-hover-color: #0e9bc4;
    --tblr-link-hover-color-rgb: 14, 155, 196;

    --tblr-tabler: #20b7e2;
    --tblr-tabler-rgb: 32, 183, 226;
}

[data-bs-theme="dark"] body::before,
[data-menu-theme="dark"] body::before {
    background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
            url('/erp-background-dark.png');
}
