/* Vento Veloz Credit System - Main Stylesheet */

/* Font Face Declaration */
@font-face {
    font-family: 'Franklin Gothic Book';
    src: url('../fonts/Franklin Gothic Book Regular/Franklin Gothic Book Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties (Variables) */
:root {
    /* Vento Brand Colors - Official Brand Guidelines */
    --vento-purple: #5254FB;        /* Primary brand color - Purple */
    --vento-blue-black: #030C14;    /* Secondary brand color - Blue-Black */
    --vento-purple-light: #7B7DFC;  /* Lighter variant of purple */
    --vento-purple-dark: #3E40C7;   /* Darker variant of purple */
    
    /* Legacy color mappings for compatibility */
    --vento-blue: #5254FB;          /* Map to brand purple */
    --vento-blue-light: #7B7DFC;    /* Map to light purple */
    --vento-blue-dark: #030C14;     /* Map to blue-black */
    --vento-magenta: #5254FB;       /* Map to brand purple */
    
    /* Color with opacity variations - Updated for brand colors */
    --vento-purple-alpha-25: rgba(82, 84, 251, 0.25);
    --vento-purple-alpha-10: rgba(82, 84, 251, 0.1);
    --vento-purple-alpha-05: rgba(82, 84, 251, 0.05);
    --vento-purple-alpha-02: rgba(82, 84, 251, 0.02);
    --vento-blue-black-alpha-10: rgba(3, 12, 20, 0.1);
    --vento-blue-black-alpha-20: rgba(3, 12, 20, 0.2);
    
    /* Legacy alpha mappings for compatibility */
    --vento-blue-alpha-25: rgba(82, 84, 251, 0.25);
    --vento-blue-alpha-10: rgba(82, 84, 251, 0.1);
    --vento-blue-alpha-05: rgba(82, 84, 251, 0.05);
    --vento-blue-alpha-02: rgba(82, 84, 251, 0.02);
    --vento-blue-dark-alpha-10: rgba(3, 12, 20, 0.1);
    --vento-blue-dark-alpha-20: rgba(3, 12, 20, 0.2);
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #F3F4F6;
    --medium-gray: #9CA3AF;
    --dark-gray: #374151;
    
    /* Accent Colors */
    --warning-yellow: #F59E0B;
    --success-green: #10B981;
    --danger-red: #EF4444;
    
    /* Typography */
    --font-family: 'Franklin Gothic Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    
    /* Spacing */
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark-gray);
    background: #fff;
    padding-top: 0; /* Dynamic padding based on header visibility */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Add padding when header is visible */
body.has-header {
    padding-top: 76px;
}

/* Outlined Arcs Background Pattern */
.background-scene {
    position: fixed;
    inset: 0;
    z-index: -10;
    pointer-events: none;
}

.arc {
    position: absolute;
    background: transparent;
}

/* Top Arcs */
.top.arc {
    left: 50%;
    width: 180vw;
    height: 90vh;
    transform: translateX(-50%);
    border: 1.5px solid transparent;
    box-shadow: 50px 0 35px rgba(0,0,0,0.08);
}

.top.a1 { 
    top: -78%; 
    border-bottom: none; 
    border-radius: 0 0 50% 50%; 
}

.top.a2 { 
    top: -68%; 
    border-bottom: none; 
    border-radius: 0 0 52% 52%; 
}

.top.a3 { 
    top: -58%; 
    border-bottom: none; 
    border-radius: 0 0 54% 54%; 
}

.top.a4 { 
    top: -48%; 
    border-bottom: none; 
    border-radius: 0 0 56% 56%; 
}

/* Middle Arc */
.middle.arc {
    left: 50%;
    top: 50%;
    width: 300vw;
    height: 160vh;
    transform: translate(-50%, -50%);
    border-top: 1.5px solid transparent;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 50%;
    box-shadow: 80px 0 60px rgba(0,0,0,0.08);
}

.middle.a1 { 
    top: -30%; 
    border-bottom: none; 
    border-radius: 0 0 0% 1%; 
}

/* Bottom Arcs */
.bottom.arc {
    left: 50%;
    width: 180vw;
    height: 90vh;
    transform: translateX(-50%);
    border: 1.5px solid transparent;
    box-shadow: inset -50px 0 35px rgba(0,0,0,0.08);
}

.bottom.a1 { 
    bottom: -78%; 
    border-top: none; 
    border-radius: 50% 50% 0 0; 
}

.bottom.a2 { 
    bottom: -68%; 
    border-top: none; 
    border-radius: 52% 52% 0 0; 
}

.bottom.a3 { 
    bottom: -58%; 
    border-top: none; 
    border-radius: 54% 54% 0 0; 
}

.bottom.a4 { 
    bottom: -48%; 
    border-top: none; 
    border-radius: 56% 56% 0 0; 
}

/* Vento Brand Colors - Official Brand Guidelines */
.bg-vento-blue {
    background-color: var(--vento-purple) !important;
}

.bg-vento-purple {
    background-color: var(--vento-purple) !important;
}

.bg-vento-blue-black {
    background-color: var(--vento-blue-black) !important;
}

.text-vento-blue {
    color: var(--vento-purple) !important;
}

.text-vento-purple {
    color: var(--vento-purple) !important;
}

.text-vento-blue-black {
    color: var(--vento-blue-black) !important;
}

.border-vento-blue {
    border-color: var(--vento-purple) !important;
}

.border-vento-purple {
    border-color: var(--vento-purple) !important;
}

/* VELOZ Brand Brush Stroke Graphics */
.veloz-brand-header {
    position: relative;
    background: linear-gradient(135deg, var(--vento-purple) 0%, var(--vento-blue-black) 100%);
    overflow: hidden;
}

.veloz-brand-header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -50px;
    width: 200px;
    height: 80px;
    background: linear-gradient(45deg, #00BFFF 0%, var(--vento-purple) 50%, #FF1493 100%);
    border-radius: 50px;
    opacity: 0.8;
    transform: rotate(-15deg);
    filter: blur(1px);
}

.veloz-brand-header::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -30px;
    width: 150px;
    height: 60px;
    background: linear-gradient(-45deg, var(--vento-purple) 0%, #FF1493 100%);
    border-radius: 40px;
    opacity: 0.6;
    transform: rotate(25deg);
    filter: blur(0.5px);
}

.veloz-logo-container {
    position: relative;
    z-index: 10;
}

/* Dotted pattern overlay for brand consistency */
.veloz-dots-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 2px, transparent 2px);
    background-size: 15px 15px;
    opacity: 0.4;
    z-index: 5;
}

