/* ===============================================
   VINCUM — Dark Theme Premium Design System
   Background: #0D0D0D  |  Accent: #6C63FF
   =============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Shared Variables */
    --success: #34D399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #FBBF24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --error: #F87171;
    --error-bg: rgba(248, 113, 113, 0.12);
    --radius: 7px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Default Theme (Dark) */
    --bg-primary: #0D0D0D;
    --bg-secondary: #141418;
    --bg-card: #1A1A22;
    --bg-input: #1E1E28;
    --bg-hover: #252530;
    --border-color: #2A2A38;
    --border-focus: #2563EB;
    --accent: #2563EB;
    --accent-light: #60A5FA;
    --accent-glow: rgba(37, 99, 235, 0.3);
    --accent-gradient: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0B8;
    --text-muted: #6B6B80;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --navbar-bg: rgba(20, 20, 24, 0.85);
}

[data-theme="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #F0F2F5;
    /* Slightly darker than primary for differentiation */
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-hover: #E9ECEF;
    --border-color: #DEE2E6;
    --border-focus: #004071;
    --accent: #004071;
    --accent-light: #26C1C1;
    --accent-glow: rgba(0, 64, 113, 0.15);
    --accent-gradient: linear-gradient(135deg, #004071 0%, #26C1C1 100%);
    --text-primary: #1A1D23;
    --text-secondary: #333333;
    /* Darker for better contrast */
    --text-muted: #6C757D;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.06);
    --navbar-bg: rgba(248, 249, 250, 0.95);
    /* Light greyish white for distinguishable header */

    /* Adjust specific elements for light mode */
    --success-bg: rgba(52, 211, 153, 0.2);
    --warning-bg: rgba(251, 191, 36, 0.2);
    --error-bg: rgba(248, 113, 113, 0.2);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-light);
}

.auth-split-inner a {
    color: #E0E0E0;
    text-decoration: none;
    transition: var(--transition);
}

.auth-split-inner a:hover {
    color: #FFFFFF !important;
}

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

/* --- Navigation --- */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    /* Thin menu as requested */
    position: relative;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    position: relative;
    z-index: 10;
    text-decoration: none;
    min-width: 200px;
    /* Ensures space for the floating logo */
}

/* Theme-specific logo visibility */
html[data-theme="dark"] #brand-logo-dark,
html:not([data-theme="light"]) #brand-logo-dark {
    display: block !important;
}

html[data-theme="dark"] #brand-logo-light,
html:not([data-theme="light"]) #brand-logo-light {
    display: none !important;
}

html[data-theme="light"] #brand-logo-light {
    display: block !important;
}

html[data-theme="light"] #brand-logo-dark {
    display: none !important;
}

.navbar-brand .logo-img {
    height: 120px;
    /* Big logo that pops out */
    width: auto;
    max-width: 320px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: var(--transition);
}

.navbar-brand .logo-img:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Navbar Toggle (Hamburger) */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.toggle-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-logo .logo-img {
    height: 173px;
    margin: -45px;
    position: static;
    transform: none;
}

/* Theme-specific icon visibility */
html[data-theme="dark"] #theme-toggle-dark-icon,
html:not([data-theme="light"]) #theme-toggle-dark-icon {
    display: none !important;
}

html[data-theme="dark"] #theme-toggle-light-icon,
html:not([data-theme="light"]) #theme-toggle-light-icon {
    display: inline-block !important;
}

html[data-theme="light"] #theme-toggle-dark-icon {
    display: inline-block !important;
}

html[data-theme="light"] #theme-toggle-light-icon {
    display: none !important;
}

.navbar-brand .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.navbar-links a.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-light);
}

