html {
  font-size: 14px;
}

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

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  background-color: var(--pg-body-bg);
  color: var(--pg-body-fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
}

/* Design tokens */

:root {
  --pg-body-bg: #f3f4f6;
  --pg-body-fg: #0f172a;
  --pg-surface-bg: #ffffff;
  --pg-border-subtle: #e5e7eb;
  --pg-accent: #22c55e;
  --pg-accent-soft: #dcfce7;
  --pg-sidebar-bg: #ffffff;
  --pg-sidebar-fg: #0f172a;
}

body[data-theme="dark"] {
  --pg-body-bg: #020617;
  --pg-body-fg: #e5e7eb;
  --pg-surface-bg: #020617;
  --pg-border-subtle: #1f2937;
  --pg-accent: #22c55e;
  --pg-accent-soft: #14532d;
  --pg-sidebar-bg: #0b1220;
  --pg-sidebar-fg: #e5e7eb;
}

body[data-theme="dark"] .navbar,
body[data-theme="dark"] .customer-header,
body[data-theme="dark"] .admin-topbar {
  background-color: #020617 !important;
  border-color: #111827 !important;
}

body[data-theme="dark"] .customer-footer {
  background-color: #020617;
  border-color: #111827;
}

body[data-theme="dark"] .admin-sidebar {
  border-right-color: #111827;
}

body[data-theme="dark"] .sidebar-link {
  color: rgba(226, 232, 240, 0.88);
}

body[data-theme="dark"] .sidebar-link:hover,
body[data-theme="dark"] .sidebar-link.active {
  background: rgba(148, 163, 184, 0.18);
  color: #f8fafc;
}

body[data-theme="dark"] .sidebar-edge-toggle {
  background: rgba(2, 6, 23, 0.78);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="dark"] .card {
  background-color: #020617;
  border-color: #1f2937;
}

body[data-theme="dark"] a { color: #e5e7eb; }

body.rtl {
  direction: rtl;
}

body.rtl .admin-shell {
  flex-direction: row-reverse;
}

body.rtl .sidebar-logo .logo-mark {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* Breadcrumbs should flow RTL in Arabic */
body.rtl .breadcrumbs {
  flex-direction: row;
  justify-content: flex-start;
}

.breadcrumbs {
  direction: ltr;
  flex-wrap: wrap;
  row-gap: 0.25rem;
}

body.rtl .breadcrumbs {
  direction: rtl;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--pg-body-fg);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.crumb:hover {
  background: rgba(148, 163, 184, 0.15);
}

.crumb-sep {
  opacity: 0.55;
  padding: 0 0.25rem;
}

/* Common buttons / utilities */

.btn-ghost {
  border-radius: 999px;
  border: 1px solid transparent;
  background-color: transparent;
  padding-inline: 0.75rem;
  height: 36px;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--pg-body-fg);
  cursor: pointer;
}

.btn-ghost:hover {
  background-color: rgba(148, 163, 184, 0.15);
}

.btn-primary,
.btn-outline {
  height: 36px;
  border-radius: 999px;
  padding: 0 0.95rem;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.08s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #052e16;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

/* btn-danger is always used together with btn-outline so it inherits base layout styles */
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border-color: #dc2626 !important;
}

.btn-danger:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── Profile modal layout ─────────────────────────────────────────────────── */
.pg-profile-body {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 540px) {
  .pg-profile-body { flex-direction: column; align-items: center; }
}

.pg-profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 150px;
}

.pg-profile-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: .75rem;
}

.pg-profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pg-border-subtle);
  background: var(--pg-sidebar-bg);
}

.pg-profile-avatar-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--pg-surface-bg);
  background: #22c55e;
  color: #fff;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}

.pg-profile-avatar-btn:hover { background: #16a34a; }

.pg-profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pg-body-fg);
  text-align: center;
  word-break: break-word;
}

.pg-profile-email {
  font-size: .8rem;
  color: #64748b;
  text-align: center;
  word-break: break-all;
  margin-top: .15rem;
}

.pg-profile-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding-top: .25rem;
}

.pg-profile-info-row {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .55rem .7rem;
  border-radius: 10px;
  background: var(--pg-sidebar-bg);
}

.pg-profile-info-label {
  color: #64748b;
  font-size: 1rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  margin-top: .05rem;
}

.pg-profile-info-value {
  font-size: .9rem;
  color: var(--pg-body-fg);
  word-break: break-word;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--pg-body-fg);
}

body[data-theme="dark"] .btn-outline {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
}

.btn-outline:hover {
  transform: translateY(-1px);
}

.muted {
  color: rgba(100, 116, 139, 1);
}

body[data-theme="dark"] .muted {
  color: rgba(148, 163, 184, 1);
}

.pg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 12px;
  line-height: 1;
}

.pg-dropdown {
  position: relative;
}

.pg-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: var(--pg-surface-bg);
  border: 1px solid var(--pg-border-subtle);
  border-radius: 14px;
  padding: 0.35rem;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.18);
  display: none;
  z-index: 1200;
}

body.rtl .pg-dropdown-menu {
  right: auto;
  left: 0;
}

.pg-dropdown.open .pg-dropdown-menu {
  display: block;
}

.pg-dropdown-item,
.pg-dropdown-link {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--pg-body-fg);
  text-decoration: none;
  cursor: pointer;
}

.pg-dropdown-item:hover,
.pg-dropdown-link:hover {
  background: rgba(148, 163, 184, 0.15);
}

.pg-dropdown-link.danger {
  color: #ef4444;
}

.pg-dropdown-sep {
  height: 1px;
  background: var(--pg-border-subtle);
  margin: 0.35rem 0.25rem;
}

.chevron {
  opacity: 0.7;
  font-size: 0.85rem;
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.3);
  color: #e5e7eb;
}

.btn-icon-only:hover {
  background: rgba(148, 163, 184, 0.3);
}

.topbar-icon-btn {
  background: rgba(255, 255, 255, 0.65);
  color: var(--pg-body-fg);
}

body[data-theme="dark"] .topbar-icon-btn {
  background: rgba(2, 6, 23, 0.55);
  color: #e5e7eb;
}

