:root {
    --primary: #18162b; /* Dark Navy from website */
    --primary-light: #2c2949;
    --secondary: #e3b077; /* Gold/Bronze from website */
    --secondary-hover: #cf9c63;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #18162b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --error: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 500px;
    background-color: var(--card-bg);
    min-height: 100vh;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

@media (min-width: 501px) {
    .app-container {
        min-height: 80vh;
        border-radius: 24px;
        overflow: hidden;
        margin: 2rem;
    }
}

.app-header {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Progress */
.progress-container {
    padding: 1.5rem 1.5rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.progress-bar-bg {
    height: 10px;
    background: var(--border);
    border-radius: 10px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 25%; /* dynamic */
    background: var(--secondary); /* GOLD */
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step.active {
    color: var(--secondary);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.wizard-step.active {
    display: block;
}

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

h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

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

.service-item {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px; /* Matched from site */
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-item:hover {
    border-color: var(--primary-light);
}

.service-item.selected {
    border-color: var(--secondary);
    background-color: rgba(212, 175, 55, 0.05);
}

.service-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.service-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Inputs */
.premium-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px; /* Matched from site */
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-transform: capitalize;
}

input[type="email"].premium-input {
    text-transform: none; /* Le email devono restare minuscole */
}

.date-large {
    font-size: 1.15rem;
    padding: 1rem;
    flex: 1;
}

.date-picker-flex {
    display: flex;
    gap: 12px;
    align-items: center;
}

.premium-input:focus {
    border-color: var(--secondary);
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px; /* Matched from site */
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.iti {
    width: 100%;
}

.input-group input:focus {
    border-color: var(--secondary);
}

/* Time slots */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.time-slot.selected {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Anamnesis Card */
.anamnesis-card {
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: 10px; /* Matched from site */
    padding: 1.5rem;
}

.question-counter {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.anamnesis-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.anamnesis-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

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

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 50px; /* Pill shape matched from site */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

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

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

.btn-secondary {
    background-color: #E2E8F0;
    color: var(--primary);
}

.btn-yes, .btn-no {
    flex: 1;
    background-color: var(--border);
    color: var(--primary);
}

.btn-no.selected {
    background-color: var(--primary);
    color: white;
}

.btn-yes.selected {
    background-color: var(--secondary);
    color: white;
}

.mt-3 {
    margin-top: 1rem;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Footer */
.app-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.app-footer .btn {
    flex: 1;
}

/* Touch responsiveness & Safe Area Support */
button, input, select, textarea, .service-item, .time-slot, a {
    touch-action: manipulation;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .app-container {
        padding-bottom: env(safe-area-inset-bottom);
    }
    .app-footer {
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}
