:root {
    --ba-bg: #f4f7fb;
    --ba-surface: #ffffff;
    --ba-surface-soft: #f8fbff;
    --ba-border: #d9e2f0;
    --ba-text: #15305b;
    --ba-text-soft: #64748b;
    --ba-primary: #2962ff;
    --ba-primary-dark: #1a3fb6;
    --ba-primary-soft: #ebf2ff;
    --ba-success-soft: #e9f8f1;
    --ba-warning-soft: #fff4df;
    --ba-danger-soft: #ffe9e9;
    --ba-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --ba-radius-xl: 26px;
    --ba-radius-lg: 20px;
    --ba-radius-md: 16px;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--ba-bg);
    color: var(--ba-text);
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

.wrapper {
    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.content-wrapper {
    background: transparent;
}

.main-header.ba-topbar {
    border-bottom: 0;
    background: transparent;
    padding: 14px 18px 0;
}

.ba-topbar-shell {
    min-height: 74px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(217, 226, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 10px 18px;
}

.ba-menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ba-text) !important;
    background: #f7f9fd;
    border: 1px solid var(--ba-border);
}

.ba-menu-toggle:hover {
    background: var(--ba-primary-soft);
    color: var(--ba-primary) !important;
}

.ba-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    color: var(--ba-text) !important;
    margin-left: 14px;
}

.ba-brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ba-primary) 0%, #5c8bff 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(41, 98, 255, 0.2);
}

.ba-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.ba-brand-text strong {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.ba-brand-text small {
    font-size: 0.88rem;
    color: var(--ba-text-soft);
}

.ba-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 8px;
    border-radius: 18px;
    background: #f7f9fd;
    border: 1px solid var(--ba-border);
    margin-right: 12px;
    min-height: 46px;
}

.ba-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.94rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ba-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.ba-user-meta span {
    color: var(--ba-text-soft);
    font-size: 0.84rem;
}

.ba-user-meta strong {
    color: var(--ba-text);
    font-size: 1rem;
    font-weight: 700;
}

.ba-logout-btn {
    border-radius: 16px;
    min-height: 46px;
    padding: 0.7rem 1.15rem;
    font-weight: 700;
    border-width: 1px;
}

.main-sidebar.ba-sidebar {
    background: linear-gradient(180deg, #08152f 0%, #0b1e4a 52%, #112d72 100%);
    border-top-right-radius: 0;
    box-shadow: 14px 0 32px rgba(5, 14, 34, 0.12);
}

.main-sidebar.ba-sidebar .brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 18px 18px;
}

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

.ba-sidebar-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1rem;
}

.ba-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    color: #fff;
}

.ba-sidebar-brand-text strong {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ba-sidebar-brand-text small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.ba-sidebar-section {
    color: rgba(255, 255, 255, 0.58);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    padding: 2px 14px 10px;
}

.ba-sidebar-user {
    margin: 18px 14px 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.ba-sidebar-user small {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 4px;
}

.ba-sidebar-user strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    word-break: break-word;
}

.ba-sidebar .nav-sidebar {
    padding: 0 8px 18px;
}

.ba-sidebar .nav-link {
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 6px;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    min-height: 52px;
    transition: all 0.2s ease;
}

.ba-sidebar .nav-link .nav-icon {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-right: 12px;
}

.ba-sidebar .nav-link:hover,
.ba-sidebar .nav-link.active {
    background: linear-gradient(90deg, #2962ff 0%, #4c85ff 100%);
    color: #fff;
    box-shadow: 0 14px 26px rgba(41, 98, 255, 0.28);
}

.ba-sidebar .nav-link:hover .nav-icon,
.ba-sidebar .nav-link.active .nav-icon {
    color: #fff;
}

body.sidebar-collapse .ba-sidebar-section {
    display: none;
}

body.sidebar-collapse .ba-sidebar .nav-link {
    justify-content: center;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

body.sidebar-collapse .ba-sidebar .nav-link .nav-icon {
    margin-right: 0;
}

body.sidebar-collapse .ba-sidebar-brand {
    justify-content: center;
}

body.sidebar-collapse .ba-sidebar-brand-text {
    display: none;
}

.ba-page-header {
    padding: 18px 10px 4px;
}

.ba-page-intro {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,252,255,0.98) 100%);
    border: 1px solid rgba(217, 226, 240, 0.95);
    border-radius: var(--ba-radius-xl);
    box-shadow: var(--ba-shadow);
    padding: 26px 28px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.ba-page-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.73rem;
    font-weight: 800;
    color: var(--ba-primary);
}

.ba-page-intro h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 3vw, 2.65rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #0f2347;
}

