* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; }

:root {
  --accent: #6C2BD9;
  --accent-dark: #4c1d95;
  --accent-light: #f3ecff;
  --mint: #d9f7ea;
  --mint-text: #0a7a4a;
  --dark: #1a1a1a;
  --sidebar-bg: #17131f;
  --text-secondary: #7a7a85;
  --border: #ececf1;
  --danger: #d92d20;
  --success: #12a150;
  --warning: #b5750a;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f6f5f9;
  color: var(--dark);
}

/* ============ AUTH PAGES (Register/Login/OTP) ============ */
body.auth-body {
  background: linear-gradient(135deg, #6C2BD9, #a855f7);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.25rem 1.85rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 380px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.brand-mark .brand-dot {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.brand-mark .brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.2px; }

h2 { font-size: 21px; font-weight: 700; margin-bottom: 4px; color: var(--dark); letter-spacing: -0.3px; }
.subtitle { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 1.25rem; }

label { display: block; font-size: 13px; color: #444; margin: 12px 0 6px; font-weight: 600; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fafafc;
  transition: border-color .15s, background .15s;
}
.form-input:focus { outline: none; border-color: var(--accent); background: #fff; }

.btn-primary {
  width: 100%;
  margin-top: 1.4rem;
  background: linear-gradient(135deg, var(--accent), #8b3ce8);
  color: #fff;
  border: none;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(108,43,217,0.3);
  transition: transform .1s;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.link-text { text-align: center; font-size: 13.5px; color: var(--text-secondary); margin-top: 1.4rem; }
.link-text a { color: var(--accent); text-decoration: none; font-weight: 700; }

.error-text { color: var(--danger); font-size: 12px; margin-top: 8px; display: block; }
.info-text {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 12.5px;
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.success-icon {
  width: 60px; height: 60px;
  background: var(--mint); color: var(--mint-text);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin: 0 auto 1rem;
}
.text-center { text-align: center; }

.btn-secondary {
  background: var(--accent-light); color: var(--accent);
  border: none; padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ============ APP SHELL (Master Page: sidebar + topbar) ============ */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: #d8d4e0;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-sidebar .brand-mark { padding: 0 0.5rem; margin-bottom: 28px; }
.app-sidebar .brand-mark .brand-name { color: #fff; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #b8b3c4;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: background .15s, color .15s;
}
.nav-item .nav-icon { font-size: 16px; width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, var(--accent), #8b3ce8); color: #fff; }

.sidebar-footer {
  position: absolute;
  bottom: 1.5rem;
  left: 1rem;
  right: 1rem;
}

/* Main content area */
.app-main { flex: 1; min-width: 0; }

.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
}
.app-topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

.app-content { padding: 1.75rem 2rem; max-width: 900px; }

/* Highlight banner (OYO-style mint promo banner) */
.promo-banner {
  background: var(--mint);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.5rem;
}
.promo-banner h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.promo-banner p { font-size: 13px; color: #1a3d2c; }

/* ============ OYO-STYLE COMPONENTS ============ */

.property-subtitle { font-size: 13px; color: var(--text-secondary); margin: -8px 0 14px; }

.period-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.period-tab { font-size: 13.5px; color: var(--text-secondary); padding-bottom: 10px; white-space: nowrap; font-weight: 500; }
.period-tab.active { color: var(--dark); font-weight: 700; border-bottom: 2px solid var(--dark); }

.sub-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.sub-tab { font-size: 14px; color: var(--text-secondary); padding-bottom: 10px; font-weight: 500; }
.sub-tab.active { color: var(--dark); font-weight: 700; border-bottom: 2px solid var(--dark); }

.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.5rem; }
.metric-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.metric-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.metric-value { font-size: 20px; font-weight: 800; }
.metric-chevron { color: var(--text-secondary); font-weight: 400; float: right; }

.section-lead { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 1rem; }

.price-box {
  border: 1.5px solid var(--dark); border-radius: 12px;
  padding: 1rem 1.2rem; margin-bottom: 12px; max-width: 220px;
}
.price-amount { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.price-room-name { font-size: 14px; font-weight: 600; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.price-room-count { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state-icon { font-size: 44px; margin-bottom: 12px; opacity: 0.6; }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--text-secondary); }

.wallet-card {
  background: linear-gradient(135deg, #1a1a1a, #2d2440);
  color: #fff; border-radius: 16px; padding: 1.4rem; margin-bottom: 1.25rem;
}
.wallet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.wallet-title { font-size: 14px; font-weight: 700; }
.wallet-add-btn {
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.wallet-label { font-size: 11px; color: #b8b3c4; letter-spacing: 0.5px; margin-bottom: 4px; }
.wallet-balance { font-size: 28px; font-weight: 800; margin-bottom: 1.1rem; }
.wallet-split { display: flex; justify-content: space-between; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 14px; font-size: 15px; font-weight: 700; }
.wallet-split-label { font-size: 11px; color: #b8b3c4; font-weight: 500; }

.menu-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; text-decoration: none; color: var(--dark);
  border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 500;
}
.menu-list-item:last-child { border-bottom: none; }
.menu-icon { font-size: 17px; width: 20px; text-align: center; }
.menu-label { flex: 1; }
.menu-chevron { color: var(--text-secondary); }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 1.5rem; }
.stat-card {
  background: #fff; border-radius: 14px; padding: 1.1rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.stat-label { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }

/* Cards */
.card {
  background: #fff; border-radius: 16px; padding: 1.4rem;
  border: 1px solid var(--border); margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.room-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-top: 1px solid var(--border); font-size: 13.5px;
}
.room-item:first-child { border-top: none; }
.room-item .room-price { font-weight: 700; color: var(--accent); }

.meta-line { font-size: 13.5px; color: #444; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* Room type add list (HotelProfile.aspx) */
.wide-card { max-width: 520px; }
.two-col { display: flex; gap: 10px; }
.two-col > div { flex: 1; }
.room-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.room-row .form-input { margin: 0; }
.room-row-name { flex: 2; }
.room-row-count { flex: 1; }
.room-row-price { flex: 1; }
.room-list-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--accent-light); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; font-size: 13px;
  font-weight: 600; color: var(--accent-dark);
}

/* ============ MOBILE BOTTOM NAV (OYO-style tab bar) ============ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}
.mobile-bottom-nav .nav-row { display: flex; justify-content: space-around; }
.mobile-bottom-nav .mnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; color: var(--text-secondary);
  font-size: 10.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 10px;
  background: none; border: none; cursor: pointer;
}
.mobile-bottom-nav .mnav-item .mnav-icon { font-size: 19px; }
.mobile-bottom-nav .mnav-item.active { color: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .app-sidebar { display: none; }
  .mobile-bottom-nav { display: block; }

  .app-topbar { padding: 0.85rem 1rem; }
  .app-topbar h1 { font-size: 16px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }

  .app-content { padding: 1rem; padding-bottom: 84px; }

  .promo-banner { padding: 0.9rem 1rem; border-radius: 12px; }
  .promo-banner h3 { font-size: 14px; }
  .promo-banner p { font-size: 12.5px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 0.85rem; border-radius: 12px; }
  .stat-value { font-size: 20px; }

  .card { padding: 1.1rem; border-radius: 14px; }
}

@media (max-width: 420px) {
  body.auth-body { padding: 0.5rem; align-items: flex-start; padding-top: 2rem; }
  .auth-card { padding: 1.6rem 1.25rem; border-radius: 16px; }
  h2 { font-size: 19px; }
  .form-input { padding: 11px 12px; font-size: 15px; } /* 15px avoids iOS auto-zoom on focus */
  .btn-primary { padding: 13px; font-size: 14px; }

  .two-col { flex-direction: row; gap: 8px; }
  .room-row { flex-wrap: wrap; }
  .room-row-name { flex: 1 1 100%; }
  .room-row-count, .room-row-price { flex: 1 1 45%; }

  .wide-card { max-width: 100%; }
}
