/* ============================================================
   GESTIONALE ITALIAN GENTLEMAN — admin dashboard
   ============================================================ */

:root {
    --bg: #fbf9f4;
    --surface: #ffffff;
    --soft: #f4efe4;
    --dark: #121212;
    --text: #1a1a1a;
    --text-soft: #4a4a4a;
    --muted: #8a8578;
    --gold: #c9a961;
    --gold-dark: #a88c4a;
    --border: #e8e2d1;
    --border-soft: #f0ecdf;
    --ok: #2f7d4b;
    --warn: #b78a2b;
    --danger: #c04a3b;

    --radius: 6px;
    --radius-lg: 12px;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 14px 0; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ LOGIN ============ */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(201,169,97,0.14), transparent 60%),
        var(--bg);
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 44px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border);
}

.login-logo { width: 120px; height: auto; margin: 0 auto 20px; }
.login-card h1 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin: 0 0 8px; }
.login-card .subtitle { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.login-card form { text-align: left; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 14px; text-align: center; }

/* ============ FORM GENERICO ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; margin-bottom: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(201,169,97,0.14);
}
.form-group textarea { resize: vertical; min-height: 72px; }
.check-label { display: inline-flex; align-items: flex-start; gap: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-soft); cursor: pointer; }
.check-label input { margin-top: 3px; accent-color: var(--gold-dark); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    border: 1px solid transparent; border-radius: var(--radius);
    transition: all 0.2s;
}
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn-primary:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #9a3d27; border-color: #9a3d27; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    background: transparent; color: var(--text-soft);
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    transition: all 0.2s;
}
.btn-icon:hover { background: var(--soft); color: var(--text); }

/* ============ APP LAYOUT ============ */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 22px; background: var(--dark); color: #fff;
    position: sticky; top: 0; z-index: 50;
    gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-logo { height: 32px; width: auto; }
.header-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin: 0; font-weight: 600; color: var(--gold); }

.header-center { flex: 1; display: flex; justify-content: center; }
.identity-switcher { display: inline-flex; background: rgba(255,255,255,0.08); padding: 3px; border-radius: 20px; gap: 2px; }
.identity-switcher button {
    padding: 6px 14px; background: transparent; border: 0; border-radius: 18px;
    color: rgba(255,255,255,0.75); font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
    transition: all 0.2s;
}
.identity-switcher button.active { background: var(--gold); color: var(--dark); }

.header-right { display: flex; align-items: center; gap: 14px; }
.badge {
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px; min-width: 22px; text-align: center;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192,74,59,0.6); }
    50% { box-shadow: 0 0 0 6px rgba(192,74,59,0); }
}
.user-name { color: rgba(255,255,255,0.85); font-size: 13px; }
.header-right .btn-icon { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.1); }
.header-right .btn-icon:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ============ TOOLBAR ============ */
.app-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 58px; z-index: 40;
    gap: 14px; flex-wrap: wrap;
}
.toolbar-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.toolbar-tabs button {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; background: transparent; border: 1px solid transparent; border-radius: var(--radius);
    color: var(--text-soft); font-size: 13px; font-weight: 500;
}
.toolbar-tabs button:hover { background: var(--soft); color: var(--text); }
.toolbar-tabs button.active { background: var(--dark); color: var(--gold); }

.toolbar-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.barber-filter, .view-mode { display: inline-flex; background: var(--soft); padding: 3px; border-radius: var(--radius); gap: 2px; }
.barber-filter button, .view-mode button {
    padding: 6px 12px; background: transparent; border: 0; border-radius: 4px;
    color: var(--text-soft); font-size: 12px; font-weight: 500;
}
.barber-filter button.active, .view-mode button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.barber-filter button[style*="--bp-color"].active { box-shadow: 0 0 0 2px var(--bp-color); color: var(--bp-color); }

