/* Esquema de colores FreeGlass */
:root {
    --freeglass-green: #4ade80;
    --freeglass-green-light: #86efac;
    --freeglass-green-dark: #16a34a;
    --freeglass-black: #1a1a1a;
    --freeglass-white: #ffffff;
    --freeglass-gray-light: #f8fafc;
    --freeglass-gray: #64748b;
    --freeglass-gray-dark: #334155;
}

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--freeglass-black);
    background-color: var(--freeglass-gray-light);
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* Header y navegación */
.header {
    background: var(--freeglass-white);
    color: var(--freeglass-black);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--freeglass-green);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Contenedor principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Contenedor específico para formularios */
.form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0;
    width: 100%;
}

/* Cards y contenido */
.card {
    background: var(--freeglass-white);
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.card-header {
    border-bottom: 2px solid var(--freeglass-green);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--freeglass-black);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Formularios mejorados pero simples */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--freeglass-gray-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

/* Indicador de campo requerido */
.form-label:has(+ .form-control[required])::after,
.form-label[for*="required"]::after {
    content: ' *';
    color: #ef4444;
    font-weight: 700;
}

/* Estados de validación */
.form-control:valid {
    border-color: var(--freeglass-green);
}

.form-control:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control:invalid:not(:placeholder-shown):focus {
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.15),
        0 2px 8px rgba(239, 68, 68, 0.1);
}

/* Estilo adicional para campos required vacíos (incluyendo los que tienen placeholder) */
.form-control[required]:invalid {
    border-color: #ef4444;
}

/* Para number inputs como kilometrage que pueden tener placeholder */
input[type="number"].form-control[required]:invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input[type="number"].form-control[required]:invalid:focus {
    border-color: #ef4444;
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.15),
        0 2px 8px rgba(239, 68, 68, 0.1);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--freeglass-white);
    color: var(--freeglass-black);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control::placeholder {
    color: var(--freeglass-gray);
    font-weight: 400;
    opacity: 0.8;
}

.form-control:focus {
    outline: none;
    border-color: var(--freeglass-green);
    box-shadow: 
        0 0 0 3px rgba(74, 222, 128, 0.15),
        0 2px 8px rgba(74, 222, 128, 0.1);
    transform: translateY(-1px);
}

.form-control:hover:not(:focus) {
    border-color: var(--freeglass-green-light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

select.form-control {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%234ade80' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
    appearance: none;
    cursor: pointer;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2316a34a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
}

/* Animación de carga de formulario */
.form-section {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Efecto de entrada secuencial para las secciones */
.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }

/* Mejor aspecto para inputs de fecha/tiempo */
input[type="date"].form-control,
input[type="datetime-local"].form-control {
    position: relative;
    padding-right: 2.5rem;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator {
    color: var(--freeglass-green);
    cursor: pointer;
}

/* Diseño limpio para form-row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Campo de solo lectura */
.form-control[readonly] {
    background-color: #f8fafc;
    border-color: #d1d5db;
    color: var(--freeglass-gray-dark);
    cursor: not-allowed;
}

.form-control[readonly]:focus {
    box-shadow: none;
    transform: none;
    border-color: #d1d5db;
}

/* Checkbox styling mejorado */
.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--freeglass-green);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-checkbox:checked {
    transform: scale(1.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(74, 222, 128, 0.05);
    border: 2px solid rgba(74, 222, 128, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.1);
}

.checkbox-group label {
    font-weight: 500;
    color: var(--freeglass-gray-dark);
    cursor: pointer;
    margin: 0;
}

/* Radio buttons para tipo de entidad */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(74, 222, 128, 0.05);
    border: 2px solid rgba(74, 222, 128, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.radio-option:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.1);
}

.radio-option input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--freeglass-green);
    cursor: pointer;
}

.radio-option label {
    font-weight: 600;
    color: var(--freeglass-gray-dark);
    cursor: pointer;
    margin: 0;
}

.radio-option:has(input:checked) {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(74, 222, 128, 0.1));
    border-color: var(--freeglass-green);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
}

