/**
 * Custom CSS per efactura.didee.ai
 * Stili personalizzati che estendono Tailwind CSS
 */

/* =============================================================================
   Variables
   ============================================================================= */
:root {
    --primary: #0ea5e9;
    --secondary: #0284c7;
    --accent: #38bdf8;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

/* =============================================================================
   Base Styles
   ============================================================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   Upload Zone Styles
   ============================================================================= */
.upload-zone {
    border: 2px dashed #cbd5e1;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary);
    background-color: #eff6ff;
}

.upload-zone.dragover {
    border-color: var(--accent);
    background-color: #e0f2fe;
    transform: scale(1.02);
}

.upload-zone.uploading {
    border-color: var(--warning);
    background-color: #fef3c7;
    cursor: wait;
}

.upload-zone.error {
    border-color: var(--error);
    background-color: #fee2e2;
}

.upload-zone.success {
    border-color: var(--success);
    background-color: #d1fae5;
}

/* =============================================================================
   File Input (Hidden)
   ============================================================================= */
input[type="file"] {
    display: none;
}

/* =============================================================================
   Progress Bar
   ============================================================================= */
.progress-bar {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

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

/* =============================================================================
   Buttons
   ============================================================================= */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =============================================================================
   Cards
   ============================================================================= */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* =============================================================================
   Badges
   ============================================================================= */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* =============================================================================
   Loading Spinner
   ============================================================================= */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

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

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

/* =============================================================================
   Tooltip
   ============================================================================= */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background-color: #1f2937;
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    z-index: 1000;
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 640px) {
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .card {
        margin: 0.5rem;
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */
@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
}



