/* Main color variables are stored here so the whole theme stays consistent. */
:root {
    --gso-green: #1f5fae;
    --gso-green-dark: #163f73;
    --gso-green-soft: #dceaff;
    --gso-gray: #6c757d;
    --gso-page: #f4f6f9;
}

/* Page-wide body styles control the default background and text color. */
body {
    background: linear-gradient(180deg, #d7e6ff 0%, #eaf2ff 20%, #f4f6f9 100%);
    color: #1f1a10;
    overflow-x: hidden;
}

/* Keep the page from creating unwanted horizontal scroll. */
html,
body {
    max-width: 100%;
    scrollbar-gutter: stable;
}

/* These wrappers make the app fill the full browser height. */
.app-shell {
    min-height: 100vh;
}

.app-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
}

/* The fixed header stays visible while the user scrolls the page. */
.app-header {
    position: fixed;
    top: 0;
    left: 16rem;
    right: 0;
    z-index: 1030;
    height: 4rem;
    min-height: 4rem;
    box-shadow: 0 10px 28px rgba(16, 43, 77, 0.16);
    overflow: visible;
}

/* Header inner layout keeps nav items aligned in one row. */
.app-header .container-fluid {
    height: 100%;
    overflow: visible;
}

.app-header .navbar-nav {
    height: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: visible;
}

.app-header .nav-item {
    display: flex;
    align-items: center;
    position: relative;
}

.app-sidebar-toggle {
    border: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 0.75rem;
    line-height: 1;
}

.app-sidebar-toggle:hover,
.app-sidebar-toggle:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* Sidebar colors separate navigation from page content. */
.bg-app-navbar {
    background: linear-gradient(90deg, #102b4d, var(--gso-green-dark), var(--gso-green));
}

.bg-app-sidebar {
    background: linear-gradient(180deg, #0d213d, #16385f 45%, var(--gso-green-dark) 100%);
}

/* The sidebar stays fixed on the left side of the screen. */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16rem;
    z-index: 1020;
    overflow: hidden;
    transition: width 0.22s ease, transform 0.22s ease;
}

/* Brand area shows the app name and the sidebar toggle button. */
.sidebar-brand {
    padding: 0.95rem 0.95rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    color: #eff6ff;
    text-decoration: none;
    min-width: 0;
}

.sidebar-brand .brand-text,
.sidebar-brand .brand-text.fw-semibold,
.sidebar-brand .brand-link .brand-text,
.sidebar-brand .brand-link .brand-text.fw-semibold,
.sidebar-menu .nav-link p,
.sidebar-menu .nav-link .fw-semibold {
    color: #eff6ff !important;
}

.brand-link:hover {
    color: #ffffff;
}

.brand-mark {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    flex: 0 0 2.2rem;
}

.brand-text {
    font-size: 1.15rem;
    line-height: 1.1;
    white-space: nowrap;
}

.sidebar-wrapper {
    height: calc(100% - 4.4rem);
    overflow-y: auto;
    padding: 0.55rem 0.45rem 0.7rem;
}

.sidebar-menu {
    gap: 0.18rem;
}

.sidebar-menu .nav-item {
    width: 100%;
}

.nav-badge {
    position: absolute;
    top: 3px;
    right: -6px;
    font-size: 0.65rem;
}

/* Sidebar links define the look of menu items and active states. */
.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 2.55rem;
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
    text-decoration: none;
    color: rgba(231, 242, 255, 0.94);
}

.sidebar-menu .nav-link.active {
    background: linear-gradient(90deg, rgba(108, 154, 214, 0.22), rgba(58, 96, 149, 0.14));
    border-left: 6px solid #6ea5e7;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(207, 226, 248, 0.1);
}

.sidebar-menu > .nav-item > a.nav-link.active {
    background: linear-gradient(90deg, rgba(255, 197, 96, 0.5), rgba(194, 126, 33, 0.22)) !important;
    border-left: 8px solid #ffd27a !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 232, 186, 0.34), 0 8px 18px rgba(12, 30, 56, 0.18) !important;
}

