/* MARA Hotel Management System - Complete Stylesheet */

/* CSS Variables for Theming */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --grey-color: #95a5a6;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #dfe6e9;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

.header-content {
    text-align: center;
    margin-bottom: 20px;
}

.header-content h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 12px 25px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255,255,255,0.3);
    font-weight: bold;
}

/* Main Content */
main {
    padding: 30px;
}

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

.stat-card {
    padding: 25px;
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1em;
    opacity: 0.9;
}

.green-card {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.red-card {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.grey-card {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.blue-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.orange-card {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 25px;
    height: 25px;
    border-radius: 5px;
}

.legend-color.green {
    background: var(--success-color);
}

.legend-color.grey {
    background: var(--grey-color);
}

.legend-color.red {
    background: var(--danger-color);
}

/* Floor Section */
.floor-section {
    margin-bottom: 40px;
}

.floor-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-color);
}

.floor-count {
    font-size: 0.8em;
    color: var(--text-light);
    font-weight: normal;
}

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

.room-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.room-card.clean_vacant {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.room-card.dirty_vacant {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.room-card.occupied {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.room-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.room-type {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.guest-name {
    font-size: 0.85em;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.room-status-text {
    font-size: 0.85em;
    margin-top: 8px;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-details {
    margin-top: 20px;
}

.modal-details p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

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

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

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

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

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

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

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

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Forms */
.form-container {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--light-bg);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Service Items Grid */
.service-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.service-item {
    padding: 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.service-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.service-item.selected {
    border-color: var(--success-color);
    background: #d4edda;
}

.service-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.service-item-price {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Cart/Summary */
.summary-box {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.summary-box h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-total {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
}

/* Report Cards */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.report-card {
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

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

.report-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header-content h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .rooms-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
    }
    
    .nav-link {
        text-align: center;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    header {
        background: white !important;
        color: black !important;
    }
    
    nav {
        display: none;
    }
    
    .btn {
        display: none;
    }
    
    .modal {
        display: none;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.quantity-selector button {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--secondary-color);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.3s ease;
}

.quantity-selector button:hover {
    background: #2980b9;
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Page Title */
.page-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-color);
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, var(--secondary-color), transparent);
    margin: 30px 0;
}
