/* Taihe Hotel Management System - Main Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: #1a5fb4;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    font-size: 20px;
    font-weight: bold;
}

.header .user-info {
    font-size: 13px;
}

.header .user-info span {
    margin-left: 15px;
}

.main-content {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 200px;
    background: #2c2c2c;
    color: white;
    padding: 10px 0;
}

.menu-title {
    padding: 10px 15px;
    font-weight: bold;
    color: #8ab4f8;
    border-bottom: 1px solid #444;
}

.menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 12px 15px;
    color: #ddd;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #3d3d3d;
    color: white;
}

.menu-item .icon {
    margin-right: 10px;
    font-size: 16px;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Page Title */
.page-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a5fb4;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #1a5fb4;
    color: white;
}

.btn-primary:hover {
    background: #1657a3;
}

.btn-success {
    background: #2e7d32;
    color: white;
}

.btn-success:hover {
    background: #256027;
}

.btn-danger {
    background: #c62828;
    color: white;
}

.btn-danger:hover {
    background: #a31f1f;
}

.btn.primary {
    background: #1a5fb4;
    color: white;
}

.btn.primary:hover {
    background: #1657a3;
}

.btn.success {
    background: #2e7d32;
    color: white;
}

.btn.success:hover {
    background: #256027;
}

.btn.secondary {
    background: #616161;
    color: white;
}

.btn.secondary:hover {
    background: #484848;
}

.btn.danger {
    background: #c62828;
    color: white;
}

.btn.danger:hover {
    background: #a31f1f;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.table th {
    background: #f5f5f5;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.table tr:hover {
    background: #f9f9f9;
}

/* Room Status */
.status-available {
    color: #2e7d32;
    font-weight: bold;
}

.status-occupied {
    color: #c62828;
    font-weight: bold;
}

.status-maintenance {
    color: #f57c00;
    font-weight: bold;
}

