:root {
    --erp-ink: #162033;
    --erp-muted: #64748b;
    --erp-panel: #ffffff;
    --erp-border: #d7e0ea;
    --erp-teal: #0f766e;
    --erp-blue: #2563eb;
    --erp-gold: #b7791f;
    --erp-rose: #be123c;
    --erp-primary: #0f5f80;
    --erp-primary-dark: #17324d;
    --erp-accent: #0f766e;
    --erp-bg: #f4f7fb;
    --erp-card-bg: #ffffff;
    --erp-text: #162033;
}

body {
    background-color: #f5f6f8;
    color: var(--erp-ink);
    font-size: 14px;
}

body.erp-app-shell {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f7fbff 0%, #f5f7fb 46%, #f3f8f4 100%);
}

.erp-navbar {
    background: linear-gradient(90deg, #0f766e 0%, #1f6f8b 42%, #385170 72%, #9a5b13 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.erp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.erp-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 8px;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
    font-size: 12px;
    font-weight: 800;
}

.erp-brand-logo {
    display: block;
    width: auto;
    max-width: 190px;
    height: 34px;
    object-fit: contain;
}

.erp-navbar .nav-link {
    border-radius: 8px;
    color: rgba(255, 255, 255, .86);
    font-weight: 600;
    padding-left: .75rem;
    padding-right: .75rem;
}

.erp-navbar .nav-link:hover,
.erp-navbar .nav-link:focus,
.erp-navbar .nav-link.show {
    background: rgba(255, 255, 255, .15);
    color: #ffffff;
}

.erp-session-area {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 12px;
}

.erp-session-pill {
    max-width: min(42vw, 520px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .12);
}

.erp-logout-btn {
    border-radius: 8px;
    font-weight: 700;
}

.erp-main {
    padding: 18px 18px 22px;
}

.erp-footer {
    border-top: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 -8px 22px rgba(15, 23, 42, .05);
}

.erp-page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #fffaf0 100%);
    border: 1px solid var(--erp-border);
    border-left: 5px solid var(--erp-teal);
    padding: 17px 20px;
    border-radius: 14px;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.erp-page-header h1,
.erp-page-header h2,
.erp-page-header h3,
.erp-page-header h4 {
    color: #12213a;
    font-weight: 800;
    margin-bottom: 3px;
}

.erp-card {
    border: 1px solid var(--erp-border);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.card {
    border-color: var(--erp-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.table th {
    background-color: #eef5f7;
    color: #172033;
}

.form-control,
.form-select {
    border-color: #cfd9e6;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erp-teal);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15);
}

.form-label {
    font-weight: 600;
    color: #26364f;
}

.required::after {
    content: " *";
    color: red;
}

.footer {
    font-size: 13px;
}

.dropdown-menu {
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}

/* The Reports menu has many groups; keep its top-level list within the viewport. */
.reports-dropdown-menu {
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    overflow-x: hidden;
}

@media (min-width: 992px) {
    /* Keep Reports children inside its scroll container instead of clipping fly-outs. */
    .reports-dropdown-menu > .dropdown-submenu > .dropdown-menu {
        position: static;
        top: auto;
        left: auto;
        min-width: 0;
        margin: 0 0 .25rem .75rem;
    }
}

.dropdown-item {
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #eef8f7;
    color: #0f5f59;
}

.dropdown-header {
    color: var(--erp-rose);
    font-weight: 800;
}

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

/* ERP UI Phase 1 foundation */
.erp-page {
    display: grid;
    gap: 14px;
}

.erp-page-title {
    color: var(--erp-primary-dark);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.erp-page-subtitle,
.erp-muted {
    color: var(--erp-muted) !important;
}

.erp-filter-card {
    border: 1px solid #d6e0ea;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.erp-filter-card .card-body {
    padding: 16px;
}

.erp-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.erp-table-wrap {
    overflow-x: auto;
}

.erp-table {
    margin-bottom: 0;
    border-color: #d7e2ec;
}

.erp-table thead th {
    background: linear-gradient(180deg, #edf6f8 0%, #e5eef4 100%);
    color: #1b3048;
    border-bottom: 1px solid #c6d5e2;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .025em;
    vertical-align: middle;
    white-space: nowrap;
}

.erp-table tbody td {
    vertical-align: middle;
}

.erp-table.table-hover tbody tr:hover {
    background-color: #f2f8fb;
}

.erp-form-section {
    padding: 14px;
    border: 1px solid var(--erp-border);
    border-radius: 14px;
    background-color: #ffffff;
}

.erp-section-title {
    margin-bottom: 10px;
    color: var(--erp-primary-dark);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.erp-summary-card {
    border-left: 4px solid var(--erp-accent);
}

.erp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c7d7e5;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f4f9fb;
    color: #24445b;
    font-size: 12px;
    font-weight: 700;
}

.erp-btn-primary,
.btn-primary {
    border-color: #0f6f88;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .16);
}

.erp-btn-primary:hover,
.erp-btn-primary:focus,
.btn-primary:hover,
.btn-primary:focus {
    border-color: #0b5f70;
    background: linear-gradient(135deg, #0b5f59, #1d4ed8);
}

.erp-pager {
    border-radius: 14px;
}

.erp-pager .card-body {
    padding: 10px 14px;
}

.erp-pager-summary,
.report-page-summary {
    color: #475569;
    font-weight: 700;
}

.erp-report-surface {
    border: 1px solid #d7e2ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.erp-print-header {
    border-bottom: 1px solid #d7e2ec;
    padding-bottom: 10px;
}

.alert {
    border-radius: 12px;
}

.validation-summary-valid.alert,
.alert:empty {
    display: none;
}

.btn-dark {
    background: linear-gradient(135deg, #0f766e, #2563eb);
    border-color: #0f766e;
}

.btn-dark:hover,
.btn-dark:focus {
    background: linear-gradient(135deg, #0b5f59, #1d4ed8);
    border-color: #0b5f59;
}

.btn-info {
    background: #f6c65b;
    border-color: #eab54a;
    color: #1f2937;
}

.btn-info:hover,
.btn-info:focus {
    background: #e9ad33;
    border-color: #d99b25;
    color: #111827;
}

.account-list-panel {
    height: 310px;
    overflow-y: auto;
}

.account-table tbody tr {
    cursor: pointer;
}

    .account-table tbody tr:hover {
        background-color: #e9f2ff;
    }

.table-primary td {
    font-weight: 600;
}

.account-list-panel {
    height: 310px;
    overflow-y: auto;
}

.account-table tbody tr {
    cursor: pointer;
}

    .account-table tbody tr:hover {
        background-color: #e9f2ff;
    }

.table-primary td {
    font-weight: 600;
}

.erp-page-header .btn {
    margin-left: 4px;
}

@media print {
    .navbar,
    .footer,
    .no-print,
    .btn {
        display: none !important;
    }

    body {
        background-color: #ffffff !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .table th {
        background-color: #efefef !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.product-list-panel {
    max-height: 360px;
    overflow-y: auto;
}

    .product-list-panel table tbody tr:hover {
        background-color: #eef5ff;
    }

.account-lov-list {
    position: absolute;
    z-index: 3000;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 4px;
}

.account-lov-item {
    padding: 7px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eeeeee;
}

    .account-lov-item:hover {
        background-color: #eef5ff;
    }

.lov-list {
    position: absolute;
    z-index: 4000;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 4px;
}

.lov-item {
    padding: 7px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eeeeee;
}

.lov-item:hover {
    background-color: #eef5ff;
}

#purchaseLinesTable input[readonly] {
    background-color: #f8f9fa;
}

.action-nowrap {
    white-space: nowrap;
}

.action-nowrap .btn {
    margin-right: 2px;
}

.transaction-grid {
    min-width: 1350px;
    table-layout: fixed;
}

    .transaction-grid th,
    .transaction-grid td {
        vertical-align: middle;
    }

    .transaction-grid input.form-control {
        min-width: 75px;
    }

    .transaction-grid .product-search {
        min-width: 260px;
    }

    .transaction-grid .btn-remove-line {
        width: 34px;
        padding-left: 0;
        padding-right: 0;
    }

    .transaction-grid .action-col {
        width: 45px;
        min-width: 45px;
        text-align: center;
    }

    .dropdown-submenu > .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
    }

/* Bootstrap 5 nested dropdown submenu fix */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        margin-top: -1px;
        margin-left: 0;
        min-width: 260px;
        z-index: 3000;
    }

    .dropdown-submenu.show > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu > .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
        transform: rotate(-90deg);
    }

/* Mobile / collapsed navbar support */
@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        left: auto;
        top: auto;
        margin-left: 15px;
        margin-top: 0;
        min-width: 100%;
        border-left: 2px solid #dee2e6;
    }

    .dropdown-submenu > .dropdown-toggle::after {
        transform: rotate(0deg);
    }
}

.report-lov-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2000;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
}

.report-lov-item {
    padding: 7px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

    .report-lov-item:hover {
        background: #f2f6ff;
    }

/* Sale and Sale Return product grid compact layout */
.sale-table-wrap {
    overflow-x: visible;
}

.sale-transaction-grid {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
}

    .sale-transaction-grid th,
    .sale-transaction-grid td {
        padding: 4px !important;
        vertical-align: middle;
    }

    .sale-transaction-grid input.form-control {
        min-width: 0 !important;
        padding: 4px 5px;
        font-size: 12px;
    }

    .sale-transaction-grid .product-search {
        min-width: 0 !important;
    }

    .sale-transaction-grid .btn-remove-line {
        width: 30px;
        padding-left: 0;
        padding-right: 0;
    }

/* Sale invoice column widths */
.sale-invoice-grid th:nth-child(1) {
    width: 22% !important;
}

.sale-invoice-grid th:nth-child(2) {
    width: 5% !important;
}

.sale-invoice-grid th:nth-child(3) {
    width: 5% !important;
}

.sale-invoice-grid th:nth-child(4) {
    width: 6% !important;
}

.sale-invoice-grid th:nth-child(5) {
    width: 6% !important;
}

.sale-invoice-grid th:nth-child(6) {
    width: 6% !important;
}

.sale-invoice-grid th:nth-child(7) {
    width: 7% !important;
}

.sale-invoice-grid th:nth-child(8) {
    width: 5% !important;
}

.sale-invoice-grid th:nth-child(9) {
    width: 7% !important;
}

.sale-invoice-grid th:nth-child(10) {
    width: 7% !important;
}

.sale-invoice-grid th:nth-child(11) {
    width: 5% !important;
}

.sale-invoice-grid th:nth-child(12) {
    width: 7% !important;
}

.sale-invoice-grid th:nth-child(13) {
    width: 7% !important;
}

.sale-invoice-grid th:nth-child(14) {
    width: 3% !important;
}

/* Sale return column widths */
.sale-return-grid th:nth-child(1) {
    width: 19% !important;
}

.sale-return-grid th:nth-child(2) {
    width: 5.5% !important;
}

.sale-return-grid th:nth-child(3) {
    width: 4.5% !important;
}

.sale-return-grid th:nth-child(4) {
    width: 4.5% !important;
}

.sale-return-grid th:nth-child(5) {
    width: 5.5% !important;
}

.sale-return-grid th:nth-child(6) {
    width: 5.5% !important;
}

.sale-return-grid th:nth-child(7) {
    width: 5.5% !important;
}

.sale-return-grid th:nth-child(8) {
    width: 6.5% !important;
}

.sale-return-grid th:nth-child(9) {
    width: 5% !important;
}

.sale-return-grid th:nth-child(10) {
    width: 6.5% !important;
}

.sale-return-grid th:nth-child(11) {
    width: 6.5% !important;
}

.sale-return-grid th:nth-child(12) {
    width: 5% !important;
}

.sale-return-grid th:nth-child(13) {
    width: 6.5% !important;
}

.sale-return-grid th:nth-child(14) {
    width: 6.5% !important;
}

.sale-return-grid th:nth-child(15) {
    width: 3% !important;
}

/* On smaller screens, allow horizontal scroll instead of breaking the layout */
@media (max-width: 1199.98px) {
    .sale-table-wrap {
        overflow-x: auto;
    }

    .sale-transaction-grid {
        min-width: 1350px !important;
    }
}

/* LOV keyboard active row */
.lov-item.lov-active,
.report-lov-item.lov-active {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

    .lov-item.lov-active .text-muted,
    .report-lov-item.lov-active .text-muted,
    .lov-item.lov-active small,
    .report-lov-item.lov-active small {
        color: #e9ecef !important;
    }

/* Store Purchase LOV visibility fix */
.store-purchase-table-responsive {
    overflow: visible !important;
    position: relative;
    padding-bottom: 170px;
}

    .store-purchase-table-responsive table {
        margin-bottom: 0;
    }

    .store-product-lov-list,
    .store-purchase-table-responsive .ProductLovList,
    .store-purchase-table-responsive .lov-list {
        position: absolute !important;
        z-index: 99999 !important;
        width: 100%;
        max-height: 260px;
        overflow-y: auto;
        background: #ffffff;
    }

.store-add-line-area {
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

/* Authentication and financial-context pages */
.auth-page {
    min-height: calc(100vh - 5rem);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background-color: #edf3f7;
}

.auth-card {
    width: min(880px, 100%);
    display: grid;
    grid-template-columns: minmax(250px, 0.82fr) minmax(360px, 1.18fr);
    overflow: hidden;
    border: 1px solid #d4dee7;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(24, 47, 66, 0.16);
}

.auth-brand-panel {
    min-height: 510px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem;
    color: #ffffff;
    background-color: #18384a;
    border-top: 7px solid #20a39e;
}

.auth-brand-mark {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    margin-bottom: 1.5rem;
    border: 2px solid #6dd5cf;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand-logo {
    display: block;
    width: min(260px, 100%);
    height: auto;
    margin-bottom: 1.35rem;
    object-fit: contain;
}

.auth-brand-name {
    font-size: 1.8rem;
    font-weight: 750;
    letter-spacing: 0;
}

.auth-brand-copy {
    margin: 0.45rem 0 0;
    color: #c9dce5;
    font-size: 0.95rem;
}

.auth-brand-footer {
    margin-top: auto;
    padding-top: 2rem;
    color: #93b2c0;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem;
}

.auth-form-heading {
    margin-bottom: 2rem;
}

.auth-eyebrow {
    display: block;
    margin-bottom: 0.55rem;
    color: #087f7a;
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
}

.auth-form-heading h1 {
    margin: 0;
    color: #172b37;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: 0;
}

.auth-form-heading p {
    margin: 0.65rem 0 0;
    color: #60727d;
}

.auth-form {
    display: grid;
    gap: 1.25rem;
}

.auth-field .form-label {
    margin-bottom: 0.45rem;
    color: #283f4c;
    font-size: 0.88rem;
    font-weight: 650;
}

.auth-control {
    min-height: 48px;
    border-color: #bdccd5;
    border-radius: 6px;
    background-color: #fbfdfe;
}

.auth-control:focus {
    border-color: #168d88;
    box-shadow: 0 0 0 0.2rem rgba(22, 141, 136, 0.14);
}

.auth-primary-btn {
    min-height: 48px;
    border-color: #087f7a;
    border-radius: 6px;
    color: #ffffff;
    background-color: #087f7a;
    font-weight: 700;
}

.auth-primary-btn:hover,
.auth-primary-btn:focus {
    border-color: #066964;
    color: #ffffff;
    background-color: #066964;
}

.auth-validation:empty,
.auth-field-error:empty {
    display: none;
}

.auth-validation:not(:empty) {
    padding: 0.75rem 0.9rem;
    border-left: 4px solid #c33c54;
    border-radius: 4px;
    color: #84233a;
    background-color: #fff0f3;
    font-size: 0.88rem;
}

.auth-field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
}

.auth-support-link {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-support-link a {
    color: #087f7a;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.auth-support-link a:hover {
    text-decoration: underline;
}

.auth-context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.auth-context-item {
    min-width: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid #d7e1e7;
    border-radius: 6px;
    background-color: #f3f7f9;
}

.auth-context-item span,
.auth-context-item strong {
    display: block;
}

.auth-context-item span {
    margin-bottom: 0.2rem;
    color: #71838d;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-context-item strong {
    overflow-wrap: anywhere;
    color: #263d49;
    font-size: 0.9rem;
    font-weight: 650;
}

@media (max-width: 767.98px) {
    .auth-page {
        min-height: calc(100vh - 2rem);
        padding: 1rem 0;
    }

    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 1rem;
        padding: 1.35rem;
        border-top-width: 5px;
    }

    .auth-brand-mark {
        width: 52px;
        height: 52px;
        margin: 0;
    }

    .auth-brand-logo {
        width: min(180px, 100%);
        margin: 0;
    }

    .auth-brand-name {
        font-size: 1.35rem;
    }

    .auth-brand-footer {
        display: none;
    }

    .auth-form-panel {
        padding: 2rem 1.35rem;
    }

    .auth-form-heading h1 {
        font-size: 1.65rem;
    }

    .auth-context-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    #dailyTrendTable.collapse:not(.show) {
        display: block !important;
    }
}

/* Login page */
.login-page {
    position: relative;
    min-height: calc(100vh - 5.5rem);
    display: grid;
    place-items: center;
    isolation: isolate;
    overflow: hidden;
    margin: -18px -18px -22px;
    padding: clamp(2rem, 5vw, 4.5rem) 1rem 5.5rem;
    background:
        linear-gradient(135deg, rgba(236, 246, 250, 0.96), rgba(245, 248, 252, 0.98) 48%, rgba(233, 243, 241, 0.96)),
        #eef4f7;
}

.login-page-decoration {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.login-page-decoration-one {
    width: min(42vw, 620px);
    aspect-ratio: 1;
    top: -28%;
    left: -12%;
    background: radial-gradient(circle, rgba(18, 111, 122, 0.15), rgba(18, 111, 122, 0));
    animation: login-decoration-drift 20s ease-in-out infinite alternate;
}

.login-page-decoration-two {
    width: min(38vw, 540px);
    aspect-ratio: 1;
    right: -9%;
    bottom: -30%;
    background: radial-gradient(circle, rgba(15, 87, 120, 0.13), rgba(15, 87, 120, 0));
    animation: login-decoration-drift 18s ease-in-out infinite alternate-reverse;
}

.login-card {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(400px, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(111, 136, 151, 0.28);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(24, 55, 72, 0.17);
    animation: login-card-enter 500ms ease-out both;
}

.login-brand-panel {
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 4.25rem);
    color: #ffffff;
    background:
        linear-gradient(155deg, rgba(15, 52, 73, 0.97), rgba(13, 83, 91, 0.96)),
        #123b4f;
}

.login-brand-panel::before,
.login-brand-panel::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand-panel::before {
    width: 280px;
    height: 280px;
    top: -130px;
    right: -120px;
}

.login-brand-panel::after {
    width: 190px;
    height: 190px;
    right: -80px;
    bottom: 42px;
}

.login-brand-content,
.login-brand-footer {
    position: relative;
    z-index: 1;
    animation: login-brand-reveal 420ms 150ms ease-out both;
}

.login-brand-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-brand-mark {
    width: 66px;
    height: 66px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(133, 226, 218, 0.68);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.035);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.login-brand-logo {
    display: block;
    width: min(315px, 100%);
    height: auto;
    object-fit: contain;
}

.login-brand-kicker {
    display: block;
    margin-bottom: 0.3rem;
    color: #9edbd7;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-brand-heading + .login-brand-kicker {
    margin-top: 1.25rem;
}

.login-brand-heading h1 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 760;
    letter-spacing: -0.025em;
}

.login-brand-copy {
    max-width: 35rem;
    margin: 2.5rem 0 0;
    color: #d6e7ec;
    font-size: 1rem;
    line-height: 1.75;
}

.login-capabilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
    margin: 2.25rem 0 0;
    padding: 0;
    list-style: none;
}

.login-capabilities li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #e7f2f4;
    font-size: 0.86rem;
    font-weight: 600;
}

.login-capabilities li > span {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 2px;
    background: #54c9c1;
    box-shadow: 0 0 0 4px rgba(84, 201, 193, 0.12);
}

.login-brand-footer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #bcd2d8;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6dd9c9;
    box-shadow: 0 0 0 4px rgba(109, 217, 201, 0.12);
    animation: login-status-pulse 3.5s ease-in-out infinite;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.5rem, 6vw, 5rem);
    background: #ffffff;
}

