/* ===== Panel de gestión ===== */
body.rr-gestion { background: var(--color-bg); display: block; }
.rr-g-wrap { display: flex; min-height: 100vh; }
.rr-g-side { --bs-offcanvas-width: 240px; --bs-offcanvas-bg: var(--color-dark); --bs-offcanvas-color: #fff; width: 240px; flex: none; background: var(--color-dark) !important; color: #fff !important; display: flex; flex-direction: column; }
@media (min-width: 992px) { .rr-g-side { position: sticky; top: 0; height: 100vh; } }
.rr-g-brand { padding: 1rem 1.25rem; font-weight: 800; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.rr-g-brand a { color: #fff; }
.rr-g-current { padding: .75rem 1.25rem; background: rgba(255,255,255,.08); font-size: .85rem; }
.rr-g-current small { display: block; opacity: .7; } .rr-g-current strong { display: block; } .rr-g-current a { color: var(--color-accent); }
.rr-g-menu { padding: .75rem 0; flex: 1; }
.rr-g-menu a { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.25rem; color: rgba(255,255,255,.85); font-weight: 500; }
.rr-g-menu a i { font-size: 1.25rem; }
.rr-g-menu a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.rr-g-menu a.active { background: var(--color-action); color: #fff; }
.rr-g-user { padding: .9rem 1.25rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.rr-g-user a, .rr-g-user .btn-link { color: var(--color-accent); }
.rr-g-main { flex: 1; min-width: 0; padding: 1.5rem; }
.rr-g-main h1 { font-size: 1.5rem; font-weight: 700; }
.rr-kpi { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.rr-kpi .rr-kpi-n { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.rr-kpi .rr-kpi-l { color: var(--color-text-muted); font-size: .8rem; margin-top: .25rem; }
.rr-kpi i { font-size: 1.6rem; color: var(--color-action); }
.rr-aloj-card img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.table-sm td, .table-sm th { vertical-align: middle; }
.rr-estado-pendiente { background: #fff3cd; color: #7a5a00; }
.rr-estado-confirmada { background: #d1e7dd; color: #0f5132; }
.rr-estado-cancelada { background: #f8d7da; color: #842029; }
.rr-estado-completada { background: #e2e3e5; color: #41464b; }
.rr-estado { border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; font-weight: 600; }

/* Calendario de ocupación */
.rr-cal-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); }
.rr-cal-tbl { border-collapse: separate; border-spacing: 0; font-size: .75rem; min-width: 100%; user-select: none; }
.rr-cal-tbl th, .rr-cal-tbl td { border-right: 1px solid #eef1f4; border-bottom: 1px solid #eef1f4; text-align: center; }
.rr-cal-tbl th { background: #f8fafc; font-weight: 600; padding: .35rem .2rem; position: sticky; top: 0; z-index: 2; }
.rr-cal-tbl th.rr-finde, .rr-cal-tbl td.rr-finde { background: #fbfcfe; }
.rr-cal-tbl th.rr-hoy { background: #fff3cd; }
.rr-cal-tbl td.rr-hab { text-align: left; white-space: nowrap; padding: .35rem .6rem; font-weight: 600; position: sticky; left: 0; background: #fff; z-index: 1; border-right: 2px solid var(--color-border); }
.rr-cal-tbl td.rr-hab small { display: block; font-weight: 400; color: var(--color-text-muted); }
.rr-cal-tbl td.rr-dia { width: 32px; min-width: 32px; height: 40px; cursor: pointer; }
.rr-cal-tbl td.rr-dia.rr-pasado { background: #f3f4f6; cursor: not-allowed; color: #aaa; }
.rr-cal-tbl td.rr-dia.rr-sel { outline: 2px solid var(--color-action); outline-offset: -2px; }
.rr-cal-tbl td.rr-reserva { background: #cfe2ff; color: #084298; cursor: pointer; }
.rr-cal-tbl td.rr-reserva.rr-pendiente { background: #fff3cd; color: #7a5a00; }
.rr-cal-tbl td.rr-bloqueo { background: #e9ecef; color: #495057; background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(0,0,0,.06) 4px 6px); }
.rr-cal-leyenda span.rr-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid #dde; }
.rr-cal-barra { position: sticky; bottom: 0; background: var(--color-primary); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); margin-top: 1rem; }

/* Tira de ocupación (panel) */
.rr-tira { overflow-x: auto; }
.rr-tira-tbl { border-collapse: separate; border-spacing: 2px; font-size: .7rem; }
.rr-tira-tbl th { font-weight: 500; color: var(--color-text-muted); text-align: center; line-height: 1.1; min-width: 26px; }
.rr-tira-tbl th.rr-finde { color: var(--color-primary); }
.rr-tira-tbl td { height: 18px; min-width: 26px; border-radius: 3px; }
.rr-tira-tbl td.rr-tira-hab { white-space: nowrap; padding-right: .5rem; font-weight: 600; font-size: .75rem; }
.rr-tira-tbl td.rr-libre { background: #e6f4ea; }
.rr-tira-tbl td.rr-res   { background: #4d8ed9; }
.rr-tira-tbl td.rr-pend  { background: #f5c342; }
.rr-tira-tbl td.rr-bloq  { background: #c8ccd1; background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(0,0,0,.12) 3px 5px); }
.rr-tira-tbl td.rr-fs    { background: #f1f1f1; }

/* Asistente de publicación */
.rr-pasos { display: flex; gap: .5rem; list-style: none; padding: 0; flex-wrap: wrap; counter-reset: p; }
.rr-pasos li { flex: 1 1 160px; }
.rr-pasos a { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--color-border); color: var(--color-text-muted); font-weight: 600; font-size: .9rem; }
.rr-pasos a:hover { text-decoration: none; border-color: var(--color-action); }
.rr-pasos .rr-paso-n { width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; flex: none; }
.rr-pasos li.done a { color: var(--color-success); } .rr-pasos li.done .rr-paso-n { background: #d1e7dd; color: var(--color-success); }
.rr-pasos li.active a { background: var(--color-action); border-color: var(--color-action); color: #fff; } .rr-pasos li.active .rr-paso-n { background: #fff; color: var(--color-action); }
.rr-drop { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; padding: 1.5rem 1rem; border: 2px dashed #cbd5e1; border-radius: var(--radius); cursor: pointer; color: var(--color-action); background: #fff; }
.rr-drop.over, .rr-drop:hover { border-color: var(--color-action); background: #eef4fb; }
.rr-mini { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; }
.rr-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.rr-foto { position: relative; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: grab; }
.rr-foto.dragging { opacity: .4; }
.rr-foto.principal { border-color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent); }
.rr-foto img { width: 100%; height: 140px; object-fit: cover; display: block; }
.rr-foto-badge { position: absolute; top: 6px; left: 6px; background: var(--color-accent); color: #1e293b; font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.rr-foto-acc { display: flex; gap: .25rem; padding: .4rem; }
.rr-preview-wrap { background: #e9ecef; padding: .5rem; display: flex; justify-content: center; }
.rr-preview-wrap iframe { width: 100%; height: 75vh; border: 0; background: #fff; border-radius: 6px; transition: width .2s; }

/* Ingresos: gráfico de barras CSS */
.rr-barras { display: flex; align-items: flex-end; gap: 6px; height: 220px; overflow-x: auto; padding-top: 1.2rem; }
.rr-barra { flex: 1 1 0; min-width: 40px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.rr-barra-val { font-size: .7rem; color: var(--color-text-muted); height: 1rem; }
.rr-barra-col { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.rr-barra-col div { width: 100%; background: var(--color-action); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s; }
.rr-barra.futuro .rr-barra-col div { background: #9ec5f0; }
.rr-barra.actual .rr-barra-lab { font-weight: 700; color: var(--color-action); }
.rr-barra-lab { font-size: .7rem; color: var(--color-text-muted); margin-top: .3rem; white-space: nowrap; }
.rr-leg { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; }
.rr-cal-tbl td.rr-externo { background: #ffe5d0; color: #8a4b00; background-image: none; cursor: default; }
/* Guía paso a paso (ayuda_ical) */
.rr-guia { max-width: 960px; }
.rr-guia-n { display:inline-flex; width:36px; height:36px; border-radius:50%; background:var(--color-action); color:#fff; align-items:center; justify-content:center; font-size:1rem; margin-right:.5rem; vertical-align:middle; }
.rr-guia-pasos { padding-left: 1.4rem; }
.rr-guia-pasos li { margin-bottom: .5rem; }
.rr-guia-pasos li::marker { font-weight: 700; color: var(--color-action); }
.rr-guia .accordion-button { font-weight: 600; }
/* Pestañas "Desde hoy / Anteriores" */
.rr-tabs .nav-link { color: var(--color-text-muted); font-weight: 600; }
.rr-tabs .nav-link.active { color: var(--color-action); border-bottom-color: #fff; }
.rr-tabs .nav-link .badge { font-weight: 600; }

/* Validación de formularios: tooltip de error en el campo y requisitos de contraseña */
.rr-tip-error { pointer-events: none; --bs-tooltip-bg: #b42318; --bs-tooltip-opacity: 1; --bs-tooltip-max-width: 300px; }
.rr-tip-error .tooltip-inner { font-size: .85rem; font-weight: 600; text-align: left; padding: .45rem .7rem; }
.rr-checks li { color: #6b7280; line-height: 1.7; }
.rr-checks li.ok { color: #15803d; }
.rr-checks li i { vertical-align: -2px; margin-right: .25rem; }

/* ---- Admin: acordeones y DataTables ---- */
body.rr-gestion { background: #f3f6f4; }
.rr-g-main { padding: 1.75rem 2.25rem 2.5rem; }
.rr-g-main > h1, .rr-g-main > .d-flex:first-child { margin-bottom: 1.25rem; }
.rr-g-main .card { background: #fff; border: 1px solid #e5e7eb; }
.rr-acc { overflow: hidden; margin: 0 0 1.25rem !important; }
.rr-acc-h { display: flex; align-items: center; gap: .75rem; width: 100%; padding: 1.05rem 1.5rem; background: #fff; border: 0; text-align: left; font-weight: 600; font-size: 1.02rem; color: inherit; cursor: pointer; }
.rr-acc-h:hover { background: #fafafa; }
.rr-acc-t { flex: 0 0 auto; }
.rr-acc-x { flex: 1 1 auto; min-width: 0; font-weight: 400; font-size: .85rem; color: var(--color-text-muted); }
.rr-acc-h .rr-acc-i { margin-left: auto; flex: 0 0 auto; font-size: 1.25rem; transition: transform .2s; }
.rr-acc-h[aria-expanded="false"] .rr-acc-i { transform: rotate(-90deg); }
.rr-acc-b { background: #fff; border-top: 1px solid #eef0f3; padding: 1.25rem 1.5rem 1.5rem; }
.rr-acc .dataTables_wrapper .row { --bs-gutter-x: .75rem; }
.rr-acc .dataTables_wrapper .dataTables_filter input,
.rr-acc .dataTables_wrapper .dataTables_length select { font-size: .85rem; }
.rr-acc table.dataTable { font-size: .9rem; }
.rr-acc table.dataTable > thead > tr > th { white-space: nowrap; }
.rr-acc .table > :not(caption) > * > * { background-color: transparent; }
.rr-acc .table-light { --bs-table-bg: #f8f9fa; }
.rr-kpi-sm { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: .6rem .9rem; display: flex; align-items: center; gap: .7rem; height: 100%; }
.rr-kpi-sm i { font-size: 1.35rem; flex: none; }
.rr-kpi-sm .n { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.rr-kpi-sm .l { font-size: .74rem; color: #6b7280; line-height: 1.2; }

/* Cabecera de tarjeta que pliega su contenido (Datos básicos) */
.rr-plegar { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.rr-plegar i { font-size: 1.1rem; transition: transform .2s; }
.rr-plegar[aria-expanded="false"] i { transform: rotate(-90deg); }
.rr-plegar:focus-visible { outline: 2px solid #27803e; outline-offset: 4px; border-radius: 4px; }