.lang-pill {
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 12px;
}

/* Admin layout */

.admin-layout {
  background: radial-gradient(circle at top left, #eff6ff, #f9fafb);
}

body[data-theme="dark"].admin-layout {
  background: radial-gradient(circle at top left, #020617, #020617);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--pg-sidebar-bg);
  color: var(--pg-sidebar-fg);
  padding: 1rem;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  transition: width 0.2s ease, transform 0.2s ease;
  border-right: 1px solid var(--pg-border-subtle);
}

body.rtl .admin-sidebar {
  left: auto;
  right: 0;
  border-right: 0;
  border-left: 1px solid var(--pg-border-subtle);
}

.sidebar-edge-toggle {
  position: fixed;
  z-index: 1100;
  top: 16px;
  left: 260px;
  transform: translateX(-50%);
  background: var(--pg-surface-bg);
  color: var(--pg-body-fg);
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.18);
}

body.sidebar-collapsed .sidebar-edge-toggle {
  left: 80px;
}

body.rtl .sidebar-edge-toggle {
  left: auto;
  right: 260px;
  transform: translateX(50%);
}

body.rtl.sidebar-collapsed .sidebar-edge-toggle {
  right: 80px;
}

.sidebar-nav {
  margin-top: 1rem;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-link {
  color: rgba(15, 23, 42, 0.85);
  padding: 0.55rem 0.75rem;
  border-radius: 0.85rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  position: relative;
}

.admin-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Tooltip for collapsed sidebar */
.admin-sidebar.collapsed .sidebar-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--pg-surface-bg);
  border: 1px solid var(--pg-border-subtle);
  color: var(--pg-body-fg);
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.18);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

body.rtl .admin-sidebar.collapsed .sidebar-link::after {
  left: auto;
  right: calc(100% + 10px);
}

.admin-sidebar.collapsed .sidebar-link:hover::after {
  opacity: 1;
}

body[data-theme="dark"] .admin-sidebar.collapsed .sidebar-link::after {
  background: #0b1220;
  border-color: #111827;
  color: #e5e7eb;
}

.sidebar-link i {
  font-size: 1.05rem;
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(15, 23, 42, 0.95);
}

.admin-sidebar.collapsed {
  width: 80px;
}

.admin-sidebar.collapsed .nav-text,
.admin-sidebar.collapsed .logo-text,
.admin-sidebar.collapsed .sidebar-section-title {
  display: none !important;
}

.sidebar-header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--pg-border-subtle);
}

.sidebar-logo .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.sidebar-logo .logo-text {
  font-size: 0.9rem;
}

.sidebar-nav .nav-link {
  color: #cbd5f5;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.sidebar-nav .nav-link i {
  font-size: 1.05rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(148, 163, 184, 0.25);
  color: #f9fafb;
}

.sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.75rem 0.2rem 0.25rem;
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  overflow-x: clip;
  transition: margin-left 0.2s ease;
}

.admin-sidebar.collapsed + .admin-main {
  margin-left: 80px;
}

/* Ensure main content responds even if DOM structure changes */
body.sidebar-collapsed .admin-main {
  margin-left: 80px;
}

body.rtl.sidebar-collapsed .admin-main {
  margin-left: 0;
  margin-right: 80px;
}

body.rtl .admin-main {
  margin-left: 0;
  margin-right: 260px;
}

body.rtl.sidebar-collapsed .admin-main {
  margin-right: 80px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 64px;
  padding: 0 1rem;
  background-color: var(--pg-surface-bg);
  border-bottom: 1px solid var(--pg-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  font-weight: 900;
  letter-spacing: 0.01em;
}

.admin-breadcrumbbar {
  position: sticky;
  top: 64px;
  z-index: 1015;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--pg-border-subtle);
  padding: 0.6rem 1rem;
  margin-top: 20px;
}

body[data-theme="dark"] .admin-breadcrumbbar {
  background: rgba(2, 6, 23, 0.78);
  border-bottom-color: #111827;
}

.admin-content {
  padding: 1.5rem 1.75rem;
  min-width: 0;
  overflow-x: hidden;
}

/* Topbar expands with admin-main width when sidebar collapses */

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-sidebar-toggle {
  display: none;
}

.breadcrumbs {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline-start: 0.75rem;
}

.breadcrumbs .breadcrumb-root {
  font-weight: 500;
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 999px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  height: 36px;
  border-radius: 999px;
}

.user-name {
  font-weight: 600;
}

.stat-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), var(--pg-surface-bg));
}

.stat-icon-pill {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--pg-accent-soft);
  color: var(--pg-accent);
}

/* Generic layout components */

.pg-container {
  max-width: 1200px;
  margin: 0 auto;
}

.pg-grid {
  display: grid;
  gap: 1rem;
}

.pg-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pg-grid-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.pg-col-8 { grid-column: span 8; }
.pg-col-4 { grid-column: span 4; }

@media (max-width: 1100px) {
  .pg-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pg-col-8, .pg-col-4 { grid-column: span 12; }
}

.mb-4 { margin-bottom: 1.5rem; }

.pg-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--pg-surface-bg);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.08);
}

/* Modal */
.pg-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
}

.pg-modal.academy-booking-confirm-modal {
  z-index: 3100;
}

