html {
    min-height: 100%;
}

/* Final sidebar color lock */
.app-sidebar-col {
    background: #ffffff !important;
    box-shadow: -12px 0 34px rgba(31, 92, 130, 0.16) !important;
    color: #213547 !important;
}

.app-drawer-head {
    background: #f8fbff !important;
    border-bottom: 1px solid #dbeaf5 !important;
    color: #1f3550 !important;
}

.app-drawer-head strong {
    color: #1f3550 !important;
}

.app-drawer-close {
    background: #eaf5ff !important;
    border: 1px solid #cce2f3 !important;
    color: #1769a6 !important;
}

.app-sidebar-col .list-group {
    background: #ffffff !important;
}

.app-sidebar-col .list-group-item {
    background: #ffffff !important;
    border-color: #e3edf7 !important;
    color: #33475b !important;
}

.app-sidebar-col .list-group-item *,
.app-sidebar-col .list-group-item .glyphicon {
    color: inherit !important;
}

.app-sidebar-col .list-group-item:hover {
    background: #f2f8ff !important;
    color: #1769a6 !important;
}

.app-sidebar-col .list-group-item.app-current-link,
.app-sidebar-col .list-group-item.active2,
.app-sidebar-col .list-group-item.active3 {
    background: #e7f4fd !important;
    border-left: 3px solid #1769a6 !important;
    color: #123f67 !important;
}

/* Final dashboard stats grid lock - keep after all responsive rules */
@media (max-width: 767px) {
    .summary-stats.stat-grid,
    .payroll-grid.stat-grid,
    .row.stat-grid.summary-stats,
    .row.stat-grid.payroll-grid {
        display: grid !important;
        gap: 7px !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 6px !important;
        width: 100% !important;
    }

    .summary-stats.stat-grid > [class*="col-"],
    .payroll-grid.stat-grid > [class*="col-"],
    .row.stat-grid.summary-stats > [class*="col-"],
    .row.stat-grid.payroll-grid > [class*="col-"] {
        display: block !important;
        float: none !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .summary-stats.stat-grid .dash-tile,
    .payroll-grid.stat-grid .dash-tile,
    .row.stat-grid.summary-stats .dash-tile,
    .row.stat-grid.payroll-grid .dash-tile {
        align-items: center !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        height: 68px !important;
        justify-content: center !important;
        margin: 0 !important;
        min-height: 68px !important;
        padding: 7px 3px !important;
    }

    .summary-stats.stat-grid .dash-tile h3,
    .payroll-grid.stat-grid .dash-tile h3,
    .row.stat-grid.summary-stats .dash-tile h3,
    .row.stat-grid.payroll-grid .dash-tile h3 {
        font-size: 19px !important;
        line-height: 1 !important;
        margin: 0 0 4px !important;
    }

    .summary-stats.stat-grid .dash-tile strong,
    .payroll-grid.stat-grid .dash-tile strong,
    .row.stat-grid.summary-stats .dash-tile strong,
    .row.stat-grid.payroll-grid .dash-tile strong {
        font-size: 8px !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }
}

/* Final quick-action card style */
.quick {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    width: 100% !important;
}

.quick a,
.quick .btn {
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid #dbeaf5 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 18px rgba(31, 92, 130, .07) !important;
    color: #10233f !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    gap: 6px !important;
    justify-content: center !important;
    margin: 0 !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
    text-shadow: none !important;
    white-space: normal !important;
    width: 100% !important;
}

.quick a:hover,
.quick .btn:hover {
    background: #f8fcff !important;
    border-color: #bfddf2 !important;
    color: #0f5f91 !important;
    text-decoration: none !important;
}

/* Final dashboard stats grid lock */
@media (max-width: 767px) {
    .summary-stats.stat-grid,
    .payroll-grid.stat-grid,
    .row.stat-grid.summary-stats,
    .row.stat-grid.payroll-grid {
        display: grid !important;
        gap: 7px !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 6px !important;
        width: 100% !important;
    }

    .summary-stats.stat-grid > [class*="col-"],
    .payroll-grid.stat-grid > [class*="col-"],
    .row.stat-grid.summary-stats > [class*="col-"],
    .row.stat-grid.payroll-grid > [class*="col-"] {
        display: block !important;
        float: none !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .summary-stats.stat-grid .dash-tile,
    .payroll-grid.stat-grid .dash-tile,
    .row.stat-grid.summary-stats .dash-tile,
    .row.stat-grid.payroll-grid .dash-tile {
        align-items: center !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        height: 68px !important;
        justify-content: center !important;
        margin: 0 !important;
        min-height: 68px !important;
        padding: 7px 3px !important;
    }

    .summary-stats.stat-grid .dash-tile h3,
    .payroll-grid.stat-grid .dash-tile h3,
    .row.stat-grid.summary-stats .dash-tile h3,
    .row.stat-grid.payroll-grid .dash-tile h3 {
        font-size: 19px !important;
        line-height: 1 !important;
        margin: 0 0 4px !important;
    }

    .summary-stats.stat-grid .dash-tile strong,
    .payroll-grid.stat-grid .dash-tile strong,
    .row.stat-grid.summary-stats .dash-tile strong,
    .row.stat-grid.payroll-grid .dash-tile strong {
        font-size: 8px !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }
}

/* Final cascade: keep the refreshed UI above older Bootstrap-era rules. */
body {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem), linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%) !important;
    color: #172033;
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

.app-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #dbe4ee !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07) !important;
    position: sticky;
    top: 0;
    z-index: 900;
}

.app-brand-subtitle {
    background: #ecfdf5 !important;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #166534 !important;
    letter-spacing: 0;
    padding: 6px 10px;
    text-transform: none;
}

.app-welcome {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    color: #172033 !important;
    padding: 7px 11px;
    text-decoration: none !important;
}

.app-menu-btn {
    background: #2563eb !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
    display: none !important;
}

.app-menu-btn span {
    background: #ffffff !important;
}

.app-sidebar-col {
    background: #0f172a !important;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.26) !important;
}

.app-drawer-head {
    background: #111827 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.app-drawer-close {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
}

