/* ============================================================
   EBEN HAIZER — Global Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --eh-primary:      #0f766e;
  --eh-primary-dark: #0d5f58;
  --eh-primary-light:#14b8a8;
  --eh-accent:       #f59e0b;
  --eh-bg:           #f0fdf9;
  --eh-sidebar:      #042f2e;
  --eh-sidebar-hover:#0d3d3c;
  --eh-sidebar-active:#0f766e;
  --eh-text:         #134e4a;
  --eh-text-muted:   #5eead4;
  --eh-border:       #ccfbf1;
  --eh-white:        #ffffff;
  --eh-danger:       #ef4444;
  --eh-success:      #10b981;
  --eh-warning:      #f59e0b;
  --eh-info:         #3b82f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --radius:    0.75rem;
  --radius-sm: 0.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--eh-bg); color: var(--eh-text); }
.hidden { display: none !important; }

/* ============ LOGIN PAGE ============ */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #042f2e 0%, #0f766e 50%, #065f46 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.login-bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.decor-circle {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.decor-1 { width: 600px; height: 600px; top: -200px; left: -150px; }
.decor-2 { width: 400px; height: 400px; bottom: -100px; right: -100px; background: rgba(245,158,11,0.07); }
.decor-3 { width: 200px; height: 200px; top: 40%; left: 45%; }

