:root {
    --amer-bg: #050816;
    --amer-bg-2: #080d20;
    --amer-panel: rgba(255, 255, 255, .055);
    --amer-panel-hover: rgba(255, 255, 255, .085);
    --amer-border: rgba(255, 255, 255, .08);
    --amer-blue: #38bdf8;
    --amer-blue-2: #2563eb;
    --amer-purple: #8b5cf6;
    --amer-purple-2: #6d28d9;
    --amer-green: #22c55e;
    --amer-red: #ef4444;
    --amer-orange: #f59e0b;
    --amer-text: #ffffff;
    --amer-text-soft: rgba(255, 255, 255, .72);
    --amer-text-muted: rgba(255, 255, 255, .46);
    --amer-sidebar-width: 270px;
    --amer-radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--amer-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    color: var(--amer-text);
    background: radial-gradient( circle at 10% 10%, rgba(37, 99, 235, .18), transparent 28% ), radial-gradient( circle at 90% 10%, rgba(124, 58, 237, .16), transparent 28% ), radial-gradient( circle at 50% 100%, rgba(14, 165, 233, .08), transparent 30% ), linear-gradient( 135deg, #030712, #050816 45%, #080d20 );
    background-attachment: fixed;
    overflow-x: hidden;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        opacity: .18;
        background-image: linear-gradient( rgba(255, 255, 255, .025) 1px, transparent 1px ), linear-gradient( 90deg, rgba(255, 255, 255, .025) 1px, transparent 1px );
        background-size: 40px 40px;
        -webkit-mask-image: linear-gradient( to bottom, black, transparent 85% );
        mask-image: linear-gradient( to bottom, black, transparent 85% );
    }

body,
input,
textarea,
select,
button {
    font-family: "Vazirmatn", Tahoma, sans-serif;
}

a {
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(56, 189, 248, .30);
    color: #fff;
}


/* =========================================================
   APP
   ========================================================= */

.amer-app {
    min-height: 100vh;
}

.amer-main {
    min-height: 100vh;
    margin-right: var(--amer-sidebar-width);
    position: relative;
}

.amer-content {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 28px 28px 70px;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.amer-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--amer-sidebar-width);
    z-index: 1000;
    padding: 18px;
    display: flex;
    flex-direction: column;
    background: linear-gradient( 180deg, rgba(9, 14, 34, .94), rgba(4, 8, 22, .96) );
    border-left: 1px solid rgba(255, 255, 255, .07);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: -15px 0 50px rgba(0, 0, 0, .18);
    overflow-y: auto;
    overflow-x: hidden;
}

    .amer-sidebar::-webkit-scrollbar {
        width: 5px;
    }

    .amer-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .amer-sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, .10);
        border-radius: 999px;
    }


/* =========================================================
   BRAND
   ========================================================= */

.amer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 7px 20px;
}

.amer-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient( 135deg, #2563eb, #7c3aed );
    box-shadow: 0 12px 35px rgba(59, 130, 246, .28), inset 0 1px rgba(255, 255, 255, .25);
}

.amer-brand-text {
    min-width: 0;
}

.amer-brand-title {
    font-size: 17px;
    font-weight: 900;
    line-height: 1.2;
}

.amer-brand-subtitle {
    margin-top: 4px;
    font-size: 9px;
    color: var(--amer-text-muted);
    white-space: nowrap;
}


/* =========================================================
   MENU SECTION
   ========================================================= */

.amer-menu-section {
    margin-top: 10px;
    margin-bottom: 8px;
    padding: 0 10px;
    font-size: 9px;
    color: rgba(255, 255, 255, .30);
    letter-spacing: .5px;
}


/* =========================================================
   NAV
   ========================================================= */

.amer-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.amer-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 8px 11px;
    border-radius: 14px;
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background .2s ease, border .2s ease, color .2s ease, transform .2s ease;
}

    .amer-nav-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, .055);
        border-color: rgba(255, 255, 255, .06);
        transform: translateX(-2px);
    }

    .amer-nav-link.active {
        color: #fff;
        background: linear-gradient( 135deg, rgba(59, 130, 246, .16), rgba(124, 58, 237, .14) );
        border-color: rgba(96, 165, 250, .16);
        box-shadow: inset 0 0 20px rgba(59, 130, 246, .04);
    }

        .amer-nav-link.active::before {
            content: "";
            position: absolute;
            right: -1px;
            top: 9px;
            bottom: 9px;
            width: 3px;
            border-radius: 999px;
            background: linear-gradient( 180deg, #38bdf8, #8b5cf6 );
            box-shadow: 0 0 14px rgba(56, 189, 248, .65);
        }

.amer-nav-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .05);
    font-size: 15px;
}

.amer-nav-link.active .amer-nav-icon {
    background: rgba(59, 130, 246, .14);
    border-color: rgba(96, 165, 250, .10);
}

.amer-nav-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   USER BOX
   ========================================================= */

.amer-sidebar-bottom {
    margin-top: auto;
    padding-top: 15px;
}

.amer-user-box {
    padding: 12px;
    border-radius: 17px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .07);
}

.amer-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amer-user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    background: linear-gradient( 135deg, #0ea5e9, #7c3aed );
}

.amer-user-info {
    min-width: 0;
    flex: 1;
}

