﻿* {
    box-sizing: border-box;
}

:root {
    --sbp-sidebar-width: 256px;
    --sbp-sidebar-collapsed-width: 72px;
    --sbp-surface: #ffffff;
    --sbp-border: #e5eaf2;
    --sbp-muted: #64748b;
    --sbp-heading: #111827;
    --sbp-radius: 8px;
}

body {
    margin: 0;
    background: #f4f7fb;
    color: #172033;
    font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.92rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), transparent 28%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.24), transparent 30%),
        #f8fafc;
}

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

.auth-visual {
    min-height: 100vh;
    padding: 36px;
    background: linear-gradient(135deg, var(--sbp-secondary), #172554);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.auth-visual::after {
    content: "";
    position: absolute;
    inset-inline-start: -140px;
    bottom: -180px;
    width: 460px;
    height: 460px;
    border: 70px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.auth-copy {
    max-width: 620px;
    position: relative;
    z-index: 1;
}

.auth-kicker {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.12);
    color: #bfdbfe;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 14px;
    font-size: 0.82rem;
}

.auth-copy h1 {
    font-size: clamp(1.8rem, 3.4vw, 3.35rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
}

.auth-copy p {
    color: #cbd5e1;
    font-size: 0.98rem;
    max-width: 520px;
}

.auth-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.auth-card .h4 {
    font-size: 1.12rem;
}

.auth-card .text-muted {
    font-size: 0.86rem;
}

.input-group-text {
    border-color: #d8e1ef;
    background: #f8fafc;
    color: var(--sbp-muted);
    font-size: 0.9rem;
}

.btn-primary {
    --bs-btn-bg: var(--sbp-primary);
    --bs-btn-border-color: var(--sbp-primary);
    --bs-btn-hover-bg: var(--sbp-secondary);
    --bs-btn-hover-border-color: var(--sbp-secondary);
}

.login-page {
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(19, 78, 138, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(19, 78, 138, 0.06) 1px, transparent 1px),
        var(--sbp-login-bg, #f8fafc);
    background-size: 44px 44px;
    color: #172033;
}

.login-shell {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
    grid-template-areas: "hero panel";
    position: relative;
    isolation: isolate;
}

.login-shell::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(19, 78, 138, 0.08);
    border-radius: 22px;
    pointer-events: none;
    z-index: -1;
}

.login-panel {
    grid-area: panel;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.login-card {
    width: 100%;
    max-width: 470px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(216, 225, 239, 0.95);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(16px);
}

.login-card-brand,
.login-hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-card-logo,
.login-hero-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--sbp-primary), var(--sbp-login-sky, #0ea5e9));
    box-shadow: 0 14px 30px rgba(19, 78, 138, 0.2);
    flex: 0 0 48px;
}

.login-card-logo img,
.login-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-card-logo i,
.login-hero-logo i {
    font-size: 1.35rem;
}

.login-card-name,
.login-hero-brand strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--sbp-secondary);
    line-height: 1.35;
}

