:root {
    --gold: #b59a5b;
    --navy: #1e293b;
    --bg: #f8fafc;
    --error: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--navy);
    margin: 0; padding: 0;
}

.header {
    background: var(--navy);
    color: white;
    text-align: center;
    padding: 50px 20px;
    position: relative; /* Importante per posizionare i crediti */
}

.header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    margin: 0;
    letter-spacing: 1px;
}

.container {
    max-width: 1100px;
    margin: -40px auto 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    padding: 0 20px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, textarea, select {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: 0.3s;
}

input:focus, textarea:focus, select:focus { border-color: var(--gold); }

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

textarea { height: 150px; }

.btn-main {
    background: var(--navy);
    color: white;
    border: none;
    padding: 18px;
    width: 100%;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.btn-main:hover { background: #0f172a; transform: translateY(-2px); }

/* Sezione caricamento PDF */
.upload-section {
    border: 2px dashed #e2e8f0;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    transition: 0.3s;
}

.upload-section:hover {
    border-color: var(--gold);
    background: #fffcf5;
}

#preflight {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--gold);
}

/* Modal Disclaimer */
#disclaimerModal {
    position: fixed;
    z-index: 1000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
}

.modal-content {
    background: white; padding: 40px; border-radius: 24px;
    max-width: 450px; text-align: center;
}

/* --- FIX MEDIA QUERIES E PDF --- */
@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
}

#results, #pdf-area {
    display: block;
    visibility: visible;
    opacity: 1;
    background-color: white;
}

canvas {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}
/* --- STILE NOTIFICHE TOAST --- */
#toastBox {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 9999;
}

.toast {
    width: 350px;
    background: #1e293b;
    color: #fff;
    font-weight: 500;
    margin-top: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    border-left: 6px solid #b59a5b;
    animation: slideIn 0.5s, fadeOut 0.5s 3.5s forwards;
}

.toast.error {
    border-left-color: #ef4444;
}

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