/* Responsiveness */
@media (max-width: 992px) {
    .navbar-inner {
        height: 100px;
        /* Persisting user's 100px test */
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
    }

    .navbar-toggle {
        display: flex;
        z-index: 1100;
        margin-left: auto;
    }

    .navbar-brand {
        min-width: unset;
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-right: auto;
        padding: 0;
        position: static;
        overflow: visible;
    }

    .navbar-links {
        display: none;
        /* User requested: fully disabled when hidden */
        visibility: hidden;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 24px;
        gap: 24px;
        z-index: 1050;
        border-left: 1px solid var(--border-color);
        list-style: none;
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
    }

    .navbar-links.active {
        display: flex;
        visibility: visible;
        animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }


    /* Staggered item animation */
    .navbar-links li {
        width: auto;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .navbar-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggering the items */
    .navbar-links li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .navbar-links li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .navbar-links li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .navbar-links li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .navbar-links li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .navbar-links a {
        display: inline-block;
        width: auto;
        padding: 12px 24px;
        font-size: 1.25rem;
        /* Larger links for mobile */
    }

    .navbar-brand .logo-img {
        position: static;
        transform: none;
        height: 100px;
        /* Persisting user's 100px height test */
        width: auto;
        max-width: 180px;
        filter: none;
        margin: 0;
    }

    .navbar-brand .logo-img:hover {
        transform: scale(1.05);
        /* Simpler hover on mobile */
    }

    /* Hamburger Animation */
    .navbar-toggle.active .toggle-bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .navbar-toggle.active .toggle-bar:nth-child(2) {
        opacity: 0;
        transform: translateX(10px);
    }

    .navbar-toggle.active .toggle-bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .navbar-inner {
        flex-direction: row;
        height: 60px;
        padding: 16px 0;
        gap: 16px;
        text-align: center;
    }
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
    background: var(--error-bg);
}

/* --- Auth Pages (Login / Register) --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease-out;
}

/* --- New Split Auth Layout --- */
.auth-split-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-primary);
}

.auth-split-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: var(--bg-primary);
    z-index: 2;
}

.auth-split-inner {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease-out both;
}

.auth-split-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: block;
}

.auth-split-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(13, 13, 13, 0.2), rgba(13, 13, 13, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 60px;
}

.auth-split-tagline {
    max-width: 500px;
    color: #FFFFFF;
}

.auth-split-tagline h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.auth-split-tagline p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .auth-split-image {
        display: none;
    }

    .auth-split-form {
        flex: 1;
    }
}

.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-card .subtitle, .auth-split-inner .subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 0.9375rem;
}

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

.auth-logo .brand-name {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.auth-logo .brand-tagline {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 4px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.025em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: var(--transition);
}

.btn-toggle-password:hover {
    color: var(--text-primary);
}

.form-control.is-invalid {
    border-color: var(--error);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A0A0B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select[multiple].form-control {
    background-image: none;
    padding: 8px;
    height: auto;
    min-height: 120px;
}

select[multiple].form-control option {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 2px;
}

select[multiple].form-control option:checked {
    background: var(--accent) linear-gradient(0deg, var(--accent) 0%, var(--accent) 100%);
    color: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.char-counter.text-error {
    color: var(--error);
    font-weight: 700;
}


/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
}

.btn-google {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-google:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

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

/* --- Alerts & Messages --- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.3s ease-out;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-light);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* --- Stepper (Onboarding) --- */
.stepper-wrapper {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 24px;
}

.stepper-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px;
}

.stepper-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.step-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: var(--transition);
}

.stepper-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.stepper-step.active .step-number {
    background: var(--accent-gradient);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 16px var(--accent-glow);
}

.stepper-step.active .step-label {
    color: var(--text-primary);
}

.stepper-step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.stepper-step.completed .step-label {
    color: var(--success);
}

.stepper-line.completed {
    background: var(--success);
}

.stepper-line.active {
    background: var(--accent);
}

.step-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.4s ease-out;
}

.step-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.step-content .step-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 32px;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* --- Dashboard --- */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.dashboard-main {
    flex: 1;
    padding: 32px;
    max-width: 100%;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.dashboard-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stat-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-light);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* --- Filter Bar (main styles at bottom of file) --- */

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-group .form-control {
    padding: 8px 12px;
    font-size: 0.8125rem;
    min-width: 140px;
}

.filter-bar .btn {
    padding: 10px 20px;
}

/* --- Opportunity Cards --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.opportunity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.opportunity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.opportunity-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.score-badge {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 700;
    min-width: 52px;
    text-align: center;
}

.score-green {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.score-yellow {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.card-detail .icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.card-detail .value {
    font-weight: 500;
    color: var(--text-primary);
}

.card-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-action {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition);
}

.opportunity-card:hover .card-action {
    opacity: 1;
    transform: translateX(0);
}

/* --- Side Panel (Match Detail) --- */
.side-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

