/* ==========================================================================
   ROOT
========================================================================== */

:root {

    --primary: #b5121b;
    --primary-dark: #8f0d14;
    --primary-light: #e11d2e;

    --red-soft: #fff1f2;
    --red-border: #fecdd3;

    --success: #15803d;
    --success-soft: #ecfdf3;

    --danger: #dc2626;
    --danger-soft: #fef2f2;

    --text: #1f2937;
    --muted: #64748b;

    --bg: #f6f7f9;
    --white: #ffffff;

    --border: #e5e7eb;

    --sidebar-width: 280px;

    --topbar-height: 76px;

    --shadow-sm:
        0 2px 10px rgba(15, 23, 42, .05);

    --shadow:
        0 8px 25px rgba(15, 23, 42, .07);

    --shadow-red:
        0 10px 30px rgba(181, 18, 27, .20);

}


/* ==========================================================================
   GLOBAL
========================================================================== */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    min-height: 100vh;

    background: var(--bg);

    color: var(--text);

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    font-size: 15px;

}


body.admin-layout {

    min-height: 100vh;

    overflow-x: hidden;

}


a {
    color: inherit;
}


button,
input,
select,
textarea {
    font-family: inherit;
}


.table {
    --bs-table-bg: transparent;
}


.text-success {
    color: var(--success) !important;
}


.text-danger {
    color: var(--danger) !important;
}


/* ==========================================================================
   SIDEBAR
========================================================================== */

.app-sidebar {

    position: fixed;

    top: 0;

    right: 0;

    width: var(--sidebar-width);

    height: 100vh;

    z-index: 1050;

    display: flex;

    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #a90f17 0%,
            #8c0d14 55%,
            #760a10 100%
        );

    color: #fff;

    box-shadow:
        -5px 0 30px rgba(0, 0, 0, .10);

    overflow-y: auto;

}


/* ==========================================================================
   SIDEBAR BRAND
========================================================================== */

.sidebar-brand {

    min-height: 82px;

    padding: 18px 22px;

    display: flex;

    align-items: center;

    gap: 14px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, .12);

}


.brand-shield {

    width: 48px;

    height: 48px;

    flex: 0 0 48px;

    border-radius: 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(255, 255, 255, .15);

    border:
        1px solid
        rgba(255, 255, 255, .18);

    font-size: 25px;

}


.brand-content {

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;

}


.brand-content strong {

    font-size: 17px;

    font-weight: 800;

}


.brand-content small {

    font-size: 11px;

    color:
        rgba(255, 255, 255, .72);

}


/* ==========================================================================
   SIDEBAR NAVIGATION
========================================================================== */

.sidebar-nav {

    padding: 22px 14px;

    flex: 1;

}


.sidebar-section-title {

    color:
        rgba(255, 255, 255, .50);

    font-size: 11px;

    font-weight: bold;

    margin:
        0
        0
        12px;

    padding:
        0
        12px;

}


.sidebar-link {

    position: relative;

    display: flex;

    align-items: center;

    gap: 14px;

    min-height: 52px;

    padding:
        0
        17px;

    margin-bottom: 6px;

    border-radius: 11px;

    text-decoration: none;

    color:
        rgba(255, 255, 255, .82);

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;

}


.sidebar-link:hover {

    color: #fff;

    background:
        rgba(255, 255, 255, .10);

    transform:
        translateX(-2px);

}


.sidebar-link.active {

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #e51b2a,
            #c5101b
        );

    box-shadow:
        0 7px 18px
        rgba(0, 0, 0, .16);

}


.sidebar-link.active::before {

    content: "";

    position: absolute;

    right: 0;

    top: 12px;

    bottom: 12px;

    width: 4px;

    border-radius:
        4px 0 0 4px;

    background: #fff;

}


.sidebar-icon {

    width: 24px;

    flex: 0 0 24px;

    text-align: center;

    font-size: 19px;

}


.sidebar-link span:last-child {

    font-size: 14px;

    font-weight: 600;

}


.sidebar-divider {

    height: 1px;

    margin:
        18px
        10px;

    background:
        rgba(255, 255, 255, .14);

}


.logout-link:hover {

    background:
        rgba(255, 255, 255, .12);

}


/* ==========================================================================
   SIDEBAR FOOTER
========================================================================== */

.sidebar-footer {

    margin: 16px;

    padding: 22px 15px;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, .07);

    border:
        1px solid
        rgba(255, 255, 255, .08);

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

    gap: 5px;

}


.sidebar-footer-icon {

    font-size: 34px;

    color:
        rgba(255, 255, 255, .18);

    margin-bottom: 4px;

}


.sidebar-footer strong {

    font-size: 14px;

}


.sidebar-footer small {

    font-size: 10px;

    color:
        rgba(255, 255, 255, .55);

}


/* ==========================================================================
   MAIN LAYOUT
========================================================================== */

.app-main {

    min-height: 100vh;

    margin-right: var(--sidebar-width);

    width: calc(100% - var(--sidebar-width));

}


/* ==========================================================================
   TOPBAR
========================================================================== */

