html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  background: #f4f7fb;
}

.siteon-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.siteon-brand:hover,
.siteon-brand:focus {
  color: #fff;
}

.siteon-brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 12px rgba(8, 26, 44, 0.18));
}

.siteon-brand-wordmark {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.siteon-brand-primary {
  color: #0f5f86;
}

.siteon-brand-accent {
  color: #42b468;
}

.siteon-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.siteon-login-mark {
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 auto;
}

@media (max-width: 575.98px) {
  .siteon-brand-wordmark {
    font-size: 1.6rem;
  }

  .siteon-brand-mark {
    width: 2.3rem;
    height: 2.3rem;
  }

  .siteon-login-brand {
    gap: 0.75rem;
  }

  .siteon-login-mark {
    width: 3.75rem;
    height: 3.75rem;
  }
}

.hero-gradient {
  background: linear-gradient(135deg, #0d6efd, #4f9dff);
}

.card {
  border-radius: 1rem;
}

.report-bar {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.report-bar span {
  display: inline-block;
  height: .75rem;
  border-radius: 999px;
}

.report-bar .income {
  background: #198754;
}

.report-bar .expense {
  background: #dc3545;
}

.report-chart {
  position: relative;
  min-height: 320px;
}

.report-chart canvas {
  width: 100% !important;
  height: 320px !important;
}

.report-item-table th,
.report-item-table td {
  white-space: nowrap;
}

.reservation-management .card-header {
  background: linear-gradient(180deg, rgba(15, 95, 134, 0.06), rgba(15, 95, 134, 0));
}

.reservation-calendar {
  display: grid;
  gap: 0.75rem;
  max-height: min(68vh, 44rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.reservation-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border: 1px solid #d9e4ef;
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.reservation-slot.available {
  border-color: #cdebd8;
  background: linear-gradient(180deg, #f4fbf7, #fff);
}

.reservation-slot.reserved {
  border-color: #f1c4cc;
  background: linear-gradient(180deg, #fff6f8, #fff);
}

.reservation-slot.available:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.6rem 1.4rem rgba(15, 95, 134, 0.10);
}

.reservation-slot-time {
  min-width: 96px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #183246;
}

.reservation-slot-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reservation-slot.available .reservation-slot-status {
  color: #0f7a45;
}

.reservation-slot.reserved .reservation-slot-status {
  color: #b4233b;
}

.reservation-slot-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.15rem;
}

@media (max-width: 991.98px) {
  .reservation-slot {
    flex-direction: column;
    align-items: flex-start;
  }

  .reservation-slot-details {
    align-items: flex-start;
    text-align: left;
  }
}

/* ── App Shell (Sidebar Layout) ─────────────────────────── */
.app-body {
  display: flex;
  min-height: 100vh;
  background: #f4f7fb;
}

.app-sidebar {
  width: 240px;
  min-width: 240px;
  background: #0f5f86;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

.app-shell {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* Sidebar Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand:hover { color: #fff; }

.sidebar-brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.sidebar-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar-brand-wordmark {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.sidebar-product-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
  color: #fff;
  margin-top: 0.15rem;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0 0.75rem;
  overflow-y: auto;
}

.sidebar-group-header {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0.9rem 1.125rem 0.3rem;
}

.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.sidebar-group-toggle .sidebar-group-header {
  margin: 0;
  padding-right: 0.5rem;
}

.sidebar-group-caret {
  color: rgba(255,255,255,0.55);
  margin-right: 1rem;
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.sidebar-group-toggle.expanded .sidebar-group-caret {
  transform: rotate(180deg);
}

.sidebar-group-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.sidebar-group-panel.expanded {
  max-height: 1200px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.625rem;
  margin: 0.1rem 0.625rem;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 450;
  border-radius: 0.375rem;
  transition: background 0.12s, color 0.12s;
}

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

.sidebar-link.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-weight: 600;
}

.sidebar-link i {
  width: 1.1rem;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.9;
}

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

.sidebar-user-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.sidebar-user-details {
  min-width: 0;
  flex: 1;
}

.sidebar-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.22);
}

.sidebar-user-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
}

.sidebar-user-name {
  display: block;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-name:hover {
  color: #fff;
  text-decoration: underline;
}

.sidebar-user-meta:hover .sidebar-user-name {
  text-decoration: underline;
}

.sidebar-user-role {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Top Bar */
.app-topbar {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.topbar-toggle {
  background: none;
  border: none;
  padding: 0.25rem 0.375rem;
  color: #6c757d;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  display: none;
}

.topbar-tenant {
  font-size: 0.875rem;
  font-weight: 600;
  color: #212529;
  flex: 1;
  min-width: 0;
}

.topbar-tenant-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
}

.topbar-tenant-logo {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background: #fff;
  flex-shrink: 0;
}

.topbar-tenant-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Main Content */
.app-main {
  flex: 1;
  padding: 1.75rem 2rem;
}

/* App Footer */
.app-footer {
  border-top: 1px solid #dee2e6;
  padding: 0.75rem 2rem;
  background: #fff;
  flex-shrink: 0;
}

/* ── Page Header (Hero) ───────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #e9ecef;
}

.page-breadcrumb {
  font-size: 0.78rem;
  color: #6c757d;
  margin-bottom: 0.2rem;
}

.page-breadcrumb a {
  color: #0d6efd;
  text-decoration: none;
}

.page-breadcrumb a:hover { text-decoration: underline; }

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
  line-height: 1.25;
}

.page-subtitle {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 0.3rem 0 0;
}

/* ── Table polish ─────────────────────────────────────────── */
.table-actions { white-space: nowrap; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  }
  .app-shell {
    margin-left: 0;
  }
  .topbar-toggle {
    display: block;
  }
  .app-main {
    padding: 1.25rem 1rem;
  }
}

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

.sidebar-backdrop.show { display: block; }

.login-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(150deg, #eaf1fb 0%, #f4f7fb 50%, #eaf5f0 100%);
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.login-card-wrapper {
  width: 100%;
  max-width: 430px;
}

.login-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 12px 40px rgba(13,110,253,0.10);
  padding: 2.75rem 2.75rem 2.25rem;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.login-brand-mark {
  width: 3.75rem;
  height: 3.75rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(8,26,44,0.15));
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.login-brand-wordmark {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.login-product-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c757d;
}

.login-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
  text-align: center;
  margin-bottom: 0.3rem;
}

.login-subtitle {
  color: #6c757d;
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.login-label {
  font-weight: 500;
  color: #344054;
  margin-bottom: 0.375rem;
}

.login-btn {
  border-radius: 0.625rem;
  letter-spacing: 0.01em;
  transition: box-shadow 0.15s ease;
}

.login-btn:hover {
  box-shadow: 0 4px 14px rgba(13,110,253,0.35);
}

.login-demo-credentials summary {
  cursor: pointer;
  user-select: none;
}

.login-demo-credentials summary:hover {
  color: #0d6efd;
}

.login-page-footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
}

.login-footer-brand {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 1rem;
  }

  .login-brand-wordmark {
    font-size: 1.75rem;
  }

  .login-brand-mark {
    width: 3.25rem;
    height: 3.25rem;
  }
}
