/* Base Variables */
/* Post-Login Visibility Cleanup */
body.user-logged-in #landing-view {
    display: none !important;
}
body.user-logged-in .auth-forms-container {
    display: none !important;
}

:root {
    /* Color Palette - Official Branding */
    --bg-color: #060b1e;
    --bg-secondary: #0d1b3e;
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --accent-blue: #3ba9ff; /* Azul Eléctrico */
    --accent-blue-hover: #0088ff;
    --accent-purple: #6366f1;
    --accent-green: #00d1ff; /* Cian Oficial */
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    /* Glassmorphism */
    --glass-bg: rgba(13, 27, 62, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d1ff, #3ba9ff);
    --gradient-danger: linear-gradient(135deg, #ef4444, #b91c1c);

    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Layout */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 169, 255, 0.2) 0%, rgba(59, 169, 255, 0) 70%);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 209, 255, 0.1) 0%, rgba(0, 209, 255, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.08;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Typography & Utils */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

.text-warning {
    color: var(--accent-warning);
}

.text-danger {
    color: var(--accent-danger);
}

.text-success {
    color: var(--accent-green);
}

.center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.small-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(59, 169, 255, 0.3));
}

/* Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.card {
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.icon {
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.accent-text {
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-main);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 169, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 169, 255, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.full-width {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    text-align: center;
}

.hero-text {
    max-width: 800px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin: 1.5rem 0 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(59, 169, 255, 0.15);
    color: var(--accent-blue);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 169, 255, 0.3);
}

/* Sections */
.section {
    padding: 6rem 0;
    margin-bottom: 2rem;
    scroll-margin-top: 80px;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group small {
    display: block;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

.row-inputs {
    display: flex;
    gap: 1rem;
}

.col {
    flex: 1;
}

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

.currency {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="number"],
input[type="text"].with-currency {
    padding-left: 2rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-box {
    background: rgba(59, 169, 255, 0.05);
    border: 1px solid rgba(59, 169, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-box.glow-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: var(--accent-blue);
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
}

.result-box h3,
.result-box .final-bid,
.result-box .stop-warning {
    position: relative;
    z-index: 1;
}

.final-bid {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 1rem 0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(59, 169, 255, 0.4);
}

.stop-warning {
    color: var(--accent-danger);
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.breakdown-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
}

.breakdown-box h4 {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.breakdown-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.divider {
    border: none;
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

.total-row {
    font-weight: 700;
    font-size: 1.1rem !important;
}

.success-row {
    color: var(--accent-green);
    font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: var(--transition);
}

.tab.active {
    color: var(--text-primary);
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.tab.active::after {
    width: 100%;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
    display: block;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.info-card.warning::before {
    background: var(--accent-warning);
}

.info-card.danger::before {
    background: var(--gradient-danger);
}

.info-card.info::before {
    background: var(--accent-blue);
}

.info-card.success::before {
    background: var(--accent-green);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    margin-bottom: 0.2rem;
}

.info-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card p {
    font-size: 0.95rem;
    color: #a0aec0;
}

/* Checklist */
.checklist-container {
    max-width: 800px;
    margin: 0 auto;
}

.checklist-group {
    margin-bottom: 2.5rem;
}

.group-title {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}

.check-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.check-item.checked {
    opacity: 0.6;
}

.check-item.checked label {
    text-decoration: line-through;
}

.check-item.critical {
    border-left: 3px solid var(--accent-danger);
}

.check-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
}

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

.check-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--bg-color);
    font-size: 16px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.check-item label {
    cursor: pointer;
    line-height: 1.5;
}

.checklist-progress {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#checklist-text {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Rules Section */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.rule-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.danger-rule {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.rule-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.danger-rule .rule-title {
    color: var(--accent-danger);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

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

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

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   BASE LAYOUT OVERRIDES (From Inline HTML)
   ========================================= */

.landing-view-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.landing-grid {
    max-width: 900px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.logout-item {
    margin-left: 1rem;
}

/* =========================================
   RESPONSIVE DESIGN (NATIVE APP MOBILE UI)
   ========================================= */

@media (max-width: 768px) {
    /* 1. True Edge-to-Edge Native Feel */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }
    
    .container, 
    main, 
    section, 
    .section, 
    div#landing-view, 
    div#app-view {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Hide Checklist Section on Mobile */
    #checklist {
        display: none !important;
    }

    /* Hide Checklist Nav Link on Mobile */
    .nav-links li a[href="#checklist"] {
        display: none !important;
    }

    /* 2. Mobile-safe containers & Cards (Edge-to-Edge) */
    .card, 
    .glass.card, 
    .auth-forms-container, 
    div#verdict-box, 
    .usage-card, 
    .admin-card {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 24px 16px !important;
        box-sizing: border-box !important;
    }

    /* Hide auth forms initially on mobile */
    .auth-forms-container {
        display: none !important;
    }

    /* Class to show auth forms when selected */
    .auth-forms-container.mobile-active {
        display: block !important;
        animation: fadeIn 0.4s ease-out;
    }
    
    /* Specific overrides for landing view layout to forcefully drop columns */
    .landing-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        max-width: 100% !important;
    }

    /* Mobile Auth Toggle Visibility */
    .auth-toggles.mobile-hidden {
        display: none !important;
    }

    .btn-back-auth {
        display: flex !important;
    }

    .hero {
        padding: 24px 16px !important;
    }

    /* 3. Forms and buttons (Touch-friendly) */
    input, 
    select, 
    textarea, 
    .form-control, 
    .search-box input {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        font-size: 16px !important; /* Prevent iOS zoom */
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
    }
    
    button, 
    .btn, 
    button[type="submit"] {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 54px !important; /* Larger touch target */
        padding: 14px 16px !important;
        font-size: 1.1rem !important;
        border-radius: 12px !important; /* Soft corners for buttons */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    /* Clean vertical rhythm for layouts */
    form, 
    .row-inputs, 
    .form-group, 
    div[style*="gap: 1rem"] {
        display: flex;
        flex-direction: column !important;
        gap: 20px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    
    .row-inputs .col, 
    .hero-actions {
        width: 100% !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    /* 4. Modals and popups (Fit screen perfectly) */
    .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 24px 16px !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }

    /* 5. Reports & Results (Tables & Verdicts) */
    .table-responsive, 
    #verdict-content, 
    .admin-table-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .admin-table th, 
    .admin-table td {
        white-space: nowrap !important;
        padding: 12px 16px !important;
    }
    
    #result-max-bid {
        word-break: break-all !important;
    }

    /* 6. Navigation (Mobile Menu Toggle) */
    .mobile-menu-btn {
        display: block !important;
        margin-left: auto !important;
        margin-right: 16px !important;
    }
    
    .logo {
        margin-left: 16px !important;
    }

    .nav-links {
        display: none;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        background: rgba(10, 15, 26, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        padding: 24px 16px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        gap: 20px !important;
        align-items: center !important;
        z-index: 1000 !important;
        box-sizing: border-box !important;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        width: 100% !important;
        text-align: center !important;
    }
    
    .logout-item {
        margin-left: 0 !important;
    }

    /* Layout structural overrides */
    .detail-grid, 
    .cards-grid, 
    .rules-grid, 
    .admin-summary-grid, 
    .calculator-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        width: 100% !important;
    }

    #subscription-status > div {
        flex-direction: column !important;
        gap: 24px !important;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
    }
    .landing-text h1 {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
    }
    .final-bid {
        font-size: 2.5rem !important;
    }
    .section-header h2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    /* >>> LOGIN/LANDING MOBILE FIXES <<< */
    .landing-view-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 40px 20px !important; /* Prevent top cropping */
        height: auto !important;
        min-height: 100vh !important;
        box-sizing: border-box !important;
    }

    .landing-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        margin: auto 0 !important; /* Center vertically naturally */
    }

    .landing-text {
        text-align: center !important;
        padding: 0 10px !important;
    }

    .landing-text h1 {
        font-size: 2.8rem !important;
        margin-bottom: 12px !important;
    }

    .landing-text p {
        font-size: 1rem !important;
        margin-bottom: 24px !important;
    }

    /* The form container gets a native modal look */
    .auth-forms-container {
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 30px 20px !important;
        width: 100% !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.6) !important;
        backdrop-filter: blur(15px) !important;
        margin: 0 !important;
    }

    .auth-forms-container h3 {
        text-align: center !important;
        font-size: 1.6rem !important;
        margin-bottom: 24px !important;
    }

    .auth-forms-container .form-group {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 20px !important;
        gap: 8px !important;
    }

    .auth-forms-container label {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
        text-align: left !important;
    }

    .auth-forms-container input {
        padding: 14px 16px !important;
        font-size: 16px !important; /* Prevent iOS zoom */
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.3) !important;
    }

    #show-login, #show-register {
        border-radius: 12px !important;
    }
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* AI Verdict Table Styling */
#verdict-content table {
    width: 100%;
    margin-top: 1.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border-collapse: collapse;
}

