/* ============================================================
   BAHRAINPOS GLOBAL THEME
   ============================================================ */

:root {

    --bahrain-dark-red: #7f1d1d;
    --bahrain-red: #b91c1c;
    --bahrain-light-red: #fee2e2;

    --bahrain-white: #ffffff;
    --bahrain-background: #f8fafc;

    --bahrain-text: #1f2937;
    --bahrain-muted: #64748b;

    --bahrain-border: #e5e7eb;

    --bahrain-shadow:
        0 20px 50px rgba(127, 29, 29, 0.14);

    --bahrain-radius: 20px;
}


/* ============================================================
   GENERAL
   ============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body {
    background: var(--bahrain-background);
    color: var(--bahrain-text);
}


/* ============================================================
   LOGIN BODY
   ============================================================ */

.bahrain-login-body {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(185, 28, 28, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(127, 29, 29, 0.10),
            transparent 35%
        ),
        #fff;

    overflow-x: hidden;
}


/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    position: relative;
    min-height: 100vh;
}


/* ============================================================
   DECORATION
   ============================================================ */

.login-decoration {

    position: fixed;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(2px);

    opacity: .45;

    animation:
        floatingDecoration
        7s
        ease-in-out
        infinite;
}

.decoration-one {

    width: 280px;
    height: 280px;

    background: var(--bahrain-light-red);

    top: -100px;
    left: -100px;
}

.decoration-two {

    width: 350px;
    height: 350px;

    background: rgba(185, 28, 28, .08);

    right: -150px;
    bottom: -120px;

    animation-delay: 2s;
}

@keyframes floatingDecoration {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }
}


/* ============================================================
   LOGIN CARD
   ============================================================ */

.login-card {

    position: relative;

    z-index: 5;

    background: rgba(255, 255, 255, .96);

    border:
        1px solid
        rgba(127, 29, 29, .08);

    border-radius: 28px;

    padding: 42px 38px 28px;

    box-shadow: var(--bahrain-shadow);

    backdrop-filter: blur(12px);

    animation:
        loginCardEntrance
        .7s
        cubic-bezier(.2,.8,.2,1);
}

@keyframes loginCardEntrance {

    from {
        opacity: 0;
        transform:
            translateY(30px)
            scale(.97);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}


/* ============================================================
   LOGO
   ============================================================ */

.bahrain-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.logo-icon {

    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;

    font-size: 32px;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            var(--bahrain-red),
            var(--bahrain-dark-red)
        );

    box-shadow:
        0 12px 25px
        rgba(127, 29, 29, .25);

    animation:
        logoPulse
        3s
        ease-in-out
        infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}


.brand-title {

    font-size: 32px;

    font-weight: 800;

    letter-spacing: -1.2px;

    color: var(--bahrain-dark-red);

    margin: 0;
}

.brand-title span {
    color: var(--bahrain-red);
}

.brand-subtitle {

    color: var(--bahrain-muted);

    font-size: 13px;

    margin-top: 4px;
}


/* ============================================================
   LOGIN HEADING
   ============================================================ */

.login-heading {

    margin-top: 30px;

    margin-bottom: 22px;
}

.login-heading h4 {

    font-size: 21px;

    font-weight: 750;

    margin-bottom: 5px;
}

.login-heading p {

    color: var(--bahrain-muted);

    font-size: 14px;

    margin: 0;
}


/* ============================================================
   MODERN INPUT
   ============================================================ */

.input-group-modern {

    position: relative;

    display: flex;
    align-items: center;

    height: 58px;

    border:
        1px solid
        var(--bahrain-border);

    background: #fff;

    border-radius: 15px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.input-group-modern:focus-within {

    border-color: var(--bahrain-red);

    box-shadow:
        0 0 0 4px
        rgba(185, 28, 28, .08);

    transform: translateY(-1px);
}

.input-group-modern .form-control {

    border: 0;

    box-shadow: none !important;

    height: 100%;

    background: transparent;

    padding-left: 8px;

    padding-right: 45px;

    font-size: 15px;
}

.input-group-modern .form-control:focus {
    box-shadow: none;
}

.input-icon {

    width: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--bahrain-red);

    font-size: 18px;
}


