/* ============================================
   ELINON HOTEL MANAGEMENT ERP
   Modern & Elegant Theme
   ============================================ */

:root {
  --hotel-primary: #cca43b;       /* Gold/Bronze - Luxury */
  --hotel-primary-light: #e5bd5b; 
  --hotel-primary-dark: #b38f32;
  
  --hotel-secondary: #2c3e50;     /* Dark Navy - Professional */
  --hotel-secondary-light: #34495e;

  --hotel-accent: #e74c3c;        /* Red - Alerts/Occupied */
  --hotel-available: #27ae60;     /* Green - Available */
  --hotel-reserved: #f39c12;      /* Orange - Reserved */
  --hotel-cleaning: #3498db;      /* Blue - Housekeeping */

  --hotel-bg: #f8f9fa;            /* Light Gray Background */
  --hotel-card-bg: #ffffff;
  --hotel-text: #2c3e50;
  --hotel-text-muted: #7f8c8d;
  --hotel-border: #ecf0f1;

  --hotel-shadow: 0 4px 6px rgba(0,0,0,0.05);
  --hotel-radius: 8px;
}

/* Embedded View Mode - Hides internal sidebar when inside ERP Shell */
body.embedded-view .sidebar {
  display: none !important;
}

body.embedded-view .main-content {
  margin-left: 0 !important;
  padding: 24px;
  width: 100%;
}

* {
  margin: 0;
  padding: 0; 
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--hotel-bg);
  color: var(--hotel-text);
  line-height: 1.6;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--hotel-secondary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hotel-primary);
  letter-spacing: 1px;
}

.nav-list {
  list-style: none;
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255,255,255,0.05);
  color: var(--hotel-primary);
  border-right: 3px solid var(--hotel-primary);
}

.nav-link i {
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  margin-left: 250px;
  flex: 1;
  padding: 30px;
}

.section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Headers */
.header-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--hotel-secondary);
}

/* Grid & Cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }

.card {
  background: var(--hotel-card-bg);
  border-radius: var(--hotel-radius);
  box-shadow: var(--hotel-shadow);
  overflow: hidden;
  border: 1px solid var(--hotel-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: var(--hotel-radius);
  box-shadow: var(--hotel-shadow);
  border-left: 4px solid var(--hotel-primary);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--hotel-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--hotel-secondary);
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--hotel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  background-color: #fcfcfc;
}

.card-body {
  padding: 20px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--hotel-border);
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--hotel-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

td {
  font-size: 0.95rem;
}

/* Badges & Status */
.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-occupied { background: #fee2e2; color: #b91c1c; }
.badge-available { background: #dcfce7; color: #15803d; }
.badge-clean { background: #e0f2fe; color: #0369a1; }
.badge-maintenance { background: #f3f4f6; color: #4b5563; }

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--hotel-radius);
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--hotel-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--hotel-primary-dark);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--hotel-border);
  color: var(--hotel-text);
}

.btn-outline:hover {
  background-color: #f8f9fa;
  border-color: var(--hotel-text-muted);
}

/* ── Responsive: Tablet (≤ 1024px) ──────────────────────────── */
@media (max-width: 1024px) {
  .sidebar {
    width: 68px;
    min-width: 68px;
    overflow: hidden;
  }
  .sidebar .nav-text,
  .sidebar .logo-text,
  .sidebar .sidebar-footer {
    display: none;
  }
  .sidebar .nav-link {
    justify-content: center;
    padding: 12px 0;
  }
  .sidebar .nav-link i { margin-right: 0; }
  .main-content { margin-left: 68px; }
  .stats-grid,
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive: Mobile (≤ 900px) ───────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 250px;
    height: 100vh;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }
  .sidebar.mobile-open {
    left: 0;
  }
  .sidebar.mobile-open .nav-text,
  .sidebar.mobile-open .logo-text,
  .sidebar.mobile-open .sidebar-footer { display: initial; }
  .sidebar.mobile-open .nav-link { justify-content: flex-start; padding: 12px 20px; }
  .sidebar.mobile-open .nav-link i { margin-right: 12px; }
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    width: 100%;
  }
  .header-area {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive: Phone (≤ 768px) ────────────────────────────── */
@media (max-width: 768px) {
  .stats-grid,
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  table th, table td { padding: 10px 12px; font-size: 0.82rem; }
}

/* ── Responsive: Small phone (≤ 600px) ──────────────────────── */
@media (max-width: 600px) {
  .main-content { padding: 12px; }
  .page-title { font-size: 1.15rem; }
  .stat-value { font-size: 1.3rem; }
  .stat-card { padding: 12px; }
}

/* ── Responsive: Narrow phone (≤ 480px) ─────────────────────── */
@media (max-width: 480px) {
  .stat-card { padding: 10px; }
  .stats-grid { gap: 8px; }
  .card-body { padding: 12px; }
}
