/* =====================================================
   GLOBAL
===================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-family);
}

body {
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.gb-app {
    min-height: 100vh;
    background: var(--bg);
}

.gb-main {
    min-height: 100vh;
}

.gb-layout {
    display: flex;
    min-height: 100vh;
}

.gb-blue {
    background: var(--primary);
    color: #fff;
}

.ops-primary-btn {
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(7, 95, 200, 0.22);
    cursor: pointer;
}

.dash-wrapper {
    margin: 0 auto;
}

.ops-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

/* =====================================================
   TOPBAR
===================================================== */

.gb-topbar,
.gb-topbar-modern {
    height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    position: sticky;
    top: 0;

    z-index: 2;
}

.gb-topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.gb-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gb-logo img {
    height: 42px;
}

.gb-org-name {
    font-size: 16px;
    font-weight: 700;
    color: #164477;
}

/* =====================================================
   SEARCH
===================================================== */

.gb-search,
.gb-search-wrap {
    height: 42px;
    background: #eef2f7;
    border-radius: 999px;

    display: flex;
    align-items: center;

    gap: 8px;
    padding: 0 14px;
}

.gb-search {
    width: 420px;
    max-width: 40vw;
}

.gb-search-wrap {
    max-width: 460px;
    flex: 1;
    padding: 0 16px;
}

.gb-search input,
.gb-search-wrap input {
    border: 0;
    outline: 0;
    width: 100%;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
}

.gb-search .material-icons,
.gb-search-wrap .material-icons {
    color: var(--muted);
    font-size: 20px;
}

/* =====================================================
   BUTTONS
===================================================== */

.gb-primary-btn {
    height: 42px;
    padding: 0 18px;

    background: var(--primary);
    color: #fff !important;

    border: 0;
    border-radius: var(--radius-sm);

    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    text-decoration: none !important;

    box-shadow: var(--shadow);
}

.gb-primary-btn:hover {
    background: var(--primary-dark);
}

.gb-secondary-btn {
    height: 42px;
    padding: 0 16px;

    background: #f8fafc;
    color: var(--text) !important;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    text-decoration: none !important;
}

.gb-secondary-btn:hover {
    background: var(--hover);
    color: var(--primary) !important;
}

.gb-icon-btn {
    width: 42px;
    height: 42px;

    border: 0;
    border-radius: var(--radius-sm);

    background: transparent;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    color: var(--text);
}

.gb-icon-btn:hover {
    background: var(--hover);
    color: var(--primary);
}

/* =====================================================
   SIDEBAR
===================================================== */

.gb-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);

    height: 100vh;

    position: sticky;
    top: 0;

    background: var(--surface);

    border-right: 1px solid var(--border);

    display: flex;
    flex-direction: column;

    z-index: 2;
}

.gb-sidebar-header {
    padding: 22px 20px 18px;
}

.gb-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gb-brand-icon {
    width: 52px;
    height: 52px;

    border-radius: var(--radius-md);

    background: linear-gradient(135deg,
            #ffffff 0%,
            #f8fafc 100%);

    border: 1px solid #e5e7eb;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    box-shadow: var(--shadow);
}

.gb-brand-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.gb-brand-title {
    margin: 0;

    font-size: 18px;
    font-weight: 800;

    color: #164477;
}

.gb-brand-subtitle {
    margin-top: 4px;

    font-size: 12px;
    color: var(--muted);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    max-width: 170px;
}

/* =====================================================
   SIDEBAR NAV
===================================================== */

.gb-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 110px;
}

.gb-nav-group {
    margin-bottom: 20px;
}

.gb-nav-label {
    margin: 0 0 8px 10px;

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .08em;

    color: #9ca3af;
}

.gb-nav-link {
    min-height: 44px;

    display: flex !important;
    align-items: center;

    gap: 12px;

    padding: 0 12px !important;
    margin-bottom: 5px;

    border-radius: var(--radius-sm);

    color: #374151 !important;

    font-size: 14px;
    font-weight: 600;

    transition: .18s ease;
}

.gb-nav-link .material-icons {
    width: 22px;
    font-size: 22px;
    color: #4b5563;
}

.gb-nav-link:hover {
    background: var(--hover) !important;
    color: var(--primary) !important;
}

.gb-nav-link:hover .material-icons {
    color: var(--primary);
}

.gb-nav-link.active_path {
    background: var(--soft) !important;
    color: var(--primary) !important;
}

.gb-nav-link.active_path .material-icons {
    color: var(--primary) !important;
}

/* =====================================================
   USER CARD
===================================================== */

.gb-sidebar-user {
    position: absolute;

    left: 14px;
    right: 14px;
    bottom: 14px;

    padding: 12px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    display: flex;
    align-items: center;
    gap: 10px;

    box-shadow: var(--shadow-sm);
}

.gb-sidebar-user img,
.gb-avatar,
.gb-user-trigger {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    object-fit: cover;
}