.sidebar-menu .nav-link p {
    margin: 0;
    white-space: nowrap;
}

.sidebar-menu .nav-link:hover {
    background: rgba(121, 174, 248, 0.2);
    color: #ffffff;
}

/* Group toggles open and close submenu sections in the sidebar. */
.sidebar-group-toggle {
    width: 100%;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 0;
    border-left: 4px solid transparent !important;
    box-shadow: none !important;
}

.sidebar-group-toggle.active:not([aria-expanded="true"]) {
    background: rgba(88, 122, 167, 0.14) !important;
    border-left: 4px solid rgba(145, 188, 248, 0.42) !important;
    color: rgba(241, 248, 255, 0.96) !important;
}

.sidebar-group-toggle.active[aria-expanded="true"] {
    background: linear-gradient(90deg, rgba(255, 197, 96, 0.5), rgba(194, 126, 33, 0.22)) !important;
    border-left: 8px solid #ffd27a !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 232, 186, 0.34), 0 8px 18px rgba(12, 30, 56, 0.18) !important;
}

.sidebar-group.is-open > .sidebar-group-toggle {
    background: linear-gradient(90deg, rgba(255, 197, 96, 0.5), rgba(194, 126, 33, 0.22)) !important;
    border-left: 8px solid #ffd27a !important;
    color: #ffffff !important;
}

.sidebar-group-toggle span {
    min-width: 0;
}

.sidebar-group-caret {
    font-size: 0.82rem;
    transition: transform 0.18s ease;
}

.sidebar-group.is-open .sidebar-group-caret {
    transform: rotate(180deg);
}

/* Submenu links are the child pages under a grouped navigation item. */
.sidebar-submenu {
    display: none;
    margin: 0.36rem 0 0.5rem;
    padding: 0.22rem 0.2rem 0.14rem 0.95rem;
    border-left: 1px solid rgba(225, 239, 255, 0.28);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(172, 210, 255, 0.05));
    border-radius: 0 0.9rem 0.9rem 0;
}

.sidebar-group.is-open .sidebar-submenu {
    display: block;
}

