/* ===========================================
   SOTELHO - Sistema de Consulta de Desayunos
   Estilos de Marca Corporativa
   =========================================== */

/* ===== VARIABLES DE MARCA ===== */
:root {
    --sotelho-primary: #151f42;
    --sotelho-blue: #4568dc;
    --sotelho-purple: #b06ab3;
    --sotelho-gradient: linear-gradient(135deg, #4568dc 0%, #b06ab3 100%);
    --sotelho-gradient-hover: linear-gradient(135deg, #3a5bc9 0%, #9d5a9f 100%);
    --sotelho-light: #f8f9fc;
    --sotelho-gray: #6c757d;
    --sotelho-success: #28a745;
    --sotelho-danger: #dc3545;
    --sotelho-warning: #ffc107;
    --sotelho-info: #17a2b8;
    --sotelho-shadow: 0 4px 6px rgba(21, 31, 66, 0.1);
    --sotelho-shadow-lg: 0 10px 25px rgba(21, 31, 66, 0.15);
}

/* ===== ESTILOS BASE ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--sotelho-light);
    color: var(--sotelho-primary);
    min-height: 100vh;
}

/* ===== HEADER Y LOGO ===== */
.sotelho-navbar {
    background: var(--sotelho-primary);
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.sotelho-navbar .navbar-brand img {
    height: 40px;
    transition: transform 0.3s ease;
}

.sotelho-navbar .navbar-brand:hover img {
    transform: scale(1.05);
}

.sotelho-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
}

.sotelho-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.sotelho-header {
    background: var(--sotelho-primary);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: var(--sotelho-shadow-lg);
}

.sotelho-logo {
    max-height: 60px;
    margin-bottom: 10px;
}

.sotelho-brand-text {
    background: var(--sotelho-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.3em;
}

/* ===== TÍTULOS ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--sotelho-primary);
    font-weight: 600;
}

h1.text-center {
    background: var(--sotelho-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 25px;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--sotelho-shadow);
    margin-top: 20px;
}

/* ===== BOTONES ===== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--sotelho-shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--sotelho-shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

/* Botón Primario - Gradiente Sotelho */
.btn-primary {
    background: var(--sotelho-gradient);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--sotelho-gradient-hover);
    box-shadow: 0 6px 20px rgba(69, 104, 220, 0.4);
}

.btn-primary:disabled {
    background: var(--sotelho-gray);
    opacity: 0.7;
}

/* Botón Secundario */
.btn-secondary {
    background: var(--sotelho-primary);
}

.btn-secondary:hover {
    background: #1d2a5a;
}

/* Botón Info */
.btn-info {
    background: var(--sotelho-blue);
}

.btn-info:hover {
    background: #3a5bc9;
}

/* Botón Success */
.btn-success {
    background: var(--sotelho-success);
}

/* Botón Warning */
.btn-warning {
    background: var(--sotelho-warning);
    color: var(--sotelho-primary);
}

/* Botón Danger */
.btn-danger {
    background: var(--sotelho-danger);
}

/* Botón con borde gradiente */
.btn-outline-sotelho {
    background: transparent;
    border: 2px solid;
    border-image: var(--sotelho-gradient) 1;
    color: var(--sotelho-blue);
}

.btn-outline-sotelho:hover {
    background: var(--sotelho-gradient);
    color: white;
}

/* ===== INPUTS Y FORMULARIOS ===== */
.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--sotelho-blue);
    box-shadow: 0 0 0 3px rgba(69, 104, 220, 0.2);
}

.form-control-lg {
    font-size: 18px;
    padding: 15px 20px;
}

input[type="number"]::-webkit-inner-spin-button {
    opacity: 1;
}

/* ===== CARDS DE ESTADÍSTICAS ===== */
.stat-card {
    background: var(--sotelho-gradient);
    color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--sotelho-shadow-lg);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ===== TARJETAS DE HUÉSPED ===== */
.guest-card {
    background: white;
    border-radius: 10px;
    border-left: 5px solid var(--sotelho-blue);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--sotelho-shadow);
    transition: all 0.3s ease;
}

.guest-card:hover {
    box-shadow: var(--sotelho-shadow-lg);
    transform: translateX(5px);
}

.guest-card.checkout {
    border-left-color: var(--sotelho-danger);
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.05) 0%, white 100%);
}

.guest-card.active {
    border-left-color: var(--sotelho-success);
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.05) 0%, white 100%);
}

.guest-card h1 {
    font-size: 1.2rem;
    color: var(--sotelho-primary);
    background: none;
    -webkit-text-fill-color: var(--sotelho-primary);
}

/* ===== BADGES ===== */
.badge {
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 500;
}

.badge-sotelho {
    background: var(--sotelho-gradient);
    color: white;
}

.badge-primary {
    background: var(--sotelho-blue);
}

.badge-success {
    background: var(--sotelho-success);
}

.badge-warning {
    background: var(--sotelho-warning);
    color: var(--sotelho-primary);
}

.badge-info {
    background: var(--sotelho-purple);
}

.badge-danger {
    background: var(--sotelho-danger);
}

/* ===== TABLAS ===== */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--sotelho-shadow);
}

.table thead {
    background: var(--sotelho-primary);
}

