/* Awesome Workforce Module - Standalone Company Design System */
:root {
    --sidebar-width: 260px;
    --wf-primary: #E8663D;
    --wf-primary-hover: #d14d24;
    --wf-primary-light: #fef2ee;
    --wf-primary-dark: #c74520;
    --wf-secondary: #0f172a;
    --wf-accent: #f59e0b;
    --bg-main: #f8fafc;
    --bg-gradient: #E8663D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.wf-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: #334155;
    min-height: 100vh;
}

body.wf-auth-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
}

/* OVERRIDE ALL BOOTSTRAP PRIMARY CLASSES TO BRAND ORANGE */
.btn-primary {
    background-color: var(--wf-primary) !important;
    border-color: var(--wf-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--wf-primary-hover) !important;
    border-color: var(--wf-primary-hover) !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: var(--wf-primary) !important;
    border-color: var(--wf-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--wf-primary) !important;
    border-color: var(--wf-primary) !important;
    color: #ffffff !important;
}

.text-primary {
    color: var(--wf-primary) !important;
}

.bg-primary {
    background-color: var(--wf-primary) !important;
    color: #ffffff !important;
}

.bg-primary-subtle {
    background-color: var(--wf-primary-light) !important;
    color: var(--wf-primary) !important;
}

.border-primary {
    border-color: var(--wf-primary) !important;
}

/* Form Controls Focus State */
.form-control:focus, .form-select:focus {
    border-color: var(--wf-primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 94, 20, 0.15) !important;
}

/* Split-Screen Auth Layout */
.wf-auth-container {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.wf-auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #ffffff;
}

.wf-auth-form-wrapper {
    width: 100%;
    max-width: 480px;
}

.wf-auth-form-wrapper.wide {
    max-width: 680px;
}

.wf-logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.wf-logo-section .wf-icon-badge {
    width: 64px;
    height: 64px;
    background: var(--wf-primary-light);
    color: var(--wf-primary);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.wf-logo-section .wf-icon-badge [data-lucide], .wf-logo-section .wf-icon-badge i {
    width: 32px;
    height: 32px;
}

.wf-logo-section h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.wf-logo-section p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Form Control & Select Controls - Main Site Aesthetics */
.form-control, .form-select {
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.925rem;
    font-weight: 500;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.25s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--wf-primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 94, 20, 0.12) !important;
    background-color: #ffffff;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Input Group Alignment (e.g. Email + Send OTP button) */
.input-group {
    display: flex;
    width: 100%;
}

.input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    flex: 1;
}

.input-group .btn {
    height: 48px;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    font-weight: 700;
    padding-left: 20px;
    padding-right: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Form Labels & Section Headers */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
    margin-top: 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title [data-lucide], .form-section-title i {
    color: var(--wf-primary);
}

.form-group {
    margin-bottom: 20px;
}

.password-toggle {
    position: relative;
}

.password-toggle .toggle-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

/* Primary Button Styling */
.btn-wf-primary {
    height: 50px;
    background: linear-gradient(135deg, var(--wf-primary) 0%, var(--wf-primary-hover) 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    box-shadow: 0 4px 14px rgba(255, 94, 20, 0.3);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-wf-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 94, 20, 0.4);
    color: #ffffff !important;
}

.btn-wf-primary:disabled {
    background: #cbd5e1 !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Brand Side Bar (Right Column) */
.wf-auth-brand-side {
    flex: 1;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.wf-auth-brand-side::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.brand-content {
    position: relative;
    z-index: 1;
    color: #ffffff;
    max-width: 480px;
}

.brand-content h3 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.25;
}

.brand-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.features-grid {
    margin-top: 40px;
    display: grid;
    gap: 16px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.feature-icon-circle {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
}

.feature-icon-circle [data-lucide] {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.feature-text h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: #ffffff;
}

.feature-text p {
    font-size: 0.875rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 991px) {
    .wf-auth-brand-side {
        display: none;
    }
}

/* Portal Layout */
.wf-layout {
    display: flex;
    min-height: 100vh;
}

.wf-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    color: #334155;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid #e2e8f0;
}

.wf-brand {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.wf-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--wf-primary-light);
    color: var(--wf-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.wf-agent-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-hover));
    color: #ffffff;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #94a3b8;
    padding: 0.75rem 1rem 0.25rem 1rem;
}

.wf-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.wf-nav-link i, .wf-nav-link [data-lucide] {
    width: 20px;
    height: 20px;
}

.wf-nav-link:hover {
    color: var(--wf-primary);
    background: var(--wf-primary-light);
}

.wf-nav-link.active {
    color: #ffffff !important;
    background: var(--wf-primary) !important;
}

.wf-main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wf-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* KPI Cards */
.kpi-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon [data-lucide] {
    width: 20px;
    height: 20px;
}

.kpi-icon.primary { background: var(--wf-primary-light); color: var(--wf-primary); }
.kpi-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--wf-accent); }
.kpi-icon.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.kpi-icon.info { background: rgba(99, 102, 241, 0.1); color: #6366f1; }

.kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.badge-status {
    padding: 0.35em 0.75em;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pending { background: #fef3c7; color: #d97706; }
.badge-grace { background: #e0f2fe; color: #0284c7; }
.badge-matured { background: #dcfce7; color: #15803d; }
.badge-revoked { background: #fee2e2; color: #b91c1c; }

/* Lucide icon spin animation */
@keyframes wf-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.fa-spin, [data-lucide="loader-2"].fa-spin {
    animation: wf-spin 1s linear infinite;
}

/* Sidebar overlay */
.wf-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .wf-sidebar {
        transform: translateX(-100%);
    }
    .wf-sidebar.show {
        transform: translateX(0);
    }
    .wf-sidebar.show ~ .wf-sidebar-overlay,
    .wf-sidebar-overlay.active {
        display: block;
    }
    .wf-main-content {
        margin-left: 0;
    }

    .wf-topbar {
        padding: 0.75rem 1rem !important;
    }

    .kpi-card {
        padding: 1rem;
    }
    .kpi-value {
        font-size: 1.25rem;
    }
    .kpi-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .kpi-icon [data-lucide] {
        width: 18px;
        height: 18px;
    }

    .card-header h6 {
        font-size: 0.875rem;
    }

    .table {
        font-size: 0.8rem;
    }
    .table th, .table td {
        padding: 0.5rem 0.6rem;
        white-space: nowrap;
    }

    .badge-status {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }

    .p-4 {
        padding: 1rem !important;
    }

    .card-body.p-0 .table-responsive {
        max-height: 60vh;
    }
}

@media (max-width: 400px) {
    .kpi-value {
        font-size: 1.15rem;
    }
    .kpi-card {
        padding: 0.85rem;
    }
    .input-group .form-control {
        font-size: 0.75rem;
    }
}