.sidebar-submenu-link {
    min-height: 2.15rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.8rem;
    color: #f8fbff !important;
    background: linear-gradient(180deg, rgba(132, 176, 235, 0.44), rgba(83, 126, 190, 0.34)) !important;
    gap: 0.65rem;
    margin-bottom: 0.24rem;
    border: 1px solid rgba(232, 242, 255, 0.22) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.sidebar-submenu-link:hover,
.sidebar-submenu-link:focus {
    background: linear-gradient(180deg, rgba(161, 204, 255, 0.56), rgba(101, 147, 213, 0.42)) !important;
    color: #ffffff !important;
}

.sidebar-submenu-link.active {
    background: linear-gradient(90deg, rgba(153, 205, 255, 0.95), rgba(89, 155, 238, 0.72)) !important;
    border-left: 4px solid #f4fbff !important;
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(12, 30, 56, 0.24) !important;
}

.sidebar-submenu-icon {
    width: 0.95rem;
    text-align: center;
    color: #f4f9ff;
    flex: 0 0 0.95rem;
}

.nav-icon {
    width: 1.15rem;
    text-align: center;
    flex: 0 0 1.15rem;
}

.app-main {
    margin-left: 16rem;
    padding-top: 4rem;
    min-height: 100vh;
    transition: margin-left 0.22s ease;
    overflow-x: hidden;
}

.app-content-header {
    padding: 1.4rem 0 0.4rem;
}

.app-content {
    padding-bottom: 1.5rem;
    transition: opacity 0.16s ease;
}

.app-content.content-loading {
    opacity: 0.82;
}

.sidebar-collapsed .app-sidebar {
    width: 4.8rem;
}

.sidebar-collapsed .app-main {
    margin-left: 4.8rem;
}

.sidebar-collapsed .app-header {
    left: 4.8rem;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .sidebar-menu .nav-link p,
.sidebar-collapsed .sidebar-group-caret,
.sidebar-collapsed .sidebar-submenu {
    display: none;
}

.sidebar-collapsed .brand-link {
    display: none;
}

.sidebar-collapsed .sidebar-brand-row {
    justify-content: center;
}

.sidebar-collapsed .brand-link,
.sidebar-collapsed .sidebar-menu .nav-link {
    justify-content: center;
}

.sidebar-collapsed .sidebar-menu .nav-link {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.sidebar-collapsed .sidebar-menu .nav-link .nav-icon {
    margin-right: 0;
    font-size: 1rem;
}

.metric-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(22, 63, 115, 0.12);
}

.metric-card .card-body {
    background: #fffdf7;
    color: #221a08;
}

.borrowing-metric-link {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.borrowing-metric-link .card-body {
    transition: background-color 0.18s ease;
}

.borrowing-metric-link:hover,
.borrowing-metric-link:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(22, 63, 115, 0.2);
    outline: 0;
}

.borrowing-metric-link:hover .card-body,
.borrowing-metric-link:focus-visible .card-body {
    background: #f4fff7;
}

.borrowing-metric-cue {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--gso-green);
    background: var(--gso-green-soft);
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.borrowing-metric-link:hover .borrowing-metric-cue,
.borrowing-metric-link:focus-visible .borrowing-metric-cue {
    transform: translateX(3px);
    color: #ffffff;
    background: var(--gso-green);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gso-green-soft);
    color: var(--gso-green);
}

.settings-tabs,
.nav.nav-tabs.settings-tabs {
    --tab-border: rgba(22, 63, 115, 0.12);
    border: 1px solid var(--tab-border);
    border-radius: 1.15rem;
    padding: 0.55rem;
    gap: 0.45rem;
    display: flex;
    flex-wrap: nowrap !important;
    align-items: stretch;
    width: max-content;
    min-width: 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 95, 174, 0.35) transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 245, 255, 0.92)),
        linear-gradient(135deg, rgba(188, 212, 245, 0.38), rgba(255, 244, 220, 0.28));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.settings-tabs::-webkit-scrollbar,
.nav.nav-tabs.settings-tabs::-webkit-scrollbar {
    height: 0.5rem;
}

.settings-tabs::-webkit-scrollbar-track,
.nav.nav-tabs.settings-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.settings-tabs::-webkit-scrollbar-thumb,
.nav.nav-tabs.settings-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 95, 174, 0.28);
}

.settings-tabs .nav-item,
.nav.nav-tabs.settings-tabs .nav-item {
    flex: 0 0 auto;
    margin-bottom: 0;
    min-width: max-content;
}

.settings-tabs .nav-link,
.nav.nav-tabs.settings-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 0.9rem;
    color: #214c82;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(221, 233, 250, 0.92));
    font-weight: 600;
    white-space: nowrap;
    padding: 0.72rem 1rem;
    line-height: 1.15;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
    margin: 0 !important;
}

.settings-tabs .nav-link:hover,
.settings-tabs .nav-link:focus,
.nav.nav-tabs.settings-tabs .nav-link:hover,
.nav.nav-tabs.settings-tabs .nav-link:focus {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(205, 225, 251, 0.98));
    border-color: rgba(31, 95, 174, 0.18);
    color: #153860;
    transform: translateY(-1px);
}

.settings-tabs .nav-link.active,
.nav.nav-tabs.settings-tabs .nav-link.active,
.card-header-tabs.settings-tabs .nav-link.active {
    background: linear-gradient(135deg, #1b4f90, #2b6cb0 62%, #4d8ad0);
    border-color: rgba(17, 52, 94, 0.18);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(22, 63, 115, 0.18);
}

.card-header > .settings-tabs,
.card-header > .card-header-tabs.settings-tabs {
    margin-top: 0.2rem;
    max-width: 100%;
}

.card-header-tabs.settings-tabs {
    margin-right: 0 !important;
    margin-left: 0 !important;
    border-bottom: 1px solid var(--tab-border) !important;
}

.report-tabs-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 95, 174, 0.35) transparent;
}