.ba-page-intro p {
    margin: 0;
    color: var(--ba-text-soft);
    font-size: 1rem;
    max-width: 820px;
}

.ba-page-intro-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ba-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--ba-border);
    background: #fff;
    color: var(--ba-text);
    font-size: 0.92rem;
    font-weight: 600;
}

.ba-chip-soft {
    background: var(--ba-primary-soft);
    color: var(--ba-primary-dark);
    border-color: rgba(41, 98, 255, 0.12);
}

.content {
    padding: 14px 10px 26px;
}

.container-fluid {
    padding-left: 16px;
    padding-right: 16px;
}

.card,
.small-box,
.ba-stat-card,
.ba-quick-card,
.ba-info-card,
.ba-login-card {
    border: 1px solid rgba(217, 226, 240, 0.95);
    border-radius: var(--ba-radius-lg);
    box-shadow: var(--ba-shadow);
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
}

.card {
    margin-bottom: 22px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(217, 226, 240, 0.72);
    padding: 20px 22px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #102649;
}

.card-body,
.card-footer {
    padding: 22px;
}

.card-footer {
    background: rgba(248, 251, 255, 0.7);
    border-top: 1px solid rgba(217, 226, 240, 0.72);
}

.alert {
    border-radius: 16px;
    border-width: 1px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.form-control,
.custom-select,
textarea.form-control {
    min-height: 48px;
    border-radius: 14px;
    border-color: var(--ba-border);
    box-shadow: none !important;
    padding-left: 14px;
    padding-right: 14px;
}

textarea.form-control {
    min-height: 120px;
}

.form-control:focus,
.custom-select:focus {
    border-color: rgba(41, 98, 255, 0.45);
    box-shadow: 0 0 0 0.15rem rgba(41, 98, 255, 0.12) !important;
}

.input-group-text {
    border-radius: 0 14px 14px 0;
    border-color: var(--ba-border);
    background: #f8fbff;
    color: var(--ba-text-soft);
}

.btn {
    border-radius: 14px;
    font-weight: 700;
    min-height: 44px;
    padding: 0.7rem 1rem;
}

.btn-sm {
    min-height: auto;
    padding: 0.45rem 0.8rem;
    border-radius: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ba-primary) 0%, #4e86ff 100%);
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #2558e6 0%, #4278ed 100%);
    border-color: transparent;
}

.btn-success,
.btn-warning,
.btn-danger,
.btn-secondary,
.btn-outline-primary {
    box-shadow: none !important;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: 0;
    border-bottom: 1px solid rgba(217, 226, 240, 0.85);
    color: var(--ba-text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    background: rgba(248, 251, 255, 0.88);
    padding: 16px 18px;
}

.table td {
    vertical-align: middle;
    padding: 16px 18px;
    color: #17355f;
    border-top: 1px solid rgba(217, 226, 240, 0.65);
}

.table-hover tbody tr:hover {
    background: rgba(235, 242, 255, 0.45);
}

.badge {
    border-radius: 999px;
    padding: 0.5em 0.8em;
    font-weight: 700;
}

.ba-stat-card {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 158px;
}

.ba-stat-card__inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    padding: 24px;
}

.ba-stat-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--ba-primary);
    background: var(--ba-primary-soft);
    flex-shrink: 0;
}

.ba-stat-card__icon.is-success { background: var(--ba-success-soft); color: #10935b; }
.ba-stat-card__icon.is-warning { background: var(--ba-warning-soft); color: #d58c02; }
.ba-stat-card__icon.is-danger { background: var(--ba-danger-soft); color: #d44d4d; }

.ba-stat-card__label {
    font-size: 0.95rem;
    color: var(--ba-text-soft);
    margin-bottom: 8px;
    font-weight: 700;
}

.ba-stat-card__value {
    font-size: clamp(2rem, 2.8vw, 2.5rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 800;
    color: #0e2549;
}

.ba-stat-card__meta {
    margin-top: 10px;
    color: var(--ba-text-soft);
    font-size: 0.92rem;
}

.ba-hero-card {
    padding: 0;
}

.ba-hero-card .card-body {
    padding: 26px 28px;
}

.ba-hero-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--ba-primary);
    font-weight: 800;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.ba-hero-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 800;
    margin-bottom: 14px;
    color: #0f2347;
}

.ba-hero-text {
    color: var(--ba-text-soft);
    max-width: 760px;
    font-size: 1rem;
    margin-bottom: 18px;
}

.ba-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.ba-quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    text-decoration: none !important;
    color: inherit;
    min-height: 118px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ba-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.11);
}