.status-reserved {
    color: #1565c0;
    font-weight: bold;
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.room-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.room-card.occupied {
    border-left: 4px solid #c62828;
}

.room-card.available {
    border-left: 4px solid #2e7d32;
}

.room-card.maintenance {
    border-left: 4px solid #f57c00;
}

.room-card.reserved {
    border-left: 4px solid #1565c0;
}

.room-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.room-type {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.room-status {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.room-price {
    color: #1a5fb4;
    font-weight: bold;
    margin-top: 5px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #1a5fb4;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #1a5fb4;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab.active {
    border-bottom-color: #1a5fb4;
    color: #1a5fb4;
}

/* Action buttons row */
.action-bar {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

/* Search bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-bar .form-control {
    width: 250px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    display: none;
}

.toast.show {
    display: block;
}

.toast.success {
    background: #2e7d32;
}

.toast.error {
    background: #c62828;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 22px;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Room Filter */
.room-filter {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.filter-group input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 200px;
}

/* Room Legend */
.room-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.legend-color.available {
    background: #2e7d32;
}

.legend-color.occupied {
    background: #c62828;
}

.legend-color.reserved {
    background: #1565c0;
}

.legend-color.cleaning {
    background: #f57c00;
}

.legend-color.maintenance {
    background: #757575;
}

/* Cleaning status style */
.room-card.cleaning {
    border-left: 4px solid #f57c00;
}

/* Modal enhancements */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 18px;
}

.modal-header .close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-header .close:hover {
    color: #333;
}

.modal-body {
    padding: 10px 0;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Text utilities */
.text-danger {
    color: #dc3545;
}

/* Status Badge */
.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #e9ecef;
    color: #495057;
}

/* ==================== CUSTOMERS PAGE ==================== */
.customers-page {
    height: 100%;
}

.customers-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
}

.customers-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ==================== RESERVATIONS PAGE ==================== */
.reservations-page {
    height: 100%;
}

.reservations-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
}

.reservations-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ==================== POS PAGE ==================== */
.pos-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pos-container {
    display: flex;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.pos-left {
    width: 350px;
    display: flex;
    flex-direction: column;
}

.pos-orders {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 200px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

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

.empty-order {
    text-align: center;
    color: #999;
    padding: 40px;
}

.order-summary {
    padding: 15px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.summary-row.total {
    font-size: 18px;
    font-weight: bold;
    color: #1a5fb4;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: 5px;
}

.pos-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn.active {
    background: #1a5fb4;
    color: white;
    border-color: #1a5fb4;
}

.category-btn:hover:not(.active) {
    background: #f0f0f0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

.product-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.product-name {
    font-size: 13px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: #1a5fb4;
    font-weight: bold;
    font-size: 14px;
}

.pos-payment {
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.payment-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-btn.active {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.payment-btn:hover:not(.active) {
    background: #f0f0f0;
}

.payment-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ==================== INVENTORY PAGE ==================== */
.inventory-page {
    height: 100%;
}

.inventory-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
}

.inventory-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ==================== REPORTS PAGE ==================== */
.reports-page {
    height: 100%;
}

.report-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #1a5fb4;
    border-bottom-color: #1a5fb4;
}

.tab-btn:hover:not(.active) {
    color: #333;
}

.report-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 24px;
    font-weight: bold;
    color: #1a5fb4;
}

.report-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ==================== SETTINGS PAGE ==================== */
.settings-page {
    height: 100%;
}

.settings-container {
    display: flex;
    gap: 15px;
    height: 100%;
}

.settings-menu {
    width: 180px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.settings-menu-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.settings-menu-item:hover {
    background: #f0f0f0;
}

.settings-menu-item.active {
    background: #e3f2fd;
    color: #1a5fb4;
    border-left: 3px solid #1a5fb4;
}

.settings-content {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-y: auto;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel h3 {
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.backup-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.backup-list h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

/* ==================== FORM LAYOUT ==================== */
.form-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.form-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #1a5fb4;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ==================== MODAL ENHANCEMENTS ==================== */
.modal-lg {
    max-width: 800px;
}

.modal-lg .modal-body {
    max-height: 500px;
    overflow-y: auto;
}

.room-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px;
}

.room-card.selectable {
    cursor: pointer;
    transition: all 0.2s;
}

.room-card.selectable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ==================== INVENTORY MODAL ==================== */
.inventory-modal .form-group {
    margin-bottom: 12px;
}

.inventory-modal .form-row-inline {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.inventory-modal .form-row-inline .form-group {
    flex: 1;
}

/* ==================== SETTINGS MODALS ==================== */
.settings-modal .form-group {
    margin-bottom: 12px;
}

/* ==================== DASHBOARD PAGE ==================== */
.welcome-page {
    padding: 10px 0;
}

.welcome-page h1 {
    font-size: 24px;
    color: #1a5fb4;
    margin-bottom: 25px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.quick-stats .stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-left: 4px solid #1a5fb4;
}

.quick-stats .stat-card:nth-child(2) {
    border-left-color: #2e7d32;
}

.quick-stats .stat-card:nth-child(3) {
    border-left-color: #f57c00;
}

.quick-stats .stat-card:nth-child(4) {
    border-left-color: #c62828;
}

.stat-icon {
    font-size: 36px;
}

.stat-info .stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.stat-info .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.action-btn.primary {
    background: #1a5fb4;
}

.action-btn.success {
    background: #2e7d32;
}

.action-btn.info {
    background: #0288d1;
}

.action-btn.warning {
    background: #f57c00;
}

.recent-activities h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

/* ==================== CHECKOUT PAGE ==================== */
.checkout-page {
    height: 100%;
}

.checkout-search {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
    align-items: center;
}

.checkout-search .form-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
    flex: 1;
}

.checkout-search .form-control {
    width: 250px;
}

.checkout-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ==================== CHECKIN PAGE ==================== */
.checkin-page {
    padding: 10px 0;
}

/* ==================== ADD/EDIT PAGE FORMS ==================== */
.add-reservation-page,
.edit-reservation-page,
.add-customer-page,
.edit-customer-page,
.add-inventory-page,
.edit-inventory-page {
    padding: 10px 0;
}

/* Empty message */
.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 14px;
}

/* ==================== CHECK OUT DETAIL ==================== */
.check-out-detail p {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.check-out-detail p:last-of-type {
    border-bottom: none;
}

.room-detail p {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.room-detail p:last-of-type {
    border-bottom: none;
}