/* Header Styles */
.navbar {
    box-shadow: var(--shadow-md);
    z-index: 1030;
    background-color: #5254FB !important;
    min-height: 76px;
}

.navbar-brand {
    font-weight: 700;
    font-size: var(--font-size-xl);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Wizard Navigation Buttons */
.wizard-nav-button {
    padding: 10px 22px;
    border-radius: 999px;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(90deg, #0ed1d7, #1a72c3) border-box;
    border: 2px solid transparent;
    color: #030C14;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.wizard-nav-button:hover {
    color: #030C14;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Bigger style for Siguiente button specifically */
.wizard-nav-button.btn-siguiente {
    padding: 14px 32px;
    font-size: 16px;
}

/* User dropdown button inherits the same styling as wizard-nav-button */

.wizard-user-dropdown i {
    font-size: 1.2rem;
    color: var(--vento-blue-black);
}

/* Hover-based dropdown for wizard navigation */
.wizard-hover-dropdown {
    position: relative;
}

.wizard-hover-dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Clean and simple dropdown menu styling */
.wizard-hover-dropdown .dropdown-menu {
    display: block;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 180px;
    background: #ffffff;
    margin-top: 0.5rem;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
}

/* Simple arrow pointer */
.wizard-hover-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.05);
}

/* Clean dropdown item styling */
.wizard-hover-dropdown .dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #374151;
    border: none;
    background: transparent;
}

.wizard-hover-dropdown .dropdown-menu .dropdown-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    transform: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: inherit;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
}

.wizard-hover-dropdown .dropdown-menu .dropdown-item i {
    color: #6b7280;
    transition: color 0.2s ease;
}

.wizard-hover-dropdown .dropdown-menu .dropdown-item:hover i {
    color: #374151;
    transform: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* Welcome Section */
.welcome-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
    padding: 3rem 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        var(--vento-purple-alpha-02) 0%, 
        transparent 25%, 
        var(--vento-purple-alpha-05) 50%, 
        transparent 75%, 
        var(--vento-purple-alpha-02) 100%);
    animation: subtle-rotate 20s linear infinite;
    z-index: -1;
}

@keyframes subtle-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.welcome-section h1 {
    position: relative;
    z-index: 2;
}