/* Campos condicionales */
.conditional-fields {
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

/* Info box para TVA */
.tva-info {
    margin-top: 0.5rem;
}

.info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.info-box span {
    font-weight: 600;
    color: var(--freeglass-gray-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.info-box small {
    color: var(--freeglass-gray);
    font-style: italic;
}

/* Header del formulario */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: var(--freeglass-white);
    border-radius: 12px;
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 1rem;
    color: var(--freeglass-gray);
    font-weight: 500;
}

/* Formulario principal */
.main-form {
    background: var(--freeglass-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

/* Grupos de formularios */
.form-section {
    background: var(--freeglass-white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(74, 222, 128, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-section h2 {
    color: var(--freeglass-black);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(74, 222, 128, 0.2);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--freeglass-green);
    color: var(--freeglass-white);
}

.btn-primary:hover {
    background: var(--freeglass-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.btn-secondary {
    background: var(--freeglass-gray);
    color: var(--freeglass-white);
}

.btn-secondary:hover {
    background: var(--freeglass-gray-dark);
}

.btn-danger {
    background: #ef4444;
    color: var(--freeglass-white);
}

.btn-danger:hover {
    background: #dc2626;
}

/* Botón de envío */
.btn-submit {
    background: var(--freeglass-green);
    color: var(--freeglass-white);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-submit:hover {
    background: var(--freeglass-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3);
}

/* Acciones del formulario */
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(74, 222, 128, 0.1);
    text-align: center;
}

/* Footer del formulario */
.form-footer {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(74, 222, 128, 0.05);
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.form-footer p {
    margin: 0.25rem 0;
    color: var(--freeglass-gray-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Canvas para firma */
#signature-canvas {
    border: 2px solid var(--freeglass-green);
    border-radius: 8px;
    cursor: crosshair;
    background: var(--freeglass-white);
    max-width: 100%;
    height: auto;
}

.signature-container {
    position: relative;
    margin: 1rem 0;
}

/* Navegación */
.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--freeglass-black);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--freeglass-green-light);
    color: var(--freeglass-black);
}

/* Tablas */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: var(--freeglass-green);
    color: var(--freeglass-white);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(74, 222, 128, 0.05);
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--freeglass-green);
    color: var(--freeglass-green-dark);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

/* Upload de facturas */
.invoice-upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.upload-step {
    width: 100%;
}

/* Devis upload specific styles */
.devis-upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid var(--freeglass-green-light);
    border-top: 0.25rem solid var(--freeglass-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .container, .form-container {
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .radio-option {
        justify-content: center;
        min-width: 100%;
    }
    
    .invoice-upload-container,
    .devis-upload-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-header h1 {
        font-size: 1.75rem;
    }
    
    .main-form, .form-section {
        padding: 1.5rem;
    }
    
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile styles for devis upload */
    .phone-input-group {
        flex-wrap: wrap;
    }
    
    .phone-input-group .country-select {
        width: 90px;
    }
    
    .phone-input-group .form-control {
        flex: 1;
        min-width: 0;
    }
    
    /* If screen is very small, stack them */
    @media (max-width: 360px) {
        .phone-input-group {
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .phone-input-group .country-select,
        .phone-input-group .form-control {
            width: 100%;
        }
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.125rem;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 500px;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
    }
    
    /* Better touch targets for mobile */
    .form-control,
    .btn,
    select {
        min-height: 44px; /* Apple's recommended touch target size */
    }
    
    /* Adjust alert spacing */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Modal adjustments for mobile */
    [id="formUrlModal"] {
        width: 95% !important;
        padding: 1.5rem !important;
    }
}

/* Utilidades */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.d-flex { display: flex; }
.d-none { display: none !important; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.w-100 { width: 100%; }
.w-50 { width: 50%; }

/* Dashboard Styles */
.dashboard-container {
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--freeglass-white) 0%, var(--freeglass-gray-light) 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.welcome-section h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--freeglass-black);
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: var(--freeglass-gray);
    font-size: 1.1rem;
    font-weight: 500;
}

.quick-actions {
    display: flex;
    gap: 1rem;
}

/* Métriques Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: var(--freeglass-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(74, 222, 128, 0.15);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--freeglass-green), var(--freeglass-green-light));
    color: var(--freeglass-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

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

.metric-icon.info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.metric-content h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--freeglass-black);
    margin-bottom: 0.25rem;
}

.metric-content p {
    color: var(--freeglass-gray-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(74, 222, 128, 0.1);
    color: var(--freeglass-green-dark);
}

.metric-trend.success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.metric-trend.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.metric-trend.info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.dashboard-main {
    min-height: 600px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Activity List */
.activity-list {
    padding: 1rem 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(74, 222, 128, 0.03);
    transform: translateX(4px);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    flex-shrink: 0;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--freeglass-white);
}

.status-icon.success {
    background: var(--freeglass-green);
}

.status-icon.pending {
    background: #f59e0b;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-weight: 600;
    color: var(--freeglass-black);
    margin-bottom: 0.25rem;
}

.activity-content p {
    color: var(--freeglass-gray);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.activity-content small {
    color: var(--freeglass-gray);
    font-size: 0.8rem;
}

.activity-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--freeglass-green);
    color: var(--freeglass-green);
}

.btn-outline:hover {
    background: var(--freeglass-green);
    color: var(--freeglass-white);
}

/* Quick Links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(74, 222, 128, 0.03);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(74, 222, 128, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.15);
}

.quick-link-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.quick-link h4 {
    font-weight: 600;
    color: var(--freeglass-black);
    margin-bottom: 0.25rem;
}

.quick-link p {
    color: var(--freeglass-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Stats List */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(74, 222, 128, 0.03);
    border-radius: 8px;
}

.stat-label {
    color: var(--freeglass-gray-dark);
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: var(--freeglass-green-dark);
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--freeglass-gray);
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .dashboard-header {
        padding: 1.5rem;
    }
    
    .welcome-section h1 {
        font-size: 1.75rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1.5rem;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .activity-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .quick-actions {
        flex-direction: column;
        width: 100%;
    }
}

/* Home Page Styles */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--freeglass-white) 0%, var(--freeglass-gray-light) 100%);
    border-radius: 24px;
    margin: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--freeglass-black);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--freeglass-gray);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-placeholder {
    width: 300px;
    height: 200px;
    background: linear-gradient(135deg, var(--freeglass-green-light), var(--freeglass-green));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--freeglass-white);
    box-shadow: 0 12px 40px rgba(74, 222, 128, 0.3);
}