.app-topbar {

    position: sticky;

    top: 0;

    z-index: 1000;

    height: var(--topbar-height);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0
        28px;

    background:
        linear-gradient(
            90deg,
            #c3141e,
            #a70f17
        );

    color: #fff;

    box-shadow:
        0 3px 15px
        rgba(0, 0, 0, .10);

}


.topbar-right,
.topbar-left {

    display: flex;

    align-items: center;

}


.sidebar-toggle {

    width: 44px;

    height: 44px;

    border: 0;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, .10);

    color: #fff;

    font-size: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

}


.sidebar-toggle:hover {

    background:
        rgba(255, 255, 255, .18);

}


.topbar-user {

    display: flex;

    align-items: center;

    gap: 11px;

}


.topbar-user-avatar {

    width: 43px;

    height: 43px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #fff;

    color: var(--primary);

    font-size: 22px;

}


.topbar-user-info {

    display: flex;

    flex-direction: column;

    gap: 2px;

}


.topbar-user-info strong {

    font-size: 13px;

}


.topbar-user-info small {

    font-size: 10px;

    color:
        rgba(255, 255, 255, .72);

}


.topbar-divider {

    width: 1px;

    height: 35px;

    margin:
        0
        22px;

    background:
        rgba(255, 255, 255, .20);

}


.topbar-logout {

    display: flex;

    align-items: center;

    gap: 8px;

    color: #fff;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

}


.topbar-logout:hover {

    color: #fff;

    opacity: .8;

}


/* ==========================================================================
   CONTENT
========================================================================== */

.app-content {

    width: 100%;

    max-width: 1800px;

    margin:
        0
        auto;

    padding: 30px;

}


/* ==========================================================================
   ALERTS
========================================================================== */

.app-alert {

    display: flex;

    align-items: center;

    gap: 10px;

    border-radius: 12px;

    border: 0;

    margin-bottom: 20px;

    box-shadow: var(--shadow-sm);

}


/* ==========================================================================
   PAGE HEADER
========================================================================== */

.page-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 28px;

}


.page-header h1 {

    font-size: 28px;

    font-weight: 800;

    margin:
        0
        0
        7px;

}


.page-header p {

    margin: 0;

    color: var(--muted);

}


/* ==========================================================================
   BUTTONS
========================================================================== */

.btn-primary {

    --bs-btn-bg: var(--primary);

    --bs-btn-border-color: var(--primary);

    --bs-btn-hover-bg:
        var(--primary-dark);

    --bs-btn-hover-border-color:
        var(--primary-dark);

    --bs-btn-active-bg:
        var(--primary-dark);

    --bs-btn-active-border-color:
        var(--primary-dark);

}


.btn {

    border-radius: 9px;

    font-weight: 600;

    padding:
        9px
        17px;

}


/* ==========================================================================
   STAT CARDS
========================================================================== */

.stat-card {

    position: relative;

    background: #fff;

    border:
        1px solid
        rgba(226, 232, 240, .8);

    border-radius: 16px;

    padding: 22px;

    min-height: 155px;

    box-shadow: var(--shadow-sm);

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    overflow: hidden;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}


.stat-card:hover {

    transform:
        translateY(-3px);

    box-shadow:
        var(--shadow);

}


.stat-card::after {

    content: "";

    position: absolute;

    width: 75px;

    height: 75px;

    left: -25px;

    bottom: -30px;

    border-radius: 50%;

    background:
        var(--red-soft);

}


.stat-card span {

    color: var(--muted);

    font-size: 13px;

    font-weight: 600;

}


.stat-card strong {

    color: var(--primary);

    font-size: 29px;

    line-height: 1.2;

    font-weight: 800;

}


.stat-card small {

    color: var(--muted);

    font-size: 11px;

}


/* ==========================================================================
   QUICK CARDS
========================================================================== */

.quick-card {

    display: flex;

    flex-direction: column;

    gap: 9px;

    min-height: 140px;

    padding: 22px;

    text-decoration: none;

    background: #fff;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow-sm);

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}


.quick-card:hover {

    color: inherit;

    transform:
        translateY(-3px);

    box-shadow:
        var(--shadow);

}


.quick-card b {

    font-size: 18px;

    color: var(--text);

}


.quick-card span {

    color: var(--muted);

    font-size: 13px;

    line-height: 1.7;

}


/* ==========================================================================
   BALANCE HERO
========================================================================== */

.balance-hero {

    position: relative;

    min-height: 210px;

    padding: 28px;

    border-radius: 20px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #d71928,
            #a20e17
        );

    color: #fff;

    box-shadow:
        var(--shadow-red);

}


.balance-hero::after {

    content: "";

    position: absolute;

    width: 210px;

    height: 210px;

    left: -70px;

    top: -70px;

    border-radius: 50%;

    border:
        35px solid
        rgba(255, 255, 255, .05);

}


.balance-hero span {

    opacity: .80;

    font-size: 14px;

}


.balance-hero strong {

    display: block;

    margin-top: 15px;

    font-size: 42px;

    font-weight: 800;

}