.report-tabs-scroll::-webkit-scrollbar {
    height: 0.5rem;
}

.report-tabs-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.report-tabs-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 95, 174, 0.3);
}

.report-tabs-scroll > .settings-tabs {
    width: max-content;
    min-width: 100%;
    overflow: visible;
}

.card-header {
    overflow-x: hidden;
}

.btn-success {
    background-color: var(--gso-green);
    border-color: var(--gso-green);
    color: #fffaf0;
    font-weight: 600;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #184f92;
    border-color: #184f92;
    color: #fffaf0;
}

.btn-outline-success {
    color: var(--gso-green-dark);
    border-color: #184f92;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background-color: var(--gso-green);
    border-color: var(--gso-green);
    color: #fffaf0;
}

.btn-outline-secondary {
    color: #163f73;
    border-color: #8eb4e8;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: var(--gso-green-soft);
    border-color: #184f92;
    color: #102b4d;
}

.card-section {
    border: 1px solid rgba(22, 63, 115, 0.12);
    border-radius: 1rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    background: #fffdf8;
}

.report-filter-form > [class*="col-"] {
    flex: 1 1 180px;
}

.report-filter-form .report-filter-reset {
    flex: 0 0 auto;
    width: auto;
    min-width: fit-content;
}

.modal-backdrop.show {
    opacity: 0.45;
}

.modal-dialog {
    margin-top: 2.25rem;
    margin-bottom: 2.25rem;
}

.modal-content {
    border: 1px solid rgba(22, 63, 115, 0.18);
    border-radius: 1.4rem;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 30px 76px rgba(16, 43, 77, 0.26);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.3rem 1.4rem 0.9rem;
    background: linear-gradient(180deg, rgba(177, 206, 247, 0.72) 0%, rgba(233, 242, 255, 0.98) 58%, rgba(255, 255, 255, 0.98) 100%);
    border-bottom: 1px solid rgba(22, 63, 115, 0.12);
}

.modal-title,
.modal-header h4 {
    color: #133154;
    font-weight: 700;
}

.modal-body {
    padding: 1.4rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 255, 0.96) 100%);
}

.modal-footer {
    padding: 1rem 1.4rem 1.35rem;
    background: linear-gradient(180deg, rgba(243, 248, 255, 0.72) 0%, rgba(226, 238, 255, 0.92) 100%);
    border-top: 1px solid rgba(22, 63, 115, 0.12);
}

.modal .btn-close {
    width: 2.2rem;
    height: 2.2rem;
    margin: 0 0 0 auto;
    border-radius: 999px;
    background-color: rgba(23, 55, 95, 0.06);
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(22, 63, 115, 0.08);
    flex: 0 0 auto;
}

.modal .btn-close:hover,
.modal .btn-close:focus {
    background-color: rgba(23, 55, 95, 0.12);
    box-shadow: inset 0 0 0 1px rgba(22, 63, 115, 0.14);
}

.modal .form-label {
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #173c68;
}

.modal .form-control,
.modal .form-select,
.modal textarea.form-control {
    min-height: 3rem;
    border-radius: 0.85rem;
    background-color: #ffffff;
    border-color: #84a9dd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.modal textarea.form-control {
    min-height: 7rem;
}

.modal .form-control:hover,
.modal .form-select:hover,
.modal textarea.form-control:hover {
    border-color: #5b8ecf;
}

.modal .form-control:focus,
.modal .form-select:focus,
.modal textarea.form-control:focus {
    border-color: #1f5fae;
    box-shadow: 0 0 0 0.22rem rgba(31, 95, 174, 0.16);
}