.academy-bk-stat-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  margin-top: 0.5rem;
}
.academy-bk-stat-badges .pg-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.academy-bk-stat-badges .academy-bk-st-total {
  background: color-mix(in srgb, var(--pg-accent) 18%, transparent);
  color: var(--pg-accent);
  border: 1px solid color-mix(in srgb, var(--pg-accent) 35%, transparent);
}
.academy-bk-stat-badges .academy-bk-st-booked {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.academy-bk-stat-badges .academy-bk-st-busy {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.academy-bk-stat-badges .academy-bk-st-available {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.academy-bk-selection-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pg-accent) 12%, var(--pg-surface, #fff));
  color: var(--pg-text, #0f172a);
  border: 1px solid color-mix(in srgb, var(--pg-accent) 28%, var(--pg-border-subtle, #e2e8f0));
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
  white-space: normal;
  word-break: break-word;
}

.academy-new-bk-slots-host .tabulator-row {
  cursor: pointer;
}

.academy-bk-confirm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.academy-bk-confirm-table th,
.academy-bk-confirm-table td {
  padding: 0.5rem 0.65rem;
  text-align: start;
  border-bottom: 1px solid var(--pg-border-subtle);
}
.academy-bk-confirm-table th {
  font-weight: 700;
  color: var(--pg-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
}

.pg-modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 2rem));
  min-width: 280px;
  min-height: 180px;
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  border-radius: 18px;
  background: var(--pg-surface-bg);
  border: 1px solid var(--pg-border-subtle);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.35);
  overflow: hidden;
  resize: both;
  display: flex;
  flex-direction: column;
}

.pg-modal-sm {
  width: min(420px, calc(100vw - 2rem));
}

.pg-modal-md {
  width: min(600px, calc(100vw - 2rem));
}

.pg-modal-lg {
  width: min(880px, calc(100vw - 2rem));
}

.pg-modal-header {
  cursor: grab;
  user-select: none;
}

.pg-modal-header.pg-modal-dragging {
  cursor: grabbing;
}

.pg-modal-header,
.pg-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--pg-border-subtle);
}

.pg-modal-footer {
  border-bottom: 0;
  border-top: 1px solid var(--pg-border-subtle);
  justify-content: flex-end;
  gap: 0.5rem;
}

.pg-modal-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

body[data-theme="dark"] .pg-modal-panel {
  border-color: #111827;
}

/* Tabulator theme overrides to match admin UI */
.tabulator {
  border: 1px solid var(--pg-border-subtle) !important;
  border-radius: 16px;
  overflow: hidden;
  background: var(--pg-surface-bg) !important;
  color: var(--pg-body-fg) !important;
  /* Let pg-table-host be the horizontal scroll container */
  width: 100% !important;
}

body[data-theme="dark"] .tabulator {
  background: var(--pg-surface-bg) !important;
}

.tabulator .tabulator-tableholder {
  min-height: 0;
  overflow-x: auto !important;
  background: transparent !important;
}

.tabulator .tabulator-table {
  background: transparent !important;
}

.tabulator .tabulator-header {
  background: transparent !important;
  border-bottom: 1px solid var(--pg-border-subtle) !important;
}

.tabulator .tabulator-header .tabulator-col {
  background: transparent !important;
  border-right: 1px solid rgba(148, 163, 184, 0.18) !important;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  font-weight: 900;
}

.tabulator .tabulator-header-filter input,
.tabulator .tabulator-header-filter select {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.85);
  padding: 0 0.65rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.82rem;
}

.tabulator .tabulator-header-filter {
  padding: 4px 6px;
}

body[data-theme="dark"] .tabulator .tabulator-header-filter input,
body[data-theme="dark"] .tabulator .tabulator-header-filter select {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

/* Angle arrow indicator for native select dropdown filters */
.tabulator .tabulator-header-filter select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M3.204 5.5L8 10.296 12.796 5.5H3.204z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 12px 12px;
}

body[data-theme="dark"] .tabulator .tabulator-header-filter select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23cbd5f5' viewBox='0 0 16 16'%3E%3Cpath d='M3.204 5.5L8 10.296 12.796 5.5H3.204z'/%3E%3C/svg%3E");
}

/* ── Custom pg-ms multi-select filter ── */
.pg-ms-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.85);
  color: var(--pg-body-fg);
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}