.login-wrapper {
  position: relative; z-index: 1;
  display: flex; width: 900px; max-width: 96vw; min-height: 560px;
  border-radius: 1.5rem; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.login-brand {
  flex: 1; background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  padding: 3rem 2.5rem; color: white;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.10);
}
.brand-logo {
  width: 64px; height: 64px; border-radius: 1rem;
  background: linear-gradient(135deg, #14b8a8, #0f766e);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem; box-shadow: 0 8px 24px rgba(20,184,166,0.4);
}
.logo-icon { width: 32px; height: 32px; color: white; }
.brand-name { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; }
.brand-subtitle { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 2px; }
.brand-divider { width: 48px; height: 3px; background: var(--eh-accent); border-radius: 2px; margin: 1.5rem 0; }
.brand-desc { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.6; margin-bottom: 2rem; }
.brand-features { display: flex; flex-direction: column; gap: 0.75rem; }
.brand-feature { display: flex; align-items: center; gap: 0.75rem; color: rgba(255,255,255,0.8); font-size: 0.875rem; }
.feature-icon { width: 16px; height: 16px; color: var(--eh-primary-light); flex-shrink: 0; }

.login-form-panel {
  flex: 1; background: white;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2.5rem;
}
.login-card { width: 100%; max-width: 380px; }
.login-card-header { margin-bottom: 2rem; }
.login-card-header h2 { font-size: 1.75rem; font-weight: 800; color: #042f2e; }
.login-card-header p { color: #64748b; font-size: 0.875rem; margin-top: 0.25rem; }

.alert-error {
  display: flex; align-items: center; gap: 0.5rem;
  background: #fef2f2; border: 1px solid #fecaca;
  color: #dc2626; border-radius: var(--radius-sm);
  padding: 0.75rem 1rem; font-size: 0.85rem; margin-bottom: 1.25rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 0.4rem; }
.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9ca3af; }
.input-wrapper input {
  width: 100%; padding: 0.75rem 0.875rem 0.75rem 2.5rem;
  border: 1.5px solid #e5e7eb; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.input-wrapper input:focus { border-color: var(--eh-primary); box-shadow: 0 0 0 3px rgba(15,118,110,0.12); }
.input-toggle {
  position: absolute; right: 0.875rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #9ca3af; padding: 0;
}
.btn-login {
  width: 100%; padding: 0.875rem;
  background: linear-gradient(135deg, var(--eh-primary), var(--eh-primary-dark));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: all 0.2s; margin-top: 0.5rem;
  box-shadow: 0 4px 12px rgba(15,118,110,0.3);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,118,110,0.4); }
.btn-login:active { transform: translateY(0); }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-footer {
  display: flex; align-items: center; gap: 0.5rem; justify-content: center;
  color: #9ca3af; font-size: 0.75rem; margin-top: 1.5rem;
}
.footer-icon { width: 13px; height: 13px; }

/* ============ MAIN LAYOUT ============ */
.eh-layout { display: flex; height: 100vh; overflow: hidden; }

.eh-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--eh-sidebar); color: white;
  display: flex; flex-direction: column; height: 100vh;
  position: fixed; left: 0; top: 0; z-index: 20;
  overflow-y: auto;
}
.eh-sidebar-logo {
  padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 0.75rem;
}
.eh-logo-icon {
  width: 40px; height: 40px; border-radius: 0.6rem;
  background: linear-gradient(135deg, #14b8a8, #0f766e);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.eh-logo-icon svg { width: 20px; height: 20px; color: white; }
.eh-logo-text h1 { font-size: 1rem; font-weight: 700; color: white; }
.eh-logo-text p { font-size: 0.65rem; color: var(--eh-text-muted); text-transform: uppercase; letter-spacing: 1.5px; }

.eh-nav { padding: 1rem 0.75rem; flex: 1; }
.eh-nav-section { padding: 0.875rem 0.75rem 0.25rem; font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1.5px; }
.eh-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.875rem; border-radius: 0.5rem;
  color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.875rem;
  margin-bottom: 2px; cursor: pointer; transition: all 0.15s;
}
.eh-nav-item:hover { background: var(--eh-sidebar-hover); color: white; }
.eh-nav-item.active { background: var(--eh-sidebar-active); color: white; box-shadow: 0 2px 8px rgba(15,118,110,0.4); }
.eh-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.eh-sidebar-footer {
  padding: 1rem 0.75rem; border-top: 1px solid rgba(255,255,255,0.06);
}
.eh-user-info {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.875rem; margin-bottom: 0.5rem;
}
.eh-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #14b8a8, #0f766e);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white; flex-shrink: 0;
}
.eh-user-name { font-size: 0.8rem; font-weight: 600; color: white; }
.eh-user-role { font-size: 0.65rem; color: var(--eh-text-muted); text-transform: uppercase; }
.btn-logout {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.5rem 0.875rem; background: none; border: none;
  color: rgba(255,255,255,0.5); font-size: 0.8rem; cursor: pointer;
  border-radius: 0.5rem; transition: all 0.15s; font-family: inherit;
}
.btn-logout:hover { background: rgba(239,68,68,0.15); color: #f87171; }

.eh-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.eh-header {
  background: white; border-bottom: 1px solid #e0f2fe;
  padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow-sm);
}
.eh-header-left h2 { font-size: 1.1rem; font-weight: 700; color: #042f2e; }
.eh-header-left p { font-size: 0.75rem; color: #64748b; margin-top: 1px; }
.eh-header-right { display: flex; align-items: center; gap: 1rem; }

.eh-content { flex: 1; padding: 2rem; overflow-y: auto; }
.eh-content-inner { max-width: 1400px; margin: 0 auto; }

/* ============ CARDS & STATS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 1.25rem;
  border: 1px solid var(--eh-border); box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 1rem; transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: #042f2e; line-height: 1; }
.stat-label { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; }
.stat-trend { font-size: 0.7rem; margin-top: 0.5rem; display: flex; align-items: center; gap: 0.25rem; }
.trend-up { color: var(--eh-success); }
.trend-down { color: var(--eh-danger); }

/* ============ TABLE ============ */
.eh-card {
  background: white; border-radius: var(--radius); border: 1px solid var(--eh-border);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 1.5rem;
}
.eh-card-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between;
}
.eh-card-title { font-size: 0.95rem; font-weight: 700; color: #042f2e; }
.eh-table-wrap { overflow-x: auto; }
.eh-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.eh-table thead th {
  background: #f8fafc; padding: 0.75rem 1rem; text-align: left;
  font-size: 0.7rem; font-weight: 700; color: #64748b; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.eh-table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: middle; }
.eh-table tbody tr:last-child td { border-bottom: none; }
.eh-table tbody tr:hover td { background: #f0fdf9; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-available   { background: #dcfce7; color: #16a34a; }
.badge-occupied    { background: #fee2e2; color: #dc2626; }
.badge-cleaning    { background: #fef9c3; color: #ca8a04; }
.badge-maintenance { background: #fee2e2; color: #dc2626; }
.badge-confirmed   { background: #dbeafe; color: #2563eb; }
.badge-checked-in  { background: #d1fae5; color: #059669; }
.badge-checked-out { background: #e2e8f0; color: #475569; }
.badge-cancelled   { background: #fee2e2; color: #dc2626; }
.badge-pending     { background: #fef3c7; color: #d97706; }
.badge-vip         { background: #fef3c7; color: #b45309; }
.badge-internal    { background: #dbeafe; color: #1d4ed8; }
.badge-external    { background: #ede9fe; color: #7c3aed; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: none; font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--eh-primary); color: white; box-shadow: 0 2px 8px rgba(15,118,110,0.25); }
.btn-primary:hover { background: var(--eh-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,118,110,0.35); }
.btn-secondary { background: white; color: #374151; border: 1.5px solid #e5e7eb; }
.btn-secondary:hover { background: #f9fafb; border-color: #d1d5db; }
.btn-danger { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; }

/* ============ SEARCH & FILTER BAR ============ */
.toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #9ca3af; }
.search-input {
  width: 100%; padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  border: 1.5px solid #e5e7eb; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: 'Inter', sans-serif; outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--eh-primary); box-shadow: 0 0 0 3px rgba(15,118,110,0.1); }
.filter-select {
  padding: 0.6rem 0.75rem; border: 1.5px solid #e5e7eb; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: 'Inter', sans-serif; outline: none;
  background: white; cursor: pointer; color: #374151;
}
.filter-select:focus { border-color: var(--eh-primary); }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(3px); animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: white; border-radius: 1rem; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s cubic-bezier(0.16,1,0.3,1);
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.modal-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: white;
}
.modal-title { font-size: 1rem; font-weight: 700; color: #042f2e; }
.modal-close { background: none; border: none; cursor: pointer; color: #9ca3af; padding: 0.25rem; border-radius: 0.375rem; }
.modal-close:hover { color: #374151; background: #f1f5f9; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ============ FORM ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group-eh { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group-eh.col-span-2 { grid-column: span 2; }
.form-label { font-size: 0.78rem; font-weight: 600; color: #374151; }
.form-label .required { color: var(--eh-danger); margin-left: 2px; }
.form-control {
  padding: 0.625rem 0.75rem; border: 1.5px solid #e5e7eb; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: 'Inter', sans-serif; outline: none; width: 100%;
  transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--eh-primary); box-shadow: 0 0 0 3px rgba(15,118,110,0.1); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ============ ROOM GRID (Status Board) ============ */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.room-tile {
  border-radius: 0.75rem; padding: 1rem; border: 2px solid transparent;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.room-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.room-tile.available   { background: #f0fdf4; border-color: #86efac; }
.room-tile.occupied    { background: #fef2f2; border-color: #fca5a5; }
.room-tile.cleaning    { background: #fefce8; border-color: #fde047; }
.room-tile.maintenance { background: #faf5ff; border-color: #c084fc; }
.room-tile .room-num   { font-size: 1.25rem; font-weight: 800; color: #042f2e; }
.room-tile .room-type  { font-size: 0.68rem; color: #64748b; margin-top: 2px; }
.room-tile .room-guest { font-size: 0.72rem; font-weight: 600; color: #374151; margin-top: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ TOAST ============ */
.eh-toast {
  position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999;
  padding: 0.875rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: white;
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease;
  max-width: 360px;
}
.eh-toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.eh-toast.success { background: var(--eh-success); }
.eh-toast.error   { background: var(--eh-danger); }
.eh-toast.warning { background: var(--eh-warning); }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ============ MISC ============ */
.page-title { font-size: 1.4rem; font-weight: 800; color: #042f2e; margin-bottom: 0.25rem; }
.page-subtitle { font-size: 0.85rem; color: #64748b; margin-bottom: 1.5rem; }
.divider { height: 1px; background: #e2e8f0; margin: 1.25rem 0; }
.loading-row td { text-align: center; padding: 3rem; color: #9ca3af; }
.empty-state { text-align: center; padding: 4rem 2rem; color: #9ca3af; }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 1rem; display: block; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 9999px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@media (max-width: 768px) {
  .login-brand { display: none; }
  .login-wrapper { max-width: 96vw; }
  .eh-sidebar { transform: translateX(-100%); }
  .eh-main { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group-eh.col-span-2 { grid-column: span 1; }
}