.modal .form-control::placeholder,
.modal .form-select::placeholder {
    color: #7f91a8;
}

.modal .text-muted {
    color: #546c8d !important;
}

body.modal-open,
body.modal-open .app-header,
body.modal-open .app-sidebar {
    padding-right: 0 !important;
}

.table thead th {
    background: linear-gradient(90deg, #dbeaff, #bed6fb);
    color: #143355;
    border-bottom-width: 1px;
}

.table td,
.table th,
.form-label,
.dropdown-item,
.card-header h5,
.fw-semibold {
    color: #2d230b;
}

.text-muted,
.small.text-muted {
    color: #48586f !important;
}

.form-control,
.form-select {
    background-color: #fffdf8;
    border-color: #97b8e1;
    color: #241b07;
}

.form-control:focus,
.form-select:focus {
    border-color: #184f92;
    box-shadow: 0 0 0 0.2rem rgba(31, 95, 174, 0.18);
}

.badge.text-bg-success,
.badge.text-bg-danger,
.badge.text-bg-warning,
.badge.text-bg-secondary,
.badge.text-bg-dark {
    font-weight: 600;
}

.timeline-list {
    border-left: 3px solid #a8c8f5;
    margin-left: 0.75rem;
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.42rem;
    top: 0.2rem;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--gso-green);
}

.filter-row .form-select,
.filter-row .form-control {
    min-width: 160px;
}

.hero-banner {
    border-radius: 1.2rem;
    padding: 1.4rem;
    color: white;
    background: linear-gradient(120deg, #0d2748, var(--gso-green-dark) 35%, #1a4f8d 78%, var(--gso-green) 100%);
    box-shadow: 0 18px 38px rgba(16, 43, 77, 0.28);
}

.dashboard-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.7rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(239, 246, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.dashboard-hero-chip {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-hero-chip strong {
    display: block;
    font-size: 1rem;
    color: #ffffff;
}

.dashboard-hero-chip-label {
    display: block;
    margin-bottom: 0.2rem;
    color: rgba(226, 236, 248, 0.78);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-metric-card .card-body {
    padding: 1.25rem;
}

.dashboard-metric-note {
    margin-top: 0.35rem;
    color: #5a6f88;
    font-size: 0.85rem;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.dashboard-action-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 148px;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid rgba(100, 141, 194, 0.16);
    box-shadow: 0 14px 28px rgba(22, 63, 115, 0.08);
    color: #173152;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-action-card:hover,
.dashboard-action-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(22, 63, 115, 0.12);
    border-color: rgba(56, 106, 176, 0.28);
    color: #173152;
}

.dashboard-action-card strong {
    font-size: 1rem;
}

.dashboard-action-card small {
    color: #627791;
    font-size: 0.84rem;
    line-height: 1.45;
}

.dashboard-action-card.is-primary {
    background: linear-gradient(135deg, #163f73 0%, #1f5fae 100%);
    color: #ffffff;
}

.dashboard-action-card.is-primary small {
    color: rgba(235, 243, 255, 0.82);
}

.dashboard-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 0.9rem;
    background: rgba(31, 95, 174, 0.1);
    color: #1f5fae;
    font-size: 1rem;
}

.dashboard-action-card.is-primary .dashboard-action-icon {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.dashboard-alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fffaf1 0%, #fffdf8 100%);
    border: 1px solid rgba(219, 181, 94, 0.24);
}

.dashboard-insight-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dashboard-insight-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
    border: 1px solid rgba(96, 132, 184, 0.16);
}

.dashboard-insight-card strong {
    font-size: 1.05rem;
    color: #173152;
}

.dashboard-insight-card small {
    color: #617791;
    line-height: 1.45;
}

.dashboard-insight-label {
    color: #6d8097;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.analytics-hero-banner {
    background: linear-gradient(125deg, #112b4d 0%, #184f86 55%, #2f7f9d 100%);
}

.analytics-filter-card .card-body {
    padding: 1.15rem 1.2rem;
}

.login-screen {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(122, 185, 255, 0.28), transparent 34%),
        radial-gradient(circle at 85% 18%, rgba(255, 207, 124, 0.16), transparent 24%),
        linear-gradient(140deg, #d9e7ff 0%, #e8f2ff 22%, #eef7f4 52%, #f4f7fb 100%);
}

.login-page.login-screen {
    min-height: 100vh;
    height: auto !important;
    justify-content: flex-start;
    padding: clamp(1rem, 3vw, 1.75rem) 0;
}

.login-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(13, 39, 72, 0.08), transparent 32%),
        linear-gradient(300deg, rgba(31, 95, 174, 0.08), transparent 28%);
    pointer-events: none;
}

.login-screen-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.75;
    pointer-events: none;
}

.login-screen-glow-left {
    width: 280px;
    height: 280px;
    top: 10%;
    left: 18%;
    background: rgba(105, 168, 243, 0.24);
}

.login-screen-glow-right {
    width: 320px;
    height: 320px;
    right: 16%;
    bottom: 12%;
    background: rgba(117, 204, 171, 0.2);
}

.login-shell {
    position: relative;
    width: min(420px, calc(100vw - 2rem));
    z-index: 1;
}

.login-card {
    border-radius: 1.35rem;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.97)),
        linear-gradient(135deg, rgba(255, 207, 124, 0.08), rgba(105, 168, 243, 0.08));
    border: 1px solid rgba(177, 203, 238, 0.7);
    box-shadow:
        0 34px 80px rgba(16, 43, 77, 0.2),
        0 14px 30px rgba(31, 95, 174, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.login-card-header {
    position: relative;
    background:
        linear-gradient(180deg, rgba(204, 224, 255, 0.7), rgba(255, 255, 255, 0.98)),
        linear-gradient(120deg, rgba(13, 39, 72, 0.08), transparent 42%);
}

.login-card-header::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 120px;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle, rgba(92, 151, 230, 0.22), transparent 60%),
        radial-gradient(circle at 30% 50%, rgba(255, 175, 74, 0.18), transparent 42%);
    filter: blur(10px);
    pointer-events: none;
}