body[data-theme="dark"] .pg-ms-btn {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

.pg-ms-btn:hover {
  border-color: rgba(34, 197, 94, 0.55);
}

.pg-ms-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.pg-ms-arrow {
  font-size: 0.7rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.pg-ms-menu {
  min-width: 160px;
  z-index: 9999;
}

.tabulator .tabulator-header-filter input:focus,
.tabulator .tabulator-header-filter select:focus {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.tabulator .tabulator-row {
  background: var(--pg-surface-bg) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
}

body[data-theme="dark"] .tabulator .tabulator-row {
  background: var(--pg-surface-bg) !important;
}

.tabulator .tabulator-row.tabulator-row-even {
  background: rgba(148, 163, 184, 0.04) !important;
}

body[data-theme="dark"] .tabulator .tabulator-row.tabulator-row-even {
  background: rgba(148, 163, 184, 0.06) !important;
}

.tabulator .tabulator-cell {
  color: var(--pg-body-fg) !important;
  padding: 0.6rem 0.75rem !important;
  font-size: 0.92rem;
  white-space: nowrap;
}

body[data-theme="dark"] .tabulator .tabulator-cell {
  color: var(--pg-body-fg) !important;
}

.tabulator .tabulator-row:hover .tabulator-cell {
  background: rgba(148, 163, 184, 0.10) !important;
}

.tabulator .tabulator-header .tabulator-col-content {
  padding: 0.5rem 0.75rem !important;
}

.tabulator .tabulator-col-title {
  color: var(--pg-body-fg) !important;
}

.tabulator .tabulator-footer {
  background: transparent !important;
  border-top: 1px solid var(--pg-border-subtle) !important;
}

.tabulator .tabulator-paginator button {
  border-radius: 999px !important;
}

body.rtl .tabulator {
  direction: rtl;
}

.pg-tablebar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.pg-tablebar .left,
.pg-tablebar .right {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.pg-input {
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.70);
  padding: 0 0.9rem;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

body[data-theme="dark"] .pg-input {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

.pg-input:focus {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.pg-input-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pg-autofill-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
  top: -9999px;
}

@keyframes pgAutofillStart { from { } to { } }

input:-webkit-autofill {
  animation-name: pgAutofillStart;
  animation-duration: 0.01s;
}

.pg-input-icon i {
  position: absolute;
  left: 12px;
  opacity: 0.7;
}

body.rtl .pg-input-icon i {
  left: auto;
  right: 12px;
}

.pg-input-icon .pg-input {
  padding-left: 2.2rem;
}

body.rtl .pg-input-icon .pg-input {
  padding-left: 0.9rem;
  padding-right: 2.2rem;
}

.pg-table-host {
  min-height: 80px;
  overflow: visible;
}

/* Record count bar below the table */
.pg-record-count {
  font-size: 0.82rem;
  color: #64748b;
  padding: 0.4rem 0.1rem 0;
}

body[data-theme="dark"] .pg-record-count {
  color: #94a3b8;
}

/* Status / role badges */
.pg-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
}

.pg-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

body[data-theme="dark"] .pg-badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.pg-badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pg-badge-warning {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
body[data-theme="dark"] .pg-badge-warning {
  background: rgba(234, 179, 8, 0.1);
  color: #fbbf24;
}

.pg-badge-primary {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
body[data-theme="dark"] .pg-badge-primary {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.pg-badge-info {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
body[data-theme="dark"] .pg-badge-info {
  background: rgba(6, 182, 212, 0.1);
  color: #22d3ee;
}
.pg-badge-academy {
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.35);
}
body[data-theme="dark"] .pg-badge-academy {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}
.pg-badge-customer {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.35);
}
body[data-theme="dark"] .pg-badge-customer {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
}

body[data-theme="dark"] .pg-badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.pg-table-nowrap .tabulator-cell {
  white-space: nowrap;
  overflow: visible;
}
.pg-table-host .tabulator-tableHolder {
  overflow-x: auto;
}

.pg-simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.pg-simple-table th, .pg-simple-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--pg-border-subtle);
}
.pg-simple-table th {
  font-weight: 600;
  color: var(--pg-body-fg);
}

/* Admin footer */
.admin-footer {
  margin-top: auto;
  padding: 0.75rem 1.75rem;
  border-top: 1px solid var(--pg-border-subtle);
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body[data-theme="dark"] .admin-footer {
  border-top-color: #111827;
  color: #94a3b8;
}

/* ══ Roles & Access combined layout ═════════════════════════════════════════ */
.pg-roles-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.25rem;
  align-items: start;
  min-height: 0;
}
@media (max-width: 900px) {
  .pg-roles-layout { grid-template-columns: 1fr; }
}
.pg-roles-panel,
.pg-perms-panel {
  min-height: 0;
}

/* Role list rows */
.pg-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--pg-border);
  transition: background .15s;
  cursor: default;
}
.pg-role-row:last-child { border-bottom: none; }
.pg-role-row:hover { background: var(--pg-hover-bg); }
.pg-role-row.selected {
  background: color-mix(in srgb, var(--pg-accent) 10%, transparent);
  border-inline-start: 3px solid var(--pg-accent);
}
.pg-role-row-info { flex: 1; min-width: 0; padding-inline-end: .5rem; }
.pg-role-row-name { font-weight: 600; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pg-role-row-desc { font-size: .8rem; margin-top: .2rem; }
.pg-role-row-meta { font-size: .78rem; margin-top: .2rem; display: flex; align-items: center; gap: .3rem; }
.pg-role-row-actions { display: flex; gap: .35rem; flex-shrink: 0; }

/* Permission matrix */
.pg-perm-admin-note {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: color-mix(in srgb, var(--pg-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--pg-accent) 25%, transparent);
  border-radius: 8px;
  padding: .65rem 1rem;
  margin-bottom: 1rem;
  font-size: .875rem;
  color: var(--pg-accent);
}

.pg-perm-section {
  border: 1px solid var(--pg-border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.pg-perm-section-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  background: var(--pg-sidebar-bg);
  font-weight: 600;
  font-size: .92rem;
  flex-wrap: wrap;
}

.pg-perm-access-toggle {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  background: color-mix(in srgb, var(--pg-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--pg-accent) 30%, transparent);
  border-radius: 20px;
  padding: .2rem .65rem;
  color: var(--pg-accent);
  transition: background .15s;
}
.pg-perm-access-toggle:hover { background: color-mix(in srgb, var(--pg-accent) 20%, transparent); }

.pg-perm-access-label { pointer-events: none; }

.pg-perm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem 1rem;
}

.pg-perm-check {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  font-size: .855rem;
  padding: .3rem .7rem;
  border-radius: 6px;
  border: 1px solid var(--pg-border);
  background: var(--pg-card-bg);
  transition: background .12s, border-color .12s;
  user-select: none;
}
.pg-perm-check:hover { background: var(--pg-hover-bg); border-color: var(--pg-accent); }
.pg-perm-check input { accent-color: var(--pg-accent); width: 14px; height: 14px; }
.pg-perm-check.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* Save success flash */
.btn-success-flash {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}

body[data-theme="dark"] .pg-perm-section-header {
  background: rgba(255,255,255,.04);
}
body[data-theme="dark"] .pg-perm-check {
  background: var(--pg-card-bg);
}

/* Admin playground photos + wide modal */
.pg-modal-wide {
  max-width: min(920px, 96vw) !important;
  width: 100%;
  max-height: calc(100vh - 2rem);
}

/* Mini stat dashboards (booking times, bookings) */
.pg-mini-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.pg-mini-dash.pg-mini-dash--hidden {
  display: none !important;
}
.pg-stat-card {
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  background: var(--pg-surface-bg);
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .25s ease, transform .25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pg-stat-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06);
  transform: translateY(-2px);
}
body[data-theme="dark"] .pg-stat-card {
  box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
}
body[data-theme="dark"] .pg-stat-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.25);
}
.pg-stat-card .pg-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.pg-stat-card.pg-stat-accent-total .pg-stat-icon { background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); color: #fff; }
.pg-stat-card.pg-stat-accent-ok .pg-stat-icon { background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%); color: #fff; }
.pg-stat-card.pg-stat-accent-booked .pg-stat-icon { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); color: #fff; }
.pg-stat-card.pg-stat-accent-busy .pg-stat-icon { background: linear-gradient(135deg, #f97316 0%, #fb923c 100%); color: #fff; }
.pg-stat-card.pg-stat-accent-money .pg-stat-icon { background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%); color: #fff; }
.pg-stat-card .pg-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
body[data-theme="dark"] .pg-stat-card .pg-stat-label {
  color: #94a3b8;
}
.pg-stat-card .pg-stat-value {
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--pg-body-fg);
  letter-spacing: -0.02em;
}

.pg-table-placeholder {
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 1px dashed var(--pg-border-subtle);
  border-radius: 16px;
  margin-top: 0.35rem;
  background: rgba(148, 163, 184, 0.07);
}
body[data-theme="dark"] .pg-table-placeholder {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.45);
}
.pg-photo-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.pg-photo-admin-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  background: var(--pg-card-bg);
}
.pg-photo-admin-thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.pg-photo-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pg-photo-admin-fields {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  min-width: 0;
}
.pg-photo-order-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
}
.pg-photo-order-input {
  width: 4.5rem !important;
  padding: 0.25rem 0.4rem !important;
  font-size: 0.85rem !important;
}
.pg-photo-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.pg-photo-admin-move {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}

