/* ================================================================
   ADMIN RISTOMACELLERIA – STILE LUXURY / ANIMATED / MOBILE-FIRST
   ================================================================ */

:root {
    --rm-primary: #8B0000;
    --rm-primary-dark: #5e0000;
    --rm-accent: #C9A961;
    --rm-accent-soft: #e7d4a3;
    --rm-bg: #1a1a1a;
    --rm-bg-soft: #2a2a2a;
    --rm-text: #f5f1e8;
    --rm-text-muted: #aaa;
    --rm-card: #ffffff;
    --rm-card-shadow: 0 10px 40px rgba(0,0,0,0.12);
    --rm-radius: 12px;
    --rm-sidebar-w: 250px;
}

* { box-sizing: border-box; }

html, body {
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #f4f1ea;
    color: #2c2c2c;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--rm-primary); text-decoration: none; transition: all .25s ease; }
a:hover { color: var(--rm-accent); }

/* ============= LOGIN ============= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a0000 0%, #3a0000 50%, #1a0000 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-wrapper::before {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(201,169,97,0.08) 0%, transparent 70%);
    animation: rm-rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rm-rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.login-card {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.97);
    border-radius: var(--rm-radius);
    box-shadow: 0 25px 70px rgba(0,0,0,0.55), 0 0 0 1px var(--rm-accent);
    width: 100%;
    max-width: 420px;
    padding: 50px 40px 40px;
    animation: rm-fadein 0.8s ease;
}
@media (max-width: 480px) {
    .login-card { padding: 35px 22px 28px; }
}

@keyframes rm-fadein {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    text-align: center;
    color: var(--rm-primary);
    margin: 0 0 6px;
    font-size: 1.9rem;
    letter-spacing: 1px;
}
.login-card .sub {
    text-align: center;
    color: var(--rm-accent);
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: 4px;
    margin-bottom: 30px;
}
.login-card .alert-error {
    background: #fde2e2;
    color: #8B0000;
    border-left: 4px solid var(--rm-primary);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: .9rem;
}

/* ============= BOTTONI ============= */
.rm-btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--rm-primary) 0%, var(--rm-primary-dark) 100%);
    color: #fff !important;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 6px 16px rgba(139,0,0,0.25);
    font-size: .9rem;
}
.rm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(139,0,0,0.4);
    color: #fff !important;
}