/* ============================================================
   PASSWORD BUTTON
   ============================================================ */

.password-toggle {

    position: absolute;

    right: 12px;

    border: 0;

    background: transparent;

    color: var(--bahrain-muted);

    font-size: 18px;

    z-index: 3;
}

.password-toggle:hover {
    color: var(--bahrain-red);
}


/* ============================================================
   REMEMBER
   ============================================================ */

.remember-box {

    display: flex;

    gap: 8px;

    align-items: center;

    color: var(--bahrain-muted);

    font-size: 13px;

    cursor: pointer;
}

.remember-box input {

    accent-color:
        var(--bahrain-red);

    width: 16px;
    height: 16px;
}


/* ============================================================
   LOGIN BUTTON
   ============================================================ */

.bahrain-login-btn {

    height: 58px;

    border: 0;

    border-radius: 15px;

    color: #fff;

    font-size: 15px;

    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            var(--bahrain-red),
            var(--bahrain-dark-red)
        );

    box-shadow:
        0 10px 20px
        rgba(127, 29, 29, .20);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.bahrain-login-btn:hover {

    color: #fff;

    transform:
        translateY(-2px);

    box-shadow:
        0 14px 28px
        rgba(127, 29, 29, .27);
}

.bahrain-login-btn:active {
    transform: translateY(0);
}

.bahrain-login-btn:disabled {
    opacity: .8;
}


/* ============================================================
   ALERT
   ============================================================ */

.login-alert {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 14px;

    margin-bottom: 18px;

    color: #991b1b;

    background:
        #fef2f2;

    border:
        1px solid
        #fecaca;

    border-radius: 13px;

    font-size: 13px;
}

.shake {

    animation:
        shakeAlert
        .35s
        ease;
}

@keyframes shakeAlert {

    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-7px);
    }

    50% {
        transform: translateX(7px);
    }

    75% {
        transform: translateX(-4px);
    }
}


/* ============================================================
   FOOTER
   ============================================================ */

.login-footer {

    margin-top: 25px;

    padding-top: 20px;

    border-top:
        1px solid
        #f1f5f9;

    text-align: center;
}

.secure-badge {

    color: #64748b;

    font-size: 12px;
}

.secure-badge i {
    color: #15803d;
}

.version {

    margin-top: 6px;

    color: #94a3b8;

    font-size: 11px;
}


/* ============================================================
   SUCCESS OVERLAY
   ============================================================ */