.login-card-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.login-logo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    flex: 0 0 120px;
}

.login-logo-wrap::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(221, 234, 255, 0.65) 52%, rgba(176, 206, 247, 0.24) 72%, transparent 100%);
    box-shadow:
        0 18px 32px rgba(31, 95, 174, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.login-card .login-logo-wrap .login-logo-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    min-width: 120px;
    min-height: 120px;
    object-fit: contain !important;
    flex: 0 0 120px;
    filter:
        drop-shadow(0 16px 24px rgba(16, 43, 77, 0.16))
        drop-shadow(0 4px 10px rgba(255, 255, 255, 0.4));
}

.chart-panel {
    position: relative;
    min-height: 340px;
    height: 340px;
}

.chart-panel.chart-panel-lg {
    min-height: 380px;
    height: 380px;
}

.chart-panel canvas {
    width: 100% !important;
    height: 100% !important;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: start;
}

.settings-key {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #2d230b;
    font-size: 0.92rem;
}

.settings-value {
    text-align: left;
    font-weight: 700;
    color: #163f73;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.35;
}

.request-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0 0.75rem;
}

.request-hero-text {
    color: #5c708c;
}

.request-open-btn {
    border-radius: 0.7rem;
    padding-inline: 1.05rem;
}

.request-card-shell {
    overflow: hidden;
}

.request-card-header {
    background: transparent;
    padding: 1.15rem 1.25rem 0.25rem;
}

.request-filter-bar .form-select {
    min-width: 160px;
    background-color: #fff;
}

.request-filter-bar {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
}

.request-filter-bar .form-select {
    width: 190px;
    flex: 0 0 190px;
}

.request-filter-bar .btn {
    flex: 0 0 auto;
}

