/* ============================================================
   FXI Global Career Career Portal - Custom Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #1b28b5;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2131DE;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out both;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out both;
}

.animate-slide-right {
    animation: slideInRight 0.5s ease-out both;
}

.animate-slide-left {
    animation: slideInLeft 0.5s ease-out both;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out both;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Staggered animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* === GLASS MORPHISM === */
.glass {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.glass-light {
    background: rgba(241, 245, 249, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* === GRADIENT BACKGROUNDS === */
.gradient-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

.gradient-primary {
    background: linear-gradient(135deg, #2131DE, #8b5cf6, #EE4411);
}

.gradient-success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.gradient-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.gradient-text {
    background: linear-gradient(135deg, #2131DE, #EE4411);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #2131DE, #1b28b5);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.2);
    color: #e2e8f0;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.3);
    border-color: rgba(100, 116, 139, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-ghost {
    background: transparent;
    color: #94a3b8;
}

.btn-ghost:hover {
    color: #e2e8f0;
    background: rgba(100, 116, 139, 0.15);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === FORM INPUTS === */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.form-input:focus {
    border-color: #2131DE;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.form-input::placeholder {
    color: #64748b;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 6px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* === CARDS === */
.card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.card-hover:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), transparent, rgba(217, 70, 239, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-glow:hover::before {
    opacity: 1;
}

/* === STAT CARDS === */
.stat-card {
    position: relative;
    overflow: hidden;
}

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

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #5361f1;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-info {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.badge-neutral {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

/* === STATUS DOT === */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot-active {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot-inactive {
    background: #64748b;
}

.status-dot-blocked {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* === JOB TRACKER === */
.tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}

.tracker-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 0;
}

.tracker-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2131DE, #EE4411);
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
    transition: width 1s ease;
}

.tracker-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tracker-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.5s ease;
}

.tracker-dot-pending {
    background: rgba(100, 116, 139, 0.3);
    color: #64748b;
    border: 2px solid rgba(100, 116, 139, 0.3);
}

.tracker-dot-active {
    background: linear-gradient(135deg, #2131DE, #EE4411);
    color: white;
    border: 2px solid #2131DE;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: pulse-glow 2s infinite;
}

.tracker-dot-completed {
    background: #10b981;
    color: white;
    border: 2px solid #10b981;
}

.tracker-label {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    white-space: nowrap;
}

.tracker-label-active {
    color: #5361f1;
    font-weight: 600;
}

.tracker-label-completed {
    color: #34d399;
}

/* === TOAST === */
.toast {
    animation: toast-in 0.4s ease-out;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    pointer-events: all;
}

.toast-exit {
    animation: toast-out 0.3s ease-in forwards;
}

.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    backdrop-filter: blur(10px);
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    backdrop-filter: blur(10px);
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
    backdrop-filter: blur(10px);
}

.toast-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
    backdrop-filter: blur(10px);
}

/* === OTP INPUT === */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    color: #e2e8f0;
    outline: none;
    transition: all 0.3s;
    caret-color: #2131DE;
}

.otp-input:focus {
    border-color: #2131DE;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.otp-input.filled {
    border-color: #2131DE;
    background: rgba(99, 102, 241, 0.1);
}

/* === QUIZ TIMER === */
.quiz-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 18px;
}

.quiz-timer-safe {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.quiz-timer-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.quiz-timer-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    animation: pulse-glow 1s infinite;
}

/* === NAVIGATION === */
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.nav-link:hover {
    color: #e2e8f0;
    background: rgba(100, 116, 139, 0.15);
}

.nav-link-active {
    color: #5361f1 !important;
    background: rgba(99, 102, 241, 0.1) !important;
    border-left: 3px solid #2131DE;
}

/* === SIDEBAR === */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(100, 116, 139, 0.1);
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-collapsed {
    transform: translateX(-100%);
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content-full {
    margin-left: 0;
}

/* === DATA TABLE === */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.08);
    font-size: 14px;
    color: #cbd5e1;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* === MARKDOWN OUTPUT === */
.md-content h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f1f5f9;
}

.md-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: #e2e8f0;
}

.md-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 12px 0 6px;
    color: #cbd5e1;
}

.md-content p {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #94a3b8;
}

.md-content ul,
.md-content ol {
    margin: 8px 0 12px 20px;
    color: #94a3b8;
}

.md-content li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.md-content code {
    background: rgba(99, 102, 241, 0.15);
    color: #5361f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.md-content pre {
    background: rgba(15, 23, 42, 0.8);
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 12px 0;
}

.md-content pre code {
    background: none;
    padding: 0;
}

.md-content strong {
    color: #e2e8f0;
}

.md-content blockquote {
    border-left: 3px solid #2131DE;
    padding-left: 16px;
    color: #94a3b8;
    margin: 12px 0;
}

/* === CHIP/TAG === */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: #5361f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.chip-removable {
    cursor: pointer;
}

.chip-removable:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
}

/* === SPINNER === */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rotate 0.6s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0 !important;
    }

    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 20px;
    }

    .tracker {
        flex-wrap: wrap;
        gap: 12px;
    }

    .tracker-line,
    .tracker-progress {
        display: none;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 10px 8px;
    }

    .toast {
        min-width: 280px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 16px;
    }

    .otp-container {
        gap: 6px;
    }

    .otp-input {
        width: 38px;
        height: 46px;
        font-size: 18px;
    }
}

/* === LANDING PAGE === */
.hero-gradient {
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(217, 70, 239, 0.1) 0%, transparent 50%);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.decoration-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
}

/* === TAB NAVIGATION === */
.tab-nav {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(100, 116, 139, 0.15);
}

.tab-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
}

.tab-btn:hover {
    color: #e2e8f0;
}

.tab-btn-active {
    background: linear-gradient(135deg, #2131DE, #1b28b5);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.15);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: #2131DE;
    color: #5361f1;
}

.page-btn-active {
    background: linear-gradient(135deg, #2131DE, #1b28b5);
    color: white;
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Notification dot */
.notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* === MOBILE MENU TOGGLE === */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}