/* ============ DATE NAV ============ */
.date-nav {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--border-soft);
}
.btn-oggi { padding: 6px 14px; background: var(--soft); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.btn-oggi:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.date-label { flex: 1; text-align: center; font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600; color: var(--text); }

/* ============ CALENDARIO: GIORNO ============ */
.calendar-day {
    max-width: 820px; margin: 0 auto; padding: 16px; background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); margin-top: 18px;
}
.day-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: start; padding: 4px 0; }
.day-row[data-hour="true"] { border-top: 1px solid var(--border-soft); padding-top: 10px; margin-top: 6px; }
.day-time { font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.day-slot { min-height: 22px; display: flex; flex-direction: column; gap: 4px; }

.appt {
    padding: 8px 12px; border-radius: 6px; border-left: 3px solid; cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.appt:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.appt-time { font-size: 11px; color: var(--muted); font-weight: 600; }
.appt-name { font-weight: 600; color: var(--text); font-size: 14px; }
.appt-barber { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

/* ============ CALENDARIO: SETTIMANA ============ */
.calendar-week { padding: 16px; max-width: 100%; overflow-x: auto; }
.week-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, minmax(100px, 1fr));
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    min-width: 820px;
}
.week-header-corner, .week-day-header {
    position: sticky; top: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 6px;
    text-align: center; font-size: 12px;
}
.week-day-header.today .week-day-num { background: var(--gold); color: var(--dark); border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.week-day-header.closed { color: var(--muted); background: var(--soft); }
.week-day-name { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-size: 10px; }
.week-day-num { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--text); }

.week-time {
    grid-column: 1; padding: 8px 4px 0; font-size: 10px; color: var(--muted);
    border-top: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; text-align: right;
}
.week-cell {
    border-top: 1px solid var(--border-soft); border-left: 1px solid var(--border-soft);
    min-height: 48px; padding: 2px; position: relative; display: flex; flex-direction: column; gap: 2px;
    cursor: pointer;
}
.week-cell:hover:not(.closed) { background: rgba(201,169,97,0.05); }
.week-cell.closed { background: var(--soft); cursor: not-allowed; }

.appt-chip {
    padding: 3px 6px; border-radius: 3px; font-size: 10px; font-weight: 600;
    color: #fff; min-height: 20px; display: flex; align-items: center;
    cursor: pointer;
    text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
}
.appt-chip:hover { transform: scale(1.02); }

/* ============ CALENDARIO: MESE ============ */
.calendar-month { padding: 16px; max-width: 100%; }
.month-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
    background: var(--surface); border-radius: var(--radius-lg); padding: 10px;
    box-shadow: var(--shadow);
}
.month-dow { text-align: center; padding: 8px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.month-cell {
    min-height: 84px; padding: 8px; border: 1px solid var(--border-soft); border-radius: var(--radius);
    background: var(--bg); cursor: pointer; transition: all 0.2s;
}
.month-cell:hover:not(.placeholder):not(.closed) { background: var(--surface); border-color: var(--gold); }
.month-cell.placeholder { background: transparent; border-color: transparent; cursor: default; }
.month-cell.closed { background: var(--soft); cursor: not-allowed; color: var(--muted); }
.month-cell.today { border-color: var(--gold); }
.month-cell.today .month-day-num { background: var(--gold); color: var(--dark); border-radius: 50%; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.month-day-num { font-weight: 600; font-size: 14px; }
.month-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.month-dots .dot { width: 7px; height: 7px; border-radius: 50%; }
.month-dots .more { font-size: 10px; color: var(--muted); font-weight: 600; }

/* ============ LISTA / TABELLA ============ */
.list-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--border-soft);
}
.list-toolbar input, .list-toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.list-toolbar input[type="search"] { flex: 1; max-width: 400px; }

.list-table-wrap { padding: 18px 22px; overflow-x: auto; }
.cestino-info { color: var(--muted); font-size: 13px; margin: 0 0 14px; font-style: italic; }

.list-table {
    width: 100%; border-collapse: collapse; background: var(--surface);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.list-table th {
    text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
    background: var(--soft); border-bottom: 1px solid var(--border);
}
.list-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.list-table tr:hover { background: var(--bg); cursor: pointer; }
.list-table td small { color: var(--muted); font-size: 11px; display: block; }
.list-table td.empty { text-align: center; color: var(--muted); padding: 40px; font-style: italic; }

.pill {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
}
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    background: var(--soft); color: var(--text-soft);
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}

.stato {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; text-transform: capitalize;
}
.stato-richiesta { background: #fff4d6; color: #8a6b00; }
.stato-confermata { background: #d9eedd; color: #1f5b38; }
.stato-completata { background: #e0e0e0; color: #555; }
.stato-cancellata { background: #fdd; color: #8a1f1f; }
.stato-no_show { background: #fde2d1; color: #8c3f0a; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px; border-bottom: 1px solid var(--border-soft);
    position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal header h2 { margin: 0; font-family: 'Playfair Display', serif; font-size: 1.3rem; }
.modal header .btn-icon { background: transparent; border: 0; font-size: 22px; color: var(--text-soft); }
.modal-body { padding: 22px; }

.detail-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 8px 0; font-size: 14px; gap: 16px;
}
.detail-row > span:first-child { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.detail-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-size: 1rem; }
.detail-row.total strong { color: var(--gold-dark); font-family: 'Playfair Display', serif; font-size: 1.3rem; }
.detail-row .discount { color: var(--gold-dark); font-weight: 600; }
.detail-row select { padding: 5px 8px; font-size: 13px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); }

.detail-group { margin: 14px 0; }
.detail-group label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.detail-group textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); resize: vertical; }

.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; justify-content: flex-end; }
.modal-actions .btn { flex: 0 0 auto; }