.monitoring-filter-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.monitoring-filter-fields {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex: 1 1 720px;
    flex-wrap: wrap;
}

.monitoring-filter-field {
    flex: 0 1 230px;
    min-width: 180px;
}

.monitoring-filter-field-wide {
    flex-basis: 320px;
}

.monitoring-filter-field .form-control,
.monitoring-filter-field .form-select {
    width: 100%;
}

.monitoring-filter-action {
    margin-left: auto;
    flex: 0 0 auto;
    align-self: flex-end;
}

.monitoring-filter-action .btn {
    min-width: 140px;
}

.request-table-wrap {
    padding-top: 0.15rem;
}

.request-table {
    border-collapse: collapse;
    border-spacing: 0;
}

.request-table thead th {
    background: #edf4ff;
    color: #11345e;
}

.request-table tbody td {
    border-bottom: 1px solid #e3edf9;
    vertical-align: middle;
}

.request-code-chip {
    color: #184f92;
    font-weight: 700;
}

.request-type-pill {
    color: #2e5a90;
    font-weight: 700;
    font-size: 0.88rem;
}

.request-modal-shell {
    border: 0;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(16, 43, 77, 0.14);
}

.request-items-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6587b4;
    font-weight: 700;
    margin: 1rem 0 0.85rem;
}

.request-item-block {
    padding: 0.9rem;
    margin-bottom: 0.9rem;
    border-radius: 0.8rem;
    background: #f8fbff;
    border: 1px solid #dce8f9;
}

.request-item-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.request-item-index {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4f74a4;
    font-weight: 700;
}

.request-item-remove[hidden] {
    display: none !important;
}

.request-detail-grid > div {
    padding: 0.4rem 0;
}

@media (max-width: 991px) {
    .app-header {
        left: 0;
    }

    .app-sidebar {
        transform: translateX(-100%);
        width: 16rem;
    }

    .app-main {
        margin-left: 0;
    }

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

    .sidebar-open-mobile::before {
        content: '';
        position: fixed;
        inset: 4rem 0 0 0;
        background: rgba(7, 18, 34, 0.35);
        z-index: 1010;
    }

    .request-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .request-filter-bar {
        flex-wrap: wrap !important;
    }

    .monitoring-filter-toolbar,
    .monitoring-filter-fields {
        align-items: stretch;
    }

    .monitoring-filter-field,
    .monitoring-filter-field-wide,
    .monitoring-filter-action {
        flex: 1 1 100%;
        min-width: 0;
        margin-left: 0;
    }

    .settings-tabs {
        padding: 0.45rem;
        gap: 0.35rem;
    }

    .settings-tabs .nav-link {
        padding: 0.65rem 0.9rem;
        font-size: 0.94rem;
    }
}
.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.6rem !important;
    border-radius: 999px;
}

.account-chip:hover,
.account-chip:focus {
    background: rgba(255, 255, 255, 0.12);
}

.account-chip-avatar,
.account-dropdown-avatar,
.profile-hero-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #d7e7ff, #8ab6ff);
    color: #12345f;
    font-weight: 700;
}

.account-chip-avatar {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    flex-shrink: 0;
}

.account-chip-avatar img,
.account-dropdown-avatar img,
.profile-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-chip-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.account-chip-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.account-chip-role {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.74);
}

.account-dropdown {
    border: 0;
    border-radius: 1.5rem;
    padding: 0;
    width: min(380px, calc(100vw - 1.25rem));
    overflow: hidden;
    box-shadow: 0 28px 65px rgba(12, 31, 61, 0.22);
    background: #f8fbff;
}