#verdict-content th {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-weight: 600;
    padding: 12px;
    text-align: left;
}

#verdict-content td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#verdict-content tr:last-child td {
    border-bottom: none;
}

#verdict-content a {
    text-decoration: none;
    transition: var(--transition);
}

#verdict-content a:hover {
    text-shadow: 0 0 8px var(--accent-blue);
    text-decoration: underline;
}

/* Upload Area Styles */
.upload-area:hover {
    background: rgba(59, 130, 246, 0.05) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* ==================================
   PRINT & EXPORT PDF STYLES
   ================================== */
@media print {

    /* Reset background and text colors for printer ink economy */
    body {
        background: white !important;
        color: black !important;
    }

    /* Hide unnecessary UI elements when printing the report */
    nav,
    .hero,
    .calculator-grid,
    footer,
    .rules,
    .checklist-wrapper,
    #perito-form {
        display: none !important;
    }

    /* Reset the verdict box constraints */
    #verdict-box {
        display: block !important;
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        page-break-inside: avoid;
    }

    #verdict-title {
        color: black !important;
        text-align: center;
        border-bottom: 2px solid #ccc;
        padding-bottom: 10px;
    }

    /* Normalize textual elements */
    h2,
    h3,
    h4,
    p,
    span,
    div,
    strong,
    li,
    td,
    th {
        color: black !important;
        background: transparent !important;
    }

    /* Ensure specific borders are visible for structure */
    .print-report-section article,
    .print-report-section section,
    .print-no-break {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        background: #fdfdfd !important;
    }

    /* Keep grid structure but change gap/padding for paper */
    .print-report-section {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    /* Keep Badges recognizable with physical borders instead of bg colors */
    .badge {
        border: 1px solid #333 !important;
        background: transparent !important;
        color: black !important;
    }

    table,
    th,
    td {
        border: 1px solid #aaa !important;
    }
}