.warn { background: #fff4d6; color: #8a6b00; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; }
.no-email-hint { color: var(--muted); font-size: 12.5px; font-style: italic; margin-top: 6px; }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; }

/* ============ TOAST ============ */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--dark); color: var(--gold);
    padding: 12px 22px; border-radius: 30px; font-size: 13px; font-weight: 500;
    box-shadow: var(--shadow-lg); z-index: 300;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .app-header { flex-direction: column; gap: 10px; padding: 10px 14px; }
    .header-center { order: 3; width: 100%; }
    .app-toolbar { padding: 10px 14px; position: relative; top: 0; }
    .toolbar-tabs button span:not(.badge) { display: none; }
    .toolbar-tabs button { padding: 8px 12px; }
    .date-nav { padding: 10px 14px; }
    .calendar-day { margin: 10px; padding: 10px; }
    .calendar-week { padding: 10px; }
    .week-grid { min-width: 700px; }
    .month-cell { min-height: 54px; padding: 4px; }
    .month-day-num { font-size: 12px; }
    .list-toolbar { padding: 10px 14px; }
    .list-table-wrap { padding: 10px; }
    .list-table { font-size: 12px; }
    .list-table th, .list-table td { padding: 8px; }
}

/* ============================================================
   SLOT MANAGER (SLOT-04, SLOT-05)
   ============================================================ */

.slot-manager {
    padding: 16px 22px;
    background: var(--bg);
    min-height: calc(100vh - 130px);
}

.sm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.sm-week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sm-week-label {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1rem;
    min-width: 180px;
    text-align: center;
    color: var(--text);
}

.sm-filtro-barbiere {
    display: inline-flex;
    background: var(--soft);
    padding: 3px;
    border-radius: var(--radius);
    gap: 2px;
}

.sm-filtro-barbiere button {
    padding: 6px 12px;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.sm-filtro-barbiere button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.sm-filtro-barbiere button[style*="--bp-color"].active {
    box-shadow: 0 0 0 2px var(--bp-color);
    color: var(--bp-color);
}

.sm-legenda {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-soft);
    flex-wrap: wrap;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid var(--border);
}

