@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --portal-navy-dark: #09111e;
    --portal-navy-panel: #0f1c30;
    --portal-sidebar: #0d1726;
    --portal-burgundy: #7c241d;
    --portal-burgundy-hover: #962b23;
    --portal-amber: #f59e0b;
    --portal-slate: #1e293b;
    --portal-text-light: #f8fafc;
    --portal-text-muted: #94a3b8;
    --portal-bg-light: #f1f5f9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--portal-bg-light);
    color: #0f172a;
}

/* =========================================================
   1. SPLIT-SCREEN AUTHENTICATION (Login, MFA, Recovery)
   ========================================================= */
body.sewp-auth-split {
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
}

.auth-split-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.auth-hero-panel {
    flex: 1.15;
    background: radial-gradient(circle at 18% 22%, #1a3052 0%, var(--portal-navy-dark) 75%);
    color: #ffffff;
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-right: 4px solid var(--portal-burgundy);
}

.auth-hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.auth-brand-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.coltcam-lockup {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.coltcam-mark {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--portal-burgundy), #4d1410);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.coltcam-wordmark {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffffff;
    line-height: 1.1;
}

.coltcam-tagline {
    font-size: 0.72rem;
    color: var(--portal-text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.sewp-program-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
}

.auth-hero-main {
    position: relative;
    z-index: 2;
    max-width: 580px;
    margin: auto 0;
    padding: 2.5rem 0;
}

.chop-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--portal-amber);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.auth-hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 1rem;
}

.auth-hero-lead {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.gov-compliance-box {
    background: rgba(9, 17, 30, 0.72);
    border-left: 3px solid var(--portal-amber);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 8px 8px 0;
    padding: 1.15rem 1.35rem;
    font-size: 0.73rem;
    line-height: 1.55;
    color: #94a3b8;
}

.gov-compliance-box strong {
    color: #e2e8f0;
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-hero-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    color: #94a3b8;
}

.auth-hero-footer a {
    color: #cbd5e1;
    text-decoration: none;
}

.auth-hero-footer a:hover {
    color: var(--portal-amber);
}

.auth-form-panel {
    flex: 0.85;
    min-width: 440px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-step-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #fef2f2;
    color: var(--portal-burgundy);
    border: 1px solid #fecaca;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.auth-form-heading {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.auth-form-sub {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.85rem;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-group i.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
}

.auth-form-control {
    width: 100%;
    padding: 0.78rem 1rem 0.78rem 2.65rem;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.auth-form-control:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--portal-burgundy);
    box-shadow: 0 0 0 4px rgba(124, 36, 29, 0.1);
}

.auth-otp-input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.45em;
    text-align: center;
    font-family: 'Inter', monospace;
    color: #0f172a;
    background-color: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
}

.auth-otp-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--portal-burgundy);
    box-shadow: 0 0 0 4px rgba(124, 36, 29, 0.12);
}

.btn-auth-primary {
    width: 100%;
    background-color: var(--portal-burgundy);
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(124, 36, 29, 0.2);
}

.btn-auth-primary:hover {
    background-color: var(--portal-burgundy-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-auth-secondary {
    width: 100%;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-auth-secondary:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.mfa-qr-frame {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 0.85rem;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.mfa-secret-code {
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    color: var(--portal-burgundy);
    font-family: monospace;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    word-break: break-all;
}

/* =========================================================
   2. PORTAL WORKBENCH & SIDEBAR LAYOUT
   ========================================================= */
.portal-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--portal-bg-light);
}

.portal-sidebar {
    width: 265px;
    background-color: var(--portal-sidebar);
    color: var(--portal-text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Official Coltcam Logo Lockup (Strictly Bounded) --- */
.portal-sidebar-header {
    padding: 0.9rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coltcam-logo-sidebar {
    background: #ffffff;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 225px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.coltcam-logo-sidebar img {
    display: block;
    width: 100% !important;
    max-width: 195px !important;
    height: auto !important;
    max-height: 40px !important;
    object-fit: contain !important;
}

.coltcam-logo-card {
    background: #ffffff;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 240px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.coltcam-logo-img {
    display: block;
    width: 100% !important;
    max-width: 210px !important;
    height: auto !important;
    max-height: 46px !important;
    object-fit: contain !important;
}

.coltcam-logo-topbar {
    display: block;
    width: auto !important;
    max-width: 165px !important;
    height: 34px !important;
    max-height: 34px !important;
    object-fit: contain !important;
}

.portal-user-box {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portal-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--portal-burgundy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.portal-nav-label {
    padding: 1.25rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--portal-text-muted);
    font-weight: 700;
}

.portal-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-nav-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.portal-nav-item a:hover,
.portal-nav-item a.active {
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    border-left-color: var(--portal-amber);
}

.portal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.portal-topbar {
    background: #ffffff;
    padding: 0.9rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-content {
    padding: 1.75rem 2rem;
}

/* =========================================================
   3. DEVEXTREME CARDS, GRIDS & WIZARD STEPS
   ========================================================= */
.dx-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dx-kpi-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    border-left: 5px solid var(--portal-navy-dark);
    box-shadow: 0 2px 8px rgba(15, 28, 46, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dx-kpi-box.burgundy { border-left-color: var(--portal-burgundy); }
.dx-kpi-box.amber { border-left-color: var(--portal-amber); }
.dx-kpi-box.emerald { border-left-color: #059669; }

.dx-kpi-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}

.dx-kpi-number {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 0.25rem;
}

.dx-kpi-sub {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
}

.dx-widget-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(15, 28, 46, 0.04);
    height: 100%;
}

.dx-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.dx-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--portal-navy-dark);
    margin: 0;
}

.badge-status {
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #b45309; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-not-canty { background: #dbeafe; color: #1d4ed8; }

.wizard-step-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wizard-step-pill {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.wizard-step-pill.active {
    background: #ffffff;
    border-color: var(--portal-burgundy);
    color: var(--portal-navy-dark);
    box-shadow: 0 4px 12px rgba(110, 38, 32, 0.12);
}

.wizard-step-pill.completed {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.wizard-pane { display: none; }
.wizard-pane.active { display: block; }

@media (max-width: 992px) {
    .auth-split-wrapper { flex-direction: column; }
    .auth-hero-panel { padding: 2rem 1.5rem; }
    .auth-form-panel { min-width: 100%; padding: 2.5rem 1.5rem; }
}