.upload-area.dragover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: var(--accent-blue) !important;
    transform: scale(1.02);
}

.upload-text-success {
    color: var(--accent-green) !important;
    font-weight: 600;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

#ai-loading .spinner {
    animation: spin 1s linear infinite, pulse-border 2s infinite;
}
/* --- Vehicle History & Usage Styles --- */
.usage-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.6s ease;
}

#history-msg.success { color: var(--accent-green); }
#history-msg.error { color: var(--accent-danger); }
#history-msg.warning { color: var(--accent-warning); }

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-processing { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.status-completed { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-failed { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); border: 1px solid rgba(239, 68, 68, 0.2); }

/* Request Items */
.request-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.request-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
.request-info h5 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}
.request-info p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #888;
}
.request-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.btn-view-report {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    background: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.btn-view-report:hover {
    background: var(--accent-blue-hover);
}

/* --- Admin Dashboard Styles --- */
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.admin-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.admin-card .label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-card .value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.admin-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

.filter-tab {
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-tab:hover {
    color: #fff;
}

.filter-tab.active {
    background: var(--accent-blue);
    color: #fff;
}

.search-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    width: 300px;
    max-width: 100%;
}

/* Admin Table */
.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    color: #888;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.btn-action-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-action-small:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1rem;
    color: #eee;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
}