.table thead th {
    color: white;
    border: none;
    padding: 15px;
    font-weight: 500;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(69, 104, 220, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(21, 31, 66, 0.02);
}

/* ===== MODALES ===== */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: var(--sotelho-shadow-lg);
}

.modal-header {
    background: var(--sotelho-gradient);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

.modal-header .modal-title {
    color: white;
    font-weight: 600;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
}

/* ===== SEPARADORES ===== */
hr {
    border-top: 2px solid rgba(69, 104, 220, 0.2);
    margin: 20px 0;
}

/* ===== INDICADORES DE ESTADO ===== */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background: var(--sotelho-success);
}

.status-indicator.checkout {
    background: var(--sotelho-danger);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(69, 104, 220, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(69, 104, 220, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(69, 104, 220, 0);
    }
}

/* ===== INFORMACIÓN DE DESAYUNO ===== */
.breakfast-included {
    background: var(--sotelho-success);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.breakfast-not-included {
    background: var(--sotelho-danger);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
}

/* ===== SECCIÓN DE RESUMEN ===== */
.summary-section {
    background: linear-gradient(135deg, var(--sotelho-primary) 0%, #2a3a6a 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.summary-section h5 {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: var(--sotelho-shadow);
}

.alert-primary {
    background: rgba(69, 104, 220, 0.1);
    color: var(--sotelho-blue);
    border-left: 4px solid var(--sotelho-blue);
}

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

.alert-danger {
    border-left: 4px solid var(--sotelho-danger);
}

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

/* ===== LOADING SPINNER ===== */
.sotelho-spinner {
    border: 4px solid rgba(69, 104, 220, 0.2);
    border-top: 4px solid var(--sotelho-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sotelho-light);
}

::-webkit-scrollbar-thumb {
    background: var(--sotelho-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sotelho-blue);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    h1.text-center {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 15px;
    }
    
    .stat-card h4 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .btn-block {
        margin-bottom: 10px;
    }
    
    .form-control-lg {
        font-size: 16px;
    }
}

/* ===== ANIMACIONES ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== FOOTER ===== */
.sotelho-footer {
    background: var(--sotelho-primary);
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-top: 40px;
}

.sotelho-footer a {
    color: var(--sotelho-purple);
    text-decoration: none;
}

.sotelho-footer a:hover {
    color: #c98acc;
}

/* ===== TOOLTIPS ===== */
.tooltip-inner {
    background: var(--sotelho-primary);
    border-radius: 6px;
}

.bs-tooltip-top .arrow::before {
    border-top-color: var(--sotelho-primary);
}

/* ===== CLASES UTILITARIAS ===== */
.text-sotelho {
    color: var(--sotelho-blue);
}

.text-sotelho-purple {
    color: var(--sotelho-purple);
}

.bg-sotelho {
    background: var(--sotelho-gradient);
}

.bg-sotelho-dark {
    background: var(--sotelho-primary);
}

.border-sotelho {
    border-color: var(--sotelho-blue) !important;
}

.shadow-sotelho {
    box-shadow: var(--sotelho-shadow-lg);
}

/* ===== NAVEGACIÓN DE MÓDULOS ===== */
.module-link {
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 25px;
    padding: 8px 16px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 5px;
    position: relative;
}

.module-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
}

.module-link.active {
    background: var(--sotelho-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(69, 104, 220, 0.4);
}

.module-link i {
    opacity: 0.8;
}

.module-link.active i {
    opacity: 1;
}

/* Menú de usuario */
.navbar .dropdown-toggle::after {
    margin-left: 8px;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--sotelho-shadow-lg);
    border-radius: 10px;
}

.navbar .dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background: rgba(69, 104, 220, 0.1);
    color: var(--sotelho-blue);
}

.navbar .dropdown-item i {
    width: 20px;
}

/* ===== BOTONES DE ROOM STATUS ===== */
.btn-room-status {
    text-align: left;
    padding: 12px 20px;
    margin-bottom: 8px;
    border-width: 2px;
    font-weight: 500;
}

.btn-room-status:hover {
    transform: translateX(5px);
}

.btn-room-status.active {
    transform: translateX(5px);
}

.status-group {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.status-group:last-child {
    border-bottom: none;
}

.status-label {
    margin-bottom: 8px;
    font-size: 1rem;
}

.btn-status-option {
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-status-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-status-option.selected-status {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ===== TABLA DE ROOM STATUS ===== */
.status-row {
    background: #fafafa;
    transition: all 0.2s ease;
}

.status-row:hover {
    background: #f0f0f0;
}

#tabla_status tbody tr {
    transition: all 0.3s ease;
}

#tabla_status tbody tr:hover {
    background-color: rgba(69, 104, 220, 0.1);
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

.fade-in {
    animation: fadeInRow 0.5s ease;
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== CARDS DE MÓDULOS ===== */
.module-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sotelho-shadow-lg);
}

/* ===== RESPONSIVE PARA MÓDULOS ===== */
@media (max-width: 991px) {
    .module-link {
        padding: 10px 15px !important;
        margin: 3px 0;
        border-radius: 10px;
    }
    
    .navbar-nav.mx-auto {
        margin: 10px 0 !important;
        padding: 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
}

@media (max-width: 768px) {
    .module-link {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .module-link i {
        display: block;
        margin-bottom: 3px;
        margin-right: 0 !important;
    }
    
    .module-link {
        text-align: center;
    }
}