/* =========================================================
   Alvantech Hotel PMS - Admin Theme
   A clean, professional theme layered on top of Bootstrap 5.
   ========================================================= */

:root {
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 84px;
  --topbar-height: 64px;
  --brand-primary: #14532d;
  --brand-primary-dark: #0f3d21;
  --brand-accent: #d4a017;
  --surface: #f4f6f8;
  --card-border: #e7eaee;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--surface);
  color: #1f2937;
}

a { text-decoration: none; }

/* ---------------------------------------------------------
   Login screen
   --------------------------------------------------------- */
.login-body {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 60%, #0a2716 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto;
}

/* ---------------------------------------------------------
   App shell
   --------------------------------------------------------- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--brand-primary-dark);
  color: #e6efe9;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, width 0.25s ease;
}

.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-brand a { color: #fff; overflow: hidden; }

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-accent);
  color: #23260e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.sidebar-brand-text {
  margin-left: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.75rem 0.6rem;
}

.sidebar-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(230,239,233,0.5);
  padding: 0.9rem 0.6rem 0.35rem;
  font-weight: 600;
}

.sidebar-nav .nav-link {
  color: #cfe0d5;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i {
  width: 20px;
  margin-right: 0.65rem;
  font-size: 1rem;
  text-align: center;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: var(--brand-accent);
  color: #23260e;
  font-weight: 600;
}

.badge-soon {
  margin-left: auto;
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  color: #d7e3da;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-nav .nav-link.active .badge-soon {
  background: rgba(0,0,0,0.15);
  color: #23260e;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1035;
}

/* Main content area */
.main-content {
  flex: 1 1 auto;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s ease;
}

body.sidebar-collapsed .sidebar { width: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-heading,
body.sidebar-collapsed .sidebar-nav .nav-link span,
body.sidebar-collapsed .sidebar-nav .badge-soon { display: none; }
body.sidebar-collapsed .sidebar-nav .nav-link { justify-content: center; }
body.sidebar-collapsed .sidebar-nav .nav-link i { margin-right: 0; }

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  gap: 0.75rem;
}

.topbar-toggle {
  border: 1px solid var(--card-border);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  flex: 1 1 auto;
}

.topbar-user {
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 0.25rem 0.4rem;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Page content */
.page-content {
  flex: 1 1 auto;
  padding: 1.5rem;
}

.page-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Cards */
.card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  border-radius: 12px 12px 0 0 !important;
}

.stat-card .card-body { padding: 1.15rem; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: #6b7280;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6b7280;
}

.empty-state i {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.75rem;
  color: #9ca3af;
}

.placeholder-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff7e0;
  color: var(--brand-accent);
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.activity-list .list-group-item { padding: 0.75rem 1rem; }

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}
.btn-outline-primary {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-outline-primary:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .main-content {
    margin-left: 0 !important;
  }
}

@media (max-width: 575.98px) {
  .page-content { padding: 1rem; }
  .topbar { padding: 0 0.85rem; }
}