.login-card-brand small,
.login-hero-brand small {
    display: block;
    color: var(--sbp-muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.login-heading {
    margin: 30px 0 22px;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 0.76rem;
    font-weight: 800;
}

.login-heading h1 {
    margin: 14px 0 6px;
    color: var(--sbp-secondary);
    font-size: 1.55rem;
    font-weight: 800;
}

.login-heading p {
    margin: 0;
    color: var(--sbp-muted);
    font-size: 0.9rem;
}

.login-alert {
    display: flex;
    gap: 10px;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #991b1b;
    font-size: 0.82rem;
}

.login-alert i {
    font-size: 1.05rem;
    margin-top: 2px;
}

.login-alert strong {
    display: block;
    margin-bottom: 4px;
}

.login-alert ul {
    margin: 0;
    padding-inline-start: 18px;
}

.login-form .form-label {
    font-size: 0.8rem;
    color: #243244;
}

.login-input-group {
    position: relative;
}

.login-input-group .form-control {
    min-height: 48px;
    border-radius: 12px;
    padding-inline-start: 48px;
    padding-inline-end: 48px;
    background: #f8fafc;
    border-color: #d8e1ef;
    font-size: 0.9rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-input-group .form-control:focus {
    background: #fff;
    border-color: var(--sbp-primary);
    box-shadow: 0 0 0 0.22rem rgba(19, 78, 138, 0.12);
}

.login-input-icon {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 3;
}

.password-toggle {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    color: #475569;
    background: transparent;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--sbp-primary);
    background: rgba(19, 78, 138, 0.08);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 22px;
    font-size: 0.84rem;
}

.login-options a {
    color: var(--sbp-primary);
    font-weight: 800;
    text-decoration: none;
}

.login-options a:hover {
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--sbp-primary), var(--sbp-login-sky, #0ea5e9));
    box-shadow: 0 16px 32px rgba(19, 78, 138, 0.25);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(19, 78, 138, 0.3);
}

.login-submit:disabled {
    opacity: 0.82;
    cursor: wait;
    transform: none;
}

.submit-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.login-submit.is-loading .submit-label {
    display: none;
}

.login-submit.is-loading .submit-loading {
    display: inline-flex;
}

.login-security-note {
    margin-top: 18px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #166534;
    background: #dcfce7;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.login-hero {
    grid-area: hero;
    min-height: 100vh;
    padding: 34px;
    display: flex;
    align-items: stretch;
}

.login-hero-content {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 42px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(11, 37, 69, 0.97), rgba(19, 78, 138, 0.95) 56%, rgba(14, 165, 233, 0.88)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.08) 75%, transparent 75%, transparent);
    background-size: auto, 26px 26px;
    box-shadow: 0 30px 80px rgba(11, 37, 69, 0.24);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
}

.login-hero-content::before {
    content: "";
    position: absolute;
    inset-inline-start: -18%;
    top: 18%;
    width: 64%;
    height: 36%;
    transform: rotate(-14deg);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
}

.login-hero-content::after {
    content: "";
    position: absolute;
    inset-inline-end: -12%;
    bottom: 8%;
    width: 48%;
    height: 28%;
    transform: rotate(12deg);
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
}

.login-hero-content > * {
    position: relative;
    z-index: 1;
}

.login-hero-logo {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.login-hero-brand strong {
    color: #fff;
}

.login-hero-brand small {
    color: rgba(255, 255, 255, 0.72);
}

.login-hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #dff6ff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.78rem;
    font-weight: 800;
}

.login-hero-copy h2 {
    max-width: 690px;
    margin: 16px 0 14px;
    font-size: 2.2rem;
    line-height: 1.35;
    font-weight: 800;
}

.login-hero-copy p {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
    line-height: 1.9;
}

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

.login-badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-feature-card {
    min-height: 150px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-feature-card i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #082f49;
    background: #e0f2fe;
    font-size: 1rem;
}

.login-feature-card strong {
    font-size: 0.9rem;
    font-weight: 800;
}

.login-feature-card span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.78rem;
    line-height: 1.7;
}

.login-footer {
    position: fixed;
    inset-inline: 34px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: rgba(71, 85, 105, 0.82);
    font-size: 0.76rem;
    pointer-events: none;
}

.app-shell {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 36%),
        linear-gradient(315deg, rgba(16, 185, 129, 0.08), transparent 30%),
        #f4f7fb;
}

.app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1040;
    width: var(--sbp-sidebar-width);
    height: 100vh;
    background: var(--sbp-secondary);
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease, transform 0.2s ease;
    box-shadow: -14px 0 34px rgba(15, 23, 42, 0.14);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sbp-primary);
    color: #fff;
    flex: 0 0 36px;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    font-size: 0.92rem;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.sidebar-section {
    margin-bottom: 6px;
}

.sidebar-section-toggle,
.sidebar-link {
    width: 100%;
    border: 0;
    min-height: 38px;
    border-radius: 8px;
    color: #dbeafe;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-decoration: none;
    text-align: right;
    font-size: 0.86rem;
    font-weight: 600;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-section-toggle:hover,
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-link.active {
    background: var(--sbp-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.sidebar-section-toggle i,
.sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
    flex: 0 0 22px;
}

.section-chevron {
    margin-right: auto;
    font-size: 0.8rem !important;
}

.app-main {
    min-height: 100vh;
    margin-right: var(--sbp-sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-right 0.2s ease;
}

.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #d8e1ef;
    border-radius: 8px;
    background: #fff;
    color: var(--sbp-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--sbp-primary);
    border-color: var(--sbp-primary);
}

.page-eyebrow {
    color: var(--sbp-muted);
    font-size: 0.72rem;
    line-height: 1.2;
}

.page-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--sbp-heading);
    line-height: 1.4;
}