.account-dropdown-card {
    padding: 1rem;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.account-dropdown-hero {
    padding: 2rem 1.25rem 1.2rem;
    margin-bottom: 0.9rem;
    border-radius: 1.25rem;
    text-align: center;
    background: linear-gradient(180deg, #dcecf3 0%, #eef7fb 100%);
    border: 1px solid rgba(110, 172, 196, 0.18);
}

.account-dropdown-avatar {
    width: 86px;
    height: 86px;
    margin: 0 auto 0.9rem;
    box-shadow: 0 14px 28px rgba(39, 92, 168, 0.14);
}

.account-dropdown-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #183153;
}

.account-dropdown-email {
    margin-top: 0.2rem;
    color: #60748f;
    font-size: 0.9rem;
}

.account-dropdown-role {
    margin-top: 0.4rem;
    color: #466b86;
    font-size: 0.82rem;
    font-weight: 600;
}

.account-dropdown-actions {
    padding: 0.15rem 0;
}

.account-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    color: #183153;
    text-align: left;
    font-size: 1rem;
}

.account-dropdown .dropdown-item:hover,
.account-dropdown .dropdown-item:focus {
    background: #edf4ff;
}

.account-dropdown-primary {
    font-weight: 600;
}

.account-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: #eef3fa;
    color: #4c6176;
    flex-shrink: 0;
}

.account-action-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.account-action-title {
    font-weight: 700;
    color: #183153;
}

.account-action-subtitle {
    margin-top: 0.2rem;
    font-size: 0.84rem;
    color: #6b7f95;
}

.account-dropdown .dropdown-item.text-danger .account-action-icon {
    background: #fdecef;
    color: #c7354e;
}

.account-dropdown .dropdown-item.text-danger .account-action-title {
    color: #c7354e;
}

.account-dropdown-divider {
    height: 1px;
    margin: 0.55rem 0;
    background: rgba(73, 111, 146, 0.16);
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-hero-avatar {
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    box-shadow: 0 16px 30px rgba(39, 92, 168, 0.16);
}

.profile-hero-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #183153;
}

.profile-hero-email {
    color: #60748f;
}

.avatar-cropper-shell {
    display: flex;
    justify-content: center;
}

.avatar-crop-modal-dialog {
    max-width: 250px;
}

#avatarCropModal .modal-content {
    border-radius: 0.85rem;
}

#avatarCropModal .modal-header {
    padding: 0.5rem 0.7rem 0;
}

#avatarCropModal .modal-body {
    padding: 0.5rem 0.7rem 0.4rem;
}

#avatarCropModal .modal-footer {
    padding: 0 0.7rem 0.55rem;
}

#avatarCropModal .modal-footer .btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
}

.avatar-cropper-stage {
    position: relative;
    width: 132px;
    height: 132px;
    overflow: hidden;
    border-radius: 0.8rem;
    background:
        linear-gradient(135deg, rgba(47, 105, 177, 0.12), rgba(28, 55, 93, 0.18)),
        #eef5ff;
    box-shadow: inset 0 0 0 1px rgba(24, 49, 83, 0.08);
    cursor: grab;
}

.avatar-cropper-stage.is-dragging {
    cursor: grabbing;
}

.avatar-cropper-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid rgba(255, 255, 255, 0.88);
    border-radius: 0.8rem;
    box-shadow: inset 0 0 0 999px rgba(11, 30, 56, 0.08);
    pointer-events: none;
}

.avatar-cropper-stage img {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    user-select: none;
    -webkit-user-drag: none;
    max-width: none;
    max-height: none;
}

.avatar-crop-controls {
    margin-top: 0.45rem;
}

.avatar-crop-controls .form-label {
    font-size: 0.78rem;
}

.avatar-crop-controls .form-range {
    transform: scaleY(0.85);
    transform-origin: center;
}

@media (max-width: 767.98px) {
    .dashboard-hero-grid,
    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }

    .account-chip-meta {
        display: none;
    }

    .account-dropdown {
        width: min(320px, calc(100vw - 1rem));
    }

    .avatar-crop-modal-dialog {
        max-width: 235px;
    }

    .avatar-cropper-stage {
        width: 120px;
        height: 120px;
    }
}
