/* StayHub PG - Theme */
:root {
  --sh-bg: #0f172a;
  --sh-surface: #1e293b;
  --sh-surface2: #273449;
  --sh-border: #334155;
  --sh-accent: #f59e0b;
  --sh-accent2: #fbbf24;
  --sh-success: #10b981;
  --sh-danger: #ef4444;
  --sh-info: #3b82f6;
  --sh-text: #e2e8f0;
  --sh-muted: #94a3b8;
  --sh-sidebar-w: 240px;
  --sh-navbar-h: 60px;
}
[data-bs-theme="dark"] body, .sh-app {
  background: var(--sh-bg) !important;
  color: var(--sh-text);
}
.sh-app { min-height: 100vh; }

/* Navbar */
.sh-navbar {
  background: var(--sh-surface);
  border-bottom: 1px solid var(--sh-border);
  height: var(--sh-navbar-h);
  z-index: 1030;
}
.sh-brand { font-weight: 700; color: #fff !important; }
.sh-brand:hover { color: var(--sh-accent) !important; }
.sh-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--sh-accent);
  color: #1a1a2e; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.sh-avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* Sidebar */
.sh-sidebar {
  position: fixed; top: var(--sh-navbar-h); left: 0;
  width: var(--sh-sidebar-w); height: calc(100vh - var(--sh-navbar-h));
  background: var(--sh-surface);
  border-right: 1px solid var(--sh-border);
  z-index: 1020; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .25s ease;
}
.sh-sidenav { list-style: none; padding: 12px 0; margin: 0; }
.sh-navlink {
  display: flex; align-items: center; gap: 12px;
  color: var(--sh-muted); padding: 10px 18px;
  text-decoration: none; font-size: .92rem;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}