.user-menu {
    border: 1px solid #d8e1ef;
    background: #fff;
    border-radius: 8px;
    min-height: 42px;
    padding: 5px 7px 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #172033;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sbp-primary), var(--sbp-accent));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.user-photo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-meta span {
    font-weight: 700;
    font-size: 0.84rem;
}

.user-meta small {
    color: var(--sbp-muted);
    font-size: 0.68rem;
}

.content-area {
    flex: 1;
    padding: 20px;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sbp-muted);
    font-size: 0.78rem;
}

.panel {
    background: var(--sbp-surface);
    border: 1px solid var(--sbp-border);
    border-radius: var(--sbp-radius);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.stat-card {
    border: 1px solid var(--sbp-border);
    border-radius: var(--sbp-radius);
    background: var(--sbp-surface);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
    position: relative;
    overflow: hidden;
    min-height: 96px;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--sbp-primary);
}

.stat-card .display-6 {
    font-size: 1.55rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
    word-break: normal;
}

.stat-card .stat-card-number {
    font-size: 1.2rem;
    white-space: nowrap;
    direction: ltr;
    text-align: start;
    font-variant-numeric: tabular-nums;
}

.stat-card .small {
    font-size: 0.76rem;
    line-height: 1.45;
}

.stat-card .icon-btn {
    flex: 0 0 auto;
}

