:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;

    /* Status Colors */
    --status-confirm: #dbeafe;
    --status-confirm-text: #1e3a8a; /* Darker blue */
    --status-checkin: #dcfce7;
    --status-checkin-text: #14532d; /* Darker green */
    --status-checkout: #fef9c3;
    --status-checkout-text: #713f12; /* Darker yellow/brown */
    --status-cancel: #fee2e2;
    --status-cancel-text: #7f1d1d; /* Darker red */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    display: flex;
}

/* Layout Principal */
.dashboard-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    color: var(--primary);
}

.logo h2 {
    font-weight: 700;
    font-size: 20px;
}

.logo span {
    color: var(--text-main);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.menu a:hover {
    background-color: var(--secondary);
    color: var(--text-main);
}

.menu a.active {
    background-color: var(--primary);
    color: white;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--secondary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.bot-status .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* Área de Conteúdo */
.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.topbar h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.topbar p {
    color: var(--text-muted);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Tabela de Reservas */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-main);
}

.search-box i {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.filters select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

td {
    padding: 16px 24px;
    font-size: 14px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: #f1f5f955;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-CONFIRMADA {
    background: var(--status-confirm) !important;
    color: var(--status-confirm-text) !important;
}

.status-CHECK-IN {
    background: var(--status-checkin) !important;
    color: var(--status-checkin-text) !important;
}

.status-CHECK-OUT {
    background: var(--status-checkout) !important;
    color: var(--status-checkout-text) !important;
}

.status-CANCELADA {
    background: var(--status-cancel) !important;
    color: var(--status-cancel-text) !important;
}

.status-PRÉ-RESERVA {
    background: #fef08a !important; /* Amber-100 */
    color: #854d0e !important; /* Amber-700 */
}

select.status-select {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 13px;
    color: #000000;
    background-color: #ffffff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-main);
}

form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--secondary);
}

/* --- NOVOS ESTILOS: QUARTOS E CONFIGURAÇÕES --- */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* Grid de Quartos (Categorias) */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* --- MAPA DE QUARTOS (BOARD) --- */
.status-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.summary-card {
    flex: 1;
    min-width: 140px;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: var(--bg-card);
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-3px);
}