.login-form-panel > * {
    animation: login-form-reveal 420ms 180ms ease-out both;
}

.login-form-heading {
    margin-bottom: 2rem;
}

.login-eyebrow {
    display: block;
    margin-bottom: 0.65rem;
    color: #087f7a;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.login-form-heading h2 {
    margin: 0;
    color: #162d3a;
    font-size: clamp(1.75rem, 3vw, 2.15rem);
    font-weight: 760;
    letter-spacing: -0.03em;
}

.login-form-heading p {
    margin: 0.7rem 0 0;
    color: #687b86;
    font-size: 0.95rem;
}

.login-form {
    display: grid;
    gap: 1.3rem;
}

.login-field .form-label,
.login-label-row .form-label {
    margin: 0 0 0.5rem;
    color: #293f4b;
    font-size: 0.87rem;
    font-weight: 700;
}

.login-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.login-label-row a {
    color: #087f7a;
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
}

.login-label-row a:hover,
.login-label-row a:focus-visible {
    text-decoration: underline;
}

.login-control {
    min-height: 50px;
    padding: 0.7rem 0.9rem;
    border-color: #b9c9d2;
    border-radius: 7px;
    color: #172e3a;
    background-color: #fbfdfe;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.login-control::placeholder {
    color: #8b9aa3;
}