.success-overlay {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(127, 29, 29, .94);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.success-overlay.show {

    opacity: 1;

    visibility: visible;
}

.success-box {

    text-align: center;

    color: white;

    animation:
        successEntrance
        .5s
        cubic-bezier(.2,.8,.2,1);
}

.success-tick {

    width: 90px;
    height: 90px;

    margin: auto;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fff;

    color: #15803d;

    font-size: 50px;

    box-shadow:
        0 20px 50px
        rgba(0,0,0,.25);
}

.success-box h4 {

    margin-top: 24px;

    font-weight: 750;
}

.success-box p {

    margin: 5px 0;

    opacity: .85;

    font-size: 14px;
}

@keyframes successEntrance {

    from {
        opacity: 0;
        transform:
            scale(.6)
            translateY(20px);
    }

    to {
        opacity: 1;
        transform:
            scale(1)
            translateY(0);
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 576px) {

    .login-card {

        padding:
            32px 22px 22px;

        border-radius: 24px;

        box-shadow:
            0 12px 35px
            rgba(127,29,29,.12);
    }

    .brand-title {
        font-size: 28px;
    }

    .logo-icon {

        width: 62px;
        height: 62px;

        font-size: 28px;

        border-radius: 19px;
    }

    .login-heading {
        margin-top: 24px;
    }

    .input-group-modern,
    .bahrain-login-btn {
        height: 56px;
    }
}

/* ============================================================
   BAHRAINPOS APPLICATION
   ============================================================ */

.bahrain-app-body {
    background: #f8fafc;
    color: #1f2937;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.bahrain-sidebar {

    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 260px;

    background:
        linear-gradient(
            180deg,
            #7f1d1d 0%,
            #991b1b 55%,
            #7f1d1d 100%
        );

    color: #fff;

    z-index: 1000;

    display: flex;

    flex-direction: column;

    box-shadow:
        8px 0 30px
        rgba(127,29,29,.10);

    transition:
        transform .3s ease;
}


/* ============================================================
   SIDEBAR BRAND
   ============================================================ */

.sidebar-brand {

    min-height: 82px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 18px 20px;

    border-bottom:
        1px solid
        rgba(255,255,255,.10);
}

.sidebar-brand-icon {

    width: 44px;
    height: 44px;

    border-radius: 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #fff;

    color: #991b1b;

    font-size: 22px;
}

.sidebar-brand-name {

    font-size: 21px;

    font-weight: 800;

    letter-spacing: -.5px;
}

.sidebar-brand-name span {
    color: #fecaca;
}

.sidebar-brand small {

    display: block;

    margin-top: 1px;

    color:
        rgba(255,255,255,.65);

    font-size: 10px;
}


/* ============================================================
   SIDEBAR USER
   ============================================================ */

.sidebar-user {

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 18px 20px;

    background:
        rgba(0,0,0,.10);
}

.sidebar-avatar,
.topbar-avatar {

    width: 42px;
    height: 42px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #fff;

    color: #991b1b;

    font-weight: 800;

    flex-shrink: 0;
}

.sidebar-user-info {

    min-width: 0;
}

.sidebar-user-info strong {

    display: block;

    font-size: 13px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.sidebar-user-info small {

    color:
        rgba(255,255,255,.65);

    font-size: 11px;
}


/* ============================================================
   SIDEBAR NAV
   ============================================================ */

.sidebar-navigation {

    flex: 1;

    overflow-y: auto;

    padding:
        15px 12px;
}

.sidebar-section-title {

    padding:
        14px 10px 7px;

    color:
        rgba(255,255,255,.48);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.4px;
}

.sidebar-link {

    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 46px;

    padding:
        10px 12px;

    margin-bottom: 3px;

    border-radius: 12px;

    color:
        rgba(255,255,255,.75);

    text-decoration: none;

    font-size: 13px;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.sidebar-link i {

    width: 22px;

    text-align: center;

    font-size: 17px;
}

.sidebar-link:hover {

    color: #fff;

    background:
        rgba(255,255,255,.10);

    transform:
        translateX(2px);
}

.sidebar-link.active {

    color: #7f1d1d;

    background: #fff;

    box-shadow:
        0 7px 18px
        rgba(0,0,0,.12);
}

.sidebar-hot {

    margin-left: auto;

    padding:
        3px 7px;

    border-radius: 20px;

    color: #fff;

    background: #dc2626;

    font-size: 8px;

    font-weight: 800;
}

.sidebar-footer {

    padding:
        12px;

    border-top:
        1px solid
        rgba(255,255,255,.10);
}

.logout-link:hover {

    background:
        rgba(255,255,255,.13);
}


/* ============================================================
   MAIN
   ============================================================ */

.bahrain-main {

    margin-left: 260px;

    min-height: 100vh;
}


/* ============================================================
   DESKTOP TOPBAR
   ============================================================ */

.desktop-topbar {

    height: 82px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 30px;

    background: #fff;

    border-bottom:
        1px solid #edf0f3;

    position: sticky;

    top: 0;

    z-index: 100;
}

.desktop-page-title {

    font-size: 21px;

    font-weight: 800;

    color: #1f2937;
}

.desktop-date {

    margin-top: 3px;

    color: #94a3b8;

    font-size: 11px;
}

.topbar-actions {

    display: flex;

    align-items: center;

    gap: 20px;
}


/* ============================================================
   TOPBAR ICON
   ============================================================ */

.notification-wrapper {
    position: relative;
}

.topbar-icon-button,
.mobile-notification-button {

    width: 42px;
    height: 42px;

    border: 0;

    border-radius: 13px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #475569;

    background: #f8fafc;

    position: relative;

    transition:
        background .2s ease,
        color .2s ease;
}

.topbar-icon-button:hover {

    color: #991b1b;

    background: #fee2e2;
}

.notification-badge {

    position: absolute;

    top: -3px;
    right: -3px;

    min-width: 17px;
    height: 17px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #dc2626;

    color: #fff;

    border: 2px solid #fff;

    font-size: 8px;

    font-weight: 800;
}


/* ============================================================
   NOTIFICATION DROPDOWN
   ============================================================ */

.notification-dropdown {

    position: absolute;

    right: 0;

    top: 52px;

    width: 340px;

    background: #fff;

    border-radius: 17px;

    border:
        1px solid #edf0f3;

    box-shadow:
        0 20px 50px
        rgba(15,23,42,.15);

    overflow: hidden;

    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {

    padding: 15px 17px;

    border-bottom:
        1px solid #f1f5f9;

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.notification-header strong {
    font-size: 14px;
}

.notification-header span {

    color: #94a3b8;

    font-size: 10px;
}

.notification-list {
    max-height: 330px;
    overflow-y: auto;
}

.notification-empty {

    padding: 35px 15px;

    text-align: center;

    color: #94a3b8;

    font-size: 12px;
}

.notification-empty i {

    display: block;

    color: #16a34a;

    font-size: 28px;

    margin-bottom: 8px;
}


/* ============================================================
   TOPBAR USER
   ============================================================ */

.topbar-user {

    display: flex;

    align-items: center;

    gap: 10px;

    cursor: pointer;
}

.topbar-user-text {

    min-width: 100px;
}

.topbar-user-text strong {

    display: block;

    font-size: 12px;

    white-space: nowrap;
}

.topbar-user-text small {

    display: block;

    margin-top: 2px;

    color: #94a3b8;

    font-size: 10px;
}

.topbar-user > i {

    color: #94a3b8;

    font-size: 10px;
}


/* ============================================================
   CONTENT
   ============================================================ */

.bahrain-content {

    padding: 28px 30px 40px;
}


/* ============================================================
   MOBILE TOPBAR
   ============================================================ */

.mobile-topbar {
    display: none;
}


/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */

.mobile-bottom-nav {
    display: none;
}


/* ============================================================
   SIDEBAR OVERLAY
   ============================================================ */

.sidebar-overlay {
    display: none;
}


/* ============================================================
   GLOBAL LOADER
   ============================================================ */

.bahrain-global-loader {

    position: fixed;

    inset: 0;

    z-index: 99999;

    background:
        rgba(255,255,255,.78);

    backdrop-filter:
        blur(3px);

    display: none;

    align-items: center;

    justify-content: center;
}

.bahrain-global-loader.show {
    display: flex;
}

.bahrain-loader-box {

    padding: 24px 30px;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 20px 50px
        rgba(0,0,0,.12);

    text-align: center;

    color: #7f1d1d;

    font-size: 12px;

    font-weight: 700;
}

.bahrain-loader-box .spinner-border {

    display: block;

    margin:
        0 auto 10px;

    color: #b91c1c;
}


/* ============================================================
   TOAST
   ============================================================ */

.bahrain-toast-container {

    position: fixed;

    right: 20px;

    bottom: 20px;

    z-index: 100000;

    display: flex;

    flex-direction: column;

    gap: 10px;
}

.bahrain-toast {

    min-width: 280px;

    max-width: 380px;

    padding:
        13px 16px;

    border-radius: 14px;

    background: #fff;

    box-shadow:
        0 15px 40px
        rgba(0,0,0,.14);

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 13px;

    transform:
        translateX(120%);

    opacity: 0;

    transition:
        transform .3s ease,
        opacity .3s ease;
}

.bahrain-toast.show {

    transform:
        translateX(0);

    opacity: 1;
}

.bahrain-toast-success i {
    color: #16a34a;
}

.bahrain-toast-error i {
    color: #dc2626;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 991.98px) {

    .bahrain-sidebar {

        transform:
            translateX(-100%);

        width: 275px;
    }

    .bahrain-sidebar.show {

        transform:
            translateX(0);
    }

    .bahrain-main {

        margin-left: 0;

        padding-bottom: 75px;
    }

    .desktop-topbar {
        display: none;
    }

    .mobile-topbar {

        position: sticky;

        top: 0;

        z-index: 900;

        height: 62px;

        background: #fff;

        border-bottom:
            1px solid #edf0f3;

        display: flex;

        align-items: center;

        justify-content: space-between;

        padding: 0 15px;
    }

    .mobile-menu-button {

        width: 40px;
        height: 40px;

        border: 0;

        border-radius: 12px;

        background: #fef2f2;

        color: #991b1b;

        font-size: 21px;
    }

    .mobile-brand {

        display: flex;

        align-items: center;

        gap: 8px;

        color: #7f1d1d;

        font-size: 17px;

        font-weight: 800;
    }

    .mobile-brand span span {
        color: #b91c1c;
    }

    .mobile-brand-icon {

        width: 32px;
        height: 32px;

        border-radius: 10px;

        display: flex;

        align-items: center;
        justify-content: center;

        color: #fff;

        background:
            linear-gradient(
                135deg,
                #b91c1c,
                #7f1d1d
            );

        font-size: 15px;
    }

    .mobile-notification-button {

        width: 40px;
        height: 40px;

        background: #f8fafc;
    }

    .sidebar-overlay {

        position: fixed;

        inset: 0;

        z-index: 950;

        background:
            rgba(15,23,42,.48);

        backdrop-filter:
            blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .bahrain-content {

        padding:
            18px 14px 25px;
    }

    .mobile-bottom-nav {

        position: fixed;

        left: 0;
        right: 0;
        bottom: 0;

        height: 68px;

        background: #fff;

        border-top:
            1px solid #edf0f3;

        z-index: 1000;

        display: flex;

        align-items: center;

        justify-content: space-around;

        box-shadow:
            0 -8px 25px
            rgba(15,23,42,.07);
    }

    .mobile-nav-item {

        position: relative;

        width: 20%;

        height: 100%;

        display: flex;

        flex-direction: column;

        align-items: center;
        justify-content: center;

        gap: 3px;

        color: #94a3b8;

        text-decoration: none;

        font-size: 9px;

        font-weight: 600;
    }

    .mobile-nav-item i {

        font-size: 19px;
    }

    .mobile-nav-pos {

        padding-top: 7px;
    }

    .mobile-pos-button {

        width: 48px;
        height: 48px;

        margin-top: -30px;

        border-radius: 50%;

        display: flex;

        align-items: center;
        justify-content: center;

        color: #fff;

        background:
            linear-gradient(
                135deg,
                #b91c1c,
                #7f1d1d
            );

        border:
            5px solid #fff;

        box-shadow:
            0 8px 18px
            rgba(127,29,29,.28);
    }

    .mobile-pos-button i {
        font-size: 20px;
    }

    .bahrain-toast-container {

        left: 12px;

        right: 12px;

        bottom: 78px;
    }

    .bahrain-toast {

        min-width: 0;

        width: 100%;
    }
}


/* ============================================================
   SMALL PHONES
   ============================================================ */

@media (max-width: 380px) {

    .mobile-brand {
        font-size: 15px;
    }

    .mobile-nav-item {
        font-size: 8px;
    }

    .mobile-nav-item i {
        font-size: 17px;
    }
}