:root {
    --primary-color: #8a2123;
    --bs-primary-rgb: 138, 33, 35;
    --primary-hover: #6a1618;
    --secondary-color: #d9a01c;
    --secondary-hover: #b8860b;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --gradient-primary: linear-gradient(135deg, #8a2123 0%, #6a1618 100%);
    --gradient-gold: linear-gradient(135deg, #fcd34d 0%, #d9a01c 100%);
    
    --shadow-sm: 0 2px 4px rgba(138, 33, 35, 0.04);
    --shadow-md: 0 8px 16px rgba(138, 33, 35, 0.06);
    --shadow-lg: 0 15px 35px -5px rgba(138, 33, 35, 0.1);
    --shadow-glow: 0 0 20px rgba(217, 160, 28, 0.25);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217, 160, 28, 0.4) 0%, rgba(217, 160, 28, 0) 70%);
    top: -200px;
    left: -100px;
}

.blob-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(138, 33, 35, 0.3) 0%, rgba(138, 33, 35, 0) 70%);
    bottom: -300px;
    right: -200px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0) 70%);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, -50px) scale(0.9); }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.modern-header {
    background: transparent;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.brand-icon img {
    width: 32px;
    height: 32px;
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 36px;
    background-color: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(138, 33, 35, 0.15);
}

.card-body {
    padding: 3rem;
}

.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(138, 33, 35, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #6a1618 0%, #4a0f11 100%);
    box-shadow: 0 8px 25px rgba(138, 33, 35, 0.4);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    background-color: rgba(248, 250, 252, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drop-zone:hover, .drop-zone.dragover {
    background-color: rgba(217, 160, 28, 0.05);
    border-color: var(--secondary-color);
    box-shadow: inset 0 0 0 4px rgba(217, 160, 28, 0.1);
}

.drop-zone i {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.drop-zone:hover i, .drop-zone.dragover i {
    color: var(--secondary-color);
}

.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(138, 33, 35, 0.1);
}

.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 20px;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    color: var(--text-muted);
    z-index: 1;
}

.stepper-item::after {
    position: absolute;
    content: "";
    border-bottom: 2px dashed rgba(148, 163, 184, 0.3);
    width: calc(100% - 48px);
    left: calc(50% + 24px);
    top: 24px;
    z-index: 1;
    transition: border-color 0.4s ease;
}

.stepper-item:last-child::after { content: none; }

.stepper-item .step-counter {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-sm);
}

.step-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.4s ease;
}

.stepper-item.active {
    color: var(--primary-color);
}

.stepper-item.active .step-counter {
    background: var(--gradient-gold);
    color: white;
    box-shadow: 0 0 25px rgba(217, 160, 28, 0.4);
    transform: scale(1.2);
    border: none;
}

.stepper-item.completed {
    color: var(--success);
}

.stepper-item.completed .step-counter {
    background: var(--success);
    color: white;
    border-color: transparent;
}

.text-primary {
    color: var(--primary-color) !important;
}

.match-score-badge {
    background-color: rgba(138, 33, 35, 0.08);
    border: 1px solid rgba(138, 33, 35, 0.2);
    border-radius: 12px;
    padding: 6px 18px;
    text-align: center;
}

.match-score-badge .score-label {
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.match-score-badge .score-value {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    margin-top: 2px;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.stepper-item.completed::after {
    border-bottom-color: var(--success);
}

.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 6px;
}

.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.table td {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    background: white;
    vertical-align: middle;
}

.table td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.table-hover tbody tr:hover td {
    background-color: #f8fafc;
}

.progress {
    border-radius: 50rem !important;
    background-color: rgba(226, 232, 240, 0.6) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden !important;
}

.progress-bar {
    background: var(--gradient-primary) !important;
    font-weight: 600;
    border-radius: 0 !important;
    transition: width 0.3s ease-out;
}

.list-group-item {
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
    padding: 1.5rem 2rem;
}

.modal-body {
    padding: 2rem;
}

.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.bg-light { background-color: #f8fafc !important; }

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.text-truncate-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.quote-box {
    border-left: 3px solid var(--primary-color);
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.kpi-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.tab-content-panel {
    min-height: 300px;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f4f6f8;
    background-image: radial-gradient(rgba(138, 33, 35, 0.15) 1.5px, transparent 1.5px), radial-gradient(rgba(217, 160, 28, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 40px 40px;
    background-position: 0 0, 25px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loader-logo {
    width: 150px;
    height: 150px;
    animation: spin 3s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #8a2123;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Mobile Responsiveness Fixes */
@media (max-width: 768px) {
    /* Button Fixes */
    .btn-lg {
        width: 100%;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }
    .btn.px-4, .btn.px-5 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    .modern-header .btn {
        padding: 0.4rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Stepper Fixes */
    .stepper-wrapper {
        padding: 0 5px;
    }
    .step-name {
        font-size: 0.75rem;
        text-align: center;
        line-height: 1.2;
        padding: 0 2px;
    }
    .stepper-item .step-counter {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    .stepper-item::after {
        width: calc(100% - 36px);
        left: calc(50% + 18px);
        top: 18px;
    }

    /* Candidate Modal Header Fix */
    .modal-header {
        flex-direction: column;
        align-items: flex-start !important;
        position: relative;
    }
    .modal-header > div:first-child {
        margin-bottom: 1rem;
        padding-right: 2rem;
    }
    .modal-header .d-flex.align-items-center.text-end {
        width: 100%;
        justify-content: flex-start;
        margin-right: 0 !important;
    }
    .modal-header .btn-close {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }
}

/* Online Status Pill */
.badge-online-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1.5px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.3;
}

.online-green-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
    display: inline-block;
    box-shadow: 0 0 5px rgba(22, 163, 74, 0.7);
}