.balance-hero small {

    display: block;

    margin-top: 14px;

    opacity: .72;

}


/* ==========================================================================
   CARDS
========================================================================== */

.card {

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow-sm);

    overflow: hidden;

}


.card-header {

    background: #fff;

    border-bottom:
        1px solid
        var(--border);

    padding: 18px 22px;

}


/* ==========================================================================
   TABLES
========================================================================== */

.table-responsive {

    border-radius: 16px;

}


.table {

    margin: 0;

    background: #fff;

}


.table thead th {

    background:
        #fafafa;

    color: #475569;

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;

    border-bottom:
        1px solid
        var(--border);

    padding:
        15px
        16px;

}


.table tbody td {

    padding:
        14px
        16px;

    font-size: 13px;

    border-color:
        #f1f5f9;

}


.table-hover tbody tr:hover {

    background:
        #fff7f7;

}


/* ==========================================================================
   BADGES
========================================================================== */

.badge {

    padding:
        7px
        10px;

    border-radius: 7px;

    font-weight: 600;

}


.text-bg-success {

    color:
        #166534 !important;

    background:
        #dcfce7 !important;

}


.text-bg-danger {

    color:
        #991b1b !important;

    background:
        #fee2e2 !important;

}


/* ==========================================================================
   FORMS
========================================================================== */

.form-control,
.form-select {

    min-height: 44px;

    border-radius: 9px;

    border-color:
        #dbe1e8;

}


.form-control:focus,
.form-select:focus {

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 .2rem
        rgba(181, 18, 27, .12);

}


.form-label {

    font-weight: 600;

    font-size: 13px;

    color: #374151;

}


/* ==========================================================================
   LOGIN
========================================================================== */

.login-wrap {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 25px;

    background:
        linear-gradient(
            135deg,
            #fff5f5,
            #f8fafc
        );

}


.login-card {

    width: 100%;

    max-width: 460px;

    border: 0;

    border-radius: 22px;

    box-shadow:
        0 20px 60px
        rgba(15, 23, 42, .10);

}


.brand-mark {

    width: 72px;

    height: 72px;

    margin: auto;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #d71928,
            #a20e17
        );

    color: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 34px;

    font-weight: bold;

    box-shadow:
        0 10px 25px
        rgba(181, 18, 27, .25);

}


/* ==========================================================================
   SIMPLE NAVBAR
========================================================================== */

.simple-navbar {

    background:
        linear-gradient(
            90deg,
            #c3141e,
            #a70f17
        );

    min-height: 70px;

    color: #fff;

}


.simple-navbar .container-fluid {

    min-height: 70px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.simple-brand {

    display: flex;

    align-items: center;

    gap: 10px;

    color: #fff;

    text-decoration: none;

    font-weight: 800;

}


.simple-brand-icon {

    width: 38px;

    height: 38px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(255, 255, 255, .15);

}


.simple-user {

    display: flex;

    align-items: center;

    gap: 15px;

}


.simple-content {

    max-width: 1400px;

}


/* ==========================================================================
   SIDEBAR OVERLAY
========================================================================== */

.sidebar-overlay {

    display: none;

}
.agent-avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--red-soft);

    color: var(--primary);

    flex: 0 0 42px;

}

/* ==========================================================================
   MOBILE
========================================================================== */

@media (max-width: 991.98px) {


    :root {

        --sidebar-width: 280px;

    }


    .app-sidebar {

        transform:
            translateX(100%);

        transition:
            transform .25s ease;

    }


    .app-sidebar.open {

        transform:
            translateX(0);

    }


    .app-main {

        width: 100%;

        margin-right: 0;

    }


    .sidebar-overlay {

        position: fixed;

        inset: 0;

        z-index: 1040;

        background:
            rgba(15, 23, 42, .55);

        backdrop-filter:
            blur(2px);

    }


    .sidebar-overlay.show {

        display: block;

    }


    .app-content {

        padding:
            22px
            16px;

    }


    .topbar-user-info {

        display: none;

    }


    .topbar-divider {

        margin:
            0
            14px;

    }

}


/* ==========================================================================
   SMALL MOBILE
========================================================================== */

@media (max-width: 576px) {


    .app-topbar {

        padding:
            0
            15px;

    }


    .topbar-logout span {

        display: none;

    }


    .page-header {

        align-items: flex-start;

        flex-direction: column;

    }


    .page-header h1 {

        font-size: 23px;

    }


    .balance-hero strong {

        font-size: 32px;

    }


    .table {

        font-size: 12px;

    }


    .stat-card {

        min-height: 135px;

    }


    .sidebar-brand {

        padding:
            16px
            18px;

    }

}


/* ==========================================================================
   SCROLLBAR
========================================================================== */

.app-sidebar::-webkit-scrollbar {

    width: 5px;

}


.app-sidebar::-webkit-scrollbar-track {

    background:
        rgba(0, 0, 0, .10);

}


.app-sidebar::-webkit-scrollbar-thumb {

    background:
        rgba(255, 255, 255, .25);

    border-radius: 10px;

}