/* ============================================
   FINANCIERA 360 - FUTURISTIC DESIGN SYSTEM
   Glassmorphism, Neumorphism & Modern Animations
   Color Palette: Olive Green (#556b2f) + Gold (#c9a227)
   ============================================ */

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

:root {
    --primary: #556b2f;
    --primary-dark: #3f4e1b;
    --primary-light: #6f8f3a;
    --accent: #c9a227;
    --accent-dark: #a88620;
    --accent-light: #d4af37;
    
    --bg-primary: #f5f1e8;
    --bg-secondary: #fafaf8;
    --bg-tertiary: #ebe6dc;
    
    --text-primary: #2d3f16;
    --text-secondary: #556b2f;
    --text-muted: #6b7280;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(85, 107, 47, 0.2);
    
    --shadow-sm: 0 2px 8px rgba(85, 107, 47, 0.08);
    --shadow-md: 0 8px 24px rgba(85, 107, 47, 0.12);
    --shadow-lg: 0 16px 48px rgba(85, 107, 47, 0.16);
    --shadow-xl: 0 24px 64px rgba(85, 107, 47, 0.2);
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f1e8 0%, #ebe6dc 50%, #f5f1e8 100%);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(85, 107, 47, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg),
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                inset 0 -1px 0 rgba(85, 107, 47, 0.05);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.1), transparent);
    transition: left 0.6s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 162, 39, 0.3);
}

.glass-card:hover::before {
    left: 100%;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 3px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 50%, var(--accent) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

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

/* ============================================
   FUTURISTIC BUTTONS
   ============================================ */

.btn-futuristic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-futuristic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-futuristic:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-futuristic {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(85, 107, 47, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid var(--accent);
}

.btn-primary-futuristic:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 36px rgba(85, 107, 47, 0.5),
                0 0 40px rgba(201, 162, 39, 0.3);
}

.btn-primary-futuristic:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-accent-futuristic {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-accent-futuristic:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 36px rgba(201, 162, 39, 0.6),
                0 0 40px rgba(201, 162, 39, 0.4);
}

.btn-ghost-futuristic {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: inset 0 0 0 0 var(--primary);
    transition: all var(--transition-base);
}

.btn-ghost-futuristic:hover {
    color: white;
    box-shadow: inset 0 0 0 50px var(--primary);
    transform: translateY(-2px);
}

/* ============================================
   FUTURISTIC FORM ELEMENTS
   ============================================ */

.form-group-futuristic {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group-futuristic label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-futuristic {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(85, 107, 47, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.input-futuristic:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.1),
                var(--shadow-md);
    transform: translateY(-2px);
}

.input-futuristic::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.select-futuristic {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(85, 107, 47, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23556b2f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
}

.select-futuristic:focus {
    outline: none;
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.1),
                var(--shadow-md);
}

.textarea-futuristic {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(85, 107, 47, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    resize: vertical;
    min-height: 120px;
}

.textarea-futuristic:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.1),
                var(--shadow-md);
}

/* ============================================
   TIME SLOT SELECTOR (FUTURISTIC)
   ============================================ */

.time-slots-futuristic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.time-slot-futuristic {
    position: relative;
    cursor: pointer;
}

.time-slot-futuristic input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.time-slot-futuristic label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(85, 107, 47, 0.2);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    cursor: pointer;
    text-align: center;
}

.time-slot-futuristic:hover label {
    background: rgba(255, 255, 255, 1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.time-slot-futuristic input:checked + label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(85, 107, 47, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.time-slot-futuristic input:disabled + label {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.3);
}

/* ============================================
   APPOINTMENT CARD (FUTURISTIC)
   ============================================ */

.appointment-card-futuristic {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(85, 107, 47, 0.15);
    border-left: 6px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.appointment-card-futuristic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.05), transparent);
    transition: left 0.5s ease;
}

.appointment-card-futuristic:hover {
    transform: translateX(8px) translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent);
}

.appointment-card-futuristic:hover::before {
    left: 100%;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.appointment-client {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.appointment-datetime {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.appointment-datetime span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   STATUS BADGES (FUTURISTIC)
   ============================================ */

.status-badge-futuristic {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    box-shadow: var(--shadow-sm);
}

.status-pendiente {
    background: linear-gradient(135deg, #fff9e6 0%, #fef3c7 100%);
    color: #8a6f1a;
    border-color: var(--accent);
}

.status-confirmada {
    background: linear-gradient(135deg, #e8f5e9 0%, #d1fae5 100%);
    color: #2d5016;
    border-color: var(--primary);
}

.status-completada {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #10b981;
}

.status-cancelada {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: #ef4444;
}

/* ============================================
   LOADING & ANIMATIONS
   ============================================ */

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(85, 107, 47, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

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

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

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

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   ALERTS (FUTURISTIC)
   ============================================ */

.alert-futuristic {
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    font-weight: 600;
    border: 2px solid;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.5s ease-out;
}

.alert-success {
    background: rgba(232, 245, 233, 0.9);
    color: #2d5016;
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(85, 107, 47, 0.2);
}

.alert-error {
    background: rgba(254, 226, 226, 0.9);
    color: #991b1b;
    border-color: #ef4444;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(255, 249, 230, 0.9);
    color: #8a6f1a;
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.2);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }
    
    .btn-futuristic {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .time-slots-futuristic {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .appointment-card-futuristic {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .glass-panel {
        padding: 1.25rem;
    }
    
    .btn-futuristic {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .time-slots-futuristic {
        grid-template-columns: repeat(2, 1fr);
    }
}