.pg-day-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--pg-border);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.pg-day-chip:has(input:checked) {
  border-color: var(--pg-accent);
  background: color-mix(in srgb, var(--pg-accent) 12%, transparent);
}

/* Customer playground grid + slider */
.pg-playground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.pg-playground-card {
  border: 1px solid var(--pg-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--pg-card-bg);
}
.pg-slider {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--pg-muted-bg);
  overflow: hidden;
}
.pg-slider-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.25;
}
.pg-slider-track {
  position: absolute;
  inset: 0;
  display: flex;
}
.pg-slide {
  position: absolute;
  inset: 0;
  flex: none;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.pg-slide.active {
  opacity: 1;
  z-index: 1;
}
.pg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.pg-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.pg-slider-btn.prev { left: 8px; }
.pg-slider-btn.next { right: 8px; }
.pg-slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.pg-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}
.pg-slider-dot.active {
  background: #fff;
}
.pg-playground-card-body {
  padding: 1rem 1.1rem 1.15rem;
}
.pg-playground-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.pg-playground-loc {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}
.pg-playground-desc {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.bk-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.bk-slot-card {
  border: 1px solid var(--pg-border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: var(--pg-surface-bg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bk-slot-card label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.bk-slot-card .bk-slot-time {
  font-weight: 600;
  color: var(--pg-body-fg);
}
.bk-slot-card .bk-slot-amount {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.bk-slot-card .bk-slot-amount input {
  width: 80px;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--pg-border);
  border-radius: 6px;
}
.bk-slot-card .bk-slot-amount span {
  font-size: 0.8rem;
  color: #64748b;
}

.pg-playground-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Timings page header */
.timings-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.timings-header-row1 {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-border-subtle);
  border-radius: 12px;
}
.timings-playground-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}
.timings-date-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-border-subtle);
  border-radius: 12px;
  flex-wrap: nowrap;
}
.timings-date-section .timings-nav-arrow {
  flex-shrink: 0;
}
[dir="rtl"] .timings-nav-arrow i { display: inline-block; transform: scaleX(-1); }
.timings-playground-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--pg-accent);
  background: var(--pg-accent-soft);
}
.timings-nav-btn {
  width: 40px; height: 40px;
  min-width: 40px;
  border: 2px solid var(--pg-accent);
  background: var(--pg-accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--pg-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.timings-nav-btn:hover {
  background: var(--pg-accent);
  color: #fff;
}
/* RTL: swap button positions — Prev left, Next right (same as LTR, chevrons unchanged) */
body.rtl .timings-date-section {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
body.rtl .timings-date-section #timingsPrevDate { order: 2; }
body.rtl .timings-date-section #timingsNextDate { order: 0; }
body.rtl .timings-date-section .timings-date-cards { order: 1; }
.timings-date-section #timingsPrevDate { order: 0; }
.timings-date-cards { order: 1; }
.timings-date-section #timingsNextDate { order: 2; }
.timings-date-cards {
  display: flex;
  gap: 0.6rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.25rem;
}
.timings-date-cards::-webkit-scrollbar {
  height: 6px;
}
.timings-date-card {
  flex-shrink: 0;
}
.timings-date-card {
  min-width: 72px;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--pg-border-subtle);
  border-radius: 14px;
  background: var(--pg-surface-bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  color: var(--pg-body-fg);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.timings-date-card:hover {
  border-color: var(--pg-accent);
  background: var(--pg-accent-soft);
}
.timings-date-card.selected {
  border-color: var(--pg-accent);
  background: var(--pg-accent);
  color: #052e16;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.timings-date-card.today:not(.selected) {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  background: var(--pg-accent-soft);
}
.timings-date-card-day { font-size: 0.8rem; font-weight: 600; opacity: 1; }
.timings-date-card-num { font-size: 1.35rem; line-height: 1.2; }
.timings-date-card-month { font-size: 0.75rem; opacity: 0.85; font-weight: 500; }

/* Timings page slot list (checkbox multi-select) */
.timings-slots-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.timings-slot-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--pg-border-subtle);
  border-radius: 10px;
  background: var(--pg-card-bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.timings-slot-row:hover:not(.timings-slot-in-cart) {
  border-color: var(--pg-accent);
  background: var(--pg-accent-soft);
}
.timings-slot-row.timings-slot-in-cart {
  opacity: 0.7;
  cursor: default;
}
.timings-slot-row .timings-slot-check {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}
.timings-slot-row .timings-slot-time {
  flex: 1;
  font-weight: 600;
}
.timings-slot-row .timings-slot-time i {
  margin-right: 0.35rem;
  opacity: 0.8;
}
.timings-slot-row .timings-slot-price {
  font-weight: 700;
  color: var(--pg-accent);
}
.timings-slot-row .timings-slot-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--pg-accent);
  color: #052e16;
  border-radius: 6px;
  font-weight: 600;
}

/* Timings page slot cards (legacy - kept for reference) */
.timings-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.timings-slot-card {
  border: 1px solid var(--pg-border-subtle);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--pg-card-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.timings-slot-card:hover {
  border-color: var(--pg-accent);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.12);
}
.timings-slot-time {
  font-weight: 600;
  font-size: 1rem;
  color: var(--pg-body-fg);
}
.timings-slot-time i {
  margin-right: 0.35rem;
  opacity: 0.7;
}
.timings-slot-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pg-accent);
}
.timings-slot-currency {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
}
.timings-slot-add {
  margin-top: 0.25rem;
}
.timings-slot-add.timings-slot-in-cart {
  opacity: 0.7;
  background: rgba(148, 163, 184, 0.3) !important;
  color: var(--pg-body-fg) !important;
  cursor: pointer;
}