.gb-user-trigger {
    border: 1px solid var(--border);
    cursor: pointer;
}

/* =====================================================
   CONTENT
===================================================== */

.gb-main-area {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.gb-content-area {
    padding: 26px;
    min-width: 0;
}

.mainBody {
    width: 100%;
    min-width: 0;
}

/* =====================================================
   DROPDOWN
===================================================== */

.gb-user-dropdown {
    position: absolute;

    right: 18px;
    top: 64px;

    width: 290px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-lg);

    overflow: hidden;
    z-index: 99999;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 980px) {

    .gb-layout {
        display: block;
    }

    .gb-sidebar {
        position: fixed;
        left: -280px;
        top: 0;

        transition: .25s ease;

        box-shadow: var(--shadow-lg);
    }

    .gb-sidebar.gb-open {
        left: 0;
    }
}

@media (max-width: 768px) {

    .gb-search,
    .gb-search-wrap {
        display: none;
    }

    .gb-topbar,
    .gb-topbar-modern {
        padding: 0 16px;
    }

    .gb-content-area {
        padding: 16px;
    }
}

/* ==========================================
   DASHBOARD
========================================== */

body {
    background: var(--bg) !important;
    font-family: var(--font-family) !important;
    color: var(--text);
}

.dash-wrapper {
    margin: 0 auto;
}

/* ==========================================
   ALERTS
========================================== */

.alert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.alert-card {
    min-height: 146px;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);

    display: flex;
    gap: 20px;
    align-items: flex-start;

    position: relative;
    overflow: hidden;
}

.alert-card.red {
    background: #fff1f1;
    border-color: #f2caca;
}

.alert-card.gold {
    background: #e5d3ac;
    border-color: #d6bd84;
    color: #fff;
}

.alert-card.blue {
    background: var(--soft);
    border-color: #c9d9ef;
}

.alert-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.alert-card.red .alert-icon {
    background: #c91818;
    color: #fff;
}

.alert-card.gold .alert-icon {
    background: #9a6400;
    color: #fff;
}

.alert-card.blue .alert-icon {
    background: var(--primary);
    color: #fff;
}

.alert-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 6px;
}

.alert-card.red .alert-title {
    color: #981b1b;
}

.alert-card.blue .alert-title {
    color: var(--primary);
}

.alert-text {
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 18px;
    color: #4b5563;
}

.alert-card.gold .alert-text,
.alert-card.gold .alert-title {
    color: #fff;
}

.alert-link {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
}

.alert-card.red .alert-link {
    color: #991b1b;
}

.alert-card.gold .alert-link {
    color: #fff;
}

.alert-card.blue .alert-link {
    color: var(--primary);
}

/* ==========================================
   KPI CARDS
========================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 34px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    padding: 22px 24px;
    min-height: 132px;

    box-shadow: var(--shadow-sm);
}

.kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.kpi-label {
    font-size: 11px;
    line-height: 1.15;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--muted);
}

.kpi-badge {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
}

.kpi-badge.good {
    background: #e8f4ef;
    color: var(--success);
}

.kpi-badge.bad {
    background: #fdecec;
    color: var(--danger);
}

.kpi-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.kpi-sub {
    font-size: 12px;
    color: var(--muted);
}

/* ==========================================
   SECTION TITLE
========================================== */

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 0 0 22px;

    font-size: 20px;
    font-weight: 600;

    letter-spacing: -.03em;
}

.section-title .material-symbols-outlined {
    color: var(--primary);
    font-size: 24px;
}

/* ==========================================
   QUICK ACTIONS
========================================== */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-action {
    background: var(--surface);

    min-height: 82px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    box-shadow: var(--shadow-sm);

    padding: 16px 20px;

    display: flex;
    align-items: center;
    gap: 18px;

    color: var(--text);
    text-decoration: none !important;

    font-size: 16px;
    font-weight: 500;

    transition: .2s ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: #b8c7dc;
    box-shadow: var(--shadow-lg);
}

.quick-icon {
    width: 42px;
    height: 42px;

    border-radius: var(--radius-sm);

    background: var(--soft);
    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.quick-icon .material-symbols-outlined {
    font-size: 24px;
}

/* ==========================================
   FLOATING BUTTON
========================================== */

.floating-help {
    position: fixed;

    right: 26px;
    bottom: 24px;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    background: var(--primary);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: var(--shadow-lg);

    z-index: 20;
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 500,
        'GRAD' 0,
        'opsz' 24;
}

/* ==========================================
   RESPONSIVE
========================================== */

@media(max-width:1100px) {

    .alert-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:640px) {

    .kpi-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

.gb-input {
    padding: 10px 14px;

    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    font-size: 14px;
    font-family: var(--font-family);

    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gb-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 95, 200, 0.12);
}

.gb-input::placeholder {
    color: var(--muted);
}