.app-sidebar-col .list-group {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.app-sidebar-col .list-group-item {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}

.app-sidebar-col .list-group-item:hover,
.app-sidebar-col .list-group-item.app-current-link,
.app-sidebar-col .list-group-item.app-current-link * {
    background: rgba(37, 99, 235, 0.18) !important;
    border-left-color: #60a5fa !important;
    color: #ffffff !important;
}

.page-header {
    border-bottom: 0 !important;
    color: #172033 !important;
    font-size: 26px;
    letter-spacing: 0;
}

.modern-card,
.panel,
.table-responsive,
.login-box {
    background: #ffffff !important;
    border: 1px solid #dbe4ee !important;
    border-radius: 8px !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09) !important;
}

.panel-heading,
.panel-default > .panel-heading,
.panel-heading[style] {
    background: #f8fafc !important;
    border-bottom: 1px solid #dbe4ee !important;
    border-radius: 8px 8px 0 0 !important;
    color: #172033 !important;
}

.dash-tile {
    border: 1px solid #dbe4ee !important;
    border-radius: 8px !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09) !important;
}

.dash-tile:before {
    background: linear-gradient(180deg, #2563eb, #0f766e) !important;
    border-radius: 8px 0 0 8px !important;
}

.dash-tile h3,
.section-title {
    color: #172033 !important;
}

.section-title {
    background: transparent !important;
    border: 0 !important;
    border-left: 4px solid #2563eb !important;
    border-radius: 0 !important;
    font-size: 17px;
}

.btn,
.form-control {
    border-radius: 8px !important;
}

.btn-primary,
.btn-info {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
}

.btn-success {
    background: #0f766e !important;
    border-color: #0d625c !important;
}

.btn-warning {
    background: #b45309 !important;
    border-color: #92400e !important;
}

.btn-danger {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

.btn-default {
    background: #ffffff !important;
    border-color: #dbe4ee !important;
    color: #172033 !important;
}

.table > thead > tr > th {
    background: #f1f5f9 !important;
    color: #334155 !important;
    white-space: nowrap;
}

.quick {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
}

.quick a,
.quick .btn {
    align-items: center !important;
    background: #fff !important;
    border: 1px solid #dbeaf5 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 18px rgba(31, 92, 130, .07) !important;
    color: #10233f !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    gap: 6px !important;
    justify-content: center !important;
    margin: 0 !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
    text-shadow: none !important;
    white-space: normal !important;
}

.quick a:hover,
.quick .btn:hover {
    background: #f8fcff !important;
    border-color: #bfddf2 !important;
    color: #0f5f91 !important;
    text-decoration: none !important;
}

@media (max-width: 991px) {
    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .stat-grid {
        display: grid !important;
        gap: 12px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        padding: 0 !important;
    }

    .stat-grid:before,
    .stat-grid:after {
        content: none !important;
        display: none !important;
    }

    .stat-grid > [class*="col-"] {
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: auto !important;
    }
}

@media (max-width: 767px) {
    .app-brand-subtitle,
    .app-welcome {
        display: none !important;
    }

    .page-header {
        display: flex;
        flex-direction: column;
        font-size: 21px !important;
        gap: 10px;
        line-height: 1.25;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-header .pull-right {
        display: flex;
        float: none !important;
        gap: 8px;
        width: 100%;
    }

    .page-header .pull-right .btn {
        flex: 1 1 150px;
    }

    .dash-tile {
        min-height: 86px !important;
        padding: 13px 10px !important;
        text-align: left !important;
    }

    .quick {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
/* Phone dashboard layout requested by client - final override */
.app-menu-btn {
    display: none !important;
}

@media (min-width: 768px) {
    .app-header .row,
    .app-header .col-sm-12,
    .app-brand,
    .app-brand-split {
        align-items: center !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .app-brand {
        min-height: 72px !important;
        padding: 0 18px !important;
        width: 100% !important;
    }

    .app-brand-main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .app-brand img {
        max-height: 58px !important;
        max-width: 240px !important;
        object-fit: contain !important;
    }

    .app-header-right {
        align-items: center !important;
        display: flex !important;
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        margin-left: auto !important;
        margin-top: 0 !important;
        white-space: nowrap !important;
    }

    .app-menu-btn {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .app-header .app-brand-subtitle,
    .app-header .app-welcome {
        display: none !important;
    }

    .app-header .row,
    .app-header .col-sm-12,
    .app-brand,
    .app-brand-split {
        align-items: center !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .app-brand-main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .app-header-right {
        flex: 0 0 auto !important;
        margin-left: auto !important;
        margin-top: 0 !important;
    }

    .app-menu-btn {
        display: inline-flex !important;
    }
}

@media (max-width: 767px) {
    body {
        background: #f7f7f4 !important;
    }

    .app-header {
        background: #f7f7f4 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
        position: relative;
    }

    .app-brand {
        align-items: center;
        min-height: 58px;
        padding: 14px 14px 4px;
    }

    .app-brand-main {
        gap: 9px;
    }

    .app-brand img {
        background: transparent;
        border-radius: 0;
        height: auto;
        max-height: 42px;
        max-width: 170px;
        object-fit: contain;
        padding: 0;
        width: auto;
    }

    .app-brand-title {
        color: #202124 !important;
        display: block !important;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.1;
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-brand-title:after {
        color: #8a8a8a;
        content: "Employee portal";
        display: block;
        font-size: 9px;
        font-weight: 700;
        line-height: 1.2;
        margin-top: 2px;
        text-transform: none;
    }

    .app-header-right {
        margin-left: auto;
    }

    .app-menu-btn {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        display: inline-flex !important;
        height: 36px;
        padding: 0;
        width: 34px;
    }

    .app-menu-btn span {
        background: #1f2937 !important;
        height: 2px;
        width: 17px;
    }

    .container-fluid[style*="margin-top:30px"] {
        margin-top: 0 !important;
    }

    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .page-header {
        display: none !important;
    }

    .panel,
    .table-responsive,
    .modern-card {
        border-color: #dedbd2 !important;
        border-radius: 10px !important;
        box-shadow: none !important;
    }

    .panel-heading,
    .panel-default > .panel-heading,
    .panel-heading[style] {
        background: #ffffff !important;
        border-bottom: 0 !important;
        border-radius: 10px 10px 0 0 !important;
        color: #2b2b2b !important;
        font-size: 13px;
        padding: 14px 12px 4px;
    }

    .panel-body {
        padding: 10px 12px 14px;
    }

    .panel-body p {
        margin-bottom: 6px;
    }

    .profile-avatar {
        border: 0;
        border-radius: 50%;
        box-shadow: none;
        float: left;
        height: 42px;
        margin: 0 10px 8px 0;
        width: 42px;
    }

    .stat-grid {
        display: grid !important;
        gap: 6px !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        margin: 8px 0 14px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .stat-grid .dash-tile {
        align-items: center;
        background: #f0eee8 !important;
        border: 0 !important;
        border-radius: 7px !important;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 56px !important;
        padding: 8px 4px !important;
        text-align: center !important;
    }

    .stat-grid .dash-tile:before {
        display: none !important;
    }

    .stat-grid .dash-tile h3 {
        color: #202124 !important;
        font-size: 20px;
        line-height: 1;
        margin: 0 0 5px;
    }

    .stat-grid .dash-tile strong {
        color: #5f6368;
        font-size: 9px;
        line-height: 1.1;
    }

    .section-title {
        border: 0 !important;
        color: #202124 !important;
        font-size: 15px;
        margin: 10px 0 8px !important;
        padding: 0 !important;
    }

    .quick {
        display: grid !important;
        gap: 9px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .quick .btn {
        align-items: center;
        background: #ffffff !important;
        border: 1px solid #dedbd2 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        color: #30343b !important;
        display: flex !important;
        flex-direction: column;
        font-size: 11px;
        font-weight: 500;
        gap: 8px;
        justify-content: center;
        min-height: 62px;
        padding: 10px 6px;
        text-align: center;
        width: 100%;
    }

    .quick .btn .glyphicon {
        align-items: center;
        border: 1px solid #1769c2;
        border-radius: 50%;
        color: #1769c2 !important;
        display: flex;
        font-size: 10px;
        height: 18px;
        justify-content: center;
        width: 18px;
    }

    .quick .btn:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Phone dashboard layout requested by client */
.app-menu-btn {
    display: none !important;
}

@media (max-width: 767px) {
    body {
        background: #f7f7f4 !important;
    }

    .app-header {
        background: #f7f7f4 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
        position: relative;
    }

    .app-brand {
        align-items: center;
        min-height: 58px;
        padding: 14px 14px 4px;
    }

    .app-brand-main {
        gap: 9px;
    }

    .app-brand img {
        background: #e6f2ff;
        border-radius: 50%;
        height: 34px;
        max-height: 34px;
        max-width: 34px;
        object-fit: contain;
        padding: 5px;
        width: 34px;
    }

    .app-brand-title {
        color: #202124 !important;
        display: block !important;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.1;
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-brand-title:after {
        color: #8a8a8a;
        content: "Employee portal";
        display: block;
        font-size: 9px;
        font-weight: 700;
        line-height: 1.2;
        margin-top: 2px;
        text-transform: none;
    }

    .app-header-right {
        margin-left: auto;
    }

    .app-menu-btn {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        display: inline-flex !important;
        height: 36px;
        padding: 0;
        width: 34px;
    }

    .app-menu-btn span {
        background: #1f2937 !important;
        height: 2px;
        width: 17px;
    }

    .container-fluid[style*="margin-top:30px"] {
        margin-top: 0 !important;
    }

    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .page-header {
        display: none !important;
    }

    .panel,
    .table-responsive,
    .modern-card {
        border-color: #dedbd2 !important;
        border-radius: 10px !important;
        box-shadow: none !important;
    }

    .panel-heading,
    .panel-default > .panel-heading,
    .panel-heading[style] {
        background: #ffffff !important;
        border-bottom: 0 !important;
        border-radius: 10px 10px 0 0 !important;
        color: #2b2b2b !important;
        font-size: 13px;
        padding: 14px 12px 4px;
    }

    .panel-body {
        padding: 10px 12px 14px;
    }

    .panel-body p {
        margin-bottom: 6px;
    }

    .profile-avatar {
        border: 0;
        border-radius: 50%;
        box-shadow: none;
        float: left;
        height: 42px;
        margin: 0 10px 8px 0;
        width: 42px;
    }

    .stat-grid {
        display: grid !important;
        gap: 6px !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        margin: 8px 0 14px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .stat-grid .dash-tile {
        align-items: center;
        background: #f0eee8 !important;
        border: 0 !important;
        border-radius: 7px !important;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 56px !important;
        padding: 8px 4px !important;
        text-align: center !important;
    }

    .stat-grid .dash-tile:before {
        display: none !important;
    }

    .stat-grid .dash-tile h3 {
        color: #202124 !important;
        font-size: 20px;
        line-height: 1;
        margin: 0 0 5px;
    }

    .stat-grid .dash-tile strong {
        color: #5f6368;
        font-size: 9px;
        line-height: 1.1;
        text-transform: none;
    }

    .section-title {
        border: 0 !important;
        color: #202124 !important;
        font-size: 15px;
        margin: 10px 0 8px !important;
        padding: 0 !important;
    }

    .quick {
        display: grid !important;
        gap: 9px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .quick .btn {
        align-items: center;
        background: #ffffff !important;
        border: 1px solid #dedbd2 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        color: #30343b !important;
        display: flex !important;
        flex-direction: column;
        font-size: 11px;
        font-weight: 500;
        gap: 8px;
        justify-content: center;
        min-height: 62px;
        padding: 10px 6px;
        text-align: center;
        width: 100%;
    }

    .quick .btn .glyphicon {
        align-items: center;
        border: 2px solid #1769c2;
        border-radius: 50%;
        color: transparent;
        display: flex;
        height: 18px;
        justify-content: center;
        overflow: hidden;
        width: 18px;
    }

    .quick .btn:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* 2026 UI refresh */
:root {
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-border: #dbe4ee;
    --app-text: #172033;
    --app-muted: #64748b;
    --app-primary: #2563eb;
    --app-primary-dark: #1d4ed8;
    --app-accent: #0f766e;
    --app-warning: #b45309;
    --app-danger: #dc2626;
    --app-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
    --app-radius: 8px;
}

body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem),
        linear-gradient(180deg, #f8fafc 0%, var(--app-bg) 100%);
    color: var(--app-text);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 14px;
}

a {
    color: var(--app-primary);
}

.app-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    position: sticky;
    top: 0;
    z-index: 900;
}

.app-brand {
    min-height: 74px;
    padding: 0 10px;
}

.app-brand img {
    max-height: 54px;
}

.app-brand-title {
    color: var(--app-text);
}

.app-brand-subtitle {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #166534;
    letter-spacing: 0;
    padding: 6px 10px;
    text-transform: none;
}

.app-welcome {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text) !important;
    padding: 7px 11px;
    text-decoration: none !important;
}

.app-menu-btn {
    background: var(--app-primary);
    border: 0;
    border-radius: var(--app-radius);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
    height: 38px;
    width: 42px;
}

.app-menu-btn span {
    background: #ffffff;
}

.app-sidebar-col {
    background: #0f172a;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.26);
}

.app-drawer-head {
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    color: #ffffff;
}

.app-drawer-close {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    border-radius: var(--app-radius);
    color: #ffffff;
}

.app-sidebar-col .list-group {
    background: transparent;
    border: 0;
}

.app-sidebar-col .list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.app-sidebar-col .list-group-item:hover,
.app-sidebar-col .list-group-item.app-current-link,
.app-sidebar-col .list-group-item.app-current-link * {
    background: rgba(37, 99, 235, 0.18) !important;
    border-left-color: #60a5fa !important;
    color: #ffffff !important;
}

.page-header {
    border-bottom: 0;
    color: var(--app-text) !important;
    font-size: 26px;
    letter-spacing: 0;
    margin-bottom: 20px;
}

.page-header .pull-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.modern-card,
.panel,
.table-responsive,
.login-box {
    background: var(--app-surface);
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow) !important;
}

.panel-heading,
.panel-default > .panel-heading,
.panel-heading[style] {
    background: var(--app-surface-soft) !important;
    border-bottom: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) var(--app-radius) 0 0 !important;
    color: var(--app-text) !important;
}

.dash-tile {
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow) !important;
    min-height: 112px;
}

.dash-tile:before {
    background: linear-gradient(180deg, var(--app-primary), var(--app-accent));
    border-radius: var(--app-radius) 0 0 var(--app-radius);
}

.dash-tile h3 {
    color: var(--app-text);
}

.section-title {
    background: transparent !important;
    border: 0;
    border-left: 4px solid var(--app-primary);
    border-radius: 0 !important;
    color: var(--app-text) !important;
    font-size: 17px;
    margin-top: 24px !important;
}

.btn {
    border-radius: var(--app-radius);
    box-shadow: none !important;
}

.btn-primary,
.btn-info {
    background: var(--app-primary);
    border-color: var(--app-primary-dark);
}

.btn-primary:hover,
.btn-info:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.btn-success {
    background: var(--app-accent);
    border-color: #0d625c;
}

.btn-warning {
    background: var(--app-warning);
    border-color: #92400e;
}

.btn-danger {
    background: var(--app-danger);
    border-color: #b91c1c;
}

.btn-default {
    background: #ffffff;
    border-color: var(--app-border);
    color: var(--app-text);
}

.form-control {
    border-color: var(--app-border);
    border-radius: var(--app-radius);
}

.form-control:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.table-responsive {
    overflow-x: auto;
}

.table > thead > tr > th {
    background: #f1f5f9 !important;
    color: #334155;
    white-space: nowrap;
}

.table > tbody > tr > td {
    color: #334155;
}

.label {
    border-radius: 999px;
    display: inline-block;
    font-weight: 700;
    padding: 5px 8px;
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick a {
    margin: 0 !important;
}

@media (max-width: 991px) {
    .app-sidebar-col + .col-sm-9,
    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .stat-grid {
        display: grid !important;
        gap: 12px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .stat-grid:before,
    .stat-grid:after {
        content: none !important;
        display: none !important;
    }

    .stat-grid > [class*="col-"] {
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: auto !important;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 13px;
    }

    body > .container,
    body > .container-fluid,
    .app-header,
    .app-topbar,
    .hedrbtm,
    .app-shell,
    .container-fluid[style*="margin-top"] {
        width: 100% !important;
    }

    .app-header {
        position: sticky;
    }

    .app-brand {
        padding: 10px 12px;
    }

    .app-brand-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .app-header-right {
        flex: 0 0 auto;
        margin-left: 8px;
        margin-top: 0;
    }

    .app-brand-subtitle,
    .app-welcome {
        display: none;
    }

    .app-sidebar-col {
        width: min(88vw, 360px) !important;
    }

    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .page-header {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        font-size: 21px;
        gap: 10px;
        line-height: 1.25;
        margin: 8px 0 14px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-header .pull-right {
        float: none !important;
        justify-content: stretch;
        width: 100%;
    }

    .page-header .pull-right .btn {
        flex: 1 1 150px;
    }

    .panel-body {
        padding: 14px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        padding: 0 !important;
    }

    .dash-tile {
        min-height: 86px !important;
        padding: 13px 10px !important;
        text-align: left !important;
    }

    .dash-tile h3 {
        font-size: 24px;
    }

    .dash-tile strong,
    .dash-tile small {
        font-size: 11px;
    }

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

    .quick .btn,
    .form-inline .btn,
    .form-inline .form-control {
        min-height: 42px;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: 1fr !important;
    }

    .app-brand img {
        max-width: 150px;
    }
}

body {
    background: #f3f8fc;
    color: #243447;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 14px;
    min-height: 100vh;
}

body > .container,
body > .container-fluid {
    box-sizing: border-box;
    width: 100%;
}

body > .container-fluid[style*="margin-top:30px"],
body > .container-fluid[style*="margin-top: 30px"] {
    flex: 1 0 auto;
    width: 100%;
}

body > .container-fluid[style*="background:#DADADA"],
body > .container-fluid[style*="background: #DADADA"] {
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
}

a {
    color: #246fa8;
}

.app-header {
    background: #ffffff;
    border-bottom: 1px solid #deedf8;
    box-shadow: 0 8px 24px rgba(31, 92, 130, 0.08);
}

.app-header .row,
.app-header .col-sm-12 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
}

.app-brand-centered {
    justify-content: center;
    text-align: center;
}

.app-brand-split {
    justify-content: space-between;
    text-align: left;
    width: 100%;
}

.app-brand-main {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.app-brand img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

.app-brand-title {
    color: #1769a6;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    letter-spacing: 0;
}

.app-brand-title {
    display: none;
}

.app-brand-subtitle {
    color: #6a7d90;
    font-size: 12px;
    margin-top: 0;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-header-right {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.app-welcome {
    color: #1769a6 !important;
    font-weight: 700;
    white-space: nowrap;
}

.app-topbar,
.hedrbtm {
    background: #ffffff !important;
    border-bottom: 1px solid #deedf8;
    color: #ffffff;
    padding: 6px 20px;
    box-shadow: 0 10px 26px rgba(31, 92, 130, 0.08);
    position: relative;
}

.app-topbar a,
.hedrbtm a {
    color: #1769a6 !important;
    font-weight: 600;
}

.app-topbar > .col-sm-4:first-child {
    align-items: center;
    display: flex;
    gap: 10px;
}

.app-topbar > .col-sm-6:first-child {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 38px;
    width: 100%;
}

.app-topbar > .col-sm-6:first-child .pull-left {
    float: none !important;
}

.app-session-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.app-topbar > .col-sm-4:first-child .pull-left {
    float: none !important;
}

.app-menu-btn {
    align-items: center;
    background: #e7f4fd;
    border: 1px solid #bfddf2;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 3px;
    height: 32px;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 0;
    vertical-align: middle;
    width: 38px;
    cursor: pointer;
    position: relative;
    z-index: 20;
}

.app-menu-btn span {
    background: #1769a6;
    border-radius: 2px;
    display: block;
    height: 2px;
    width: 20px;
}

.app-sidebar-col {
    background: #f6fbff;
    bottom: 0;
    box-shadow: -18px 0 44px rgba(31, 92, 130, 0.18);
    right: 0;
    max-width: 340px;
    overflow-y: auto;
    padding: 0 0 18px !important;
    position: fixed !important;
    top: 0;
    transform: translateX(108%);
    transition: transform 0.24s ease;
    width: 300px !important;
    z-index: 1001;
}

body.sidebar-open .app-sidebar-col {
    transform: translateX(0);
}

.app-sidebar-backdrop {
    background: rgba(15, 45, 70, 0.32);
    border: 0;
    bottom: 0;
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

body.sidebar-open .app-sidebar-backdrop {
    display: block;
}

.app-drawer-head {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #deedf8;
    box-shadow: 0 8px 24px rgba(31, 92, 130, 0.08);
    color: #1769a6;
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 1002;
}

.app-drawer-close {
    align-items: center;
    background: #e7f4fd;
    border: 1px solid #bfddf2;
    border-radius: 12px;
    color: #1769a6;
    display: inline-flex;
    font-size: 22px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 46px;
}

.app-drawer-head strong {
    font-size: 18px;
}

.app-sidebar-col .list-group {
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

.app-sidebar-col + .col-sm-9 {
    float: none !important;
    margin-left: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    .app-sidebar-col {
        width: 320px !important;
    }
}

.app-top-actions a {
    display: inline-block;
    margin: 0 8px;
}

.app-shell,
.container-fluid[style*="margin-top:30px"] {
    margin-top: 22px !important;
}

.list-group {
    background: #ffffff;
    border: 1px solid #d7e8f6;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(31, 92, 130, 0.10);
    overflow: hidden;
}

.list-group-item {
    background: #ffffff;
    border-color: #e5f0f8;
    border-left: 0;
    border-right: 0;
    color: #334e68;
    font-size: 14px;
    padding: 12px 16px;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.list-group-item:hover {
    background: #eef8ff;
    color: #1f6fa9;
    padding-left: 18px;
}

.list-group-item.app-current-link {
    background: #dff1fc !important;
    border-left: 5px solid #2384c6 !important;
    color: #115f98 !important;
    font-weight: 800;
    padding-left: 18px;
}

.list-group-item.app-current-link .glyphicon {
    color: #115f98 !important;
}

.list-group-item:first-child,
.list-group-item:last-child {
    border-radius: 0;
}

.list-group-item.active2,
.list-group-item.active3,
.list-group-item[style*="background:#1d959a"],
.list-group-item[style*="background:#4f9fd9"],
.list-group-item[style*="background-color:#4f9fd9"],
.list-group-item[style*="background-color: #4f9fd9"] {
    background: linear-gradient(90deg, #62b4e8 0%, #3189c5 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    font-weight: 800;
    letter-spacing: 0;
}

.badge {
    background: #e8f5ff;
    color: #246fa8;
    border: 1px solid #cae7fb;
}

.page-header {
    border-bottom: 1px solid #d7e8f6;
    color: #1f6fa9 !important;
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.modern-card,
.panel,
.table-responsive,
.login-box {
    background: #ffffff;
    border: 1px solid #d7e8f6 !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 40px rgba(31, 92, 130, 0.10) !important;
}

.panel-heading,
.panel-default > .panel-heading,
.panel-heading[style*="background:#1d959a"],
.panel-heading[style*="background:#4f9fd9"],
.panel-heading[style*="background:#555"] {
    background: #e7f4fd !important;
    border: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    color: #1769a6 !important;
    font-weight: 800;
}

[style*="background:#1d959a"],
[style*="background: #1d959a"] {
    background: #e7f4fd !important;
    color: #1769a6 !important;
}

[style*="color:#fff"],
[style*="color:#FFF"] {
    color: inherit;
}

.app-topbar,
.app-topbar *,
.list-group-item.active2,
.list-group-item.active2 *,
.list-group-item.active3,
.list-group-item.active3 * {
    color: #1769a6 !important;
}

.list-group-item.app-current-link,
.list-group-item.app-current-link * {
    background: #dff1fc !important;
    color: #115f98 !important;
}

.panel-body {
    padding: 18px;
}

.dash-tile {
    background: #ffffff !important;
    border: 1px solid #d7e8f6 !important;
    border-left: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 40px rgba(31, 92, 130, 0.10) !important;
    min-height: 108px;
    padding: 18px !important;
    position: relative;
}

.dash-tile:before {
    background: linear-gradient(180deg, #62b4e8, #3189c5);
    border-radius: 18px 0 0 18px;
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    top: 0;
    width: 5px;
}

.dash-tile h3 {
    color: #173b57;
    font-size: 30px;
    margin: 0 0 8px;
}

.dash-tile strong,
.dash-tile small {
    color: #607587;
    font-weight: 700;
}

.section-title {
    background: #e7f4fd !important;
    border: 1px solid #cce7f8;
    border-radius: 14px !important;
    color: #1769a6 !important;
    font-weight: 800;
    padding: 10px 14px !important;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
    padding: 8px 14px;
}

.btn-lg {
    border-radius: 12px;
    padding: 10px 18px;
}

.btn-primary,
.btn-info {
    background: #2384c6;
    border-color: #1f75af;
}

.btn-success {
    background: #2f9e72;
    border-color: #278560;
}

.btn-warning {
    background: #d08a2d;
    border-color: #b87522;
    color: #ffffff;
}

.btn-danger {
    background: #d14b4b;
    border-color: #b83e3e;
}

.btn-default {
    background: #ffffff;
    border-color: #c7e0f2;
    color: #246fa8;
}

.alert {
    border-radius: 14px;
}

.app-fixed-alert {
    box-shadow: 0 18px 42px rgba(31, 92, 130, 0.20);
    left: auto !important;
    margin: 0 !important;
    max-width: min(520px, calc(100vw - 32px));
    min-width: 300px;
    padding-right: 42px;
    position: fixed !important;
    right: 18px;
    top: 18px;
    width: auto;
    z-index: 3000;
}

.app-fixed-alert .app-alert-close {
    position: absolute;
    right: 14px;
    top: 10px;
}

.form-control {
    border-color: #c7e0f2;
    border-radius: 12px;
    box-shadow: none;
    min-height: 38px;
}

.form-control:focus {
    border-color: #62b4e8;
    box-shadow: 0 0 0 3px rgba(98, 180, 232, 0.18);
}

label {
    color: #334e68;
    font-weight: 700;
}

.table-responsive {
    padding: 0;
}

.table {
    margin-bottom: 0;
}

.table > thead > tr > th {
    background: #e8f5ff !important;
    border-color: #d7e8f6 !important;
    color: #1769a6;
    font-weight: 800;
}

.table > tbody > tr > td {
    border-color: #e5f0f8;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: #f8fcff;
}

.login-wrapper,
.signup-wrap {
    margin-top: 36px !important;
}

.profile-avatar {
    border: 4px solid #e8f5ff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(42, 111, 151, 0.14);
    display: block;
    height: 96px;
    margin-bottom: 12px;
    object-fit: cover;
    width: 96px;
}

.profile-avatar-empty {
    align-items: center;
    background: #e8f5ff;
    color: #3189c5;
    display: flex;
    font-size: 34px;
    justify-content: center;
}

.login-box {
    overflow: hidden;
    padding: 0 !important;
}

.login-box > form,
.login-box > .alert,
.login-box > div:not(.login-header) {
    margin-left: 26px;
    margin-right: 26px;
}

.login-header {
    background: #e7f4fd !important;
    border-radius: 18px 18px 0 0 !important;
    margin: 0 0 24px !important;
    padding: 24px 30px !important;
}

.login-header h2 {
    color: #1769a6 !important;
}

.login-header p {
    color: #607587 !important;
}

.input-group-addon {
    background: #3189c5 !important;
    border-color: #3189c5 !important;
    color: #ffffff !important;
    border-radius: 10px 0 0 10px;
}

.brand-title {
    color: #1f6fa9 !important;
}

@media (max-width: 991px) {
    .container-fluid .col-sm-3,
    .container-fluid .col-sm-9 {
        width: 100%;
    }

    .container-fluid .col-sm-3 {
        margin-bottom: 18px;
        padding-right: 0;
    }

    .list-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-group-item {
        border: 1px solid #e5f0f8;
        min-height: 42px;
    }
}

@media (max-width: 767px) {
    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    body {
        background: #f6fbff;
        font-size: 13px;
    }

    .container,
    .container-fluid {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    body > .container,
    body > .container-fluid,
    .app-header,
    .app-topbar,
    .hedrbtm,
    .app-shell,
    .container-fluid[style*="margin-top"] {
        left: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none !important;
        right: 0 !important;
        width: 100vw !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    [class*="col-xs-"],
    [class*="col-sm-"],
    [class*="col-md-"],
    [class*="col-lg-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .app-header .row,
    .app-header .col-sm-12 {
        display: flex;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .app-header {
        position: relative;
    }

    .app-brand {
        justify-content: space-between !important;
        min-height: auto;
        padding: 10px 12px;
        text-align: left;
    }

    .app-brand-split {
        display: flex;
    }

    .app-brand-main {
        justify-content: flex-start;
    }

    .app-brand-title {
        display: block !important;
        font-size: 18px;
    }

    .app-brand-subtitle {
        font-size: 10px;
        margin-top: 4px;
        white-space: normal;
    }

    .app-brand img {
        max-height: 46px;
        max-width: 170px;
    }

    .app-topbar .text-center,
    .app-topbar .pull-right,
    .app-topbar .pull-left,
    .hedrbtm .text-center,
    .hedrbtm .pull-right,
    .hedrbtm .pull-left {
        display: block;
        float: none !important;
        margin: 5px 0;
        text-align: left;
    }

    .app-topbar {
        padding: 4px 14px 6px;
        position: relative;
    }

    .app-menu-btn {
        display: inline-flex !important;
        float: none;
        height: 32px;
        margin: 0;
        width: 38px;
        z-index: 20;
    }

    .app-topbar .col-xs-12 {
        padding-left: 12px;
        padding-right: 12px;
    }

    .app-topbar > .col-sm-4:first-child {
        align-items: center;
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }

    .app-topbar > .col-sm-6:first-child {
        justify-content: center;
        min-height: 38px;
        width: 100%;
    }

    .app-topbar .pull-left {
        line-height: 18px;
        margin: 0;
        padding-right: 0;
        text-align: center;
    }

    .app-top-actions {
        display: none !important;
    }

    .app-session-actions {
        display: none !important;
    }

    .app-brand {
        padding-right: 12px;
    }

    .app-header-right {
        flex-wrap: wrap;
        gap: 8px 12px;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .app-brand-subtitle,
    .app-welcome {
        font-size: 11px;
    }

    .list-group {
        border-radius: 0;
        grid-template-columns: none !important;
        margin: 0;
        max-height: none;
        max-width: none;
        overflow-y: auto;
        box-shadow: none;
    }

    .app-sidebar-col {
        max-width: none;
        width: min(86vw, 340px) !important;
    }

    .app-drawer-actions {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .app-drawer-actions a {
        background: #e7f4fd;
        border: 1px solid #cce7f8;
        border-radius: 12px;
        color: #1769a6;
        font-weight: 700;
        padding: 10px 12px;
        text-align: center;
    }

    .app-sidebar-col .list-group-item {
        display: block;
        min-height: 0;
        width: 100%;
    }

    .list-group-item:hover {
        padding-left: 14px;
    }

    .page-header {
        font-size: 19px;
        margin: 10px 0 12px !important;
        padding-bottom: 8px;
    }

    .container-fluid[style*="margin-top:30px"],
    .app-shell {
        margin-top: 0 !important;
    }

    .container-fluid[style*="margin-top:30px"] > .row > .col-sm-12,
    .app-shell > .row > .col-sm-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .dash-tile {
        border-radius: 14px !important;
        min-height: 72px;
        padding: 12px !important;
    }

    .dash-tile h3 {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .dash-tile strong,
    .dash-tile small {
        font-size: 11px;
    }

    .panel,
    .table-responsive,
    .modern-card {
        border-radius: 14px !important;
        margin-bottom: 12px;
        width: 100%;
    }

    .panel {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .table-responsive {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .panel-body {
        padding: 14px;
    }

    .quick {
        display: grid;
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick .btn,
    .form-inline .btn,
    .form-inline .form-control {
        display: block;
        font-size: 12px;
        margin: 0 !important;
        min-height: 44px;
        padding: 10px 8px;
        width: 100%;
    }

    .form-inline .btn,
    .form-inline .form-control {
        margin-bottom: 10px !important;
    }

    .app-top-actions a {
        margin: 5px 10px 5px 0;
    }

    .table-responsive {
        border: 0;
        overflow-x: auto;
    }

    .section-title {
        margin: 14px 0 10px !important;
        padding: 9px 12px !important;
    }

    .profile-avatar {
        height: 74px;
        width: 74px;
    }

    .login-box > form,
    .login-box > .alert,
    .login-box > div:not(.login-header) {
        margin-left: 18px;
        margin-right: 18px;
    }

    .login-wrapper,
    .signup-wrap {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .form-control,
    textarea.form-control,
    select.form-control {
        width: 100%;
    }

    .app-fixed-alert {
        left: 10px !important;
        max-width: none;
        min-width: 0;
        right: 10px;
        top: 10px;
        width: auto;
    }
}

/* Final cascade: keep the refreshed UI above older Bootstrap-era rules. */
body {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem), linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%) !important;
    color: #172033;
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

.app-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #dbe4ee !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07) !important;
    position: sticky;
    top: 0;
    z-index: 900;
}

.app-brand-subtitle {
    background: #ecfdf5 !important;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #166534 !important;
    letter-spacing: 0;
    padding: 6px 10px;
    text-transform: none;
}

.app-welcome {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    color: #172033 !important;
    padding: 7px 11px;
    text-decoration: none !important;
}

.app-menu-btn {
    background: #2563eb !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.app-menu-btn span {
    background: #ffffff !important;
}

.app-sidebar-col {
    background: #0f172a !important;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.26) !important;
}

.app-drawer-head {
    background: #111827 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.app-drawer-close {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
}

.app-sidebar-col .list-group {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.app-sidebar-col .list-group-item {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}

.app-sidebar-col .list-group-item:hover,
.app-sidebar-col .list-group-item.app-current-link,
.app-sidebar-col .list-group-item.app-current-link * {
    background: rgba(37, 99, 235, 0.18) !important;
    border-left-color: #60a5fa !important;
    color: #ffffff !important;
}

.page-header {
    border-bottom: 0 !important;
    color: #172033 !important;
    font-size: 26px;
    letter-spacing: 0;
}

.modern-card,
.panel,
.table-responsive,
.login-box {
    background: #ffffff !important;
    border: 1px solid #dbe4ee !important;
    border-radius: 8px !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09) !important;
}

.panel-heading,
.panel-default > .panel-heading,
.panel-heading[style] {
    background: #f8fafc !important;
    border-bottom: 1px solid #dbe4ee !important;
    border-radius: 8px 8px 0 0 !important;
    color: #172033 !important;
}

.dash-tile {
    border: 1px solid #dbe4ee !important;
    border-radius: 8px !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09) !important;
}

.dash-tile:before {
    background: linear-gradient(180deg, #2563eb, #0f766e) !important;
    border-radius: 8px 0 0 8px !important;
}

.dash-tile h3,
.section-title {
    color: #172033 !important;
}

.section-title {
    background: transparent !important;
    border: 0 !important;
    border-left: 4px solid #2563eb !important;
    border-radius: 0 !important;
    font-size: 17px;
}

.btn,
.form-control {
    border-radius: 8px !important;
}

.btn-primary,
.btn-info {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
}

.btn-success {
    background: #0f766e !important;
    border-color: #0d625c !important;
}

.btn-warning {
    background: #b45309 !important;
    border-color: #92400e !important;
}

.btn-danger {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

.btn-default {
    background: #ffffff !important;
    border-color: #dbe4ee !important;
    color: #172033 !important;
}

.table > thead > tr > th {
    background: #f1f5f9 !important;
    color: #334155 !important;
    white-space: nowrap;
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick a {
    margin: 0 !important;
}

@media (max-width: 991px) {
    .container-fluid[style*="margin-top:30px"] .col-sm-9,
    .app-shell .col-sm-9 {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .stat-grid {
        display: grid !important;
        gap: 12px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        padding: 0 !important;
    }

    .stat-grid:before,
    .stat-grid:after {
        content: none !important;
        display: none !important;
    }

    .stat-grid > [class*="col-"] {
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: auto !important;
    }
}

@media (max-width: 767px) {
    .app-brand-subtitle,
    .app-welcome {
        display: none !important;
    }

    .page-header {
        display: flex;
        flex-direction: column;
        font-size: 21px !important;
        gap: 10px;
        line-height: 1.25;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-header .pull-right {
        display: flex;
        float: none !important;
        gap: 8px;
        width: 100%;
    }

    .page-header .pull-right .btn {
        flex: 1 1 150px;
    }

    .dash-tile {
        min-height: 86px !important;
        padding: 13px 10px !important;
        text-align: left !important;
    }

    .quick {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .app-header,
    .app-header .row,
    .app-header .col-sm-12,
    .app-brand,
    .app-brand-main {
        overflow: visible !important;
    }

    .app-header,
    .app-brand {
        background: #f7f7f4 !important;
    }

    .app-brand {
        min-height: 66px !important;
        padding-bottom: 8px !important;
        padding-top: 12px !important;
    }

    .app-brand img {
        background: transparent !important;
        border-radius: 0 !important;
        height: auto !important;
        max-height: 54px !important;
        max-width: 210px !important;
        object-fit: contain !important;
        padding: 0 !important;
        width: auto !important;
    }

    .quick .btn .glyphicon {
        border: 1px solid #1769c2 !important;
        border-radius: 50% !important;
        color: #1769c2 !important;
        font-size: 10px !important;
        height: 18px !important;
        line-height: 16px !important;
        text-align: center !important;
        width: 18px !important;
    }
}

/* Keep small headers clean: logo + menu only */
@media (max-width: 991px) {
    .app-header .app-brand-subtitle,
    .app-header .app-welcome {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
        width: 0 !important;
    }

    .app-header .app-brand,
    .app-header .app-brand-split {
        align-items: center !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    .app-header .app-header-right {
        align-items: center !important;
        display: flex !important;
        flex: 0 0 auto !important;
        gap: 0 !important;
        margin-left: auto !important;
        margin-top: 0 !important;
    }

    .app-header .app-menu-btn {
        display: inline-flex !important;
    }
}

@media (max-width: 991px) {
    .app-header .app-brand {
        position: relative !important;
        width: 100% !important;
    }

    .app-header .app-brand-main {
        padding-right: 54px !important;
        width: 100% !important;
    }

    .app-header .app-header-right {
        bottom: 0 !important;
        margin: auto 0 !important;
        position: absolute !important;
        right: 12px !important;
        top: 0 !important;
    }

    .app-header .app-menu-btn {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/* Final shared mobile header fix */
@media (max-width: 991px) {
    .app-header {
        background: #ffffff !important;
        border: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow: visible !important;
        position: relative !important;
        width: 100% !important;
    }

    .app-header > .row,
    .app-header > .row > .col-sm-12 {
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .app-header .app-brand,
    .app-header .app-brand-split {
        align-items: center !important;
        background: #ffffff !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        min-height: 72px !important;
        overflow: visible !important;
        padding: 12px 62px 12px 14px !important;
        position: relative !important;
        width: 100% !important;
    }

    .app-header .app-brand-main {
        align-items: center !important;
        display: flex !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        width: auto !important;
    }

    .app-header .app-brand img {
        background: transparent !important;
        border-radius: 0 !important;
        display: block !important;
        height: auto !important;
        max-height: 58px !important;
        max-width: 220px !important;
        object-fit: contain !important;
        overflow: visible !important;
        padding: 0 !important;
        width: auto !important;
    }

    .app-header .app-brand-subtitle,
    .app-header .app-welcome {
        display: none !important;
    }

    .app-header .app-header-right {
        align-items: center !important;
        bottom: auto !important;
        display: flex !important;
        height: 40px !important;
        justify-content: center !important;
        margin: 0 !important;
        position: absolute !important;
        right: 14px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 40px !important;
    }

    .app-header .app-menu-btn {
        background: #e7f4fd !important;
        border: 1px solid #bfddf2 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        display: inline-flex !important;
        height: 36px !important;
        margin: 0 !important;
        position: static !important;
        transform: none !important;
        width: 38px !important;
    }
}

/* Light mobile surface */
@media (max-width: 991px) {
    body,
    .app-header,
    .app-brand,
    .container-fluid[style*="margin-top"] {
        background: #ffffff !important;
    }

    .panel,
    .modern-card,
    .table-responsive,
    .employee-stats-grid {
        background: #ffffff !important;
    }

    .section-title,
    .panel-heading,
    .panel-default > .panel-heading {
        background: #f8fbff !important;
    }

    .app-sidebar-col {
        background: #ffffff !important;
        box-shadow: -12px 0 34px rgba(31, 92, 130, 0.16) !important;
        color: #213547 !important;
    }

    .app-drawer-head {
        background: #f8fbff !important;
        border-bottom: 1px solid #dbeaf5 !important;
        color: #1f3550 !important;
    }

    .app-drawer-head strong {
        color: #1f3550 !important;
    }

    .app-drawer-close {
        background: #eaf5ff !important;
        border: 1px solid #cce2f3 !important;
        color: #1769a6 !important;
    }

    .app-sidebar-col .list-group {
        background: #ffffff !important;
    }

    .app-sidebar-col .list-group-item {
        background: #ffffff !important;
        border-color: #e3edf7 !important;
        color: #33475b !important;
    }

    .app-sidebar-col .list-group-item *,
    .app-sidebar-col .list-group-item .glyphicon {
        color: inherit !important;
    }

    .app-sidebar-col .list-group-item:hover {
        background: #f2f8ff !important;
        color: #1769a6 !important;
    }

    .app-sidebar-col .list-group-item.app-current-link,
    .app-sidebar-col .list-group-item.active2,
    .app-sidebar-col .list-group-item.active3 {
        background: #e7f4fd !important;
        border-left: 3px solid #1769a6 !important;
        color: #123f67 !important;
    }

    .app-sidebar-backdrop {
        background: rgba(15, 32, 48, 0.24) !important;
    }
}

/* Final global menu panel color lock */
.app-sidebar-col {
    background: #ffffff !important;
    box-shadow: -12px 0 34px rgba(31, 92, 130, 0.16) !important;
    color: #213547 !important;
}

.app-drawer-head {
    background: #f8fbff !important;
    border-bottom: 1px solid #dbeaf5 !important;
    color: #1f3550 !important;
}

.app-drawer-head strong {
    color: #1f3550 !important;
}

.app-drawer-close {
    background: #eaf5ff !important;
    border: 1px solid #cce2f3 !important;
    color: #1769a6 !important;
}

.app-sidebar-col .list-group {
    background: #ffffff !important;
}

.app-sidebar-col .list-group-item {
    background: #ffffff !important;
    border-color: #e3edf7 !important;
    color: #33475b !important;
}

.app-sidebar-col .list-group-item *,
.app-sidebar-col .list-group-item .glyphicon {
    color: inherit !important;
}

.app-sidebar-col .list-group-item:hover {
    background: #f2f8ff !important;
    color: #1769a6 !important;
}

.app-sidebar-col .list-group-item.app-current-link,
.app-sidebar-col .list-group-item.active2,
.app-sidebar-col .list-group-item.active3 {
    background: #e7f4fd !important;
    border-left: 3px solid #1769a6 !important;
    color: #123f67 !important;
}