.summary-card .count {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.summary-card .label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card.total {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.summary-card.disponivel {
    background: linear-gradient(135deg, #10b981, #059669);
}

.summary-card.ocupado {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.summary-card.limpeza {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.summary-card.bloqueado {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.rooms-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.room-card-unit {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.room-card-unit:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.room-card-header {
    padding: 1rem 1.25rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.room-card-unit.disponivel .room-card-header {
    background: #10b981;
}

.room-card-unit.ocupado .room-card-header {
    background: #ef4444;
}

.room-card-unit.limpeza .room-card-header {
    background: #f59e0b;
}

.room-card-unit.bloqueado .room-card-header {
    background: #6b7280;
}

.room-card-body {
    padding: 1.25rem;
    flex: 1;
}

.room-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #4a5568;
}

.info-item i {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    color: var(--primary);
}

.room-card-footer {
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
}

/* Status Selector Radio Toggles */
.status-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-status {
    position: relative;
    cursor: pointer;
}

.radio-status input {
    position: absolute;
    opacity: 0;
}

.radio-status span {
    display: block;
    padding: 0.75rem;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    color: #64748b;
}

.radio-status:hover span {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.radio-status.disponivel input:checked+span {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.radio-status.ocupado input:checked+span {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.radio-status.limpeza input:checked+span {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.radio-status.bloqueado input:checked+span {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: white;
}

.room-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--secondary);
    padding-bottom: 16px;
}

.room-header h3 {
    font-size: 18px;
    color: var(--text-main);
}

.room-header .price {
    font-weight: 600;
    color: var(--primary);
}

.room-body {
    flex: 1;
    margin-bottom: 20px;
}

.room-body .desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.room-meta i {
    width: 14px;
    height: 14px;
}

.w-100 {
    width: 100%;
    justify-content: center;
}

.mt-3 {
    margin-top: 16px;
}

/* Configurações */
.config-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.config-card small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==========================================
   AGENTE BOT - ESTILOS
   ========================================== */

/* Badge de status na topbar do agente */
.agent-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.agent-status-badge .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    transition: all 0.3s;
}

.agent-status-badge.online .indicator {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

/* Sub-abas */
.agent-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
    width: fit-content;
}

.agent-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.agent-tab-btn:hover {
    color: var(--text-main);
    background: var(--secondary);
}

.agent-tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.conv-count-badge {
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Conteúdo das sub-abas */
.agent-tab-content {
    display: none;
}

.agent-tab-content.active {
    display: block;
}

/* Título de seção dentro do form */
.config-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.config-section-title i {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Layout de monitoramento: lista + chat */
.monitor-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: calc(100vh - 260px);
    min-height: 500px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Painel esquerdo: lista de conversas */
.conversations-panel {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-main);
}

.conversations-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.btn-icon:hover {
    background: var(--secondary);
    color: var(--text-main);
}

.btn-icon.spinning i {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Item de conversa */
.conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
}

.conv-item:hover {
    background: var(--secondary);
}

.conv-item.active {
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.conv-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.conv-info {
    flex: 1;
    overflow: hidden;
}

.conv-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.conv-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Estado vazio inline */
.empty-state-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 16px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state-small i {
    width: 36px;
    height: 36px;
    opacity: 0.4;
}

.empty-state-small p {
    font-size: 13px;
}

/* Painel direito: visualizador de chat */
.chat-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-messages-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
}

.guest-data-panel {
    width: 320px;
    background: var(--bg-main);
    border-left: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.guest-data-panel h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.guest-data-panel .form-group {
    margin-bottom: 0;
}

.guest-data-panel label {
    font-size: 12px;
    color: var(--text-muted);
}

.guest-data-panel input,
.guest-data-panel textarea {
    font-size: 13px;
    padding: 10px;
    background: white;
}

/* ==========================================
   FICHA DO CLIENTE - Monitoramento Real-Time
   ========================================== */

.ficha-cliente-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.ficha-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ficha-header i {
    width: 16px;
    height: 16px;
}

.ficha-header span {
    flex: 1;
}

.ficha-refresh-btn {
    color: rgba(255,255,255,0.7) !important;
}

.ficha-refresh-btn:hover {
    color: white !important;
    background: rgba(255,255,255,0.15) !important;
}

.ficha-body {
    padding: 12px;
}

.ficha-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px;
    color: var(--text-muted);
    text-align: center;
}

.ficha-empty-state i {
    width: 28px;
    height: 28px;
    opacity: 0.3;
}

.ficha-empty-state p {
    font-size: 12px;
}

/* Etapa Badge */
.ficha-etapa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.ficha-etapa-badge i {
    width: 13px;
    height: 13px;
}

/* Campos da ficha */
.ficha-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    gap: 8px;
}

.ficha-field:last-child {
    border-bottom: none;
}

.ficha-field-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.ficha-field-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
    word-break: break-word;
}

.ficha-field-value.indefinido {
    color: #94a3b8;
    font-style: italic;
    font-weight: 400;
}

.ficha-field-value.ativo {
    color: #16a34a;
}

.ficha-field-value.inativo {
    color: #94a3b8;
}

/* Seção do pedido atual */
.ficha-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 4px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

/* Indicador de status inline */
.ficha-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 4px;
}

.ficha-status-dot.green {
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

.ficha-status-dot.gray {
    background: #94a3b8;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-main);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
}

.btn-danger-outline {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

/* Estado vazio do chat */
.chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.chat-empty-state i {
    width: 52px;
    height: 52px;
    opacity: 0.25;
}

.chat-empty-state p {
    font-size: 14px;
    max-width: 240px;
    line-height: 1.5;
}

/* Bolhas de mensagem */
.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 72%;
}

.chat-bubble-wrapper.user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-bubble-wrapper.bot {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-bubble-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.chat-bubble.user {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 3px;
}

.chat-bubble.bot {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chat-bubble-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Category Status Summary (Mini Badges) */
.category-status-summary {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.stat-mini {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    cursor: default;
}

.stat-mini:hover {
    transform: translateY(-1px);
}

.stat-mini.disponivel {
    background: #10b981;
}

.stat-mini.ocupado {
    background: #ef4444;
}

.stat-mini.limpeza {
    background: #f59e0b;
}

.stat-mini.bloqueado {
    background: #6b7280;
}

.stat-mini span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* --- GANTT TIMELINE --- */
.timeline-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.timeline-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.timeline-nav button {
    background: var(--secondary);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
}

.timeline-nav button:hover {
    background: var(--primary);
    color: white;
}

.timeline-nav span {
    font-weight: 600;
    color: var(--text-main);
    font-size: 15px;
}

.timeline-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    border: 1px solid var(--border);
}

.timeline-grid {
    min-width: 1200px;
    display: grid;
    /* Coluna 1: Nome do Quarto fixo (200px), Demais colunas: dias (min 60px) */
    grid-template-columns: 200px repeat(30, minmax(60px, 1fr));
}

.timeline-head {
    display: contents;
}

.timeline-head-cell {
    background: #f8fafc;
    padding: 12px 6px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.timeline-head-cell.room-label {
    text-align: left;
    align-items: flex-start;
    padding-left: 16px;
    background: white;
    border-right: 2px solid #e2e8f0;
    position: sticky;
    left: 0;
    z-index: 10;
}

.timeline-head-cell .dia-semana {
    font-size: 10px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}

.timeline-row {
    display: contents;
}

.timeline-cell {
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f8fafc;
    height: 60px;
    background: white;
}

.timeline-cell.room-name {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 2px solid #e2e8f0;
    position: sticky;
    left: 0;
    z-index: 5;
    background: white; /* fallback */
}

.timeline-cell.room-name.u-disponivel {
    background: #10b981;
}

.timeline-cell.room-name.u-ocupado {
    background: #ef4444;
}

.timeline-cell.room-name.u-limpeza {
    background: #f59e0b;
}

.timeline-cell.room-name.u-bloqueado {
    background: #6b7280;
}

.timeline-cell.room-name strong {
    font-size: 14px;
}

.timeline-cell.room-name small {
    font-size: 11px;
}

/* Fundo para finais de semana */
.timeline-cell.weekend {
    background: #f8fafc;
}

.timeline-row-content {
    position: relative;
    grid-column: 2 / -1; /* Ocupa todas as colunas de dias */
    border-bottom: 1px solid #f1f5f9;
    height: 60px;
    pointer-events: none; /* Deixa os cliques passarem para as células abaixo, se necessário */
}

.timeline-bar {
    position: absolute;
    top: 10px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 2;
}

.timeline-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 3;
}

.timeline-bar.status-CONFIRMADA {
    background: linear-gradient(135deg, #0ea5e9, #0284c7); /* Azul */
}

.timeline-bar.status-CHECK-IN {
    background: linear-gradient(135deg, #10b981, #059669); /* Verde */
}

/* Tooltip interno na barra */
.timeline-bar .tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    pointer-events: none;
}

.timeline-bar:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    background: var(--secondary);
    padding: 4px;
    border-radius: 8px;
}

.view-toggle button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.view-toggle button.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Print */
@media print {

    .sidebar,
    .topbar button,
    .search-box,
    .filters,
    .status-select,
    .timeline-header-controls,
    .view-toggle,
    th:last-child,
    td:last-child {
        display: none !important;
    }

    .content {
        padding: 0;
    }

    .table-card, .timeline-wrapper {
        box-shadow: none;
        border: none;
    }

    .dashboard-container {
        display: block;
    }
}

/* ==========================================
   TIPOS DE HÓSPEDE
   ========================================== */

.tipos-hospede-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 4px 0;
}

.tipo-hospede-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.tipo-hospede-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Ajuste para guest-data-panel com o novo campo de tipo */
.guest-data-panel .form-group select {
    font-size: 13px;
    padding: 8px 10px;
    background: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

/* Spinner animation for loading states */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}