/* Cart page */
.cart-list { display: flex; flex-direction: column; gap: 0; }
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--pg-border-subtle);
  gap: 1rem;
}
.cart-item:last-of-type { border-bottom: none; }
.cart-item-main { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 1rem; }
.cart-item-details { font-size: 0.875rem; margin-top: 0.2rem; }
.cart-item-right { display: flex; align-items: center; gap: 0.75rem; }
.cart-item-price { font-weight: 700; color: var(--pg-accent); font-size: 1.05rem; }
.cart-item-remove {
  width: 36px; height: 36px;
  border: none; background: rgba(239, 68, 68, 0.1);
  color: #dc2626; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.cart-item-remove:hover { background: rgba(239, 68, 68, 0.2); }
.cart-summary {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--pg-border-subtle);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.cart-total-amount { font-weight: 800; font-size: 1.35rem; color: var(--pg-accent); }

.cart-payment-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--pg-border-subtle);
  background: var(--pg-surface-bg);
}
.cart-payment-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pg-muted-fg, #64748b);
  margin-bottom: 0.5rem;
}
.cart-knet-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cart-knet-icon {
  flex-shrink: 0;
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 6px;
}
.cart-knet-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cart-modal.show { display: flex; }
.cart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.cart-modal-panel {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
  border-radius: 14px;
  background: var(--pg-surface-bg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.cart-modal-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.cart-modal-panel p {
  margin: 0 0 1.25rem;
  line-height: 1.55;
  color: var(--pg-muted-fg, #475569);
  font-size: 0.95rem;
}
.cart-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Full-screen KNET redirect loading (blocks page) */
.cart-knet-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10060;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.cart-knet-loading.show {
  display: flex;
}
.cart-knet-loading-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 58, 95, 0.82) 50%, rgba(15, 23, 42, 0.9) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cart-knet-loading-card {
  position: relative;
  max-width: 22rem;
  width: 100%;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 25px 50px -12px rgba(0, 0, 0, 0.35),
    0 0 80px -20px rgba(0, 132, 200, 0.35);
  text-align: center;
  animation: cart-knet-card-in 0.35s ease-out;
}
@keyframes cart-knet-card-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.cart-knet-loading-logo {
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 82, 140, 0.15));
}
.cart-knet-spinner-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.cart-knet-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(0, 132, 200, 0.2);
  border-top-color: #0084c8;
  border-right-color: #00a8e8;
  animation: cart-knet-spin 0.75s linear infinite;
}
@keyframes cart-knet-spin {
  to {
    transform: rotate(360deg);
  }
}
.cart-knet-loading-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}
.cart-knet-loading-sub {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Cart: expired-items modal list */
.cart-expired-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.cart-expired-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pg-border-subtle);
  font-size: 0.9rem;
}
.cart-expired-item:last-child { border-bottom: none; }
.cart-expired-item i { color: #ef4444; font-size: 1.1rem; flex-shrink: 0; }

/* Redirect overlay animated icon */
.cart-redirect-plane {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  position: relative;
}
.cart-redirect-plane svg {
  display: block;
  width: 100%;
  height: 100%;
}
.cart-redirect-plane-path {
  animation: cart-redirect-dash 1.5s ease-in-out infinite;
}
@keyframes cart-redirect-dash {
  0% { stroke-dashoffset: 100; opacity: 0.3; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0.3; }
}
.cart-redirect-arrow {
  animation: cart-redirect-bounce 1.2s ease-in-out infinite;
}
@keyframes cart-redirect-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
.cart-redirect-dots::after {
  content: '';
  animation: cart-redirect-dots-anim 1.4s steps(4, end) infinite;
}
@keyframes cart-redirect-dots-anim {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Payment success page */
.payment-success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: payment-circle-draw 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.payment-success-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: payment-check-draw 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}
@keyframes payment-circle-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes payment-check-draw {
  to { stroke-dashoffset: 0; }
}

/* Booking cards */
.booking-card {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pg-border-subtle);
  transition: background 0.15s;
}
.booking-card:hover { background: var(--pg-surface-bg); }
.booking-card:last-child { border-bottom: none; }
.booking-card-past { opacity: 0.55; }
.booking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.booking-card-name {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.booking-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.booking-card-detail {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--pg-muted);
}
.booking-card-detail i { font-size: 0.95rem; }
.booking-filter-btn.active {
  background: var(--pg-accent);
  color: #fff;
  border-color: var(--pg-accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Auth pages (Login / Register) */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 140px);
}
.auth-page-cover {
  display: block;
  position: relative;
  min-height: calc(100vh - 140px);
}
.auth-page-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.auth-page-form-floating {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 2rem;
}
.auth-page-form {
  width: 100%;
  max-width: 420px;
  background: var(--pg-surface-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border: 1px solid var(--pg-border-subtle);
}
.auth-page-image {
  background-size: cover;
  background-position: center;
  position: relative;
}
.auth-page-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.75), rgba(20, 184, 166, 0.6));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}
.auth-page-tagline {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.auth-page-tagline-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.95);
  margin: 0;
}
.auth-page-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: var(--pg-body-bg);
}
.auth-page-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.auth-page-subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
.auth-page-footer {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}
@media (max-width: 768px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-page-image {
    min-height: 200px;
  }
  .auth-page-tagline { font-size: 1.5rem; }
  .auth-page-tagline-sub { font-size: 0.95rem; }
}

/* Global loading overlay */
.pg-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: auto;
}
body.pg-loading-active {
  overflow: hidden;
}
body.pg-loading-active * {
  pointer-events: none !important;
}
body.pg-loading-active .pg-loading-overlay {
  pointer-events: auto !important;
}
.pg-loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--pg-accent);
  animation: pg-spin 0.9s linear infinite;
}
.pg-loading-spinner i {
  display: block;
}
.pg-loading-text {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}
@keyframes pg-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Toast notifications */
.pg-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.pg-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.pg-toast.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.pg-toast.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #22c55e;
}