.login-control:focus {
    border-color: #148e89;
    background-color: #ffffff;
    box-shadow: 0 0 0 0.22rem rgba(20, 142, 137, 0.14);
}

.login-control.input-validation-error {
    border-color: #b93750;
}

.login-password-control {
    position: relative;
}

.login-password-control .login-control {
    padding-right: 4.5rem;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    min-width: 3.25rem;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: 5px;
    color: #176b70;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 750;
    transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: #0c5257;
    background: #e9f4f4;
    outline: none;
}

.login-primary-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.15rem;
    border: 1px solid #087f7a;
    border-radius: 7px;
    color: #ffffff;
    background: linear-gradient(135deg, #087f7a, #116b80);
    box-shadow: 0 10px 22px rgba(8, 127, 122, 0.2);
    font-weight: 750;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.login-primary-btn:hover,
.login-primary-btn:focus-visible {
    border-color: #066d69;
    color: #ffffff;
    background: linear-gradient(135deg, #066d69, #0e5c70);
    box-shadow: 0 12px 25px rgba(8, 127, 122, 0.25);
    transform: translateY(-1px);
}

.login-button-arrow {
    transition: transform 0.16s ease;
}

.login-primary-btn:hover .login-button-arrow,
.login-primary-btn:focus-visible .login-button-arrow {
    transform: translateX(3px);
}

.login-primary-btn:focus-visible {
    outline: 3px solid rgba(8, 127, 122, 0.2);
    outline-offset: 2px;
}

.login-validation:empty,
.login-field-error:empty {
    display: none;
}

.login-validation:not(:empty) {
    padding: 0.85rem 1rem;
    border: 1px solid #efc2ca;
    border-left: 4px solid #bd3650;
    border-radius: 6px;
    color: #7e2437;
    background: #fff3f5;
    font-size: 0.86rem;
}

.login-validation ul {
    margin: 0;
    padding-left: 1.15rem;
}

.login-field-error {
    display: block;
    margin-top: 0.38rem;
    color: #a5283f !important;
    font-size: 0.8rem;
}

.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.75rem;
    color: #71828b;
    font-size: 0.78rem;
    text-align: center;
}

.login-security-mark {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #087f7a;
    background: #e5f3f2;
    font-size: 0.72rem;
    font-weight: 800;
}

@keyframes login-card-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes login-brand-reveal {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes login-form-reveal {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes login-decoration-drift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(18px, -12px, 0);
    }
}

@keyframes login-status-pulse {
    0%,
    100% {
        opacity: 0.78;
    }

    50% {
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .login-card {
        grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
    }

    .login-brand-panel {
        padding: 2.5rem;
    }

    .login-capabilities {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .login-page {
        min-height: calc(100vh - 4rem);
        margin: -18px -18px -22px;
        padding: 1rem 0.75rem 4.75rem;
    }

    .login-card {
        grid-template-columns: 1fr;
        max-width: 560px;
        border-radius: 10px;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 1.5rem;
    }

    .login-brand-mark {
        width: 52px;
        height: 52px;
        border-radius: 9px;
        font-size: 0.86rem;
    }

    .login-brand-logo {
        width: min(235px, 100%);
    }

    .login-brand-kicker {
        font-size: 0.65rem;
    }

    .login-brand-heading h1 {
        font-size: 1.45rem;
    }

    .login-brand-copy,
    .login-capabilities,
    .login-brand-footer {
        display: none;
    }

    .login-form-panel {
        padding: 2rem 1.4rem;
    }

    .login-form-heading {
        margin-bottom: 1.6rem;
    }
}

@media (max-width: 420px) {
    .login-page {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .login-label-row {
        align-items: flex-start;
    }

    .login-form-panel {
        padding: 1.75rem 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-control,
    .login-primary-btn,
    .login-button-arrow {
        transition: none;
    }

    .login-card,
    .login-brand-content,
    .login-brand-footer,
    .login-form-panel > *,
    .login-page-decoration,
    .login-status-dot {
        animation: none !important;
    }

    .login-primary-btn:hover .login-button-arrow,
    .login-primary-btn:focus-visible .login-button-arrow {
        transform: none;
    }
}

/* Dashboard charts */
.dashboard-kpi-card .card-body {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.dashboard-chart-large {
    position: relative;
    height: 340px;
}

.dashboard-chart-compact {
    position: relative;
    height: 270px;
}

.dashboard-chart-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    border: 1px dashed #c9d3d8;
    border-radius: 0.45rem;
    color: #6c757d;
    text-align: center;
    padding: 1rem;
}

@media (max-width: 767.98px) {
    .dashboard-chart-large {
        height: 280px;
    }

    .dashboard-chart-compact {
        height: 240px;
    }
}