.ba-quick-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.12rem;
    background: var(--ba-primary-soft);
    color: var(--ba-primary);
    flex-shrink: 0;
}

.ba-quick-card__title {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    color: #0f2347;
    margin-bottom: 5px;
}

.ba-quick-card__text {
    color: var(--ba-text-soft);
    font-size: 0.92rem;
    line-height: 1.3;
}

.ba-list-clean {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ba-list-clean li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px dashed rgba(217, 226, 240, 0.95);
}

.ba-list-clean li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.ba-list-index {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--ba-primary-soft);
    color: var(--ba-primary-dark);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ba-list-title {
    font-weight: 700;
    color: #102649;
    margin-bottom: 4px;
}

.ba-list-subtitle {
    color: var(--ba-text-soft);
    font-size: 0.92rem;
}

.ba-info-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ba-info-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f2347;
    margin: 0;
}

.ba-info-text {
    color: var(--ba-text-soft);
    margin: 0;
}

.main-footer.ba-footer {
    background: transparent;
    border-top: 0;
    color: var(--ba-text-soft);
    font-size: 0.88rem;
    padding: 8px 24px 22px;
}

.ba-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(41, 98, 255, 0.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.18), transparent 28%),
        linear-gradient(180deg, #f3f7ff 0%, #eef3fb 100%);
}

.ba-login-card {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.ba-login-side {
    padding: 42px;
    background: linear-gradient(165deg, #091733 0%, #0f2b69 50%, #1b4ec9 100%);
    color: #fff;
}

.ba-login-kicker {
    display: inline-block;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.78);
}

.ba-login-side h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    margin: 0 0 16px;
    font-weight: 800;
    text-align: center;
}

.ba-login-side p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.ba-login-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 26px;
}

.ba-login-logo {
    display: block;
    width: 300px;
    max-width: 100%;
    height: 75px;
    object-fit: contain;
}

.ba-login-features {
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.ba-login-features li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.88);
}

.ba-login-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.75rem;
    font-weight: 800;
}

.ba-login-formpanel {
    background: rgba(255, 255, 255, 0.98);
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ba-login-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ba-primary-soft);
    color: var(--ba-primary);
    font-size: 1.3rem;
    margin-bottom: 18px;
}

.ba-login-formpanel h2 {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.05em;
    margin: 0 0 12px;
    font-weight: 800;
    color: #0f2347;
}

.ba-login-formpanel p {
    color: var(--ba-text-soft);
    margin-bottom: 22px;
}

.ba-login-formpanel .form-group {
    margin-bottom: 16px;
}

.ba-login-formpanel .btn-primary {
    width: 100%;
}

.ba-table-empty {
    color: var(--ba-text-soft);
}

@media (max-width: 1199.98px) {
    .ba-page-intro {
        padding: 24px;
    }

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

@media (max-width: 991.98px) {
    .main-header.ba-topbar {
        padding: 12px 12px 0;
    }

    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ba-page-header,
    .content {
        padding-left: 0;
        padding-right: 0;
    }

    .ba-page-intro {
        padding: 22px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ba-page-intro-meta {
        justify-content: flex-start;
    }

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

@media (max-width: 767.98px) {
    .ba-brand-text strong {
        font-size: 1.02rem;
    }

    .ba-brand-text small {
        display: none;
    }

    .ba-user-pill {
        display: none;
    }

    .ba-topbar-shell {
        padding: 10px 12px;
    }

    .ba-brand-pill {
        margin-left: 10px;
        gap: 10px;
    }

    .ba-brand-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .card-header,
    .card-body,
    .card-footer,
    .ba-hero-card .card-body,
    .ba-stat-card__inner,
    .ba-login-side,
    .ba-login-formpanel {
        padding: 18px;
    }

    .ba-page-intro {
        border-radius: 22px;
    }

    .ba-page-intro h1,
    .ba-hero-title,
    .ba-login-side h1,
    .ba-login-formpanel h2 {
        font-size: 1.85rem;
    }

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

    .table thead th,
    .table td {
        padding: 14px 12px;
    }

    .ba-stat-card {
        min-height: auto;
    }
}