.welcome-section .lead {
    position: relative;
    z-index: 2;
}

/* Feature Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(230, 230, 230, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vento-purple), var(--vento-purple-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--vento-purple-light);
    background: rgba(255, 255, 255, 1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--vento-blue);
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    color: var(--vento-purple-light);
    transform: scale(1.1);
}

.feature-card h3 {
    color: var(--vento-blue-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: var(--font-size-xl);
    transition: color 0.3s ease;
}

.feature-card:hover h3 {
    color: var(--vento-purple);
}

.feature-card p {
    color: var(--medium-gray);
    margin-bottom: 0;
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--vento-blue);
    border-color: var(--vento-blue);
}

.btn-primary:hover {
    background-color: var(--vento-blue-dark);
    border-color: var(--vento-blue-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--vento-blue);
    border-color: var(--vento-blue);
}

.btn-outline-primary:hover {
    background-color: var(--vento-blue);
    border-color: var(--vento-blue);
}

.btn-success {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

.btn-warning {
    background-color: var(--warning-yellow);
    border-color: var(--warning-yellow);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-red);
    border-color: var(--danger-red);
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(230, 230, 230, 0.3);
    transition: box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    color: var(--vento-blue-dark);
}

/* Form Styles */
.form-control {
    border-radius: var(--border-radius-sm);
    border: 1px solid #D1D5DB;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--vento-blue-light);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

/* Status Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
}

.badge-success {
    background-color: var(--success-green);
    color: var(--white);
}

.badge-warning {
    background-color: var(--warning-yellow);
    color: var(--white);
}

.badge-danger {
    background-color: var(--danger-red);
    color: var(--white);
}

.badge-primary {
    background-color: var(--vento-blue);
    color: var(--white);
}

/* Table Styles */
.table {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 230, 230, 0.3);
}

.table th {
    background-color: var(--light-gray);
    border-bottom: 2px solid #E5E7EB;
    font-weight: 600;
    color: var(--vento-blue-dark);
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #F9FAFB;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .welcome-section {
        margin: 1rem 0;
        padding: 2rem 1rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: var(--font-size-lg);
    }
    
    body.has-header {
        padding-top: 70px;
    }
    
    /* Responsive wizard navigation buttons */
    .wizard-nav-button {
        padding: 8px 16px;
        font-size: 12px;
        letter-spacing: 0.4px;
    }
    
    .wizard-nav-button.btn-siguiente {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Top navigation bar - stack on mobile if needed */
    .d-flex.justify-content-between.align-items-center.py-3.px-3 {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem !important;
    }
    
    .d-flex.justify-content-between.align-items-center.py-3.px-3 > div {
        flex: 0 1 auto;
    }
}

@media (max-width: 576px) {
    .welcome-section {
        padding: 1.5rem 1rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    /* Extra small screens - even smaller buttons */
    .wizard-nav-button {
        padding: 6px 12px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }
    
    .wizard-nav-button.btn-siguiente {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Hide text on very small screens, show only icons */
    .wizard-nav-button i {
        margin-right: 4px;
    }
    
    /* Top navigation - full width stacking on very small screens */
    .d-flex.justify-content-between.align-items-center.py-3.px-3 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem;
    }
    
    .d-flex.justify-content-between.align-items-center.py-3.px-3 > div {
        width: 100%;
        text-align: center;
    }
    
    .wizard-nav-button {
        width: 100%;
        justify-content: center;
    }
}
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    body.has-header {
        padding-top: 65px;
    }
}

/* Utility Classes */
.text-muted {
    color: var(--medium-gray) !important;
}

.bg-light {
    background-color: var(--light-gray) !important;
}

.border-light {
    border-color: #E5E7EB !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    height: calc(100vh - 76px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1019;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Auto-Save Indicators */
.auto-save-indicator {
    position: fixed;
    top: 90px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 500;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.auto-save-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

.auto-save-indicator.saving {
    background-color: var(--vento-blue);
    color: var(--white);
}

.auto-save-indicator.success {
    background-color: var(--success-green);
    color: var(--white);
}

.auto-save-indicator.error {
    background-color: var(--danger-red);
    color: var(--white);
}

.auto-save-indicator .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auto-save-indicator .icon {
    font-size: 16px;
}

@media (max-width: 768px) {
    .auto-save-indicator {
        top: 80px;
        right: 10px;
        padding: 10px 16px;
        font-size: 0.8125rem;
    }
}