.amer-user-name {
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amer-user-role {
    margin-top: 2px;
    font-size: 9px;
    color: var(--amer-text-muted);
}


/* =========================================================
   LOGOUT
   ========================================================= */

.logout-form {
    margin-top: 10px;
    margin-bottom: 0;
}

.logout-menu-btn {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid rgba(239, 68, 68, .15);
    border-radius: 13px;
    background: rgba(239, 68, 68, .065);
    color: #ff9b9b;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s ease, border .2s ease, transform .2s ease, color .2s ease;
}

    .logout-menu-btn:hover {
        background: rgba(239, 68, 68, .13);
        border-color: rgba(239, 68, 68, .28);
        color: #fff;
        transform: translateY(-1px);
    }

    .logout-menu-btn:active {
        transform: translateY(0);
    }

    .logout-menu-btn .menu-icon {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        background: rgba(239, 68, 68, .10);
        font-size: 17px;
    }


/* =========================================================
   MOBILE HEADER
   ========================================================= */

.amer-mobile-header {
    display: none;
}


/* =========================================================
   MOBILE BOTTOM NAV
   ========================================================= */

.amer-bottom-nav {
    display: none;
}


/* =========================================================
   GLOBAL COMPONENTS
   ========================================================= */

.card {
    background: rgba(255, 255, 255, .045) !important;
    border: 1px solid rgba(255, 255, 255, .075) !important;
    color: #fff !important;
    border-radius: 20px !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.bg-white,
.bg-light {
    background: rgba(255, 255, 255, .045) !important;
}

.text-dark,
.text-black {
    color: #fff !important;
}

.text-muted {
    color: rgba(255, 255, 255, .50) !important;
}

label {
    color: rgba(255, 255, 255, .75);
}

.form-control,
.form-select {
    background: rgba(0, 0, 0, .18) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .10) !important;
    border-radius: 13px !important;
}

    .form-control:focus,
    .form-select:focus {
        color: #fff !important;
        background: rgba(0, 0, 0, .25) !important;
        border-color: rgba(56, 189, 248, .50) !important;
        box-shadow: 0 0 0 .2rem rgba(56, 189, 248, .08) !important;
    }

    .form-control::placeholder {
        color: rgba(255, 255, 255, .32);
    }

    .form-select option {
        background: #111827;
        color: #fff;
    }

.table {
    color: #fff !important;
}

    .table > :not(caption) > * > * {
        background: transparent !important;
        color: rgba(255, 255, 255, .82) !important;
        border-bottom-color: rgba(255, 255, 255, .07) !important;
    }

    .table thead th {
        color: rgba(255, 255, 255, .55) !important;
    }

.modal-content {
    color: #fff;
    background: #0a1024;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
}

.dropdown-menu {
    background: #0a1024;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 15px;
}

.dropdown-item {
    color: rgba(255, 255, 255, .75);
}

    .dropdown-item:hover {
        color: #fff;
        background: rgba(255, 255, 255, .06);
    }


/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .015);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .10);
    border-radius: 999px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, .18);
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 991.98px) {

    :root {
        --amer-sidebar-width: 0px;
    }

    body {
        padding-bottom: 78px;
    }

    .amer-sidebar {
        display: none;
    }

    .amer-main {
        margin-right: 0;
        min-height: 100vh;
    }

    .amer-content {
        padding: 14px 12px 25px;
    }

    .amer-mobile-header {
        position: sticky;
        top: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 11px 12px;
        background: rgba(5, 8, 22, .82);
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .amer-mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .amer-mobile-logo {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 900;
        color: #fff;
        background: linear-gradient( 135deg, #2563eb, #7c3aed );
        box-shadow: 0 8px 25px rgba(37, 99, 235, .25);
    }

    .amer-mobile-title {
        font-size: 13px;
        font-weight: 900;
    }

    .amer-mobile-subtitle {
        margin-top: 2px;
        font-size: 8px;
        color: var(--amer-text-muted);
    }

    .amer-mobile-user {
        width: 37px;
        height: 37px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, .06);
        border: 1px solid rgba(255, 255, 255, .08);
        color: #fff;
        font-size: 14px;
    }


    /* =====================================================
       MOBILE BOTTOM NAV
       ===================================================== */

    .amer-bottom-nav {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        padding: 7px;
        border-radius: 21px;
        background: rgba(7, 12, 30, .90);
        border: 1px solid rgba(255, 255, 255, .09);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    }

    .amer-bottom-item {
        min-width: 0;
        min-height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border-radius: 15px;
        color: rgba(255, 255, 255, .45);
        font-size: 8px;
        font-weight: 700;
        transition: .2s;
    }

        .amer-bottom-item:hover {
            color: #fff;
        }

        .amer-bottom-item.active {
            color: #fff;
            background: linear-gradient( 135deg, rgba(59, 130, 246, .18), rgba(124, 58, 237, .16) );
        }

    .amer-bottom-icon {
        font-size: 17px;
        line-height: 1;
    }

    .amer-bottom-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .amer-content {
        padding: 10px 9px 22px;
    }

    .amer-bottom-nav {
        left: 5px;
        right: 5px;
        bottom: 5px;
        padding: 5px;
    }

    .amer-bottom-item {
        min-height: 49px;
        border-radius: 13px;
        font-size: 7px;
    }

    .amer-bottom-icon {
        font-size: 15px;
    }
}


/* =========================================================
   DESKTOP LARGE
   ========================================================= */

@media (min-width: 1200px) {

    .amer-content {
        padding: 30px 35px 70px;
    }
}


/* =========================================================
   SAFE AREA IPHONE
   ========================================================= */

@supports (padding: env(safe-area-inset-bottom)) {

    @media (max-width: 991.98px) {

        body {
            padding-bottom: calc( 78px + env(safe-area-inset-bottom) );
        }

        .amer-bottom-nav {
            bottom: calc( 8px + env(safe-area-inset-bottom) );
        }
    }
}
