/* ================================
   RESET & VARIABLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Backgrounds */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-dark: #1e293b;
    --bg-sidebar: #0f172a;
    
    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.logo i {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
}

.nav-item:hover {
    background: rgba(37, 99, 235, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
}

.user-info i {
    font-size: 24px;
    color: var(--primary);
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.top-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.current-date, .current-time {
    padding: 8px 16px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.btn-logout {
    padding: 10px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ================================
   STATS GRID
   ================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card.purple .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ================================
   PAGE CONTENT
   ================================ */
.page-content {
    padding: 32px;
}

/* ================================
   QUICK ACTIONS
   ================================ */
.quick-actions {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
}

.quick-actions h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.action-btn {
    padding: 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
}

.action-btn i {
    font-size: 32px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.action-btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.action-btn.info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.action-btn.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

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

/* ================================
   SECTION CARD
   ================================ */
.section-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.section-card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

/* ================================
   TABLE
   ================================ */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
}

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

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-primary);
}

.data-table td {
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.ativo {
    background: #dcfce7;
    color: #166534;
}

.status-badge.finalizado {
    background: #e0e7ff;
    color: #3730a3;
}

/* ================================
   FORM
   ================================ */
.form-card {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-width: 900px;
}

.form-card h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.readonly-input {
    background: var(--bg-primary) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ================================
   BUTTONS
   ================================ */
.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

/* ================================
   QUARTOS GRID
   ================================ */
.quartos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.quarto-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quarto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.quarto-card.disponivel {
    border-color: var(--success);
    background: #dcfce7;
}

.quarto-card.ocupado {
    border-color: var(--danger);
    background: #fee2e2;
}

.quarto-numero {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.quarto-card.disponivel .quarto-numero {
    color: var(--success);
}

.quarto-card.ocupado .quarto-numero {
    color: var(--danger);
}

.quarto-status {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.quarto-cliente {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ================================
   MODAL
   ================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    font-size: 20px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.saida-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
}

.info-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.info-item input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.info-item.highlight {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid var(--primary);
}

.info-item.highlight label {
    color: var(--primary-dark);
}

.info-item.highlight span {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
}

/* ================================
   FILTERS
   ================================ */
.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ================================
   RELATÓRIOS
   ================================ */
.relatorio-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: end;
}

.relatorio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
}

.relatorio-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.relatorio-item label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.relatorio-item span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.relatorio-item.total {
    grid-column: 1 / -1;
    padding: 16px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 8px;
}

.relatorio-item.total span {
    font-size: 32px;
    color: var(--primary);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .header-right {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
    }
}

/* ================================
   UTILITIES
   ================================ */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}