.workflow-step-card {
    min-height: 136px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.workflow-step-card::before {
    background: var(--sbp-primary);
}

.workflow-step-card.workflow-step-success::before {
    background: var(--bs-success);
}

.workflow-step-card.workflow-step-danger::before {
    background: var(--bs-danger);
}

.workflow-step-card.workflow-step-secondary::before {
    background: var(--bs-secondary);
}

.workflow-step-card .workflow-step-number {
    min-width: 34px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.workflow-step-card .workflow-step-title {
    font-size: 0.98rem;
    line-height: 1.55;
}

.service-phase-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.service-phase-card {
    min-width: 0;
    min-height: 154px;
    padding: 14px;
    border: 1px solid #d8e1ee;
    border-radius: 7px;
    background: #f8fafc;
    color: #475569;
    text-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.service-phase-card:hover,
.service-phase-card[aria-expanded="true"] {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
}

.service-phase-card.is-completed { background: #effcf7; border-color: #86d7bd; color: #166534; }
.service-phase-card.is-current { background: #eef4ff; border-color: #60a5fa; color: #1d4ed8; box-shadow: inset 0 3px 0 #2563eb; }
.service-phase-card.is-attention { background: #fff8e8; border-color: #f2c96d; color: #92400e; box-shadow: inset 0 3px 0 #d97706; }
.service-phase-card.is-locked { background: #f8fafc; color: #64748b; }

.service-phase-card__top,
.service-phase-card__body,
.service-phase-card__progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.service-phase-card__body { justify-content: flex-start; align-items: flex-start; }
.service-phase-card__number,
.service-phase-card__icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #e2e8f0;
    font-weight: 800;
}

.service-phase-card.is-completed .service-phase-card__number { background: #059669; color: #fff; }
.service-phase-card.is-current .service-phase-card__number { background: #2563eb; color: #fff; }
.service-phase-card.is-attention .service-phase-card__number { background: #d97706; color: #fff; }
.service-phase-card__state,
.service-phase-card__progress { font-size: .76rem; font-weight: 700; }
.service-phase-card__body strong,
.service-phase-card__body small,
.service-phase-step__content strong,
.service-phase-step__content small { display: block; }
.service-phase-card__body strong { color: #0f172a; margin-bottom: 4px; }
.service-phase-card__body small { line-height: 1.65; }

.service-phase-detail {
    border: 1px solid #d8e1ee;
    border-radius: 7px;
    padding: 14px;
    background: #fff;
}

.service-phase-step-list { border-top: 1px solid #e2e8f0; }
.service-phase-step {
    min-height: 54px;
    padding: 10px 4px;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}
.service-phase-step:last-child { border-bottom: 0; }
.service-phase-step__status { text-align: center; }
.service-phase-step.is-completed .service-phase-step__status { color: #059669; }
.service-phase-step.is-current .service-phase-step__status { color: #2563eb; }
.service-phase-step.is-attention .service-phase-step__status { color: #d97706; }
.service-phase-step.is-locked { color: #64748b; }
.service-phase-step__content small { color: #64748b; margin-top: 2px; }
.service-phase-badge.is-completed { background: #d1fae5; color: #166534; }
.service-phase-badge.is-current { background: #dbeafe; color: #1d4ed8; }
.service-phase-badge.is-attention { background: #fef3c7; color: #92400e; }
.service-phase-badge.is-locked { background: #e2e8f0; color: #475569; }

@media (max-width: 1199.98px) {
    .service-phase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .service-phase-grid { grid-template-columns: 1fr; }
    .service-phase-step { grid-template-columns: 24px minmax(0, 1fr); }
    .service-phase-step > .btn,
    .service-phase-step > .text-nowrap { grid-column: 2; justify-self: start; }
}

.table {
    --bs-table-striped-bg: #f8fafc;
    font-size: 0.86rem;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
    padding: 0.72rem 0.78rem;
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    border-bottom: 1px solid var(--sbp-border);
}

.form-label {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    border-color: #d8e1ef;
    border-radius: var(--sbp-radius);
    font-size: 0.86rem;
    min-height: 38px;
    padding-block: 0.42rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sbp-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.btn {
    border-radius: var(--sbp-radius);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.42rem 0.78rem;
}

.btn-sm {
    font-size: 0.78rem;
    padding: 0.28rem 0.5rem;
}

.action-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.toolbar-btn {
    min-width: 74px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #d8e1ef;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 0 10px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.toolbar-btn i {
    font-size: 0.94rem;
    line-height: 1;
}

.toolbar-btn:hover {
    color: var(--sbp-primary);
    border-color: rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.dropdown-menu {
    border-color: var(--sbp-border);
    border-radius: var(--sbp-radius);
    font-size: 0.86rem;
}

.dropdown-item {
    padding-block: 0.48rem;
}

.pagination {
    --bs-pagination-font-size: 0.82rem;
    --bs-pagination-padding-x: 0.62rem;
    --bs-pagination-padding-y: 0.34rem;
}

.content-area h2.h4,
.content-area .h4 {
    font-size: 1.05rem;
}

.content-area p {
    font-size: 0.88rem;
}

.content-area > .d-flex.justify-content-between {
    gap: 12px;
}

.content-area > .d-flex.justify-content-between .btn {
    white-space: nowrap;
}

.badge-soft-success {
    color: #047857;
    background: #d1fae5;
}

.badge-soft-danger {
    color: #b91c1c;
    background: #fee2e2;
}

.badge-soft-warning {
    color: #a16207;
    background: #fef3c7;
}

.badge-soft-secondary {
    color: #475569;
    background: #e2e8f0;
}

.badge-soft-info {
    color: #0e7490;
    background: #cffafe;
}

.badge,
.fs-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    min-width: 68px;
    padding: 0.36rem 0.68rem;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
}

.table .badge,
.table .fs-status-badge {
    min-width: 76px;
}

.fs-workflow-panel {
    overflow: hidden;
}

.fs-workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.fs-workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #f8fbff;
    min-height: 92px;
}

.fs-workflow-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eaf3ff;
    color: var(--sbp-primary);
}

.fs-engagement-workflow-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.fs-engagement-workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 12px;
}

.fs-engagement-step {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    min-height: 128px;
    padding: 12px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.fs-engagement-step::after {
    content: "";
    position: absolute;
    inset-inline-start: 12px;
    inset-block-start: 12px;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: #dbe7f5;
}

.fs-engagement-step-no {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    background: #eef4fa;
    color: #64748b;
    margin-block-start: 8px;
}

.fs-engagement-step-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fs-engagement-step-title {
    font-weight: 800;
    color: #0f172a;
    line-height: 1.45;
}

.fs-engagement-step-desc {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.55;
}

.fs-engagement-step-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.fs-engagement-step.is-done {
    border-color: rgba(5, 150, 105, 0.32);
    background: #f0fdf4;
}

.fs-engagement-step.is-done::after,
.fs-engagement-step.is-done .fs-engagement-step-no,
.fs-engagement-step.is-done .fs-engagement-step-state {
    background: #059669;
    color: #ffffff;
}

.fs-engagement-step.is-active {
    border-color: rgba(37, 99, 235, 0.42);
    background: #eaf3ff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.13);
}

.fs-engagement-step.is-active::after,
.fs-engagement-step.is-active .fs-engagement-step-no,
.fs-engagement-step.is-active .fs-engagement-step-state {
    background: var(--sbp-primary);
    color: #ffffff;
}

.fs-engagement-step.is-pending {
    background: #f8fafc;
}

.fs-engagement-step.is-pending .fs-engagement-step-state {
    background: #e2e8f0;
    color: #475569;
}

.reconciliation-flow-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.reconciliation-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.reconciliation-step {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 14px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #fff;
}

.reconciliation-step.is-active {
    border-color: rgba(37, 99, 235, 0.34);
    background: #eaf3ff;
}

.reconciliation-step.is-done {
    border-color: rgba(5, 150, 105, 0.28);
    background: #f0fdf4;
}

.reconciliation-step-no {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--sbp-primary);
    background: rgba(37, 99, 235, 0.1);
    font-weight: 900;
}

.reconciliation-step.is-done .reconciliation-step-no {
    color: #047857;
    background: #d1fae5;
}

.reconciliation-step strong,
.reconciliation-step small {
    display: block;
    line-height: 1.45;
}

.reconciliation-step small {
    color: var(--sbp-muted);
    font-size: 0.76rem;
}

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

.reconciliation-upload-card {
    min-height: 152px;
    padding: 14px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #fff;
}

.reconciliation-upload-card.is-ready {
    border-color: rgba(5, 150, 105, 0.28);
    background: #f8fffb;
}

.reconciliation-upload-card.is-error {
    border-color: rgba(220, 38, 38, 0.26);
    background: #fff7f7;
}

.reconciliation-upload-card.is-pending {
    background: #f8fbff;
}

.reconciliation-upload-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    min-width: 92px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eaf3ff;
    color: var(--sbp-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
}

.reconciliation-upload-card.is-ready .reconciliation-upload-status {
    color: #047857;
    background: #d1fae5;
}

.reconciliation-upload-card.is-error .reconciliation-upload-status {
    color: #b91c1c;
    background: #fee2e2;
}

.reconciliation-process-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f8fbff;
    border-color: rgba(37, 99, 235, 0.22);
}

.reconciliation-report-table tr.reconciliation-row-matched > * {
    background-color: #f0fdf4 !important;
}

.reconciliation-report-table tr.reconciliation-row-unmatched > * {
    background-color: #fff1f2 !important;
}

.reconciliation-report-table tr.reconciliation-row-fees > * {
    background-color: #ecfeff !important;
}

.reconciliation-report-table tr.reconciliation-row-range > *,
.reconciliation-report-table tr.reconciliation-row-manual > * {
    background-color: #fffbeb !important;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 800;
}

.legend-success {
    color: #047857;
    background: #d1fae5;
}

.legend-danger {
    color: #b91c1c;
    background: #fee2e2;
}

.legend-info {
    color: #0e7490;
    background: #cffafe;
}

.legend-warning {
    color: #a16207;
    background: #fef3c7;
}

.chart-box {
    position: relative;
    height: 230px;
}

.suggestion-details {
    display: grid;
    gap: 12px;
}

.suggestion-detail-block {
    border: 1px solid var(--sbp-border);
    border-radius: var(--sbp-radius);
    background: #fff;
    padding: 14px;
}

.suggestion-detail-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--sbp-heading);
}

.suggestion-detail-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.suggestion-detail-totals span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.76rem;
}

.suggestion-items-table {
    font-size: 0.8rem;
}

.suggestion-items-table tfoot th {
    background: #f8fafc;
    color: #334155;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    align-items: end;
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sbp-sidebar-collapsed-width);
}

body.sidebar-collapsed .app-main {
    margin-right: var(--sbp-sidebar-collapsed-width);
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .sidebar-section-toggle span,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .section-chevron {
    display: none;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-section-toggle,
body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 8px;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .fs-workflow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fs-engagement-workflow {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .login-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "panel"
            "hero";
        min-height: auto;
    }

    .login-shell::before {
        inset: 10px;
        border-radius: 18px;
    }

    .login-panel,
    .login-hero {
        min-height: auto;
        padding: 22px;
    }

    .login-panel {
        padding-bottom: 10px;
    }

    .login-hero {
        padding-top: 10px;
        padding-bottom: 64px;
    }

    .login-card {
        max-width: 560px;
        padding: 26px;
    }

    .login-hero-content {
        padding: 28px;
        gap: 24px;
    }

    .login-hero-copy h2 {
        font-size: 1.65rem;
    }

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

    .login-feature-card {
        min-height: auto;
    }

    .login-footer {
        position: static;
        padding: 0 22px 18px;
        flex-wrap: wrap;
    }

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

    .auth-visual {
        min-height: auto;
        padding: 28px;
    }

    .auth-copy {
        margin-top: 52px;
    }

    .app-sidebar {
        transform: translateX(110%);
        width: var(--sbp-sidebar-width);
    }

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

    body.sidebar-collapsed .app-main {
        margin-right: 0;
    }

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

    body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1030;
        background: rgba(15, 23, 42, 0.48);
    }

    .content-area,
    .top-navbar,
    .app-footer {
        padding-inline: 14px;
    }

    .user-meta {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .auth-panel {
        min-height: auto;
        padding: 16px;
    }

    .auth-card {
        padding: 22px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .reconciliation-steps,
    .fs-engagement-workflow,
    .reconciliation-upload-grid {
        grid-template-columns: 1fr;
    }

    .reconciliation-process-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .reconciliation-process-panel .btn,
    .reconciliation-upload-card .input-group .btn {
        width: 100%;
    }

    .reconciliation-upload-card .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .reconciliation-upload-card .input-group > .form-control,
    .reconciliation-upload-card .input-group > .btn {
        width: 100%;
        border-radius: var(--sbp-radius) !important;
    }

    .content-area > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
        margin-bottom: 1rem !important;
    }

    .content-area > .d-flex.justify-content-between .btn {
        width: 100%;
    }

    .top-navbar {
        align-items: flex-start;
        gap: 10px;
    }

    .page-title {
        font-size: 0.98rem;
    }

    .app-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 0.88rem;
    }

    .login-panel,
    .login-hero {
        padding-inline: 14px;
    }

    .login-card {
        padding: 20px;
        border-radius: 16px;
    }

    .login-card-brand {
        align-items: flex-start;
    }

    .login-card-logo,
    .login-hero-logo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 12px;
    }

    .login-heading {
        margin-top: 24px;
    }

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

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-hero-content {
        padding: 22px;
        border-radius: 18px;
    }

    .login-hero-copy h2 {
        font-size: 1.35rem;
    }

    .login-badges span {
        width: 100%;
        justify-content: flex-start;
    }

    .badge,
    .fs-status-badge {
        min-width: 0;
        width: auto;
        max-width: 100%;
    }

    .fs-workflow-steps {
        grid-template-columns: 1fr;
    }

    .fs-workflow-step {
        min-height: 0;
    }

    .content-area {
        padding: 14px;
    }

    .panel,
    .stat-card {
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    }

    .table {
        font-size: 0.82rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.6rem 0.62rem;
    }

    .auth-visual {
        padding: 22px;
    }

    .auth-copy h1 {
        font-size: 1.65rem;
    }
}

/* Refined full-screen SaaS login experience. */
.login-page {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 22%, rgba(14, 165, 233, 0.32), transparent 28%),
        radial-gradient(circle at 86% 14%, rgba(37, 99, 235, 0.28), transparent 26%),
        radial-gradient(circle at 72% 86%, rgba(255, 255, 255, 0.12), transparent 30%),
        linear-gradient(135deg, #0b2545 0%, var(--sbp-secondary, #0b2545) 36%, var(--sbp-primary, #134e8a) 68%, #0ea5e9 130%);
    color: #eaf4ff;
    font-size: 0.9rem;
}

.login-page::before,
.login-page::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
}

.login-page::before {
    width: 320px;
    height: 320px;
    inset-inline-start: 7%;
    top: 10%;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.045);
    filter: blur(0.2px);
}

.login-page::after {
    width: 520px;
    height: 520px;
    inset-inline-end: -210px;
    bottom: -240px;
    border: 80px solid rgba(255, 255, 255, 0.055);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
    grid-template-areas: "hero panel";
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.login-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 0;
    border-radius: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(120deg, transparent, #000 18%, #000 72%, transparent);
}

.login-panel {
    grid-area: panel;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 42px;
}

.login-card {
    width: min(100%, 400px);
    max-width: 400px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(5, 16, 34, 0.26);
    backdrop-filter: blur(18px);
}

.login-card::before {
    content: "";
    position: absolute;
    inset-inline: 22px;
    top: 0;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, #0ea5e9, var(--sbp-primary, #134e8a), #2563eb);
}

.login-card.is-submitting::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.42) 45%, transparent 72%);
    transform: translateX(100%);
    animation: login-card-sheen 0.9s ease-in-out infinite;
}

.login-card-brand,
.login-hero-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-card-logo,
.login-hero-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--sbp-primary, #134e8a), #0ea5e9);
    box-shadow: 0 12px 28px rgba(19, 78, 138, 0.22);
}

.login-card-logo img,
.login-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-card-logo i,
.login-hero-logo i {
    font-size: 1.18rem;
}

.login-card-name,
.login-hero-brand strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--sbp-secondary, #0b2545);
    line-height: 1.35;
}

.login-card-brand small,
.login-hero-brand small {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.3;
}

.login-heading {
    margin: 22px 0 18px;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 0.7rem;
    font-weight: 800;
}

.login-heading h1 {
    margin: 11px 0 4px;
    color: #0f172a;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0;
}

.login-heading p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.7;
}

.login-alert {
    display: flex;
    gap: 9px;
    padding: 10px 11px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #991b1b;
    font-size: 0.78rem;
}

.login-alert i {
    font-size: 1rem;
    margin-top: 2px;
}

.login-alert strong {
    display: block;
    margin-bottom: 3px;
}

.login-alert ul {
    margin: 0;
    padding-inline-start: 17px;
}

.login-form .mb-3 {
    margin-bottom: 0.82rem !important;
}

.login-form .form-label {
    margin-bottom: 0.36rem;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 700;
}

.login-input-group {
    position: relative;
}

.login-input-group .form-control {
    min-height: 43px;
    border-radius: 12px;
    padding-inline-start: 42px;
    padding-inline-end: 42px;
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    color: #0f172a;
    font-size: 0.82rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-input-group .form-control::placeholder {
    color: #94a3b8;
}

.login-input-group .form-control:focus {
    background: #fff;
    border-color: var(--sbp-primary, #134e8a);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.14);
}

.login-input-icon {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 3;
    font-size: 0.96rem;
}

.password-toggle {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 33px;
    height: 33px;
    border: 0;
    border-radius: 10px;
    color: #475569;
    background: transparent;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.16s ease, background 0.16s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--sbp-primary, #134e8a);
    background: rgba(37, 99, 235, 0.08);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 5px 0 18px;
    color: #475569;
    font-size: 0.78rem;
}

.login-options .form-check-input {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.18rem;
}

.login-options a {
    color: var(--sbp-primary, #134e8a);
    font-weight: 800;
    text-decoration: none;
}

.login-options a:hover {
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    min-height: 43px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--sbp-primary, #134e8a), #2563eb 55%, #0ea5e9);
    box-shadow: 0 15px 32px rgba(37, 99, 235, 0.25);
    font-size: 0.84rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.33);
}

.login-submit:disabled {
    opacity: 0.9;
    cursor: wait;
    transform: none;
}

.submit-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.login-submit.is-loading .submit-label {
    display: none;
}

.login-submit.is-loading .submit-loading {
    display: inline-flex;
}

.login-submit.is-loading .spinner-border {
    animation-duration: 0.72s;
}

.login-security-note {
    margin-top: 15px;
    padding: 9px 10px;
    border-radius: 12px;
    color: #166534;
    background: #dcfce7;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.6;
}

.login-hero {
    grid-area: hero;
    min-height: 100vh;
    padding: 36px 46px;
    display: flex;
    align-items: center;
}

.login-hero-content {
    width: min(100%, 680px);
    position: relative;
    overflow: visible;
    border-radius: 0;
    padding: 0;
    color: #fff;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}

.login-hero-content::before,
.login-hero-content::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
}

.login-hero-content::before {
    width: 150px;
    height: 150px;
    inset-inline-start: 10%;
    top: -40px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: login-float 8s ease-in-out infinite;
}

.login-hero-content::after {
    width: 78px;
    height: 78px;
    inset-inline-end: 16%;
    bottom: -28px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: login-float 9s ease-in-out infinite reverse;
}

.login-hero-content > * {
    position: relative;
    z-index: 1;
}

.login-hero-logo {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.login-hero-brand strong {
    color: #fff;
    font-size: 1rem;
}

.login-hero-brand small {
    color: rgba(255, 255, 255, 0.72);
}

.login-hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 11px;
    border-radius: 999px;
    color: #dff6ff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.74rem;
    font-weight: 800;
}

.login-hero-copy h2 {
    max-width: 560px;
    margin: 12px 0 10px;
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 0;
}

.login-hero-copy p {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    line-height: 1.85;
}

.login-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.login-badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.74rem;
    font-weight: 800;
}

.login-feature-grid {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.login-feature-card {
    min-height: 126px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: transform 0.18s ease, background 0.18s ease;
}

.login-feature-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.login-feature-card i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #082f49;
    background: rgba(224, 242, 254, 0.96);
    font-size: 0.95rem;
}

.login-feature-card strong {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.login-feature-card span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    line-height: 1.7;
}

.login-footer {
    position: fixed;
    inset-inline: 34px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    pointer-events: none;
}

.login-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 42%, rgba(14, 165, 233, 0.34), transparent 26%),
        linear-gradient(135deg, rgba(11, 37, 69, 0.96), rgba(19, 78, 138, 0.96));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.login-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.login-loading-card {
    position: relative;
    width: min(100%, 310px);
    min-height: 250px;
    border-radius: 24px;
    padding: 34px 26px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 80px rgba(2, 8, 23, 0.36);
    backdrop-filter: blur(18px);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.26s ease;
}

.login-loading-overlay.is-visible .login-loading-card {
    transform: translateY(0) scale(1);
}

.login-loading-logo {
    position: relative;
    z-index: 2;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28);
    animation: login-logo-pulse 1.25s ease-in-out infinite;
}

.login-loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-loading-logo i {
    color: var(--sbp-primary, #134e8a);
    font-size: 2rem;
}

.login-loading-ring {
    position: absolute;
    top: 30px;
    width: 102px;
    height: 102px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-inline-start-color: rgba(14, 165, 233, 0.95);
    animation: login-ring-spin 0.82s linear infinite;
}

.login-loading-card strong {
    margin-top: 18px;
    font-size: 1rem;
    font-weight: 800;
}

.login-loading-card small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.login-loading-dots {
    display: inline-flex;
    gap: 5px;
    margin-top: 8px;
}

.login-loading-dots i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #fff;
    opacity: 0.48;
    animation: login-dot 0.86s ease-in-out infinite;
}

.login-loading-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.login-loading-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes login-card-sheen {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes login-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(14px);
    }
}

@keyframes login-ring-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes login-logo-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.045);
    }
}

