/**
 * Villa Augusta Preventivi - Frontend CSS
 */

/* Login Page */
.vap-frontend-login {
    max-width: 400px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vap-login-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.vap-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.vap-login-header h2 {
    color: #8B4513;
    font-size: 24px;
    margin-bottom: 10px;
}

.vap-login-header p {
    color: #666;
    font-size: 14px;
}

.vap-login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.vap-login-field {
    margin-bottom: 20px;
}

.vap-login-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.vap-login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.vap-login-field input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.vap-login-btn {
    width: 100%;
    background: linear-gradient(135deg, #8B4513 0%, #a0522d 100%);
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.vap-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

.vap-login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.vap-login-footer p {
    color: #6b7280;
    font-size: 13px;
}

/* Logout Bar */
.vap-logout-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.vap-logout-bar span {
    color: #166534;
    font-weight: 500;
}

.vap-logout-btn {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.vap-logout-btn:hover {
    background: #dc2626;
    color: #fff;
}

/* Preview Page */
.vap-frontend-preview {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vap-preview-header {
    text-align: center;
    margin-bottom: 30px;
}

.vap-preview-header h2 {
    color: #8B4513;
    font-size: 28px;
    margin-bottom: 10px;
}

.vap-preview-header p {
    color: #666;
}

.vap-no-preventivo {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
}

.vap-no-preventivo p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 10px;
}

.vap-preview-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.vap-preview-doc-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #8B4513;
    margin-bottom: 25px;
}

.vap-preview-doc-header h3 {
    color: #8B4513;
    font-size: 20px;
    margin-bottom: 10px;
}

.vap-doc-numero {
    color: #666;
    font-size: 14px;
}

.vap-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.vap-preview-box {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.vap-preview-box h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vap-preview-box p {
    margin: 0 0 8px 0;
    color: #4b5563;
    font-size: 14px;
}

.vap-preview-totali {
    background: #fffbeb;
    border-color: #fbbf24;
}

.vap-totale-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #fde68a;
}

.vap-totale-row:last-of-type {
    border-bottom: none;
}

.vap-totale-row span:last-child {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 500;
}

.vap-totale-finale {
    background: #fef3c7;
    margin: 10px -20px;
    padding: 12px 20px !important;
    font-size: 16px;
    font-weight: 600;
}

.vap-totale-finale span:last-child {
    color: #b45309;
}

.vap-anticipo span:last-child {
    color: #059669;
}

.vap-saldo span:last-child {
    color: #2563eb;
}

.vap-tassa-nota {
    margin-top: 15px;
    padding: 10px;
    background: #fff9c4;
    border-radius: 4px;
    font-size: 13px;
    color: #f57f17;
    text-align: center;
}

.vap-preview-stato {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 20px;
}

.vap-stato-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.vap-stato-bozza {
    background: #e5e7eb;
    color: #374151;
}

.vap-stato-inviato {
    background: #dbeafe;
    color: #1d4ed8;
}

.vap-stato-confermato {
    background: #d1fae5;
    color: #065f46;
}

.vap-stato-annullato {
    background: #fee2e2;
    color: #991b1b;
}

.vap-email-inviata {
    color: #059669;
    font-size: 13px;
}

.vap-preview-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.vap-preview-actions p {
    color: #6b7280;
    margin-bottom: 15px;
}

.vap-btn-backend {
    display: inline-block;
    background: linear-gradient(135deg, #8B4513 0%, #a0522d 100%);
    color: #fff;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.vap-btn-backend:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .vap-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .vap-preview-content {
        padding: 20px;
    }
}