.form-control:focus {
    border-color: var(--accent-blue);
    outline: none;
}

/* History Delivery Selection */
input[name="delivery_method"] {
    accent-color: var(--accent-blue);
    width: 18px;
    height: 18px;
}

#delivery-whatsapp-group, #delivery-email-group {
    animation: fadeIn 0.3s ease-out;
}

.usage-warning {
    color: #ffcc00;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
    margin-bottom: 8px;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.history-item .vin {
    font-family: monospace;
    font-weight: bold;
    color: var(--accent-blue);
}

.history-item .status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
/* Usage & Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.close-modal, .close-limit-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover, .close-limit-modal:hover {
    color: var(--text-primary);
}

/* Usage Progress Bar */
.usage-progress-container {
    margin-top: 1rem;
}

.usage-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.usage-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 1s ease-out;
}

.usage-fill.warning {
    background: var(--accent-warning);
}

.usage-fill.danger {
    background: var(--accent-danger);
}

/* CALCULADORA DE GASTOS EXTRA */
#extra-expenses .final-bid {
    font-size: 2.8rem;
    color: var(--accent-blue);
}

.decision-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.decision-safe {
    background: rgba(46, 204, 113, 0.15) !important;
    border-color: rgba(46, 204, 113, 0.4) !important;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.1);
}

.decision-safe .badge {
    background: #2ecc71 !important;
    color: #fff !important;
}

.decision-warning {
    background: rgba(241, 196, 15, 0.15) !important;
    border-color: rgba(241, 196, 15, 0.4) !important;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.1);
}

.decision-warning .badge {
    background: #f1c40f !important;
    color: #000 !important;
}

.decision-danger {
    background: rgba(231, 76, 60, 0.15) !important;
    border-color: rgba(231, 76, 60, 0.4) !important;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.1);
}

.decision-danger .badge {
    background: #e74c3c !important;
    color: #fff !important;
}

#decision-profit {
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}
/* --- Extra Costs Calculator Status Box --- */
.status-valid {
    background: rgba(46, 204, 113, 0.2) !important;
    border: 1px solid rgba(46, 204, 113, 0.4) !important;
    color: #4ade80 !important;
}

.status-warning {
    background: rgba(243, 156, 18, 0.2) !important;
    border: 1px solid rgba(243, 156, 18, 0.4) !important;
    color: #fbd38d !important;
}

.status-danger {
    background: rgba(231, 76, 60, 0.2) !important;
    border: 1px solid rgba(231, 76, 60, 0.4) !important;
    color: #feb2b2 !important;
}

/* Dynamic Rows Styling */
.extra-cost-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

.extra-cost-row input {
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    padding: 0.6rem !important;
    border-radius: 6px !important;
}

.btn-remove-row {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 6px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-row:hover {
    background: #e74c3c;
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- NUEVOS ESTILOS ADMIN DASHBOARD --- */
.admin-main-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.admin-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: var(--font-main);
}

.admin-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.admin-tab-btn.active {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 169, 255, 0.3);
}

/* Admin Cards Enhancements */
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition);
}

.admin-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 169, 255, 0.3);
}

.admin-card .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-card .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.admin-card.mini {
    padding: 1rem;
    text-align: center;
}

.admin-card .value-mini {
    font-size: 1.5rem;
    font-weight: 700;
}

/* User Table Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.status-processing { background: rgba(59, 169, 255, 0.2); color: #60a5fa; }
.status-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-failed { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Admin Modal Adjustments */
#admin-user-modal .modal-content {
    background: #0d1224; /* Darker for forms */
    border: 1px solid rgba(59, 169, 255, 0.2);
}

#admin-user-modal .form-group label {
    color: #8892b0;
}

#admin-user-modal input.form-control, 
#admin-user-modal select.form-control {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Animations */
.admin-tab-content {
    animation: slideInAdmin 0.4s ease-out;
}

@keyframes slideInAdmin {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