.sh-navlink i { font-size: 1.1rem; width: 20px; }
.sh-navlink:hover { color: #fff; background: var(--sh-surface2); }
.sh-navlink.active {
  color: var(--sh-accent); background: rgba(245,158,11,0.08);
  border-left-color: var(--sh-accent); font-weight: 600;
}
.sh-sidebar-overlay {
  display: none; position: fixed; inset: var(--sh-navbar-h) 0 0 0;
  background: rgba(0,0,0,0.6); z-index: 1015;
}
.sh-sidebar-overlay.show { display: block; }

/* Main */
.sh-main {
  margin-left: var(--sh-sidebar-w);
  padding-top: var(--sh-navbar-h);
  min-height: 100vh;
}
.sh-page-content { max-width: 1400px; }
.sh-page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 12px;
}
.sh-page-header h1 { font-size: 1.6rem; font-weight: 700; margin: 0; color: #fff; }
.sh-page-header p { color: var(--sh-muted); margin: 0; }

/* Cards */
.sh-card {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sh-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: #fff; }

/* KPIs */
.sh-kpi-card {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex; gap: 16px; align-items: center;
  height: 100%;
}
.sh-kpi-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.sh-kpi-value { font-size: 1.6rem; font-weight: 700; color: #fff; line-height: 1; }
.sh-kpi-label { font-size: .82rem; color: var(--sh-muted); margin-top: 4px; }
.sh-kpi-change.positive { color: var(--sh-success); font-size: .8rem; }
.sh-kpi-change.negative { color: var(--sh-danger); font-size: .8rem; }

/* Buttons */
.sh-btn-primary {
  background: var(--sh-accent); color: #0f172a; border: 0;
  font-weight: 600; padding: 8px 18px; border-radius: 8px;
}
.sh-btn-primary:hover { background: var(--sh-accent2); color: #0f172a; }
.sh-btn-ai {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff; border: 0; font-weight: 600;
  padding: 8px 18px; border-radius: 8px;
}
.sh-btn-ai:hover { opacity: 0.9; color: #fff; }

/* Forms */
.sh-input {
  background: var(--sh-surface2) !important;
  border: 1px solid var(--sh-border) !important;
  color: #fff !important;
  border-radius: 8px;
}
.sh-input:focus {
  background: var(--sh-surface2) !important;
  color: #fff !important;
  border-color: var(--sh-accent) !important;
  box-shadow: 0 0 0 .2rem rgba(245,158,11,.15);
}
.form-control, .form-select { background: var(--sh-surface2); border-color: var(--sh-border); color: #fff; }
.form-control:focus, .form-select:focus { background: var(--sh-surface2); color: #fff; border-color: var(--sh-accent); box-shadow: 0 0 0 .2rem rgba(245,158,11,.15); }
.form-control::placeholder { color: var(--sh-muted); }

/* Tables */
.sh-table { width: 100%; border-collapse: collapse; }
.sh-table th, .sh-table td { padding: 12px; border-bottom: 1px solid var(--sh-border); text-align: left; }
.sh-table th { color: var(--sh-muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.sh-table tr:hover { background: rgba(255,255,255,0.02); }

/* PG Listing card (marketplace) */
.sh-pg-card {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; height: 100%;
}
.sh-pg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  border-color: var(--sh-accent);
}
.sh-pg-card-img {
  width: 100%; height: 200px; object-fit: cover;
  background: var(--sh-surface2);
}
.sh-pg-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.sh-pg-card-title { font-weight: 700; font-size: 1.05rem; color: #fff; margin-bottom: .25rem; }
.sh-pg-card-loc { color: var(--sh-muted); font-size: .85rem; }
.sh-pg-price { font-size: 1.1rem; font-weight: 700; color: var(--sh-accent); }
.sh-pg-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin: .5rem 0; }
.sh-pg-amenity {
  font-size: .72rem; padding: 3px 9px; border-radius: 12px;
  background: var(--sh-surface2); color: var(--sh-muted);
  border: 1px solid var(--sh-border);
}

/* Marketplace nav (public) */
.sh-public-nav {
  background: var(--sh-surface);
  border-bottom: 1px solid var(--sh-border);
  position: sticky; top: 0; z-index: 1000;
}
.sh-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 5rem 1rem 3rem;
  text-align: center;
}
.sh-hero h1 { font-size: 2.5rem; font-weight: 800; color: #fff; }
.sh-hero h1 span { color: var(--sh-accent); }
.sh-search-box {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 900px; margin: 2rem auto 0;
}

/* Auth */
.sh-auth-body { background: var(--sh-bg); min-height: 100vh; }
.sh-auth-wrapper { min-height: 100vh; display: flex; }
.sh-auth-left {
  flex: 1; background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: none; align-items: center; justify-content: center;
  padding: 3rem; color: #fff;
}
@media (min-width: 992px) { .sh-auth-left { display: flex; } }
.sh-auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.sh-auth-card {
  background: var(--sh-surface); border: 1px solid var(--sh-border);
  border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 440px;
}
.sh-otp-inputs { display: flex; gap: 10px; justify-content: center; }
.sh-otp-digit {
  width: 50px; height: 56px; text-align: center;
  font-size: 1.3rem; font-weight: 600;
  background: var(--sh-surface2); border: 1px solid var(--sh-border);
  color: #fff; border-radius: 8px;
}
.sh-otp-digit:focus { border-color: var(--sh-accent); outline: none; }
.sh-timer { color: var(--sh-muted); font-size: .85rem; }

/* Notifications */
.sh-notif-badge { font-size: .65rem; padding: 3px 6px; }
.sh-dropdown-notif { background: var(--sh-surface); border: 1px solid var(--sh-border); }
.sh-notif-header { background: var(--sh-surface2); }

/* Plan cards */
.sh-plan-card {
  background: var(--sh-surface); border: 1px solid var(--sh-border);
  border-radius: 14px; padding: 2rem 1.5rem; height: 100%;
  display: flex; flex-direction: column; position: relative;
}
.sh-plan-card.featured { border-color: var(--sh-accent); transform: scale(1.02); }
.sh-plan-card.featured::before {
  content: 'POPULAR'; position: absolute; top: -10px; right: 20px;
  background: var(--sh-accent); color: #0f172a;
  padding: 3px 10px; border-radius: 12px; font-size: .7rem; font-weight: 700;
}
.sh-plan-price { font-size: 2.4rem; font-weight: 800; color: #fff; }
.sh-plan-period { color: var(--sh-muted); font-size: .9rem; }
.sh-plan-features { list-style: none; padding: 0; margin: 1rem 0; flex: 1; }
.sh-plan-features li { padding: 6px 0; color: var(--sh-text); font-size: .9rem; }
.sh-plan-features li i { color: var(--sh-success); margin-right: 8px; }

/* Upgrade card */
.sh-upgrade-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(239,68,68,0.1));
  border: 1px solid rgba(245,158,11,0.3); border-radius: 12px;
  text-align: center;
}

/* AI chat */
.sh-chat-window { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; height: calc(100vh - 200px); display: flex; flex-direction: column; }
.sh-chat-messages { flex: 1; overflow-y: auto; padding: 1rem; }
.sh-msg { display: flex; gap: 10px; margin-bottom: 1rem; }
.sh-msg-user { flex-direction: row-reverse; }
.sh-msg-content { padding: 10px 14px; border-radius: 12px; max-width: 75%; }
.sh-msg-ai .sh-msg-content { background: var(--sh-surface2); color: var(--sh-text); }
.sh-msg-user .sh-msg-content { background: var(--sh-accent); color: #0f172a; }
.sh-typing { display: inline-flex; gap: 3px; padding: 8px; }
.sh-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--sh-muted); animation: typing 1.4s infinite; }
.sh-typing span:nth-child(2) { animation-delay: .2s; }
.sh-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
.sh-chat-input-area { border-top: 1px solid var(--sh-border); padding: 1rem; }
.sh-chat-input { width: 100%; background: var(--sh-surface2); color: #fff; border: 1px solid var(--sh-border); border-radius: 10px; padding: 10px 14px; }

/* Photo gallery */
.sh-gallery-main { width: 100%; height: 420px; object-fit: cover; border-radius: 12px; }
.sh-gallery-thumb { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: 0.7; transition: opacity .15s; }
.sh-gallery-thumb:hover, .sh-gallery-thumb.active { opacity: 1; border: 2px solid var(--sh-accent); }

/* Bed grid */
.sh-bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.sh-bed-card {
  background: var(--sh-surface2); border: 1px solid var(--sh-border);
  border-radius: 10px; padding: 1rem; text-align: center;
}
.sh-bed-card.vacant { border-color: var(--sh-success); }
.sh-bed-card.occupied { border-color: var(--sh-info); }
.sh-bed-card.reserved { border-color: var(--sh-accent); }
.sh-bed-card.maintenance { border-color: var(--sh-danger); }

/* Misc */
.sh-stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--sh-border); }
.sh-stat-row:last-child { border-bottom: 0; }
.sh-tip { background: var(--sh-surface2); border-left: 3px solid var(--sh-accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; font-size: .9rem; }

/* Responsive */
@media (max-width: 991px) {
  .sh-sidebar { transform: translateX(-100%); }
  .sh-sidebar.show { transform: translateX(0); }
  .sh-main { margin-left: 0; }
}
.dropdown-menu { background: var(--sh-surface); border: 1px solid var(--sh-border); }
.dropdown-item { color: var(--sh-text); }
.dropdown-item:hover { background: var(--sh-surface2); color: #fff; }
.modal-content { background: var(--sh-surface); border: 1px solid var(--sh-border); }
.modal-header, .modal-footer { border-color: var(--sh-border); }
.text-muted { color: var(--sh-muted) !important; }
.bg-light-alt { background: var(--sh-surface2); }
hr { border-color: var(--sh-border); }
.list-group-item { background: var(--sh-surface); color: var(--sh-text); border-color: var(--sh-border); }
.nav-tabs { border-color: var(--sh-border); }
.nav-tabs .nav-link { color: var(--sh-muted); border: 0; }
.nav-tabs .nav-link.active { background: transparent; color: var(--sh-accent); border-bottom: 2px solid var(--sh-accent); }
