:root { --blue: #203b59; --blue-dark: #152a40; --blue-medium: #355674; --blue-light: #edf2f7; --blue-border: #d6e0e9; --gold: #b69a63; --gold-light: #e7d9b9; --ivory: #f6f4ef; --white: #ffffff; --text: #252b32; --muted: #777e86; --border: #e5e0d5; --danger: #a34b43; --shadow: 0 20px 60px rgba(25, 45, 66, 0.10); }

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; min-height: 100dvh; padding: 35px 18px; display: flex; justify-content: center; align-items: center; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: radial-gradient(circle at 10% 10%, rgba(182,154,99,.10), transparent 30%), radial-gradient(circle at 90% 90%, rgba(32,59,89,.08), transparent 35%), var(--ivory); }

button, select, input { font: inherit; }

button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.container { width: 100%; max-width: 530px; overflow: hidden; background: var(--white); border: 1px solid rgba(182,154,99,.25); border-radius: 18px; box-shadow: var(--shadow); animation: appear .45s ease both; }

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

.header { position: relative; overflow: hidden; padding: 36px 25px 30px; text-align: center; color: var(--white); background: linear-gradient(145deg, var(--blue), var(--blue-dark)); }

.header::before, .header::after { content: ""; position: absolute; border: 1px solid rgba(231,217,185,.13); border-radius: 50%; pointer-events: none; }

.header::before { width: 170px; height: 170px; top: -115px; left: -70px; }

.header::after { width: 220px; height: 220px; right: -100px; bottom: -130px; }

.brand { position: relative; z-index: 1; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 7vw, 40px); font-weight: normal; letter-spacing: 3px; }

.brand-line { width: 46px; height: 2px; margin: 15px auto 18px; background: var(--gold); }

.header h1 { position: relative; z-index: 1; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: normal; }

.header p { position: relative; z-index: 1; margin: 11px 0 0; color: rgba(255,255,255,.75); font-size: 10px; line-height: 1.7; letter-spacing: 1.3px; text-transform: uppercase; }

.content { padding: 29px; }

.section-heading { margin: 0 0 9px; color: var(--blue); font-size: 13px; font-weight: bold; letter-spacing: .3px; }

.section-description { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.days { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }

.day-button { position: relative; min-width: 0; min-height: 108px; padding: 16px 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 11px; background: var(--white); color: var(--blue); cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }

.day-button:hover { border-color: var(--blue-medium); transform: translateY(-2px); }

.day-button.active { border-color: var(--blue); background: var(--blue); color: var(--white); box-shadow: 0 6px 16px rgba(32,59,89,.17); }

.day-name { font-size: 14px; font-weight: bold; letter-spacing: 1.2px; }

.date { color: var(--muted); font-size: 13px; font-weight: normal; }

.day-button.active .date { color: rgba(255,255,255,.78); }

.options { display: flex; flex-direction: column; gap: 18px; margin-bottom: 23px; }

.field { min-width: 0; }

.field-label { display: block; margin-bottom: 9px; color: var(--blue); font-size: 12px; font-weight: bold; line-height: 1.5; }

.electric-selection { width: 100%; min-height: 51px; padding: 9px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #d8dfe6; border-radius: 8px; background: var(--white); color: var(--text); font-size: 12px; line-height: 1.4; cursor: pointer; transition: background .2s ease, border-color .2s ease; }

.electric-selection:has(input:checked) { border-color: var(--blue-medium); background: var(--blue-light); }

.electric-selection input { width: 17px; height: 17px; margin: 0; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; }

.electric-icon { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 5px; background: var(--blue-light); color: var(--blue); font-size: 16px; }

.assign-button { width: 100%; min-height: 56px; padding: 14px 18px; display: flex; justify-content: center; align-items: center; gap: 10px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: var(--white); font-size: 14px; font-weight: bold; cursor: pointer; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }

.assign-button:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 6px 16px rgba(32,59,89,.17); transform: translateY(-1px); }

.assign-button:disabled { border-color: #d9dfe5; background: #e8ebef; color: #777e86; cursor: not-allowed; box-shadow: none; }

.button-arrow { font-size: 19px; font-weight: normal; line-height: 1; }

.bookings-section { margin-top: 29px; }

.bookings-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }

.bookings-header .section-heading { margin: 0; }

.booking-count { padding: 5px 9px; border-radius: 20px; background: var(--ivory); color: var(--muted); font-size: 10px; white-space: nowrap; }

.bookings { display: flex; flex-direction: column; gap: 10px; }

.result { display: none; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; background: var(--blue-light); border: 1px solid var(--blue-border); border-radius: 9px; text-align: left; animation: appear .3s ease both; }

.result.show { display: flex; }

.result-info { flex: 1 1 70px; min-width: 0; }

.result-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }

.result-value { display: block; color: var(--blue); font-size: 14px; font-weight: bold; overflow-wrap: anywhere; }

.place-with-electric { display: inline-flex; align-items: center; gap: 5px; }

.electric-bolt { display: inline-flex; align-items: center; justify-content: center; color: var(--gold); font-size: 21px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(182,154,99,.15)); }

.electric-bolt[hidden] { display: none; }

.remove-button { flex-shrink: 0; width: 32px; height: 32px; padding: 0; border: none; border-radius: 50%; background: transparent; color: #777e86; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s ease, color .2s ease; }

.remove-button:hover { background: #dce5ee; color: var(--danger); }

.empty-state { padding: 22px 14px; border: 1px dashed var(--border); border-radius: 9px; text-align: center; }

.empty-icon { margin-bottom: 8px; color: var(--gold); font-size: 25px; }

.empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.notice { display: none; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--blue-border); border-radius: 8px; background: var(--blue-light); color: var(--blue); font-size: 12px; line-height: 1.6; }

.notice.show { display: block; animation: appear .25s ease both; }

.footer { padding: 18px; border-top: 1px solid var(--border); background: #fcfbf8; color: #929188; font-size: 10px; letter-spacing: 1.4px; text-align: center; }

.footer span { padding: 0 5px; color: var(--gold); }

/* Rifiniture estetiche (stessa struttura e palette) */
.container { border-radius: 24px; border-color: rgba(182,154,99,.28); box-shadow: 0 1px 2px rgba(25,45,66,.06), 0 24px 70px -20px rgba(25,45,66,.24); }

.header { padding: 42px 28px 34px; background: radial-gradient(120% 120% at 85% 0%, #3a5f84 0%, transparent 55%), linear-gradient(150deg, var(--blue), var(--blue-dark)); }
.brand { font-size: clamp(28px, 6.5vw, 34px); letter-spacing: .22em; text-transform: uppercase; }
.brand-line { width: 90px; height: 1px; margin: 16px auto 18px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.header h1 { font-size: 21px; letter-spacing: .3px; }
.header p { color: rgba(255,255,255,.65); font-size: 10.5px; }

.content { padding: 32px 30px; }
.section-heading { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.step { min-width: 28px; height: 24px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 20px; background: var(--blue); color: var(--gold-light); font-size: 11px; letter-spacing: .5px; }
.section-description { font-size: 13px; }
.field-label { font-size: 13px; }

.day-button { min-height: 104px; border-radius: 14px; background: linear-gradient(180deg, #ffffff, #fbfaf7); }
.day-button:hover { box-shadow: 0 12px 24px -14px rgba(32,59,89,.5); }
.day-button.active { background: linear-gradient(150deg, var(--blue), var(--blue-dark)); box-shadow: 0 14px 28px -14px rgba(32,59,89,.7), inset 0 0 0 1px rgba(231,217,185,.35); }
.day-name { font-size: 15px; letter-spacing: 1.6px; }



.electric-selection { min-height: 58px; padding: 10px 14px; border-radius: 14px; font-size: 13px; }
.electric-selection:has(input:checked) { border-color: var(--gold); background: #fbf8f0; }
.electric-icon { width: 30px; height: 30px; border-radius: 9px; transition: background .2s ease, color .2s ease; }
.electric-selection:has(input:checked) .electric-icon { background: var(--gold); color: var(--white); }

.assign-button { min-height: 58px; border-radius: 14px; border-color: transparent; background: linear-gradient(150deg, var(--blue-medium), var(--blue) 55%, var(--blue-dark)); font-size: 15px; letter-spacing: .3px; box-shadow: 0 12px 24px -14px rgba(32,59,89,.8); }
.assign-button:hover:not(:disabled) { background: linear-gradient(150deg, var(--blue), var(--blue-dark)); box-shadow: 0 16px 28px -14px rgba(32,59,89,.85); }
.assign-button:disabled { background: #e8ebef; box-shadow: none; }
.button-arrow { transition: transform .2s ease; }
.assign-button:hover:not(:disabled) .button-arrow { transform: translateX(3px); }

.notice { border-left: 3px solid var(--gold); border-radius: 6px 12px 12px 6px; font-size: 13px; }

.result { padding: 16px; border-left: 3px solid var(--gold); border-radius: 14px; background: linear-gradient(180deg, #f4f8fb, var(--blue-light)); }
.result-value { font-size: 15px; }
.place-with-electric { font-family: Georgia, "Times New Roman", serif; font-size: 21px; letter-spacing: .5px; }
.remove-button { width: 34px; height: 34px; }

.empty-state { padding: 26px 16px; border-radius: 14px; background: #fcfbf8; }
.empty-state p { font-size: 13px; }
.footer { padding: 20px; }

/* Seconda passata: più profondità e carattere */
body { background: linear-gradient(180deg, var(--blue-dark) 0, var(--blue) 300px, var(--ivory) 300px); }
.container { border: 0; border-radius: 26px; box-shadow: 0 2px 4px rgba(20,36,54,.05), 0 40px 90px -30px rgba(10,22,36,.55); }

.header { box-shadow: inset 0 -3px 0 var(--gold); }
.brand { font-size: clamp(30px, 7vw, 38px); letter-spacing: .26em; text-indent: .26em; }
.header h1 { font-size: 20px; font-style: italic; color: var(--gold-light); }

.content > section + section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.days { margin-bottom: 0; }
.section-heading { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: normal; letter-spacing: 0; }
.day-button .date { text-align: center; text-transform: capitalize; line-height: 1.4; }
.day-name { letter-spacing: 1.4px; }


.electric-selection { position: relative; }
.electric-selection input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.electric-selection > span:not(.electric-icon):not(.switch) { flex: 1; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; border-radius: 26px; background: #c9d2dc; transition: background .25s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.3, .8, .3, 1); }
.electric-selection:has(input:checked) .switch { background: var(--gold); }
.electric-selection:has(input:checked) .switch::after { transform: translateX(18px); }
.electric-selection:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }

.assign-button { box-shadow: 0 12px 24px -14px rgba(32,59,89,.8), inset 0 1px 0 rgba(255,255,255,.14); }

.booking-count { background: var(--blue-light); color: var(--blue); font-size: 11px; }
.result { background: var(--white); border: 1px solid var(--blue-border); border-left: 3px solid var(--gold); box-shadow: 0 14px 30px -22px rgba(32,59,89,.6); }
.result-info:first-child { flex: 1.3 1 110px; }
.place-with-electric { gap: 8px; font-family: Arial, Helvetica, sans-serif; font-size: 15px; letter-spacing: 0; }
.result-value span[id^="place-"] { padding: 7px 13px; border-radius: 10px; background: var(--blue); color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 20px; letter-spacing: .06em; }
.electric-bolt { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--gold); color: var(--white); font-size: 16px; filter: none; }
.remove-button { border: 1px solid var(--blue-border); background: var(--white); font-size: 20px; }
.remove-button:hover { border-color: var(--danger); background: #fbeeec; color: var(--danger); }

.footer { border-top: 0; background: var(--blue-dark); color: rgba(255,255,255,.55); letter-spacing: 1.6px; }


/* Avviso con azioni e lista d'attesa */
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.notice-action { flex: 1 1 150px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--blue); border-radius: 10px; background: var(--blue); color: var(--white); font-size: 13px; font-weight: bold; cursor: pointer; transition: background .2s ease, color .2s ease; }
.notice-action:hover { background: var(--blue-dark); }
.notice-action.secondary { background: var(--white); color: var(--blue); }
.notice-action.secondary:hover { background: var(--blue-light); }

/* Fascia oraria della ricarica */
.slot-picker { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; animation: appear .25s ease both; }
.slot-picker[hidden] { display: none; }
.slot-picker legend { padding: 0; margin-bottom: 9px; color: var(--blue); font-size: 13px; font-weight: bold; }
.slot-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot-option { position: relative; min-height: 58px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); color: var(--blue); cursor: pointer; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.slot-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.slot-option:hover { border-color: var(--blue-medium); }
.slot-option:has(input:checked) { border-color: var(--gold); background: #fbf8f0; box-shadow: inset 0 0 0 1px var(--gold); }
.slot-option:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.slot-name { font-size: 14px; font-weight: bold; }
.slot-hint { color: var(--muted); font-size: 11px; }

.result.waiting { border-left-color: var(--muted); }
.result.waiting span[id^="place-"] { padding: 7px 12px; border: 1.5px dashed var(--blue-medium); background: transparent; color: var(--blue); font-family: Arial, Helvetica, sans-serif; font-size: 14px; letter-spacing: 0; }
.result.waiting .electric-bolt { border: 1.5px solid var(--gold); background: transparent; color: var(--gold); }


.electric-bolt { width: auto; height: auto; border-radius: 0; background: none; font-size: 26px; filter: drop-shadow(0 1px 1px rgba(150,100,0,.3)); }
.electric-bolt svg { display: block; }
.result.waiting .electric-bolt { border: 0; background: none; opacity: .6; }

@media (max-width: 420px) {
    body { padding: 12px 9px; align-items: flex-start; }
    .container { border-radius: 14px; }
    .header { padding: 30px 18px 25px; }
    .header h1 { font-size: 20px; }
    .header p { font-size: 9px; letter-spacing: 1px; }
    .content { padding: 22px 16px; }
    .day-button { min-height: 100px; padding: 13px 8px; }
    .day-name { font-size: 13px; }
    .result { gap: 9px; padding: 11px; }
    .result-info { flex-basis: 65px; }
    .result-value { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