.rm-btn-accent {
    background: linear-gradient(135deg, var(--rm-accent) 0%, #b89548 100%);
    color: #1a1a1a !important;
    border: none;
    padding: 9px 18px;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201,169,97,0.35);
    transition: all .25s ease;
    font-size: .88rem;
}
.rm-btn-accent:hover { transform: translateY(-1px); color: #1a1a1a !important; }

.rm-btn-danger {
    background: #c82333;
    color: #fff !important;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    transition: all .2s ease;
}
.rm-btn-danger:hover { background: #a01b27; color: #fff !important; }

.rm-btn-default {
    background: #f0f0f0;
    color: #333 !important;
    border: 1px solid #ddd;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    transition: all .2s ease;
}
.rm-btn-default:hover { background: #e8e8e8; color: #333 !important; }

.rm-btn-primary i, .rm-btn-accent i, .rm-btn-danger i, .rm-btn-default i { margin-right: 4px; }

/* ============= LAYOUT SHELL ============= */
.cms-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.cms-sidebar {
    width: var(--rm-sidebar-w);
    background: linear-gradient(180deg, #1a1a1a 0%, #2a1a1a 100%);
    color: var(--rm-text);
    padding: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    z-index: 100;
    transition: transform .3s ease;
}

.cms-sidebar .brand {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(201,169,97,0.2);
    background: rgba(0,0,0,0.3);
}
.cms-sidebar .brand h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--rm-accent);
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: 1px;
}
.cms-sidebar .brand small {
    color: var(--rm-text-muted);
    font-size: .68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-top: 4px;
}

.cms-sidebar nav { padding: 18px 0; }
.cms-sidebar nav a {
    display: flex;
    align-items: center;
    color: var(--rm-text);
    padding: 12px 22px;
    border-left: 3px solid transparent;
    transition: all .25s ease;
    font-size: .93rem;
    gap: 12px;
}
.cms-sidebar nav a i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}
.cms-sidebar nav a:hover, .cms-sidebar nav a.active {
    background: rgba(201,169,97,0.1);
    border-left-color: var(--rm-accent);
    color: var(--rm-accent);
}
.cms-sidebar nav a.logout-item {
    margin-top: 30px;
    color: #ff7a7a;
}
.cms-sidebar nav a.logout-item:hover { background: rgba(200,35,51,0.15); border-left-color: #c82333; color: #ff9b9b; }

/* Voci di menu in evidenza (Richieste / Prenotazioni) + divisore "Altro" */
.cms-sidebar nav a.nav-priority {
    font-weight: 600;
    background: rgba(201,169,97,0.07);
    border-left-color: rgba(201,169,97,0.45);
}
.cms-sidebar nav a.nav-priority i { color: var(--rm-accent); }
.cms-sidebar nav .nav-sep {
    color: var(--rm-text-muted); font-size: .6rem; letter-spacing: 2.5px;
    text-transform: uppercase; padding: 18px 22px 8px; opacity: .6;
}

/* Overlay quando sidebar è aperta su mobile */
.cms-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99;
}
body.sidebar-open .cms-sidebar-overlay { display: block; }

.cms-content {
    margin-left: var(--rm-sidebar-w);
    flex: 1;
    padding: 0;
    min-height: 100vh;
    min-width: 0;
}

.cms-topbar {
    background: #fff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
}

.cms-hamburger {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--rm-primary);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}
.cms-hamburger:hover { background: #f5f1e8; }

.user-info { color: #666; font-size: .9rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-info b { color: var(--rm-primary); }
.logout-link {
    color: var(--rm-primary);
    padding: 6px 10px;
    border-radius: 6px;
    transition: background .2s ease;
}
.logout-link:hover { background: #f5e6e6; color: var(--rm-primary-dark); }

.cms-page {
    padding: 30px;
    max-width: 1300px;
    margin: 0 auto;
}

.page-header { margin-bottom: 22px; }
.page-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    margin: 0;
    color: var(--rm-primary-dark);
    font-size: 1.8rem;
    line-height: 1.2;
}
.page-header h1 i { color: var(--rm-accent); margin-right: 10px; }
.page-header small { color: var(--rm-accent); text-transform: uppercase; letter-spacing: 2px; font-size: .72rem; font-weight: 600; }

.breadcrumb {
    list-style: none;
    padding: 8px 0;
    margin: 0 0 22px 0;
    font-size: .85rem;
    color: #999;
}
.breadcrumb li { display: inline; }
.breadcrumb li:after { content: "›"; margin: 0 8px; color: #ccc; }
.breadcrumb li:last-child:after { content: ""; }

/* ============= CARDS / TABLES ============= */
.rm-card {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-card-shadow);
    padding: 24px;
    margin-bottom: 24px;
    animation: rm-fadein 0.4s ease;
}
@media (max-width: 600px) { .rm-card { padding: 16px; } }

.rm-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.rm-table th {
    text-align: left;
    padding: 12px 14px;
    background: #faf6ee;
    color: var(--rm-primary-dark);
    text-transform: uppercase;
    font-size: .73rem;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--rm-accent);
    white-space: nowrap;
}
.rm-table td {
    padding: 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: .9rem;
}
.rm-table tr:hover td { background: #fbf8f1; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.badge-active { background: #d4edda; color: #155724; }
.badge-hidden { background: #f8d7da; color: #721c24; }
.badge-admin { background: #d1ecf1; color: #0c5460; }
.badge-attivita { background: #fff3cd; color: #856404; }
.badge-utente { background: #ede0d4; color: #5e0000; }
.badge-utente-form { background: #5e0000; color: #fff; font-size: .68rem; margin-left: 4px; }
.badge-visibile { background: #d4edda; color: #155724; }

/* ============= FORM ============= */
.form-row { margin-bottom: 16px; }
.form-row label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    font-size: .85rem;
    letter-spacing: .2px;
}
.form-row input[type=text], .form-row input[type=email], .form-row input[type=password],
.form-row input[type=number], .form-row input[type=date], .form-row textarea, .form-row select,
.form-row input:not([type]) {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    font-size: .95rem;
    font-family: inherit;
    transition: all .2s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    outline: none;
    border-color: var(--rm-accent);
    box-shadow: 0 0 0 3px rgba(201,169,97,0.18);
}
.form-row textarea { min-height: 100px; resize: vertical; }

.row-cols { display: flex; gap: 16px; flex-wrap: wrap; }
.row-cols > .col { flex: 1 1 200px; min-width: 0; }

@media (max-width: 600px) {
    .row-cols { gap: 0; }
    .row-cols > .col { flex: 1 1 100%; }
}

/* ============= TABS ============= */
.rm-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.rm-tabs button {
    background: transparent;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .25s ease;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: 1px;
    white-space: nowrap;
}
.rm-tabs button.active {
    color: var(--rm-primary);
    border-bottom-color: var(--rm-accent);
}
.rm-tabs button:hover { color: var(--rm-primary-dark); }
.rm-tab-content { display: none; animation: rm-fadein .3s ease; }
.rm-tab-content.active { display: block; }

/* ============= PAGINATION ============= */
.rm-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}
.rm-pagination a, .rm-pagination span {
    padding: 7px 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #444;
    font-size: .88rem;
}
.rm-pagination a:hover { background: var(--rm-accent-soft); color: #5e0000; }
.rm-pagination .current { background: var(--rm-primary); color: #fff; border-color: var(--rm-primary); }

/* ============= DRAG & DROP LIST ============= */
.rm-sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rm-sortable-list li {
    background: #fff;
    border: 1px solid #ececec;
    border-left: 4px solid var(--rm-accent);
    padding: 14px 18px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all .2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    flex-wrap: wrap;
}
.rm-sortable-list li:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border-left-color: var(--rm-primary);
}
.rm-sortable-list li.ui-sortable-helper { background: #fff8e7; }
.rm-sortable-list .drag-handle {
    cursor: grab;
    color: #bbb;
    font-size: 1.4rem;
    padding: 0 6px;
}
.rm-sortable-list .drag-handle:active { cursor: grabbing; }

/* ============= DASHBOARD WIDGETS ============= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}
.dashboard-tile {
    background: #fff;
    border-radius: var(--rm-radius);
    padding: 26px 22px;
    text-align: center;
    box-shadow: var(--rm-card-shadow);
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    color: #2c2c2c;
}
.dashboard-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.15);
    color: #2c2c2c;
}
.dashboard-tile::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rm-primary), var(--rm-accent));
}
.dashboard-tile .tile-icon {
    font-size: 2rem;
    color: var(--rm-accent);
    margin-bottom: 6px;
    display: block;
}
.dashboard-tile .num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    color: var(--rm-primary);
    font-weight: 700;
    line-height: 1;
    margin: 6px 0 10px;
}
.dashboard-tile .lbl {
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .75rem;
    font-weight: 600;
}

/* Variante "alert": tile rossa + numero ben visibile, usata quando
   ci sono richieste prenotazione "nuova" da gestire. */
.dashboard-tile.tile-alert {
    background: linear-gradient(135deg, #fff4f4 0%, #ffe9e9 100%);
    box-shadow: 0 4px 20px rgba(220, 53, 69, .15);
    border: 1px solid rgba(220, 53, 69, .2);
}
.dashboard-tile.tile-alert::before {
    background: linear-gradient(90deg, #dc3545, #c92a3a);
}
.dashboard-tile.tile-alert .tile-icon {
    color: #dc3545;
    animation: tilePulse 1.8s ease-in-out infinite;
}
.dashboard-tile.tile-alert .num { color: #dc3545; }
.dashboard-tile.tile-alert .lbl { color: #c92a3a; }
@keyframes tilePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* ============= UTILS ============= */
.text-right { text-align: right; }
.text-center { text-align: center; }
.actions-bar {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.actions-bar .search-box { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-bar .search-box input, .actions-bar .search-box select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 200px;
    font-size: .9rem;
}
@media (max-width: 600px) {
    .actions-bar .search-box input, .actions-bar .search-box select { min-width: 0; flex: 1 1 100%; }
}

.muted { color: #999; font-size: .85rem; }
.spacer-y { height: 20px; }

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============= IMAGE UPLOAD WIDGET ============= */
.rm-img-upload {
    display: inline-block;
    position: relative;
    width: 200px;
    height: 200px;
    border: 2px dashed #d4c89a;
    background: #faf6ee;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all .25s ease;
    vertical-align: top;
}
.rm-img-upload:hover {
    border-color: var(--rm-accent);
    background: #f5ecd6;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201,169,97,0.18);
}
.rm-img-upload input[type=file] { display: none; }
.rm-img-upload .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b8a468;
    font-size: .85rem;
    text-align: center;
    padding: 12px;
}
.rm-img-upload .placeholder i { font-size: 2.4rem; margin-bottom: 8px; }
.rm-img-upload .placeholder strong { display: block; color: var(--rm-primary); margin-bottom: 2px; font-size: .9rem; }
.rm-img-upload img.preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.rm-img-upload.has-image .placeholder { display: none; }
.rm-img-upload.has-image img.preview { display: block; }
.rm-img-upload.has-image { border-style: solid; border-color: var(--rm-accent); }

.rm-img-upload .btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(200,35,51,0.9);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all .2s ease;
    font-size: 1rem;
    line-height: 1;
}
.rm-img-upload.has-image .btn-remove { display: flex; }
.rm-img-upload .btn-remove:hover { background: #a01b27; transform: scale(1.1); }

.rm-img-upload .upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 4;
    font-size: .85rem;
}
.rm-img-upload.uploading .upload-overlay { display: flex; }
.rm-img-upload .upload-overlay .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: var(--rm-accent);
    border-radius: 50%;
    animation: rm-spin .8s linear infinite;
    margin-bottom: 10px;
}
@keyframes rm-spin { to { transform: rotate(360deg); } }

.rm-img-upload-help {
    font-size: .8rem;
    color: #999;
    margin-top: 6px;
    line-height: 1.4;
}

/* ============= ELEMENTI MENU - LISTA ============= */
.rm-elem-thumb {
    width: 50px; height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}
.rm-elem-thumb-empty {
    width: 50px; height: 50px;
    border-radius: 6px;
    background: #f5f1e8;
    color: #c9a961;
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed #d4c89a;
    font-size: 1.2rem;
}
.rm-elements-table .drag-handle { cursor: grab; color: #bbb; font-size: 1.2rem; }
.rm-elements-table .drag-handle:active { cursor: grabbing; }
.rm-elements-table tbody tr.ui-sortable-helper { background: #fff8e7; box-shadow: 0 8px 20px rgba(0,0,0,0.1); }

.rm-status-dot {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,0.06);
}
.rm-status-on { background: #28a745; }
.rm-status-off { background: #c8c8c8; }

/* ============= TOGGLE SWITCH ============= */
.rm-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    vertical-align: middle;
}
.rm-switch input { opacity: 0; width: 0; height: 0; }
.rm-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    transition: .25s;
    border-radius: 28px;
}
.rm-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px; width: 22px;
    left: 3px; bottom: 3px;
    background: #fff;
    transition: .25s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.rm-switch input:checked + .rm-switch-slider { background: #28a745; }
.rm-switch input:checked + .rm-switch-slider:before { transform: translateX(22px); }

/* ============= CHECKBOX GRID ============= */
.rm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 24px;
    margin: 12px 0 24px;
}
.rm-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .92rem;
    font-weight: 500;
    color: #444;
}
.rm-checkbox-grid input[type=checkbox] {
    width: 18px; height: 18px;
    accent-color: var(--rm-primary);
    cursor: pointer;
}

.rm-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--rm-primary-dark);
    margin: 20px 0 10px;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

/* ============= MODAL XL FIX (sopra il loader) ============= */
.modal.show { z-index: 1060; }
.modal-backdrop.show { z-index: 1055; }

/* ============= SLUG PREVIEW (sotto i campi SEO URL) ============= */
.rm-slug-preview {
    margin-top: 6px;
    padding: 6px 10px;
    background: #f8f5ec;
    border-left: 3px solid var(--rm-accent);
    color: #6a5a30;
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    border-radius: 4px;
    word-break: break-all;
}
.rm-slug-preview .slug-val { color: var(--rm-primary); font-weight: 700; }
.rm-slug-preview i { color: var(--rm-accent); margin-right: 4px; }
.rm-slug-input { font-family: 'Courier New', monospace; }

/* ============= QR CODE MODAL GRID ============= */
.rm-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.rm-qr-card {
    background: #faf6ee;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border: 1px solid #ecdfbf;
}
.rm-qr-lang {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--rm-primary-dark);
    font-weight: 600;
    margin-bottom: 10px;
}
.rm-qr-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 12px;
}
.rm-qr-card .rm-btn-primary { display: inline-block; padding: 8px 14px; font-size: .85rem; }

/* ============= EDITOR ORARI ATTIVITÀ ============= */
.rm-orari-editor {
    background: #faf6ee;
    border: 1px solid #ecdfbf;
    border-radius: 10px;
    padding: 14px;
}
.rm-orari-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecdfbf;
}
.rm-orari-toolbar .rm-btn-default,
.rm-orari-toolbar .rm-btn-danger {
    font-size: .82rem;
    padding: 6px 12px;
}
.rm-orari-select {
    padding: 6px 10px;
    border: 1px solid #d4c89a;
    border-radius: 6px;
    background: #fff;
    font-size: .85rem;
    cursor: pointer;
}

.rm-orari-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.rm-orari-day {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ecdfbf;
    overflow: hidden;
    transition: all .2s ease;
}
.rm-orari-day:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.rm-orari-day.is-closed { background: #f5f1e8; opacity: .85; }

.rm-orari-day-header {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #5e0000, #8B0000);
    color: #fff;
    padding: 8px 12px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: .95rem;
    letter-spacing: .3px;
}
.rm-orari-day.is-closed .rm-orari-day-header {
    background: linear-gradient(90deg, #555, #777);
}
.rm-orari-day-name { flex: 1; }
.rm-orari-closed-tag {
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .65rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1.5px;
    margin-right: 6px;
}
.btn-day-remove {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .8rem;
    transition: all .2s ease;
}
.btn-day-remove:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

.rm-orari-day-body { padding: 10px 12px; }

.rm-orari-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px dashed #f0e8d8;
}
.rm-orari-slot:last-of-type { border-bottom: none; }
.rm-orari-slot input[type=time] {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: .9rem;
    background: #fff;
    flex: 1;
    min-width: 0;
}
.rm-orari-slot input[type=time]:focus {
    outline: none;
    border-color: var(--rm-accent);
    box-shadow: 0 0 0 2px rgba(201,169,97,0.18);
}
.rm-orari-arrow { color: var(--rm-accent); font-weight: 700; }
.btn-slot-remove {
    background: transparent;
    border: none;
    color: #c8c8c8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: .9rem;
    transition: all .2s ease;
}
.btn-slot-remove:hover { color: #c82333; background: #fde2e2; }

.btn-slot-add {
    font-size: .8rem !important;
    padding: 4px 10px !important;
    margin-top: 6px;
    width: 100%;
    background: transparent !important;
    border: 1px dashed #d4c89a !important;
}
.btn-slot-add:hover { background: #faf6ee !important; border-color: var(--rm-accent) !important; }

@media (max-width: 600px) {
    .rm-orari-list { grid-template-columns: 1fr; }
}

/* ============= DROPZONE UPLOAD MULTIPLO ============= */
.rm-dropzone {
    border: 2px dashed #d4c89a;
    background: #faf6ee;
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .25s ease;
}
.rm-dropzone.dz-over { background: #f5ecd6; border-color: var(--rm-accent); transform: scale(1.01); }
.rm-dropzone input[type=file] { display: none; }
.rm-dz-icon { font-size: 3rem; color: var(--rm-accent); display: block; margin-bottom: 10px; }
.rm-dz-msg strong { color: var(--rm-primary); font-size: 1rem; }
.rm-dz-msg a { color: var(--rm-accent); text-decoration: underline; }
.rm-dz-msg .muted { display: block; font-size: .82rem; margin-top: 6px; }

.rm-dz-progress {
    margin-top: 14px;
    background: #ecdfbf;
    border-radius: 8px;
    height: 28px;
    overflow: hidden;
    position: relative;
}
.rm-dz-progress-bar {
    background: linear-gradient(90deg, var(--rm-primary), var(--rm-accent));
    height: 100%;
    width: 0%;
    transition: width .2s ease;
}
.rm-dz-progress-text {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* ============= GRIGLIA FOTO GALLERY ============= */
.rm-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.rm-media-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all .25s ease;
    position: relative;
}
.rm-media-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.15); }
.rm-media-card.ui-sortable-helper { box-shadow: 0 14px 30px rgba(0,0,0,0.25); transform: rotate(2deg); }
.rm-media-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0e8d8;
}
.rm-media-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity .25s ease;
}
.rm-media-card:hover .rm-media-overlay { opacity: 1; }
.rm-media-btn {
    background: rgba(255,255,255,0.95);
    border: none;
    width: 38px; height: 38px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--rm-primary);
    font-size: 1rem;
    transition: all .2s ease;
}
.rm-media-btn:hover { background: var(--rm-accent); color: #fff; transform: scale(1.1); }
.rm-media-check {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(255,255,255,0.92);
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 5;
}
.rm-media-check input { margin: 0; width: 18px; height: 18px; cursor: pointer; accent-color: var(--rm-primary); }
.rm-media-drag {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(255,255,255,0.92);
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: grab;
    color: #555;
    z-index: 5;
}
.rm-media-drag:active { cursor: grabbing; }
.rm-media-label {
    padding: 8px 10px;
    font-size: .82rem;
    color: #555;
    border-top: 1px solid #f0e8d8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============= LIGHTBOX ============= */
.rm-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15,5,5,0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.rm-lightbox.open { display: flex; animation: rm-fadein .25s ease; }
.rm-lb-img {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border-radius: 6px;
}
.rm-lb-close {
    position: absolute;
    top: 20px; right: 24px;
    background: rgba(255,255,255,0.92);
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--rm-primary);
    cursor: pointer;
    transition: all .2s ease;
}
.rm-lb-close:hover { background: var(--rm-accent); color: #fff; transform: rotate(90deg); }

/* ============= LOADER FULL-SCREEN ============= */
.cms-loader {
    position: fixed;
    inset: 0;
    background: rgba(20,10,10,0.78);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity .2s ease;
}
.cms-loader.active { display: flex; opacity: 1; }

.cms-loader-box {
    background: #fff;
    border-radius: 14px;
    padding: 36px 44px;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 0 1px var(--rm-accent);
    min-width: 280px;
    max-width: 90vw;
    animation: rm-fadein .25s ease;
}

.cms-loader-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(139,0,0,0.12);
    border-top-color: var(--rm-primary);
    border-right-color: var(--rm-accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: rm-spin 0.9s linear infinite;
}

.cms-loader-msg {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--rm-primary-dark);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.cms-loader-progress {
    width: 100%;
    height: 6px;
    background: #f0e8d8;
    border-radius: 3px;
    overflow: hidden;
}
.cms-loader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--rm-primary), var(--rm-accent));
    transition: width .2s ease;
    border-radius: 3px;
}

/* ============= RESPONSIVE / MOBILE ============= */
@media (max-width: 992px) {
    /* Su mobile la sidebar è nascosta off-canvas, si apre con hamburger */
    .cms-sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-open .cms-sidebar {
        transform: translateX(0);
    }
    .cms-content {
        margin-left: 0;
    }
    .cms-hamburger { display: inline-block; }
    .cms-page { padding: 18px; }
    .page-header h1 { font-size: 1.4rem; }
}

@media (max-width: 600px) {
    .hello-text { display: none; }
    .user-info { gap: 8px; font-size: .85rem; }
    .dashboard-tile .num { font-size: 2.1rem; }
    .login-card h1 { font-size: 1.5rem; }
    .actions-bar { gap: 8px; }
    .rm-pagination a, .rm-pagination span { padding: 6px 10px; font-size: .82rem; }
    .cms-topbar { padding: 10px 14px; }
}

/* ================================================================
   PRENOTAZIONI - STATI/CANALE (badge globali) + LISTA A CARD
   Sostituisce la tabella a scroll orizzontale con schede leggibili
   e toccabili, ottimizzate per telefono e per utenti non esperti.
   ================================================================ */
.badge-nuova       { background:#dc3545; color:#fff; }
.badge-contattata  { background:#f0ad4e; color:#fff; }
.badge-confermata  { background:#28a745; color:#fff; }
.badge-rifiutata   { background:#6c757d; color:#fff; }
.badge-cancellata  { background:#343a40; color:#fff; }
.badge-source-form     { background:#5e0000; color:#fff; }
.badge-source-whatsapp { background:#25D366; color:#fff; }

.pren-list { display:grid; grid-template-columns:1fr; gap:14px; }
@media (min-width: 900px) {
    .pren-list.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.pren-card {
    background:#fff;
    border:1px solid #ececec;
    border-left:5px solid #ccc;
    border-radius:12px;
    box-shadow:0 4px 14px rgba(0,0,0,0.06);
    padding:16px 18px;
    transition: box-shadow .2s ease;
    animation: rm-fadein .3s ease;
}
.pren-card:hover { box-shadow:0 10px 26px rgba(0,0,0,0.10); }
.pren-card.st-nuova      { border-left-color:#dc3545; background:linear-gradient(180deg,#fff 0%, #fff6f6 100%); }
.pren-card.st-contattata { border-left-color:#f0ad4e; }
.pren-card.st-confermata { border-left-color:#28a745; }
.pren-card.st-rifiutata  { border-left-color:#6c757d; }
.pren-card.st-cancellata { border-left-color:#343a40; }
.pren-card.st-active     { border-left-color:#28a745; }
.pren-card.st-hidden     { border-left-color:#c8c8c8; }

.pren-card__top { display:flex; align-items:flex-start; gap:10px; margin-bottom:10px; }
.pren-card__name {
    font-family:'Playfair Display', Georgia, serif;
    font-size:1.15rem; color:var(--rm-primary-dark); font-weight:700;
    line-height:1.2; margin:0; flex:1; min-width:0; word-break:break-word;
}
.pren-card__badges { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }

.pren-card__when {
    display:flex; align-items:center; gap:12px; flex-wrap:wrap;
    background:#faf6ee; border-radius:8px; padding:10px 12px; margin-bottom:12px;
}
.pren-card__when .wd { display:flex; align-items:center; gap:7px; }
.pren-card__when i { color:var(--rm-accent); font-size:1.05rem; }
.pren-card__when .big { font-weight:700; color:#2c2c2c; font-size:1rem; }
.pren-card__when .ppl {
    margin-left:auto; background:var(--rm-primary); color:#fff;
    padding:4px 12px; border-radius:20px; font-weight:600; font-size:.85rem;
    display:inline-flex; align-items:center; gap:6px;
}

.pren-card__contacts { display:flex; flex-wrap:nowrap; gap:8px; margin-bottom:12px; }
.pren-card__contacts a {
    flex:1 1 auto; min-width:0; justify-content:center; overflow:hidden;
    display:inline-flex; align-items:center; gap:6px;
    padding:9px 12px; border-radius:8px; font-size:.85rem; font-weight:600;
    border:1px solid #e0d3b0; background:#fff; color:#5e0000; text-decoration:none;
    transition: all .2s ease;
}
.pren-card__contacts a .lbl { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pren-card__contacts a i { flex-shrink:0; }
.pren-card__contacts a:hover { background:#5e0000; color:#fff; border-color:#5e0000; }
.pren-card__contacts a.wa { border-color:#25D366; color:#1a8f45; }
.pren-card__contacts a.wa:hover { background:#25D366; color:#fff; }
/* Non ci stanno le scritte -> solo icone, larghezza adattiva */
@media (max-width: 520px) {
    .pren-card__contacts a .lbl { display:none; }
    .pren-card__contacts a { gap:0; padding:11px 8px; }
    .pren-card__contacts a i { font-size:1.15rem; }
}

.pren-card__note {
    background:#fafafa; border:1px dashed #e5e5e5; border-radius:8px;
    padding:8px 12px; color:#555; font-size:.86rem; margin-bottom:12px; white-space:pre-wrap;
}
.pren-card__note b { color:#5e0000; font-weight:600; }

.pren-card__meta { color:#999; font-size:.78rem; margin-bottom:12px; display:flex; flex-wrap:wrap; gap:4px 14px; }

.pren-card__actions { display:flex; flex-wrap:wrap; gap:8px; }
.pren-card__actions .rm-btn-primary,
.pren-card__actions .rm-btn-default,
.pren-card__actions .rm-btn-danger,
.pren-card__actions .btn-ok,
.pren-card__actions .btn-no { padding:10px 16px; font-size:.9rem; border-radius:8px; cursor:pointer; font-weight:600; }
.pren-card__actions .btn-ok { background:#28a745; border:1px solid #28a745; color:#fff; box-shadow:0 4px 12px rgba(40,167,69,.25); }
.pren-card__actions .btn-ok:hover { background:#219a3b; }
.pren-card__actions .btn-no { background:#fff; border:1px solid #dc3545; color:#dc3545; }
.pren-card__actions .btn-no:hover { background:#dc3545; color:#fff; }

/* Telefono: bottoni a piena larghezza, target ampi */
@media (max-width: 560px) {
    .pren-card__actions > * { flex:1 1 100%; text-align:center; justify-content:center; }
    .pren-card__when .ppl { margin-left:0; }
}

/* Ritorno di pagina (filo di navigazione): BARRA FISSA in basso sempre visibile,
   a tutte le larghezze. Su desktop rientra dopo la sidebar; su mobile a tutta larghezza. */
.pren-backbar {
    position:fixed; left:var(--rm-sidebar-w); right:0; bottom:0; z-index:84;
    margin:0; padding:10px 14px; border-top:1px solid #e6e6e6;
    background:#fff; box-shadow:0 -6px 18px rgba(0,0,0,.08); text-align:center;
}
.pren-backbar a { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.cms-page { padding-bottom: 82px; }
@media (max-width: 992px) {
    .pren-backbar { left:0; }
    .pren-backbar a { width:100%; }
}

.pren-count { color:#777; font-size:.9rem; margin:0 0 14px; }
.pren-count b { color:var(--rm-primary); }

/* Banner GIORNO nella vista-giorno: mostra chiaramente che giorno si sta guardando */
.dayview-banner {
    display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
    background:linear-gradient(135deg,#5e0000,#8B0000); color:#fff;
    border-radius:14px; padding:20px 24px; margin-bottom:18px;
    box-shadow:0 8px 26px rgba(94,0,0,.22);
}
.dayview-banner__day { display:flex; align-items:center; gap:16px; }
.dayview-banner__day > i { font-size:2.2rem; color:var(--rm-accent); }
.dayview-banner__tag { background:var(--rm-accent); color:#3a0000; font-size:.6rem; font-weight:700; letter-spacing:2px; padding:2px 9px; border-radius:20px; display:inline-block; margin-bottom:5px; }
.dayview-banner .dow { font-family:'Playfair Display', Georgia, serif; font-size:1.7rem; font-weight:700; line-height:1; }
.dayview-banner .date { color:#e7d4a3; font-size:1rem; margin-top:3px; }
.dayview-banner__all { color:#fff; border:1px solid rgba(255,255,255,.45); padding:9px 15px; border-radius:8px; font-size:.85rem; font-weight:600; text-decoration:none; display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.dayview-banner__all:hover { background:rgba(255,255,255,.15); color:#fff; }
@media (max-width:520px) {
    .dayview-banner { flex-direction:column; align-items:stretch; }
    .dayview-banner__all { justify-content:center; }
}
.pren-empty {
    text-align:center; padding:50px 20px; color:#aaa;
    background:#fff; border:1px dashed #e0e0e0; border-radius:12px;
}
.pren-empty i { font-size:2.6rem; color:#d9c9a0; display:block; margin-bottom:10px; }
.pren-empty strong { display:block; color:#777; font-size:1rem; margin-bottom:4px; }

/* Contatore nel menu laterale (es. richieste da gestire) */
.cms-sidebar nav a .nav-count {
    background:#dc3545; color:#fff; font-size:.68rem; font-weight:700;
    border-radius:20px; padding:1px 8px; margin-left:auto; line-height:1.5;
}

/* Sotto-filtri a "chip" (Tutte / Nuove / Contattate ...) */
.pren-segment { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.pren-segment a {
    padding:8px 14px; border-radius:20px; font-size:.85rem; font-weight:600;
    background:#fff; border:1px solid #e3e3e3; color:#666; text-decoration:none;
    transition: all .2s ease;
}
.pren-segment a:hover { border-color:var(--rm-accent); color:var(--rm-primary); }
.pren-segment a.active { background:var(--rm-primary); border-color:var(--rm-primary); color:#fff; }
.pren-segment a .cnt { opacity:.85; font-weight:700; }

/* ================================================================
   MODAL GUIDATO: box "cosa succederà" + menu azioni
   ================================================================ */
.act-explain {
    display:flex; gap:14px; align-items:flex-start;
    border-radius:10px; padding:14px 16px; margin-bottom:18px;
    border:1px solid #e5e5e5; background:#fafafa;
    color:#333; font-size:.92rem; line-height:1.55;
}
.act-explain__ico { font-size:1.7rem; line-height:1; flex-shrink:0; padding-top:2px; }
.act-explain__h { font-weight:700; text-transform:uppercase; letter-spacing:.5px; font-size:.7rem; margin-bottom:5px; opacity:.75; }
.act-explain--ok   { background:#eaf7ee; border-color:#bfe6c9; }
.act-explain--ok   .act-explain__ico { color:#28a745; }
.act-explain--no   { background:#fdecec; border-color:#f5c2c2; }
.act-explain--no   .act-explain__ico { color:#dc3545; }
.act-explain--warn { background:#fff6e6; border-color:#efd9a6; }
.act-explain--warn .act-explain__ico { color:#e0902b; }
.act-explain--dark { background:#eef0f2; border-color:#d5d8dd; }
.act-explain--dark .act-explain__ico { color:#343a40; }

.act-menu { display:flex; flex-direction:column; gap:10px; }
.act-menu__item {
    display:flex; align-items:center; gap:12px;
    padding:15px 16px; border-radius:10px; cursor:pointer;
    border:1px solid #e3e3e3; background:#fff; font-weight:600; font-size:.95rem;
    color:#333; text-align:left; width:100%; transition:all .2s ease;
}
.act-menu__item:hover { border-color:var(--rm-accent); box-shadow:0 4px 12px rgba(0,0,0,.06); }
.act-menu__item i { font-size:1.3rem; color:var(--rm-accent); }
.act-menu__item.danger { color:#dc3545; }
.act-menu__item.danger i { color:#dc3545; }
.act-menu__item.danger:hover { border-color:#dc3545; background:#fff5f5; }

/* Riepilogo prenotazione dentro il modal Azioni (confermate) */
.act-detail__name { font-family:'Playfair Display', Georgia, serif; color:#5e0000; font-size:1.25rem; font-weight:700; margin-bottom:12px; }
.act-detail__rows { display:flex; flex-direction:column; gap:9px; background:#faf6ee; border:1px solid #eadfc4; border-radius:10px; padding:14px 16px; margin-bottom:18px; }
.act-detail__row { display:flex; align-items:center; gap:10px; color:#333; font-size:.95rem; word-break:break-word; }
.act-detail__row i { color:var(--rm-accent); font-size:1.1rem; width:20px; text-align:center; flex-shrink:0; }

/* ================================================================
   PANNELLO STATO nel DETTAGLIO prenotazione (layout premium)
   ================================================================ */
.pren-statuspanel {
    background:#fff; border:1px solid #eadfc4; border-radius:14px;
    padding:18px 20px; margin-bottom:22px; box-shadow:0 4px 16px rgba(0,0,0,.05);
}
.pren-statuspanel__head {
    display:flex; align-items:center; justify-content:space-between;
    gap:10px; flex-wrap:wrap; margin-bottom:16px;
    padding-bottom:14px; border-bottom:1px solid #f0e8d8;
}
.pren-statuspanel__title { font-family:'Playfair Display', Georgia, serif; color:#5e0000; font-size:1.1rem; }
.pren-statuspanel__title i { color:var(--rm-accent); margin-right:6px; }
.pren-statuspanel__meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:.82rem; color:#888; }

.pren-statuspanel__actions { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px; }
.stbtn {
    display:flex; align-items:center; justify-content:center; gap:8px;
    padding:13px 14px; border-radius:10px; border:1px solid #e2e2e2;
    background:#fff; color:#333; font-weight:600; font-size:.92rem; cursor:pointer;
    transition:all .2s ease; text-align:center;
}
.stbtn i { font-size:1.15rem; }
.stbtn:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.08); }
.stbtn--ok { background:#28a745; border-color:#28a745; color:#fff; box-shadow:0 4px 12px rgba(40,167,69,.25); }
.stbtn--ok:hover { background:#219a3b; color:#fff; }
.stbtn--warn { border-color:#e0a83b; color:#b9791a; }
.stbtn--warn:hover { background:#fff7e9; }
.stbtn--danger { border-color:#dc3545; color:#dc3545; }
.stbtn--danger:hover { background:#fff5f5; }

/* ================================================================
   ACTION-BAR FISSA IN BASSO SU MOBILE (schermate di modifica)
   ================================================================ */
.rm-mobile-actionbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
@media (max-width: 768px) {
    .rm-mobile-actionbar {
        position:fixed; left:0; right:0; bottom:0; z-index:85;
        background:#fff; border-top:1px solid #e6e6e6;
        box-shadow:0 -6px 18px rgba(0,0,0,.10);
        padding:10px 14px; margin:0; gap:8px;
    }
    .rm-mobile-actionbar > * { flex:1 1 auto; justify-content:center; text-align:center; }
    /* spazio per non far coprire il contenuto dalla barra fissa */
    .cms-page { padding-bottom: 88px; }
}

/* ================================================================
   BARRA AZIONI STANDARD DEI FORM (.rm-formbar)
   Regola fissa: ELIMINA a sinistra, tutte le altre azioni a destra.
   Icone sempre presenti; su schermi stretti restano solo le icone.
   Su mobile la barra è ancorata in basso (fixed), Indietro incluso.
   ================================================================ */
.rm-formbar {
    display:flex; align-items:center; justify-content:space-between;
    gap:10px; margin-top:24px; flex-wrap:wrap;
}
.rm-formbar__left, .rm-formbar__right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
/* i pulsanti (anche LinkButton -> <a>) mostrano icona + testo allineati */
.rm-formbar a.rm-btn-default, .rm-formbar a.rm-btn-primary,
.rm-formbar a.rm-btn-accent, .rm-formbar a.rm-btn-danger {
    display:inline-flex; align-items:center; gap:7px; justify-content:center; text-decoration:none;
}
.rm-formbar .lbl { display:inline; }
/* Pulsanti azione dentro la barra (status: Conferma/Contattata/Rifiuta/Annulla) */
.rm-formbar .fbtn {
    display:inline-flex; align-items:center; justify-content:center; gap:7px;
    padding:9px 14px; border-radius:8px; border:1px solid #e2e2e2; background:#fff;
    color:#333; font-weight:600; font-size:.9rem; cursor:pointer; transition:all .2s ease;
}
.rm-formbar .fbtn:hover { box-shadow:0 4px 12px rgba(0,0,0,.08); }
.rm-formbar .fbtn i { font-size:1.1rem; }
.rm-formbar .fbtn--ok { background:#28a745; border-color:#28a745; color:#fff; box-shadow:0 4px 12px rgba(40,167,69,.25); }
.rm-formbar .fbtn--ok:hover { background:#219a3b; color:#fff; }
.rm-formbar .fbtn--warn { border-color:#e0a83b; color:#b9791a; }
.rm-formbar .fbtn--warn:hover { background:#fff7e9; }
.rm-formbar .fbtn--danger { border-color:#dc3545; color:#dc3545; }
.rm-formbar .fbtn--danger:hover { background:#fff5f5; }
/* Barra del dettaglio: molte azioni -> su mobile SOLO ICONE, una riga sola */
@media (max-width: 768px) {
    .detail-formbar .lbl { display:none; }
    .detail-formbar .fbtn, .detail-formbar a.rm-btn-default, .detail-formbar a.rm-btn-danger { padding:11px 9px; }
    .detail-formbar .fbtn i, .detail-formbar a.rm-btn-default i, .detail-formbar a.rm-btn-danger i { margin:0; font-size:1.25rem; }
    .detail-formbar .rm-formbar__right { gap:6px; }
    .detail-formbar { gap:6px; padding-left:10px; padding-right:10px; }
}

@media (max-width: 768px) {
    .rm-formbar {
        position:fixed; left:0; right:0; bottom:0; z-index:85;
        background:#fff; border-top:1px solid #e6e6e6;
        box-shadow:0 -6px 18px rgba(0,0,0,.12);
        padding:9px 12px; margin:0; gap:8px; flex-wrap:nowrap;
    }
    .rm-formbar__left  { flex:0 0 auto; }
    .rm-formbar__right { flex:1 1 auto; justify-content:flex-end; }
    .rm-formbar a.rm-btn-default, .rm-formbar a.rm-btn-primary,
    .rm-formbar a.rm-btn-accent, .rm-formbar a.rm-btn-danger { padding:11px 15px; }
    .cms-page { padding-bottom: 82px; }
}
/* Troppo stretto per le scritte -> SOLO ICONE */
@media (max-width: 460px) {
    .rm-formbar .lbl { display:none; }
    .rm-formbar a.rm-btn-default i, .rm-formbar a.rm-btn-primary i,
    .rm-formbar a.rm-btn-accent i, .rm-formbar a.rm-btn-danger i { margin:0; font-size:1.15rem; }
    .rm-formbar__right { gap:6px; }
    .rm-formbar a.rm-btn-default, .rm-formbar a.rm-btn-primary,
    .rm-formbar a.rm-btn-accent, .rm-formbar a.rm-btn-danger { padding:11px 14px; }
}