/* Services Section */
.services-section, .process-section {
    padding: 4rem 2rem;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--freeglass-black);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--freeglass-gray);
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--freeglass-white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(74, 222, 128, 0.15);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--freeglass-gray);
    line-height: 1.6;
}

/* Process Section */
.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.process-step {
    text-align: center;
    max-width: 200px;
    flex: 1;
}

.step-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--freeglass-green), var(--freeglass-green-light));
    color: var(--freeglass-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

.process-step h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin-bottom: 0.75rem;
}

.process-step p {
    color: var(--freeglass-gray);
    line-height: 1.5;
}

.process-arrow {
    font-size: 2rem;
    color: var(--freeglass-green);
    font-weight: bold;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--freeglass-green), var(--freeglass-green-dark));
    color: var(--freeglass-white);
    padding: 4rem 2rem;
    margin: 2rem;
    border-radius: 24px;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--freeglass-white);
    color: var(--freeglass-green);
}

.cta-section .btn-primary:hover {
    background: var(--freeglass-gray-light);
    transform: translateY(-4px);
}

/* Responsive Home */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .process-steps {
        flex-direction: column;
        gap: 3rem;
    }
    
    .process-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .home-container {
        padding: 0;
    }
    
    .hero-section, .cta-section {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .services-section, .process-section {
        padding: 2rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================
   ADMIN INTERFACE STYLES
   ======================== */

/* Container principal para admin */
.admin-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header admin */
.admin-header {
    background: linear-gradient(135deg, var(--freeglass-white) 0%, var(--freeglass-gray-light) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.admin-title-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--freeglass-black);
    margin-bottom: 0.5rem;
}

.admin-title-section p {
    color: var(--freeglass-gray);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.date-info {
    color: var(--freeglass-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Stats cards en header */
.admin-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-card {
    background: var(--freeglass-white);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--freeglass-green-dark);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--freeglass-gray-dark);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Barre d'actions */
.admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--freeglass-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.search-section {
    flex: 1;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    max-width: 400px;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--freeglass-green);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* Grid de centros */
.centres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.centre-card {
    background: var(--freeglass-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
    transition: all 0.3s ease;
}

.centre-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(74, 222, 128, 0.15);
}

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

.centre-info h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin-bottom: 0.5rem;
}

.centre-email {
    color: var(--freeglass-green-dark);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.centre-responsable {
    color: var(--freeglass-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.centre-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(74, 222, 128, 0.03);
    border-radius: 12px;
}

.centre-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--freeglass-green-dark);
    margin-bottom: 0.125rem;
}

.stat-name {
    font-size: 0.75rem;
    color: var(--freeglass-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.centre-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Formulario admin */
.form-container-admin {
    max-width: 900px;
    margin: 0 auto;
}

.admin-form {
    background: var(--freeglass-white);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
    overflow: hidden;
}

.admin-form .form-section {
    padding: 2rem;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    margin-bottom: 0;
}

.admin-form .form-section:last-child {
    border-bottom: none;
}

.admin-form .form-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--freeglass-green);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--freeglass-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.page-link {
    padding: 0.75rem 1rem;
    color: var(--freeglass-green-dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--freeglass-green-light);
    color: var(--freeglass-white);
}

.page-info {
    padding: 0.75rem 1rem;
    color: var(--freeglass-gray-dark);
    font-weight: 600;
}

/* Empty state mejorado */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--freeglass-white);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--freeglass-gray);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--freeglass-white);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--freeglass-black);
    margin: 0;
}

.modal-close {
    font-size: 2rem;
    color: var(--freeglass-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--freeglass-black);
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    color: var(--freeglass-gray-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body .warning {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive admin */
@media (max-width: 1024px) {
    .admin-container {
        padding: 1rem;
    }
    
    .admin-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .centres-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .admin-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 2rem 1.5rem;
    }
    
    .admin-title-section h1 {
        font-size: 2rem;
    }
    
    .centres-grid {
        grid-template-columns: 1fr;
    }
    
    .centre-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .centre-stat {
        justify-content: center;
    }
    
    .search-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input {
        max-width: none;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .centre-actions {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}