/* ── Modal tabs ───────────────────────────────────────────────────────────── */
.pg-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--pg-border-subtle);
  margin-bottom: 0.5rem;
}

.pg-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, border-color 0.15s;
}

.pg-tab:hover {
  color: var(--pg-body-fg);
}

.pg-tab.active {
  color: #22c55e;
  border-bottom-color: #22c55e;
  font-weight: 600;
}

/* ── Actions ──────────────────────────────────────────────────────────────── */
.pg-table-actions {
  display: inline-flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}

.btn-xs {
  height: 28px;
  min-width: 28px;
  padding: 0 0.45rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-action {
  background: var(--pg-surface-bg);
}

.btn-action-danger {
  border-color: rgba(248, 113, 113, 0.55);
  color: #ef4444;
}

.btn-action-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 767.98px) {
  .admin-content {
    overflow-x: hidden;
  }
  .pg-table-host {
    margin-bottom: 0.5rem;
  }
}

/* Pagination styling */
.tabulator .tabulator-footer .tabulator-page {
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  background: rgba(255, 255, 255, 0.65) !important;
  color: var(--pg-body-fg) !important;
  margin: 0 3px !important;
  padding: 6px 10px !important;
}

body[data-theme="dark"] .tabulator .tabulator-footer .tabulator-page {
  background: rgba(2, 6, 23, 0.65) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #e5e7eb !important;
}

.tabulator .tabulator-footer .tabulator-page.active {
  background: rgba(34, 197, 94, 0.18) !important;
  border-color: rgba(34, 197, 94, 0.45) !important;
  font-weight: 900;
}

.tabulator .tabulator-footer .tabulator-page:hover {
  background: rgba(148, 163, 184, 0.12) !important;
}

/* Hide footer when table is empty */
.pg-table-empty .tabulator-footer {
  display: none !important;
}

/* fitColumns fills the container exactly – no filler column needed */
/* Hide any leftover ghost columns just in case (belt-and-suspenders) */
.tabulator .tabulator-col[tabulator-field=""],
.tabulator .tabulator-cell[tabulator-field=""] {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
}

/* Pagination label (page size) */
.tabulator .tabulator-footer .tabulator-page-size-container {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--pg-body-fg);
}

/* Page size select styling — use appearance:none to remove all native/Tabulator arrows */
.tabulator .tabulator-footer .tabulator-page-size {
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  padding: 0.2rem 1.75rem 0.2rem 0.75rem !important;
  background-color: rgba(255, 255, 255, 0.85) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M3.204 5.5L8 10.296 12.796 5.5H3.204z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.6rem center !important;
  background-size: 11px 11px !important;
  font-size: 0.82rem !important;
  color: var(--pg-body-fg) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

body[data-theme="dark"] .tabulator .tabulator-footer .tabulator-page-size {
  background-color: rgba(2, 6, 23, 0.65) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #e5e7eb !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M3.204 5.5L8 10.296 12.796 5.5H3.204z'/%3E%3C/svg%3E") !important;
}

body[data-theme="dark"] .pg-card {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.pg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--pg-border-subtle);
}

.pg-card-title {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pg-card-body {
  padding: 1rem;
}

.pg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.pg-table th,
.pg-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--pg-border-subtle);
  text-align: left;
  white-space: nowrap;
}

body.rtl .pg-table th,
body.rtl .pg-table td {
  text-align: right;
}

.pg-table th {
  font-weight: 900;
}

.pg-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.10);
}

.pg-chip {
  border: 1px solid var(--pg-border-subtle);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
}

.pg-kpi {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pg-kpi-label {
  font-size: 0.85rem;
}

.pg-kpi-value {
  font-size: 1.75rem;
  font-weight: 900;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.collapsed {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  body.rtl .admin-sidebar {
    transform: translateX(100%);
  }

  body.rtl .admin-sidebar.collapsed {
    transform: translateX(0);
  }

  body.rtl .admin-main {
    margin-right: 0;
  }

  .sidebar-edge-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    right: auto;
    transform: none;
    margin: 0;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.18);
  }

  body.rtl .sidebar-edge-toggle {
    left: auto;
    right: 12px;
  }
}

/* Customer layout */