@keyframes login-dot {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.42;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .login-page {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "panel";
        min-height: 100vh;
        height: auto;
    }

    .login-panel,
    .login-hero {
        min-height: auto;
        padding: 22px;
    }

    .login-hero {
        padding-bottom: 8px;
        text-align: center;
    }

    .login-hero-content {
        width: min(100%, 640px);
        margin-inline: auto;
        gap: 16px;
    }

    .login-hero-brand,
    .login-badges {
        justify-content: center;
    }

    .login-hero-copy h2 {
        margin-inline: auto;
        font-size: 1.38rem;
    }

    .login-hero-copy p {
        margin-inline: auto;
        font-size: 0.8rem;
        line-height: 1.8;
    }

    .login-feature-grid {
        display: none;
    }

    .login-panel {
        align-items: flex-start;
        padding-top: 8px;
        padding-bottom: 62px;
    }

    .login-card {
        width: min(100%, 420px);
        padding: 22px;
    }

    .login-footer {
        position: fixed;
        inset-inline: 18px;
        bottom: 10px;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .login-page {
        font-size: 0.86rem;
    }

    .login-panel,
    .login-hero {
        padding-inline: 14px;
    }

    .login-hero {
        padding-top: 18px;
    }

    .login-hero-copy h2 {
        font-size: 1.26rem;
    }

    .login-hero-copy p {
        display: none;
    }

    .login-badges {
        gap: 7px;
    }

    .login-badges span {
        width: auto;
        min-height: 28px;
        padding: 4px 9px;
        font-size: 0.68rem;
    }

    .login-card {
        padding: 19px;
        border-radius: 17px;
    }

    .login-card-logo,
    .login-hero-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 11px;
    }

    .login-heading {
        margin-top: 18px;
    }

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

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}

