/* ============================================
   RESET Y VARIABLES
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #111;
    --primary-hover: #333;
    --background: #f4f6f8;
    --card-bg: #fff;
    --border-color: #ddd;
    --text-primary: #333;
    --text-secondary: #777;
    --success: #1e7f3c;
    --success-bg: #e6f7ec;
    --error: #b42318;
    --error-bg: #fdecea;
    --warning: #a15c00;
    --warning-bg: #fff4e5;
    --shadow: 0 4px 10px rgba(0,0,0,.05);
    --shadow-hover: 0 6px 20px rgba(0,0,0,.1);
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
}

.header-info {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.9;
    align-items: center;
    flex-wrap: wrap;
}

#current-date {
    margin-right: auto;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 120px);
}

/* ============================================
   SIDEBAR
   ============================================ */
aside {
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
}

aside h2, aside h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.roles-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.role {
    padding: 0.8rem;
    border-radius: 8px;
    background: #f1f1f1;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.role:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.role.active {
    background: var(--primary-color);
    color: #fff;
}

.role.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* FILTROS */
.filters {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ESTADÍSTICAS */
.stats {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item strong {
    font-size: 1rem;
    color: var(--primary-color);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    padding: 2rem;
    overflow-y: auto;
}

/* ============================================
   NAVEGADOR DE CALENDARIO
   ============================================ */
.calendar-nav {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.2rem 1.5rem 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.2rem;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.year-row {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #eee;
}

.year-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.month-row {
    gap: 0;
}

.month-title-area {
    text-align: center;
    flex: 1;
}

.month-title-area h2 {
    margin: 0;
    font-size: 1.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.month-title-area span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.nav-btn {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.nav-btn-sm {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn-sm:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Puntos indicadores de mes */
.month-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.month-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.month-dot:hover {
    background: #aaa;
    transform: scale(1.3);
}

.month-dot.active {
    background: var(--primary-color);
    transform: scale(1.4);
}

.month-dot.has-res {
    background: var(--error);
}

.month-dot.active.has-res {
    background: var(--primary-color);
    outline: 2px solid var(--error);
    outline-offset: 2px;
}

/* ============================================
   SLIDER MENSUAL
   ============================================ */
.month-slider-wrapper {
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.month-slider {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.month {
    background: var(--card-bg);
    border-radius: 0;
    padding: 1.5rem 2rem 2rem;
    flex: 0 0 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.month h3 {
    display: none; /* title moved to nav bar */
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.weekdays div {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0.4rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.day {
    aspect-ratio: 1;
    border-radius: 10px;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 44px;
}

.day:not(.empty):hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.day.selected {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

.day.today {
    border: 2px solid var(--primary-color);
    font-weight: bold;
}

.day.has-reservations::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background: var(--error);
    border-radius: 50%;
}

.day.empty {
    cursor: default;
    background: transparent;
}

/* ============================================
   SECCIÓN DE HABITACIONES
   ============================================ */
.rooms {
    margin-top: 2rem;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.rooms h2 {
    margin: 0 0 1.5rem;
    color: var(--primary-color);
}

#selected-date-display {
    color: var(--error);
    font-weight: bold;
}

#rooms-list {
    min-height: 100px;
}

.no-selection {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

.room-card {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background 0.2s ease;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.room-card:hover {
    background: #f9f9f9;
}

.room-card:last-child {
    border-bottom: none;
}

.room-info strong {
    font-size: 1rem;
    color: var(--primary-color);
}

.room-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.3rem;
}

.room-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.available {
    background: var(--success-bg);
    color: var(--success);
}

.occupied {
    background: var(--error-bg);
    color: var(--error);
}

.dirty {
    background: var(--warning-bg);
    color: var(--warning);
}

/* ============================================
   ACCIONES
   ============================================ */
.actions {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.action-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.action-card h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.action-buttons button {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-buttons button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ============================================
   MODALES
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: 14px;
    width: min(95%, 850px);
    max-width: 850px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border 0.2s ease;
}

.form-note {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    z-index: 10;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

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

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

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #9a1f15;
}

.btn-sm {
    flex-shrink: 0;
}

#logout-btn {
    margin-left: 1rem;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.form-actions.tight {
    margin-top: 1.5rem;
}

.text-center {
    text-align: center;
}

.icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.modal-subtitle {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-description {
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.alert-box {
    display: none;
    background: var(--error-bg);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.staff-summary {
    margin-bottom: 1.2rem;
}

.staff-summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.role-color-bar {
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 2px;
}

.staff-name-small {
    font-size: 0.9rem;
    color: #333;
}

.staff-status-text {
    font-size: 0.7rem;
    color: #777;
    margin-left: 0.5rem;
}

.staff-role-pill {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.info-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.status-text {
    font-size: 0.85rem;
}

.avatar-badge {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-block {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.summary-block.clean {
    background: #e6f7ec;
    color: #1e7f3c;
}

.summary-block.dirty {
    background: #fff4e5;
    color: #a15c00;
}

.monospace-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #f4f6f8;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.3rem;
    letter-spacing: 2px;
    user-select: all;
}

.warning-text {
    color: #b42318;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.secondary-text {
    color: #777;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.empty-message {
    text-align: center;
    color: #777;
    padding: 1rem;
}

.reservation-item {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.reservation-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reservation-status-pill {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.reservation-detail {
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.3rem;
}

.reservation-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.3rem;
}

.info-box {
    margin-bottom: 0.8rem;
    padding: 0.6rem 1rem;
    background: #e8f0fe;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1a73e8;
    font-weight: 600;
}

.button-group {
    margin-bottom: 0.8rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-title {
    margin-bottom: 1rem;
}

.pending-list-item {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.scrollable-list {
    max-height: 420px;
    overflow-y: auto;
}

.highlight-success {
    color: #1e7f3c;
}

.highlight-warning {
    color: #a15c00;
}

.notification {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
}

/* ============================================
   NOTIFICACIONES
   ============================================ */
#notification-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--error);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

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

.notification .message {
    flex: 1;
    font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    aside {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .calendar-nav {
        padding: 1rem;
    }

    .month-title-area h2 {
        font-size: 1.3rem;
    }

    .month {
        padding: 1rem 1rem 1.5rem;
    }

    .day {
        font-size: 0.85rem;
        min-height: 38px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        max-height: 90vh;
    }
}
/* ============================================
   MENÚ DESPLEGABLE DEL USUARIO
   ============================================ */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-menu-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    user-select: none;
}

.user-menu-trigger:hover {
    background: rgba(255,255,255,0.1);
}

.user-menu-trigger .arrow {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.user-menu-trigger.open .arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    min-width: 220px;
    z-index: 200;
    overflow: hidden;
    animation: dropdownSlide 0.2s ease;
    margin-top: 0.5rem;
}

.user-dropdown.active {
    display: block;
}

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

.user-dropdown .dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.user-dropdown .dropdown-header .user-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.user-dropdown .dropdown-header .user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.user-dropdown .dropdown-header .user-role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary-color);
    color: #fff;
    margin-top: 0.4rem;
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-dropdown .dropdown-item:hover {
    background: #f4f6f8;
}

.user-dropdown .dropdown-item.danger {
    color: var(--error);
}

.user-dropdown .dropdown-item.danger:hover {
    background: var(--error-bg);
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 0;
}

/* ============================================
   ESTADO RESERVADA
   ============================================ */
.reserved {
    background: #e8f0fe;
    color: #1a73e8;
}

/* ============================================
   ESTADO MANTENIMIENTO
   ============================================ */
.maintenance {
    background: #f3e8ff;
    color: #7c3aed;
}

/* ============================================
   LISTA DE EMPLEADOS (MODAL)
   ============================================ */
.staff-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.staff-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
    border-radius: 6px;
    margin-bottom: 0.3rem;
}

.staff-item:hover {
    background: #f9f9f9;
}

.staff-item:last-child {
    border-bottom: none;
}

.staff-item-info {
    flex: 1;
}

.staff-item-info .staff-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.staff-item-info .staff-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.staff-item-info .staff-role {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

.staff-item-info .staff-role.role-admin {
    background: #111;
    color: #fff;
}

.staff-item-info .staff-role.role-recepcion {
    background: #1a73e8;
    color: #fff;
}

.staff-item-info .staff-role.role-limpieza {
    background: #f59e0b;
    color: #fff;
}

.staff-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.staff-item-actions button {
    padding: 0.4rem 0.7rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.staff-item-actions .btn-view {
    background: #f0f4f8;
    color: #555;
}

.staff-item-actions .btn-view:hover {
    background: #e0e4e8;
}

.staff-item-actions .btn-edit {
    background: #e8f0fe;
    color: #1a73e8;
}

.staff-item-actions .btn-edit:hover {
    background: #d0e1fd;
}

.staff-item-actions .btn-regen {
    background: #fff4e5;
    color: #a15c00;
}

.staff-item-actions .btn-regen:hover {
    background: #ffe8cc;
}

.staff-item-actions .btn-delete {
    background: var(--error-bg);
    color: var(--error);
}

.staff-item-actions .btn-delete:hover {
    background: #fbd5d1;
}

.staff-status-active {
    color: var(--success);
}

.staff-status-inactive {
    color: var(--error);
    text-decoration: line-through;
    opacity: 0.6;
}

/* ============================================
   MODAL DE CAMBIO DE CONTRASEÑA
   ============================================ */
.password-display {
    background: #f4f6f8;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

.password-display .generated-password {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    margin: 0.5rem 0;
    user-select: all;
}

.password-display .password-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.password-display .copy-btn {
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.password-display .copy-btn:hover {
    background: var(--primary-hover);
}

/* ============================================
   MODAL FORZAR CAMBIO DE CONTRASEÑA
   ============================================ */
.force-password-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.force-password-overlay.active,
.force-password-overlay[style*="display: flex"] {
    display: flex;
}

.force-password-card {
    background: #fff;
    border-radius: 14px;
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    text-align: center;
}

.force-password-card .icon-lock {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.force-password-card h2 {
    margin: 0 0 0.5rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.force-password-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.force-password-card .form-group {
    text-align: left;
}

.force-password-card .btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* ============================================
   TABLA DE RESERVACIONES EN MODAL
   ============================================ */
.reservation-list {
    max-height: 350px;
    overflow-y: auto;
}

.reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 0.3rem;
}

.reservation-item:hover {
    background: #f9f9f9;
}

.reservation-item-info {
    flex: 1;
}

.reservation-item-info .guest-name {
    font-weight: 600;
    color: var(--text-primary);
}

.reservation-item-info .reservation-dates {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.reservation-item-info .reservation-room {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.reservation-item-actions {
    display: flex;
    gap: 0.4rem;
}

.reservation-item-actions button {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 300px;
    margin: 0 auto;
}

/* ============================================
   RESPONSIVE ADICIONAL
   ============================================ */
@media (max-width: 768px) {
    .user-dropdown {
        right: -10px;
        min-width: 200px;
    }

    .staff-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .staff-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .reservation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .force-password-card {
        padding: 1.5rem;
        width: 95%;
    }
}


/* ============================================
   ESTILOS PARA PESTAÑAS DEL MODAL
   ============================================ */

/* Contenedor de pestañas */
.modal-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    padding: 0 1rem;
    background: #fafafa;
    flex-wrap: wrap;
}

/* Botones de pestaña */
.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(0,0,0,0.02);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(0,0,0,0.02);
}

/* Contenido de pestaña */
.tab-content {
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

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

/* Grid de información */
.room-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.info-item span {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Badges de estado */
.status-badge,
.clean-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.status-available {
    background: var(--success-bg);
    color: var(--success);
}

.status-occupied {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-maintenance {
    background: #f0f0f0;
    color: #666;
}

.status-reserved {
    background: #e3f2fd;
    color: #1976d2;
}

.clean-clean {
    background: var(--success-bg);
    color: var(--success);
}

.clean-dirty {
    background: var(--error-bg);
    color: var(--error);
}

/* Descripción */
.info-description {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.info-description label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.info-description p {
    color: var(--text-primary);
    line-height: 1.5;
}

/* Tarjeta de reserva */
.reservation-card {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 18px 40px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

.reservation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reservation-card-header h4 {
    margin: 0 0 0.35rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.reservation-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.reservation-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 1rem;
}

.info-item-full {
    grid-column: 1 / -1;
}

.reservation-notes {
    margin: 0.35rem 0 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.button-group.reservation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    width: auto;
}

.button-group.reservation-actions .btn {
    white-space: nowrap;
    min-width: 130px;
}

/* Acciones de reserva */
.reservation-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.reservation-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* Secciones de gestión */
.management-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.management-section:last-child {
    border-bottom: none;
}

.management-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.button-group .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Lista de historial */
.history-list {
    margin-bottom: 1.5rem;
}

.history-list h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.history-item {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--border-color);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.guest-name {
    font-weight: 600;
    color: var(--primary-color);
}

.history-dates {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* Mensaje sin datos */
.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Botones de acción */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 120px;
}

/* Estilos de botones específicos */
.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #1a6b31;
}

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

.btn-warning:hover {
    background: #8a4a00;
}

.btn-info {
    background: #1976d2;
    color: white;
}

.btn-info:hover {
    background: #1565c0;
}

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

.btn-danger:hover {
    background: #9a1f15;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-tabs {
        padding: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .room-info-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .reservation-actions {
        flex-direction: column;
    }
    
    .reservation-actions .btn {
        width: 100%;
    }
}
