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

:root {
    --primary: #1a3c5e;
    --primary-light: #2563a8;
    --accent: #c9a227;
    --accent-light: #f0c940;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0891b2;
    --bg: #f0f4f8;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-w: 260px;
}

body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

/* SIDEBAR */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--primary) 0%, #0f2440 100%);
    display: flex; flex-direction: column; z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar-logo h2 { color: var(--accent); font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.sidebar-logo p { color: rgba(255,255,255,0.5); font-size: 11px; margin-top: 4px; }
.sidebar-logo .hotel-icon { font-size: 36px; margin-bottom: 8px; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 8px; }
.nav-section-title { color: rgba(255,255,255,0.35); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 8px 12px 4px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px; cursor: pointer;
    color: rgba(255,255,255,0.7); text-decoration: none;
    font-size: 14px; font-weight: 500;
    transition: all 0.2s; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: var(--accent); color: var(--primary); font-weight: 700; }
.nav-item .icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.1); }
.user-info { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.user-avatar { width: 36px; height: 36px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); font-size: 14px; }
.user-details .name { color: #fff; font-size: 13px; font-weight: 600; }
.user-details .role { color: rgba(255,255,255,0.5); font-size: 11px; }
.logout-btn { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: rgba(255,255,255,0.6); font-size: 13px; text-decoration: none; border-radius: 8px; transition: all 0.2s; margin-top: 4px; }
.logout-btn:hover { background: rgba(220,38,38,0.2); color: #f87171; }

/* MAIN CONTENT */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar {
    background: #fff; padding: 0 28px;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.topbar-left h1 { font-size: 20px; font-weight: 700; color: var(--primary); }
.topbar-left p { font-size: 12px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.date-badge { background: var(--bg); padding: 6px 14px; border-radius: 20px; font-size: 12px; color: var(--text-muted); font-weight: 500; }

.content { padding: 24px 28px; }

/* CARDS */
.card { background: #fff; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body { padding: 20px; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border-radius: 12px; padding: 20px;
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.stat-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.stat-icon.blue { background: #dbeafe; }
.stat-icon.green { background: #dcfce7; }
.stat-icon.orange { background: #ffedd5; }
.stat-icon.gold { background: #fef9c3; }
.stat-info .value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-info .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-info { background: #e0f2fe; color: #0891b2; }
.badge-secondary { background: #f1f5f9; color: #64748b; }
.badge-gold { background: #fef9c3; color: #854d0e; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: var(--accent-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }

/* FORMS */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
input, select, textarea {
    padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; color: var(--text); background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,168,0.1); }
textarea { resize: vertical; min-height: 80px; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 4px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ROOM GRID */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.room-card {
    border: 2px solid var(--border); border-radius: 12px; padding: 16px;
    cursor: pointer; transition: all 0.2s; background: #fff;
}
.room-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.room-card.available { border-color: #bbf7d0; }
.room-card.occupied { border-color: #fecaca; background: #fff5f5; }
.room-card.maintenance { border-color: #fed7aa; background: #fffbf5; }
.room-number { font-size: 24px; font-weight: 800; color: var(--primary); }
.room-type { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }
.room-price { font-size: 15px; font-weight: 700; color: var(--accent); margin-top: 8px; }
.room-amenities { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.amenity-tag { background: var(--bg); padding: 2px 8px; border-radius: 10px; font-size: 10px; color: var(--text-muted); font-weight: 600; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 800; color: var(--primary); }
.page-header p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

.bill-section { border: 2px solid var(--border); border-radius: 12px; padding: 20px; }
.bill-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.bill-row:last-child { border-bottom: none; font-weight: 700; font-size: 16px; color: var(--primary); }
.bill-row .label { color: var(--text-muted); }

/* Login page */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary) 0%, #0f2440 100%); }
.login-card { background: #fff; border-radius: 20px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .icon { font-size: 48px; }
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--primary); margin-top: 8px; }
.login-logo p { font-size: 13px; color: var(--text-muted); }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.empty-state p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 8px 12px; font-size: 13px; }
.search-box { flex: 1; min-width: 200px; }