.side-panel-overlay.active {
    display: block;
    animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.side-panel {
    display: none;
    /* User requested: disabled when hidden */
    visibility: hidden;
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 2001;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.side-panel.active {
    display: block;
    visibility: visible;
    animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}


.side-panel-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.side-panel-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: break-word;
    padding-right: 12px;
    flex: 1;
}


.side-panel-body {
    padding: 24px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
}

.detail-section p,
.detail-section .detail-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.65;
    word-break: break-word;
    overflow-wrap: break-word;
}


.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.score-row .label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.score-row .points {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--accent-light);
}

/* --- Profile Page --- */
.profile-layout {
    max-width: 800px;
    margin: 32px auto;
    padding: 0 24px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.profile-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--accent);
}

.history-title {
    font-size: 0.8125rem;
    font-weight: 500;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    animation: fadeIn 0.5s ease-out;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    max-width: 400px;
    margin: 0 auto;
}

/* --- File Upload --- */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.file-upload:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.05);
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload .upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.file-upload .upload-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-upload .upload-text span {
    color: var(--accent);
    font-weight: 600;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {


    .navbar-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .stepper-header {
        flex-direction: column;
        gap: 12px;
    }

    .stepper-line {
        width: 2px;
        height: 24px;
    }

    .stepper-step {
        flex-direction: column;
        text-align: center;
    }

    .step-content {
        padding: 24px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group .form-control {
        min-width: 100%;
    }

    .filter-bar .btn,
    .filter-bar a {
        width: 100%;
    }

    .dashboard-main {
        padding: 20px 16px;
    }

    .side-panel {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }

    .side-panel.active {
        right: 0;
    }

    .navbar-links a {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.25rem;
    }

    .stat-badge {
        font-size: 0.75rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-action {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }

    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        padding: 12px;
    }

    .n8n-popup-card {
        padding: 24px 16px;
        width: 95%;
    }
}

/* --- Checkbox Override --- */
input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: 700;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.side-panel::-webkit-scrollbar {
    width: 6px;
}

.side-panel::-webkit-scrollbar-track {
    background: transparent;
}

.side-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .match-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .match-score {
        margin-top: 12px;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Base animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

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

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

/* --- Glass Panel Effect --- */
.glass {
    background: rgba(26, 26, 34, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- OAuth Divider --- */
.oauth-divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    gap: 16px;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.oauth-divider span {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: lowercase;
}

/* --- LinkedIn Button --- */
.btn-linkedin {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: var(--transition);
}

.btn-linkedin:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-linkedin:active {
    transform: translateY(0);
}

/* --- Google Button --- */
.btn-google {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: var(--transition);
}

.btn-google:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-google:active {
    transform: translateY(0);
}

/* --- Registration Stepper --- */
.reg-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.reg-step {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reg-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: var(--transition);
}

.reg-step.active .reg-step-num {
    background: var(--accent-gradient);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 12px var(--accent-glow);
}

.reg-step-line {
    width: 48px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    transition: var(--transition);
}

.reg-step-line.active {
    background: var(--accent);
}

/* --- Tom Select Custom Dark Theme --- */
.ts-wrapper .ts-control {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.9375rem;
}

.ts-wrapper.single .ts-control,
.ts-wrapper.is-active .ts-control {
    background: var(--bg-primary);
}

.ts-wrapper.focus .ts-control {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.ts-dropdown,
.ts-control,
.ts-control input {
    color: var(--text-primary);
    font-family: inherit;
}

.ts-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin-top: 4px;
}

.ts-dropdown .option {
    padding: 10px 16px;
    cursor: pointer;
}

.ts-dropdown .active,
.ts-dropdown .option:hover {
    background: var(--bg-hover) !important;
    color: var(--accent) !important;
}

.ts-control .item {
    background: var(--accent) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 10px !important;
}

.ts-control .item .remove {
    border-left-color: rgba(255, 255, 255, 0.2) !important;
}

.ts-control .item .remove:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

@keyframes popupScaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- n8n Info Popup --- */
.n8n-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.n8n-popup-overlay.active {
    display: block;
}

.n8n-popup-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 450px;
    z-index: 3001;
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.2);
    display: none;
    text-align: center;
}

.n8n-popup-card.active {
    display: block;
    animation: popupScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.n8n-popup-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.n8n-popup-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.n8n-popup-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- Admin Panel Tables --- */
.admin-layout {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 20px;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
}

.status-badge.banned {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-badge.pending {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.role-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.role-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.role-select {
    padding: 6px 12px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* ─── "Nuevos Hoy" Button ─── */
.btn-nuevos-hoy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.25);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.btn-nuevos-hoy:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-nuevos-hoy.active {
    background: var(--accent-gradient);
    color: #FFFFFF;
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-nuevos-hoy .btn-nuevos-hoy-icon {
    font-size: 1rem;
}

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--error);
    color: #FFFFFF;
    animation: badgePulse 2s ease-in-out infinite;
}

.btn-nuevos-hoy.active .badge-count {
    background: rgba(255, 255, 255, 0.25);
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ─── Filter Bar (Improved Layout) ─── */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.filter-row-basic {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-row-advanced {
    display: none;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    animation: filterSlideDown 0.3s ease-out;
}

.filter-row-advanced.show {
    display: flex;
}

@keyframes filterSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.btn-toggle-filters {
    white-space: nowrap;
}

/* ─── Card Discard Button ─── */
.card-discard-form {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.btn-discard {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    padding: 0;
    font-family: inherit;
}

.opportunity-card:hover .btn-discard {
    opacity: 1;
}

.btn-discard:hover {
    background: var(--error-bg);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.3);
    transform: scale(1.1);
}

/* ─── Active Filter Banner ─── */
.filter-active-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--accent-light);
    font-weight: 500;
    animation: fadeInDown 0.3s ease-out;
}

.btn-clear-filter {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-clear-filter:hover {
    color: var(--error);
    background: var(--error-bg);
}

/* ─── Responsive: Filter Bar ─── */
@media (max-width: 768px) {

    .filter-row-basic,
    .filter-row-advanced {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group .form-control {
        min-width: unset;
        width: 100%;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-stats {
        flex-wrap: wrap;
        width: 100%;
    }

    .btn-nuevos-hoy {
        flex: 1;
        justify-content: center;
    }

    .filter-active-banner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .btn-discard {
        opacity: 1;
    }

    /* Side Panel Mobile Fixes */
    .side-panel {
        display: none;
        visibility: hidden;
        width: 100vw;
        max-width: 100vw;
        right: 0;
        /* Reset right for transform animation */
        overflow-x: hidden;
    }

    .side-panel.active {
        display: block;
        visibility: visible;
    }



    .side-panel-header {
        padding: 16px 20px;
    }

    .side-panel-body {
        padding: 20px;
    }

    .score-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 14px;
    }

    .score-row .points {
        align-self: flex-end;
        background: rgba(37, 99, 235, 0.1);
        padding: 2px 8px;
        border-radius: 4px;
    }
}

.no-scroll {
    overflow: hidden;
}

/* ===== SAVE BUTTON (Guardar) ===== */
.btn-guardar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-hover);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.btn-guardar:hover {
    border-color: #FBBF24;
    color: #FBBF24;
    background: rgba(251, 191, 36, 0.08);
}

.btn-guardar.active {
    background: rgba(251, 191, 36, 0.1);
    border-color: #FBBF24;
    color: #FBBF24;
}

.btn-guardar .guardar-icon {
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-guardar:hover .guardar-icon,
.btn-guardar.active .guardar-icon {
    transform: scale(1.3) rotate(-5deg);
}

/* ===== LEAFLET MAP CONTAINER ===== */
.licitacion-map {
    height: 220px;
    width: 100%;
    border-radius: var(--radius);
    margin-top: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 0;
}

.licitacion-map .leaflet-container {
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ===== ORGANISMO SECTION ===== */
.organismo-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, transparent 100%);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius);
    padding: 16px;
}

.organismo-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-top: 6px;
}

/* ===== DETAIL SECTION TITLE ===== */
.detail-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== CHATBOT UI ===== */
.chatbot-container {
    margin-top: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-primary);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.chatbot-messages {
    max-height: 350px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.chat-message.bot {
    align-self: flex-start;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.chat-message.user {
    align-self: flex-end;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--accent-light);
    border-bottom-right-radius: 2px;
}

.chat-input-container {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.chat-input-container input {
    flex: 1;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-send {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-send:hover {
    background: var(--accent-hover);
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
    padding: 4px 8px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}