.customer-layout {
  background: radial-gradient(circle at top, #eff6ff, #ffffff);
}

body[data-theme="dark"].customer-layout {
  background: radial-gradient(circle at top, #020617, #020617);
}

.customer-hero {
  position: relative;
  overflow: hidden;
  color: #f9fafb;
  min-height: 100vh;
}

.customer-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: brightness(0.45);
}

body[data-theme="dark"] .customer-hero::before {
  filter: brightness(0.25);
}

.customer-hero-overlay {
  position: relative;
  z-index: 1;
}

.hero-wrap {
  padding: 4.25rem 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #f0fdf4;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  line-height: 1.06;
  margin: 0 0 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero-accent {
  color: #86efac;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(226, 232, 240, 0.9);
  margin: 0 0 1.35rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-lg {
  height: 44px;
  padding: 0 1.1rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  color: rgba(226, 232, 240, 0.92);
  font-weight: 650;
}

.hero-features i {
  color: #86efac;
  margin-right: 0.35rem;
}

body.rtl .hero-features i {
  margin-right: 0;
  margin-left: 0.35rem;
}

body.rtl .hero-title-en {
  display: none !important;
}

body.rtl .hero-title-ar {
  display: inline !important;
}

.hero-card {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .hero-card {
  background: rgba(2, 6, 23, 0.72);
}

.hero-card-title {
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
  color: var(--pg-body-fg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-grid-1 {
  grid-template-columns: 1fr;
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Phone input with country dropdown */
.pg-phone-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.pg-phone-wrap .form-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  flex: 1;
}
[dir="rtl"] .pg-phone-wrap .form-input {
  border-top-left-radius: var(--pg-radius);
  border-bottom-left-radius: var(--pg-radius);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.pg-phone-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 0.65rem;
  height: 2.5rem;
  border: 1px solid var(--pg-border);
  border-right: none;
  border-radius: var(--pg-radius) 0 0 var(--pg-radius);
  background: var(--pg-surface-bg);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--pg-body-fg);
  flex-shrink: 0;
}
[dir="rtl"] .pg-phone-toggle {
  border-right: 1px solid var(--pg-border);
  border-left: none;
  border-radius: 0 var(--pg-radius) var(--pg-radius) 0;
}
.pg-phone-toggle:hover { background: var(--pg-hover-bg); }
.pg-phone-flag { font-size: 1.2rem; line-height: 1; }
.pg-phone-code { font-weight: 600; font-size: 0.82rem; font-family: monospace; }
.pg-phone-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10100;
  width: 280px;
  max-height: 280px;
  background: #ffffff;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body[data-theme="dark"] .pg-phone-dropdown {
  background: #1e293b;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
[dir="rtl"] .pg-phone-dropdown { left: auto; right: 0; }
.pg-phone-search {
  padding: 0.5rem 0.65rem;
  border: none;
  border-bottom: 1px solid var(--pg-border-subtle);
  background: inherit;
  font-size: 0.85rem;
  color: var(--pg-body-fg);
  outline: none;
  width: 100%;
}
.pg-phone-list {
  overflow-y: auto;
  flex: 1;
}
.pg-phone-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.1s;
}
.pg-phone-option:hover { background: rgba(0,0,0,.06); }
body[data-theme="dark"] .pg-phone-option:hover { background: rgba(255,255,255,.08); }
.pg-phone-option.selected { background: var(--pg-accent); color: #fff; }
.pg-phone-option-name { flex: 1; }
.pg-phone-option-code { font-family: monospace; font-size: 0.8rem; opacity: 0.7; }

.pw-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.pw-input {
  padding-right: 44px;
  width: 100%;
  box-sizing: border-box;
}

body.rtl .pw-input {
  padding-right: 0.9rem;
  padding-left: 44px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--pg-body-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  flex-shrink: 0;
}

body.rtl .pw-toggle {
  right: auto;
  left: 10px;
}

body[data-theme="dark"] .pw-toggle {
  color: #e5e7eb;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 650;
}

.form-input {
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.85);
  padding: 0 0.9rem;
  outline: none;
  color: #0f172a;
  width: 100%;
  box-sizing: border-box;
}

body[data-theme="dark"] .form-input {
  background: rgba(11, 18, 32, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.28);
  color: #e5e7eb;
}

body[data-theme="dark"] .form-input::placeholder {
  color: #64748b;
}

/* Form validation */
.form-input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}
.pg-field-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  line-height: 1.3;
}

/* Override Chrome's autofill white background in dark mode */
body[data-theme="dark"] input:-webkit-autofill,
body[data-theme="dark"] input:-webkit-autofill:hover,
body[data-theme="dark"] input:-webkit-autofill:focus,
body[data-theme="dark"] input:-webkit-autofill:active {
  -webkit-text-fill-color: #e5e7eb !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(11, 18, 32, 0.9) inset !important;
  caret-color: #e5e7eb;
  transition: background-color 9999s ease-in-out 0s;
}

.form-input:focus {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.customer-header .brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #ffffff;
  font-weight: 800;
}

.customer-nav {
  position: sticky;
  top: 0;
  z-index: 1010;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid var(--pg-border-subtle);
}

body[data-theme="dark"] .customer-nav {
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid #111827;
}

.customer-nav-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-text {
  display: inline;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--pg-body-fg);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: contain;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #ffffff;
}

.customer-nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.customer-nav-links .nav-link {
  text-decoration: none;
  color: var(--pg-body-fg);
  opacity: 0.9;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.customer-nav-links .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.customer-nav-links .nav-link i {
  font-size: 1.05em;
  opacity: 0.85;
}
.customer-nav-links .nav-link:hover {
  background: rgba(148, 163, 184, 0.15);
}

.customer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.customer-auth-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.customer-actions .user-chip,
.customer-actions .pg-dropdown .user-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 0.5rem;
  height: 38px;
  padding: 0 0.85rem;
  line-height: 1;
}

.customer-actions .user-chip .avatar-sm,
.customer-actions .pg-dropdown .user-chip .avatar-sm {
  flex-shrink: 0;
  display: block;
  vertical-align: middle;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

.customer-nav-toggle {
  display: none;
}

.cart-btn {
  position: relative;
  padding: 0 0.65rem;
}

.customer-main {
  min-height: calc(100vh - 140px);
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.65rem;
  padding: 0 0.3rem;
}

.customer-footer {
  border-top: 1px solid var(--pg-border-subtle);
}

.customer-footer-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

@media (max-width: 900px) {
  .customer-nav-toggle {
    display: inline-flex;
  }

  .brand-text {
    display: none;
  }

  .customer-actions .btn-outline span:not(.cart-count-badge),
  .customer-actions .btn-primary span:not(.cart-count-badge) {
    display: none;
  }

  .customer-actions .cart-btn .cart-count-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .customer-actions .btn-outline,
  .customer-actions .btn-primary {
    padding: 0 0.75rem;
  }

  .customer-nav-links {
    display: none;
  }

  .customer-nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 70px;
    background: var(--pg-surface-bg);
    border: 1px solid var(--pg-border-subtle);
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.18);
  }

  body[data-theme="dark"] .customer-nav-links.open {
    background: #020617;
  }
}

.pg-settings-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--pg-border-subtle);
}
.pg-settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Admin: Settings + Profile section headings */
.pg-subheading {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--pg-body-fg);
  opacity: 0.9;
}

.pg-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--pg-border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--pg-surface-bg);
}

.pg-settings-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  align-items: center;
  border-bottom: 1px solid var(--pg-border-subtle);
}

.pg-settings-row:last-child {
  border-bottom: none;
}

.pg-settings-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pg-body-fg);
  opacity: 0.75;
}

.pg-settings-value {
  font-size: 0.9rem;
  word-break: break-word;
}

@media (max-width: 600px) {
  .pg-settings-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