.swatch-libero { background: #ffffff; }
.swatch-bloccato { background: #f4a4a4; border-color: #c97474; }
.swatch-prenotato { background: var(--gold); border-color: var(--gold-dark); }

.sm-grid {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    user-select: none;
    box-shadow: var(--shadow);
}

.sm-cell {
    background: var(--surface);
    padding: 4px;
    min-height: 28px;
    font-size: 12px;
    position: relative;
}

.sm-header-cell {
    background: var(--soft);
    font-weight: 600;
    text-align: center;
    padding: 8px 4px;
}

.sm-header-cell.sm-oggi {
    background: var(--gold);
    color: var(--dark);
}

.sm-day-name {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.sm-header-cell.sm-oggi .sm-day-name { color: var(--dark); opacity: 0.8; }

.sm-day-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.sm-header-cell.sm-oggi .sm-day-num { color: var(--dark); }

.sm-time-cell {
    background: var(--soft);
    text-align: right;
    color: var(--muted);
    font-size: 11px;
    padding-right: 8px;
    line-height: 28px;
    font-variant-numeric: tabular-nums;
}

.sm-slot-cell {
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
}

.sm-slot-cell:hover {
    background: rgba(201, 169, 97, 0.18);
}

/* Zebra striping solo righe pari/dispari (meno rumore visivo di scacchiera) */
.sm-slot-cell.sm-row-even { background: #ffffff; }
.sm-slot-cell.sm-row-odd { background: #f3f3f3; }
.sm-slot-cell.sm-libero { /* base — colore da zebra */ }
.sm-slot-cell.sm-prenotato {
    background: var(--gold) !important;
    color: #fff;
}
/* Slot OCCUPATO: rosato saturo con label "Slot occupato" centrato in rosso */
.sm-slot-cell.sm-bloccato {
    background: #f5b5b5 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
}
.sm-slot-occupato-label {
    font-size: 10px;
    font-weight: 700;
    color: #a83232;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.1;
    pointer-events: none;
}

/* Giorno chiuso (Dom/Lun default, o override chiuso): celle disabled + visual */
.sm-slot-cell.sm-day-closed-cell {
    background: repeating-linear-gradient(45deg, #d8d8d8, #d8d8d8 6px, #cccccc 6px, #cccccc 12px) !important;
    cursor: not-allowed !important;
    pointer-events: none;
    opacity: 0.6;
}
.sm-slot-cell.sm-day-closed-cell .sm-slot-occupato-label { display: none; }

.sm-header-cell.sm-day-closed-header {
    background: #d8d8d8;
    color: #777;
}
.sm-header-cell.sm-day-closed-header.sm-oggi { background: var(--gold); color: var(--dark); }

.sm-header-cell { position: relative; }
.sm-toggle-giorno {
    display: block;
    margin-top: 6px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px 0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer !important;
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
    transition: background 0.12s;
}
.sm-toggle-giorno.sm-btn-close { background: #fff; color: #a83232; border-color: #f4a4a4; }
.sm-toggle-giorno.sm-btn-close:hover { background: #fbeaea; }
.sm-toggle-giorno.sm-btn-open { background: #fff; color: #2d6a2d; border-color: #a4dca4; }
.sm-toggle-giorno.sm-btn-open:hover { background: #eafbea; }

.sm-override-badge {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #6b8e9e;
    padding: 1px 4px;
    border-radius: 8px;
    display: inline-block;
    letter-spacing: 0.4px;
}

/* Calendario: giorno chiuso di default (Dom/Lun) — visual ma SELEZIONABILE */
.week-cell.day-default-closed,
.month-cell.day-default-closed {
    background: repeating-linear-gradient(45deg, #f4efe4, #f4efe4 6px, #e8e2d1 6px, #e8e2d1 12px);
    opacity: 0.85;
}
.week-cell.day-default-closed:hover,
.month-cell.day-default-closed:hover {
    background: rgba(201,169,97,0.18);
    opacity: 1;
}
.sm-slot-cell.sm-drag-selected {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
    background: rgba(201, 169, 97, 0.45);
}

.sm-block-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #7a2a2a;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    right: 4px;
}

/* Colori barbiere su blocco */
.sm-slot-cell.sm-bf-francesco.sm-bloccato { background: #f4d4a4; }
.sm-slot-cell.sm-bf-ottavio.sm-bloccato { background: #a4c4d4; }

.sm-modal-summary {
    background: var(--soft);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text);
    margin: 0 0 14px;
    font-weight: 500;
}

/* Responsive slot manager */
@media (max-width: 768px) {
    .slot-manager { padding: 10px; }
    .sm-grid { grid-template-columns: 50px repeat(7, 1fr); font-size: 10px; }
    .sm-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .sm-week-nav { justify-content: center; }
    .sm-week-label { min-width: auto; }
    .sm-legenda { justify-content: center; }
    .sm-day-num { font-size: 1rem; }
    .sm-time-cell { font-size: 9px; padding-right: 4px; }
}

/* ============================================================
   NOTIFICA DESKTOP NUOVA PRENOTAZIONE (SLOT-07)
   ============================================================ */

.notify-modal {
    position: fixed;
    inset: 0;
    z-index: 500;                            /* sopra modal-overlay (200) e toast (300) */
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: notify-fade-in 200ms ease-out;
}

@keyframes notify-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.notify-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 5px solid var(--gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px 28px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    animation: notify-card-pop 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notify-card-pop {
    from { transform: translateY(-20px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.notify-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    animation: notify-bell-shake 600ms ease-out;
}

@keyframes notify-bell-shake {
    0%, 100% { transform: rotate(0deg); }
    20%      { transform: rotate(15deg); }
    40%      { transform: rotate(-12deg); }
    60%      { transform: rotate(8deg); }
    80%      { transform: rotate(-4deg); }
}

.notify-card h3 {
    margin: 0 0 14px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text);
}

.notify-cliente {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--text);
}

.notify-dettagli {
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.notify-card .btn-primary {
    min-width: 160px;
    padding: 12px 28px;
}

.notify-coda {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

@media (max-width: 480px) {
    .notify-card { padding: 24px 18px; }
    .notify-icon { font-size: 38px; }
    .notify-card h3 { font-size: 1.25rem; }
}
