/* ============================================================
   WorkPulse Command Center v6
   Shared premium SaaS admin design system
   ============================================================ */

:root {
  --wp-primary: #0e343d;
  --wp-primary-2: #14515b;
  --wp-teal: #1f7a82;
  --wp-teal-2: #29a7ad;
  --wp-teal-soft: #e7f6f7;
  --wp-green: #139064;
  --wp-green-soft: #e6f8ef;
  --wp-blue: #3178c6;
  --wp-blue-soft: #eaf3ff;
  --wp-amber: #b76a0b;
  --wp-amber-soft: #fff4df;
  --wp-red: #bd3328;
  --wp-red-soft: #fff0ee;
  --wp-purple: #6952c7;
  --wp-purple-soft: #f0edff;

  --wp-ink: #102a2f;
  --wp-text: #22373c;
  --wp-muted: #6a7e83;
  --wp-muted-2: #91a1a5;
  --wp-border: rgba(16, 42, 47, .12);
  --wp-border-strong: rgba(16, 42, 47, .2);
  --wp-surface: rgba(255, 255, 255, .92);
  --wp-surface-2: rgba(248, 252, 253, .82);
  --wp-bg: #edf2f4;
  --wp-radius: 16px;
  --wp-radius-sm: 10px;
  --wp-shadow-low: 0 3px 10px rgba(16, 42, 47, .07);
  --wp-shadow-mid: 0 14px 32px rgba(16, 42, 47, .11);
  --wp-shadow-high: 0 28px 72px rgba(8, 28, 34, .16);
  --wp-ring: rgba(41, 167, 173, .24);

  --primary: var(--wp-teal);
  --primary-hover: var(--wp-primary-2);
  --primary-light: var(--wp-teal-2);
  --primary-bg: var(--wp-teal-soft);
  --primary-ring: var(--wp-ring);
  --bg: var(--wp-bg);
  --card: #ffffff;
  --dark: var(--wp-ink);
  --text: var(--wp-text);
  --muted: var(--wp-muted);
  --border: var(--wp-border);
  --row-hover: rgba(231, 246, 247, .48);
  --success: var(--wp-green);
  --success-bg: var(--wp-green-soft);
  --danger: var(--wp-red);
  --danger-bg: var(--wp-red-soft);
  --warning: var(--wp-amber);
  --warning-bg: var(--wp-amber-soft);
  --radius: var(--wp-radius);
  --radius-sm: var(--wp-radius-sm);
  --shadow: var(--wp-shadow-mid);
  --shadow-md: var(--wp-shadow-high);

  --bs-primary: #1f7a82;
  --bs-primary-rgb: 31, 122, 130;
  --bs-body-font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--wp-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--wp-text) !important;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 62% 52% at 10% 0%, rgba(41, 167, 173, .12), transparent 62%),
    radial-gradient(ellipse 46% 42% at 86% 10%, rgba(16, 42, 47, .08), transparent 64%),
    radial-gradient(ellipse 56% 48% at 78% 92%, rgba(19, 144, 100, .07), transparent 66%),
    linear-gradient(135deg, #e8eef1 0%, #f6f9fa 46%, #eaf0f2 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(16, 42, 47, .026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 42, 47, .022) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 70% at 52% 30%, rgba(0, 0, 0, .58), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 130deg, transparent, rgba(41, 167, 173, .075), transparent, rgba(255, 255, 255, .14), transparent);
  filter: blur(36px);
  opacity: .65;
  animation: wp-ambient-drift 18s linear infinite;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.btn,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--wp-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@keyframes wp-ambient-drift {
  from { transform: rotate(0deg) scale(1.02); }
  to { transform: rotate(360deg) scale(1.02); }
}

/* ============================================================
   Layout
   ============================================================ */

.page {
  width: min(100% - 48px, 1320px) !important;
  max-width: 1320px !important;
  margin: 104px auto 56px !important;
  padding: 0 !important;
  animation: wp-page-in .38s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes wp-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-card,
.billing-card,
.modal-content {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .82) !important;
  border-radius: var(--wp-radius) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 252, 253, .9)) !important;
  box-shadow:
    var(--wp-shadow-mid),
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 0 0 1px rgba(16, 42, 47, .035) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-card,
.billing-card {
  padding: 28px 30px !important;
  margin-bottom: 24px !important;
  overflow: hidden;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.admin-card::before,
.billing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(41, 167, 173, .42), transparent);
  opacity: .7;
  pointer-events: none;
}

.admin-card:hover,
.billing-card:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 167, 173, .2) !important;
  box-shadow:
    var(--wp-shadow-high),
    inset 0 1px 0 rgba(255, 255, 255, .98),
    0 0 0 1px rgba(41, 167, 173, .045) !important;
}

.card-header,
.employee-toolbar,
.reports-toolbar,
.user-toolbar,
.toolbar {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.header-title,
.billing-card-title,
.modal-title {
  position: relative;
  color: var(--wp-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
}

.header-title::before,
.billing-card-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--wp-teal-2);
  box-shadow: 0 0 14px rgba(41, 167, 173, .56);
  vertical-align: 2px;
}

.tenant-name,
.billing-card-sub,
.text-muted,
.muted,
.status,
.report-empty,
.toggle-desc,
.msg-line,
.pagination-bar,
.card-subtitle {
  color: var(--wp-muted) !important;
}

.tenant-name,
.billing-card-sub {
  margin-top: 5px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.section-label {
  margin: 28px 0 14px;
  color: var(--wp-muted-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-hero {
  background:
    radial-gradient(ellipse 62% 80% at 0% 0%, rgba(41, 167, 173, .14), transparent 62%),
    radial-gradient(ellipse 50% 60% at 100% 18%, rgba(19, 144, 100, .08), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 252, 253, .9)) !important;
}

.command-hero-head,
.settings-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.hero-kicker {
  color: var(--wp-teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-title {
  margin-top: 6px;
  color: var(--wp-ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
}

.hero-copy {
  margin-top: 8px;
  color: var(--wp-muted);
  font-size: 14px;
  font-weight: 650;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid rgba(19, 144, 100, .18);
  border-radius: 999px;
  background: rgba(230, 248, 239, .88);
  color: var(--wp-green);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 10px 22px rgba(19, 144, 100, .08);
}

.hero-status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wp-green);
  box-shadow: 0 0 12px rgba(19, 144, 100, .62);
}

.hero-status-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(19, 144, 100, .32);
  border-radius: inherit;
  animation: wp-status-pulse 2.5s ease-out infinite;
}

.ops-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ops-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(16, 42, 47, .08);
  border-radius: 13px;
  background: rgba(255, 255, 255, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.ops-mini-card i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(180deg, #eefbfc, #d9f0f2);
  color: var(--wp-teal);
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(31, 122, 130, .1), inset 0 1px 0 rgba(255, 255, 255, .86);
}

.ops-mini-label {
  display: block;
  color: var(--wp-muted-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ops-mini-card strong {
  display: block;
  margin-top: 2px;
  color: var(--wp-ink);
  font-size: 13px;
  font-weight: 800;
}

.settings-control-card {
  display: grid;
  gap: 10px;
  flex: 0 1 520px;
  padding: 16px;
  border: 1px solid rgba(16, 42, 47, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.settings-control-grid {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(190px, 1fr);
  gap: 12px;
  align-items: end;
}

.settings-control-card .btn {
  justify-self: start;
}

.settings-note {
  color: var(--wp-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.help-icon,
.toc-link,
.callout,
.email-badge,
.badge-pill {
  border-radius: 13px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 10px 22px rgba(16, 42, 47, .06);
}

.help-icon {
  border: 1px solid rgba(31, 122, 130, .14) !important;
  background: linear-gradient(180deg, #eefbfc, #d9f0f2) !important;
  color: var(--wp-teal) !important;
}

.toc-grid {
  gap: 10px !important;
}

.toc-link {
  border: 1px solid rgba(16, 42, 47, .1) !important;
  background: rgba(255, 255, 255, .62) !important;
  color: var(--wp-text) !important;
  font-weight: 800 !important;
  transition: transform .14s ease, box-shadow .14s ease, color .14s ease, background .14s ease, border-color .14s ease !important;
}

.toc-link:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 130, .24) !important;
  background: rgba(231, 246, 247, .84) !important;
  color: var(--wp-teal) !important;
}

.help-section-title {
  color: var(--wp-ink) !important;
  letter-spacing: 0 !important;
}

.help-section-title i,
.toc-link i {
  color: var(--wp-teal) !important;
}

.help-section p,
.help-list li {
  color: var(--wp-text) !important;
}

.help-list li::before {
  background: var(--wp-teal-2) !important;
  box-shadow: 0 0 10px rgba(41, 167, 173, .36);
}

.callout {
  border: 1px solid rgba(16, 42, 47, .08) !important;
  border-left-width: 3px !important;
}

.callout-info {
  background: rgba(234, 243, 255, .86) !important;
  color: #1e4f8d !important;
}

.callout-warn {
  background: rgba(255, 244, 223, .9) !important;
  color: var(--wp-amber) !important;
}

.callout-tip {
  background: rgba(231, 246, 247, .9) !important;
  color: var(--wp-primary) !important;
}

.term-name {
  color: var(--wp-ink) !important;
  font-weight: 800 !important;
}

@keyframes wp-status-pulse {
  0% { transform: scale(.62); opacity: .85; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ============================================================
   Navigation
   ============================================================ */

.admin-header {
  position: fixed;
  inset: 14px 0 auto;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}

.admin-nav {
  width: min(100%, 1320px);
  min-height: 70px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(247, 251, 252, .76));
  box-shadow:
    0 18px 50px rgba(8, 28, 34, .12),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  pointer-events: auto;
}

.admin-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 36% 80% at 0% 50%, rgba(41, 167, 173, .13), transparent 68%),
    linear-gradient(90deg, rgba(14, 52, 61, .03), transparent 40%);
  pointer-events: none;
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  min-height: 70px;
  padding: 10px 14px 10px 18px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  color: var(--wp-ink);
  text-decoration: none;
}

.nav-brand-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .42), transparent 38%),
    linear-gradient(180deg, #2aa6af, #17616a);
  color: #fff;
  box-shadow:
    0 8px 24px rgba(31, 122, 130, .28),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.nav-brand-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  background: var(--wp-green);
  box-shadow: 0 0 12px rgba(19, 144, 100, .72);
}

.nav-brand-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.nav-brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.nav-brand-name {
  overflow: hidden;
  color: var(--wp-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-brand-meta {
  color: var(--wp-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--wp-muted) !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform .15s ease,
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    box-shadow .15s ease;
}

.nav-item i {
  font-size: 14px;
  opacity: .82;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--wp-teal-2), var(--wp-green));
  opacity: 0;
  transform: scaleX(.6);
  transition: opacity .18s ease, transform .18s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 130, .12);
  background: rgba(231, 246, 247, .7);
  color: var(--wp-ink) !important;
  box-shadow: var(--wp-shadow-low);
}

.nav-item.active {
  border-color: rgba(41, 167, 173, .26);
  background:
    linear-gradient(180deg, rgba(231, 246, 247, .96), rgba(246, 252, 253, .78));
  color: var(--wp-teal) !important;
  box-shadow:
    0 8px 20px rgba(31, 122, 130, .12),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.nav-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-user-chip {
  color: #475569;
  cursor: default;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
  font-size: .82rem;
  opacity: .9;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-chip:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
}

.nav-logout {
  color: #a23b35 !important;
  margin-left: 6px;
}

.nav-logout:hover {
  border-color: rgba(189, 51, 40, .18);
  background: rgba(255, 240, 238, .86);
  color: var(--wp-red) !important;
}

/* ============================================================
   Operational cards and shortcuts
   ============================================================ */

.stat-grid,
.stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-top: 20px !important;
}

.seat-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) !important;
  gap: 14px !important;
  margin: 18px 0 14px !important;
}

.stat-card,
.stat-box,
.quick-card,
.info-item,
.seat-stat {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .84) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(243, 248, 250, .86)) !important;
  box-shadow:
    0 4px 0 rgba(16, 42, 47, .045),
    0 14px 28px rgba(16, 42, 47, .085),
    inset 0 1px 0 rgba(255, 255, 255, .96) !important;
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.stat-card,
.stat-box {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 112px !important;
  padding: 20px !important;
}

.seat-stat {
  display: grid !important;
  min-height: 112px !important;
  min-width: 0 !important;
  align-content: center !important;
  gap: 8px !important;
  padding: 20px 18px !important;
  overflow: hidden;
}

.stat-card::after,
.stat-box::after,
.quick-card::after,
.seat-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, .54) 48%, transparent 62%);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .2s ease, transform .46s ease;
  pointer-events: none;
}

.stat-card:hover,
.stat-box:hover,
.quick-card:hover,
.quick-card:focus,
.seat-stat:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(41, 167, 173, .24) !important;
  box-shadow:
    0 5px 0 rgba(16, 42, 47, .045),
    0 22px 46px rgba(31, 122, 130, .14),
    inset 0 1px 0 rgba(255, 255, 255, .98) !important;
}

.stat-card:hover::after,
.stat-box:hover::after,
.quick-card:hover::after,
.quick-card:focus::after,
.seat-stat:hover::after {
  opacity: 1;
  transform: translateX(50%);
}

.stat-icon-wrap,
.stat-icon,
.quick-icon {
  display: grid !important;
  place-items: center !important;
  flex: 0 0 auto;
  width: 52px !important;
  height: 52px !important;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 14px !important;
  box-shadow:
    0 10px 22px rgba(16, 42, 47, .1),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.stat-icon-wrap i,
.quick-icon i {
  font-size: 22px;
}

.stat-label,
.stat-title,
.info-label,
.seat-stat-lbl,
.form-label-sm,
label {
  color: var(--wp-muted-2) !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.stat-num,
.stat-value,
.seat-stat-val {
  color: var(--wp-ink) !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

.quick-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-top: 18px !important;
}

.quick-card {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 108px !important;
  padding: 18px !important;
  color: var(--wp-ink) !important;
  text-decoration: none !important;
}

.quick-title {
  color: var(--wp-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.2;
}

.quick-copy {
  margin: 4px 0 0 !important;
  color: var(--wp-muted) !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.42 !important;
}

.bg-teal-soft { background: linear-gradient(180deg, #eefbfc, #d9f0f2) !important; }
.bg-green-soft { background: linear-gradient(180deg, #f0fff7, #def8ec) !important; }
.bg-blue-soft { background: linear-gradient(180deg, #eef6ff, #dcecff) !important; }
.bg-purple-soft { background: linear-gradient(180deg, #f4f1ff, #e8e3ff) !important; }
.text-teal { color: var(--wp-teal) !important; }
.text-blue { color: var(--wp-blue) !important; }
.text-purple { color: var(--wp-purple) !important; }
.text-success { color: var(--wp-green) !important; }

/* ============================================================
   Forms
   ============================================================ */

.form-control,
.form-select,
.field,
textarea,
select {
  border: 1px solid rgba(16, 42, 47, .16) !important;
  border-radius: var(--wp-radius-sm) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 250, 251, .9)) !important;
  color: var(--wp-text) !important;
  font-weight: 650 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 1px 2px rgba(16, 42, 47, .035) !important;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease,
    transform .16s ease !important;
}

.form-control-sm,
.form-select-sm {
  min-height: 36px;
}

.form-control:focus,
.form-select:focus,
.field:focus,
textarea:focus,
select:focus {
  outline: 0 !important;
  border-color: rgba(31, 122, 130, .58) !important;
  background: #fff !important;
  box-shadow:
    0 0 0 4px var(--wp-ring),
    0 0 24px rgba(41, 167, 173, .14),
    inset 0 1px 0 rgba(255, 255, 255, .96) !important;
  transform: translateY(-1px);
}

.form-control::placeholder,
.field::placeholder {
  color: #9aabad !important;
}

input[type="date"].form-control,
input[type="date"].form-control-sm {
  min-width: 150px;
  padding-right: 38px !important;
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  margin-right: -4px;
  padding: 5px;
  border-radius: 9px;
  background-color: rgba(231, 246, 247, .92);
  cursor: pointer;
  opacity: .82;
  transition: background-color .14s ease, box-shadow .14s ease, opacity .14s ease, transform .14s ease;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="date"]:focus::-webkit-calendar-picker-indicator {
  background-color: rgba(41, 167, 173, .16);
  box-shadow: 0 0 0 3px rgba(41, 167, 173, .1);
  opacity: 1;
  transform: translateY(-1px);
}

.timepicker-shell {
  position: relative;
  min-width: 150px;
}

.timepicker-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(231, 246, 247, .82);
  border: 1px solid rgba(31, 122, 130, .24);
  color: transparent;
  pointer-events: none;
  transform: translateY(-50%);
  transition: background .14s ease, box-shadow .14s ease, color .14s ease;
}

.timepicker-shell::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 21px;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-left: 2px solid var(--wp-teal);
  border-bottom: 2px solid var(--wp-teal);
  border-radius: 0 0 0 2px;
  pointer-events: none;
  transform: translate(50%, -62%) rotate(-45deg);
}

.timepicker-shell.open::after {
  background: rgba(41, 167, 173, .15);
  box-shadow: 0 0 0 3px rgba(41, 167, 173, .1);
  color: var(--wp-primary);
}

.timepicker-input {
  padding-right: 42px !important;
  cursor: pointer;
}

.timepicker-input[readonly] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 250, 251, .9)) !important;
}

.timepicker-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1100;
  display: grid;
  gap: 12px;
  width: 292px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(41, 167, 173, .13), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 252, 253, .94));
  box-shadow:
    0 24px 58px rgba(8, 28, 34, .18),
    inset 0 1px 0 rgba(255, 255, 255, .96);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transform-origin: top left;
  transition: opacity .16s ease, transform .16s ease;
}

.timepicker-shell.open .timepicker-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.timepicker-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.timepicker-fields label {
  margin: 0;
}

.timepicker-fields span {
  display: block;
  margin-bottom: 5px;
  color: var(--wp-muted-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.timepicker-hour,
.timepicker-minute {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(16, 42, 47, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .8);
  color: var(--wp-ink);
  font-weight: 800;
}

.timepicker-meridiem {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(16, 42, 47, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .56);
}

.timepicker-meridiem button,
.timepicker-presets button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--wp-muted);
  font-size: 12px;
  font-weight: 800;
  transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.timepicker-meridiem button {
  min-height: 34px;
}

.timepicker-meridiem button:hover,
.timepicker-presets button:hover {
  transform: translateY(-1px);
  background: rgba(231, 246, 247, .82);
  color: var(--wp-primary);
}

.timepicker-meridiem button.active {
  border-color: rgba(41, 167, 173, .28);
  background: linear-gradient(180deg, rgba(231, 246, 247, .96), rgba(247, 252, 253, .86));
  color: var(--wp-teal);
  box-shadow: 0 8px 18px rgba(31, 122, 130, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.timepicker-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.timepicker-presets button {
  min-height: 32px;
  border-color: rgba(16, 42, 47, .08);
  background: rgba(255, 255, 255, .58);
}

.form-check-input {
  border-color: rgba(16, 42, 47, .24) !important;
  box-shadow: none !important;
}

.form-check-input:checked {
  background-color: var(--wp-teal) !important;
  border-color: var(--wp-teal) !important;
  box-shadow: 0 0 0 3px rgba(41, 167, 173, .16) !important;
}

.row {
  --bs-gutter-x: .85rem;
  --bs-gutter-y: .85rem;
}

/* ============================================================
   Buttons
   ============================================================ */

button,
.btn {
  font-family: inherit !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border-radius: 10px !important;
  border-width: 1px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition:
    transform .12s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease,
    color .14s ease !important;
}

.btn-teal,
.btn-primary,
.btn.btn-teal {
  border-color: rgba(23, 97, 106, .96) !important;
  background:
    linear-gradient(180deg, #2aa6af 0%, #1e7780 54%, #17616a 100%) !important;
  color: #fff !important;
  box-shadow:
    0 3px 0 #0f4e56,
    0 14px 28px rgba(31, 122, 130, .26),
    inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}

.btn-teal:hover,
.btn-teal:focus,
.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-1px);
  border-color: rgba(23, 97, 106, .96) !important;
  background:
    linear-gradient(180deg, #31afb8 0%, #1f7a82 54%, #17616a 100%) !important;
  color: #fff !important;
  box-shadow:
    0 4px 0 #0f4e56,
    0 20px 36px rgba(31, 122, 130, .34),
    inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}

.btn-teal:active,
.btn-primary:active {
  transform: translateY(3px) !important;
  box-shadow:
    0 1px 0 #0f4e56,
    0 8px 16px rgba(31, 122, 130, .2),
    inset 0 2px 5px rgba(8, 28, 34, .18) !important;
}

.btn-outline-teal,
.btn-outline,
.btn-outline-secondary,
.btn-secondary {
  border-color: rgba(16, 42, 47, .16) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(245, 249, 250, .88)) !important;
  color: var(--wp-teal) !important;
  box-shadow:
    0 2px 0 rgba(16, 42, 47, .05),
    0 8px 18px rgba(16, 42, 47, .07),
    inset 0 1px 0 rgba(255, 255, 255, .92) !important;
}

.btn-outline-teal:hover,
.btn-outline:hover,
.btn-outline-secondary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 130, .36) !important;
  background: rgba(231, 246, 247, .82) !important;
  color: var(--wp-primary) !important;
  box-shadow:
    0 3px 0 rgba(16, 42, 47, .05),
    0 14px 24px rgba(31, 122, 130, .12),
    inset 0 1px 0 rgba(255, 255, 255, .94) !important;
}

.btn-danger,
.btn-outline-danger {
  border-color: rgba(189, 51, 40, .22) !important;
  background: rgba(255, 240, 238, .82) !important;
  color: var(--wp-red) !important;
}

.btn-danger:hover,
.btn-outline-danger:hover {
  background: var(--wp-red) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(189, 51, 40, .18) !important;
}

.btn-outline-success {
  border-color: rgba(19, 144, 100, .24) !important;
  background: rgba(230, 248, 239, .82) !important;
  color: var(--wp-green) !important;
}

.btn-sm {
  min-height: 34px;
  padding: 8px 13px !important;
  font-size: 12px !important;
}

.btn-ghost {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--wp-muted) !important;
}

.btn-ghost:hover {
  background: rgba(231, 246, 247, .72) !important;
  color: var(--wp-ink) !important;
}

/* ============================================================
   Tables
   ============================================================ */

.table-responsive {
  border: 1px solid rgba(16, 42, 47, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
}

table,
.table {
  width: 100%;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--wp-text) !important;
}

thead,
.table-light {
  background:
    linear-gradient(180deg, rgba(239, 246, 248, .96), rgba(232, 240, 243, .92)) !important;
}

th,
.table thead th {
  padding: 13px 15px !important;
  border-bottom: 1px solid rgba(16, 42, 47, .1) !important;
  color: var(--wp-muted) !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-align: left;
  text-transform: uppercase !important;
  white-space: nowrap;
}

td,
.table td {
  padding: 14px 15px !important;
  border-bottom: 1px solid rgba(16, 42, 47, .075) !important;
  color: var(--wp-text) !important;
  font-size: 13px !important;
  font-weight: 600;
  vertical-align: middle;
}

tbody tr {
  transition: background .14s ease, transform .14s ease;
}

tbody tr:hover,
.table-hover tbody tr:hover {
  background: rgba(231, 246, 247, .52) !important;
}

tbody tr:last-child td {
  border-bottom: 0 !important;
}

.actions,
.employee-actions,
.user-actions,
.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-number,
.username-cell {
  color: var(--wp-ink) !important;
  font-weight: 800 !important;
}

.email-cell,
.schedule-cell,
.diff-cell {
  color: var(--wp-muted) !important;
}

/* ============================================================
   Badges, banners, operational states
   ============================================================ */

.pill,
.badge,
.badge-action,
.invoice-status,
.canceling-badge,
.kiosk-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill.ok,
.badge-emp,
.inv-paid,
.kiosk-pill {
  border-color: rgba(19, 144, 100, .18) !important;
  background: rgba(230, 248, 239, .88) !important;
  color: var(--wp-green) !important;
}

.pill.bad,
.badge-forced,
.badge-user-del {
  border-color: rgba(189, 51, 40, .18) !important;
  background: rgba(255, 240, 238, .88) !important;
  color: var(--wp-red) !important;
}

.badge-manual,
.badge-emp-warn,
.inv-open,
.canceling-badge {
  border-color: rgba(183, 106, 11, .2) !important;
  background: rgba(255, 244, 223, .9) !important;
  color: var(--wp-amber) !important;
}

.badge-user {
  border-color: rgba(49, 120, 198, .18) !important;
  background: rgba(234, 243, 255, .9) !important;
  color: var(--wp-blue) !important;
}

.badge-ot {
  border-color: rgba(105, 82, 199, .18) !important;
  background: rgba(240, 237, 255, .9) !important;
  color: var(--wp-purple) !important;
}

.status-banner,
.seat-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, .82) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(247, 251, 252, .86)) !important;
  box-shadow:
    var(--wp-shadow-mid),
    inset 0 1px 0 rgba(255, 255, 255, .94) !important;
}

.status-banner::before,
.seat-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 36% 90% at 0% 50%, rgba(41, 167, 173, .16), transparent 68%),
    linear-gradient(90deg, rgba(41, 167, 173, .06), transparent 52%);
  pointer-events: none;
}

.status-banner.active {
  border-color: rgba(19, 144, 100, .2) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(19, 144, 100, .14), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 252, 249, .9)) !important;
}

.status-banner.trialing {
  border-color: rgba(49, 120, 198, .2) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(49, 120, 198, .12), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 249, 255, .9)) !important;
}

.status-banner.past-due {
  border-color: rgba(183, 106, 11, .22) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(183, 106, 11, .14), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 250, 241, .92)) !important;
}

.status-banner.canceled,
.status-banner.inactive {
  border-color: rgba(189, 51, 40, .22) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(189, 51, 40, .13), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 246, 245, .9)) !important;
}

.status-title {
  color: var(--wp-ink) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

.status-desc {
  color: var(--wp-muted) !important;
  font-weight: 650;
}

.status-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: 14px !important;
  border-radius: 14px;
  background: rgba(231, 246, 247, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 22px rgba(31, 122, 130, .12);
}

.status-banner.active .status-icon,
.status-banner.trialing .status-icon {
  background: rgba(230, 248, 239, .9);
}

.status-banner.past-due .status-icon {
  background: rgba(255, 244, 223, .9);
}

.status-banner.canceled .status-icon,
.status-banner.inactive .status-icon {
  background: rgba(255, 240, 238, .9);
}

.seat-bar,
.seat-progress-bar {
  overflow: hidden;
  border-radius: 99px !important;
  background: rgba(16, 42, 47, .1) !important;
  box-shadow: inset 0 1px 2px rgba(16, 42, 47, .08);
}

.seat-bar-fill,
.seat-progress-fill {
  border-radius: inherit !important;
  background: linear-gradient(90deg, var(--wp-teal), var(--wp-green)) !important;
  box-shadow: 0 0 16px rgba(31, 122, 130, .28);
  transition: width .42s cubic-bezier(.22, 1, .36, 1), background .2s ease !important;
}

.seat-bar-fill.warn,
.seat-progress-fill.warn {
  background: linear-gradient(90deg, #e8a11b, #f59e0b) !important;
}

.seat-bar-fill.danger,
.seat-progress-fill.danger {
  background: linear-gradient(90deg, #d94c3f, var(--wp-red)) !important;
}

.info-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.info-item {
  padding: 16px !important;
}

.info-value {
  color: var(--wp-ink) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

.info-value.muted {
  color: var(--wp-muted-2) !important;
}

.billing-divider,
hr {
  border: 0 !important;
  height: 1px !important;
  margin: 22px 0 !important;
  opacity: 1 !important;
  background: linear-gradient(90deg, transparent, rgba(16, 42, 47, .12), transparent) !important;
}

.invoice-row,
.toggle-row {
  border-bottom: 1px solid rgba(16, 42, 47, .08) !important;
}

.toggle-row {
  padding: 16px 0 !important;
}

.toggle-label {
  color: var(--wp-ink) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.settings-save-row {
  border-top: 1px solid rgba(16, 42, 47, .1) !important;
}

.tab-bar {
  display: flex !important;
  gap: 8px !important;
  margin: 18px -4px 0 !important;
  padding: 4px 4px 0 !important;
  overflow-x: auto;
  border-bottom: 0 !important;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 10px 14px !important;
  border: 1px solid rgba(16, 42, 47, .1) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .58) !important;
  color: var(--wp-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease, border-color .14s ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 130, .2) !important;
  background: rgba(231, 246, 247, .76) !important;
  color: var(--wp-ink) !important;
}

.tab-btn.active {
  border-color: rgba(41, 167, 173, .3) !important;
  background: linear-gradient(180deg, rgba(231, 246, 247, .96), rgba(247, 252, 253, .84)) !important;
  color: var(--wp-teal) !important;
  box-shadow: 0 12px 24px rgba(31, 122, 130, .12), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.tab-pane {
  animation: wp-page-in .22s ease both;
}

.filter-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  gap: 10px !important;
  margin-bottom: 18px !important;
  padding: 14px !important;
  border: 1px solid rgba(16, 42, 47, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.period-card,
.diff-box,
.empty-state {
  border: 1px solid rgba(16, 42, 47, .08) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 10px 22px rgba(16, 42, 47, .06);
}

.period-card {
  padding: 16px 18px !important;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.period-card:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 130, .18) !important;
  box-shadow: 0 16px 30px rgba(31, 122, 130, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.period-name {
  color: var(--wp-ink) !important;
  font-weight: 800 !important;
}

.period-dates {
  color: var(--wp-muted) !important;
  font-weight: 650;
}

.empty-state {
  padding: 44px 24px !important;
  color: var(--wp-muted-2) !important;
  font-weight: 750;
}

.empty-state i {
  color: var(--wp-teal);
  opacity: .7;
}

.diff-box {
  padding: 12px 14px !important;
}

.diff-box .from,
.diff-old {
  color: var(--wp-red) !important;
}

.diff-box .to,
.diff-new {
  color: var(--wp-green) !important;
  font-weight: 800 !important;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.dot-open { color: var(--wp-green); background: currentColor !important; }
.dot-finalized { color: var(--wp-red); background: currentColor !important; }
.dot-reopened { color: var(--wp-amber); background: currentColor !important; }

.badge-pending {
  border-color: rgba(183, 106, 11, .2) !important;
  background: rgba(255, 244, 223, .9) !important;
  color: var(--wp-amber) !important;
}

.badge-approved {
  border-color: rgba(19, 144, 100, .18) !important;
  background: rgba(230, 248, 239, .9) !important;
  color: var(--wp-green) !important;
}

.badge-rejected {
  border-color: rgba(189, 51, 40, .18) !important;
  background: rgba(255, 240, 238, .9) !important;
  color: var(--wp-red) !important;
}

.badge-adjusted {
  border-color: rgba(49, 120, 198, .18) !important;
  background: rgba(234, 243, 255, .9) !important;
  color: var(--wp-blue) !important;
}

.report-status,
.status-message,
.msg-line {
  min-height: 20px;
  font-weight: 650;
}

.msg-line.ok {
  color: var(--wp-green) !important;
}

.msg-line.err {
  color: var(--wp-red) !important;
}

/* ============================================================
   Modals and empty states
   ============================================================ */

.modal-backdrop.show {
  opacity: .38 !important;
  backdrop-filter: blur(8px);
}

.modal-content {
  overflow: hidden;
}

.modal-header,
.modal-footer {
  border-color: rgba(16, 42, 47, .1) !important;
}

td.text-center.text-muted,
.report-empty {
  color: var(--wp-muted-2) !important;
  font-weight: 700;
}

/* ============================================================
   Legacy app header support
   ============================================================ */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--wp-border);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.app-header h1 {
  margin: 0;
  color: var(--wp-ink);
  font-size: 18px;
  font-weight: 800;
}

.app-header nav a {
  margin-left: 14px;
  color: var(--wp-teal);
  font-weight: 800;
  text-decoration: none;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1180px) {
  .admin-header {
    inset: 10px 0 auto;
    padding: 0 14px;
  }

  .admin-nav,
  .nav-inner {
    min-height: 66px;
  }

  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .nav-brand {
    width: 100%;
    min-width: 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .page {
    width: min(100% - 28px, 1320px) !important;
    margin-top: 132px !important;
  }

  .stat-grid,
  .stats,
  .quick-grid,
  .seat-stat-grid,
  .ops-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(ellipse 90% 48% at 50% 0%, rgba(41, 167, 173, .14), transparent 62%),
      linear-gradient(180deg, #edf2f4, #f6f9fa) !important;
  }

  .admin-header {
    inset: 8px 0 auto;
    padding: 0 10px;
  }

  .admin-nav {
    border-radius: 14px;
  }

  .nav-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .nav-brand-name {
    font-size: 13px;
  }

  .nav-brand-meta {
    font-size: 9px;
  }

  .nav-item {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .page {
    width: calc(100% - 20px) !important;
    margin-top: 126px !important;
    margin-bottom: 28px !important;
  }

  .admin-card,
  .billing-card {
    padding: 20px 16px !important;
    border-radius: 14px !important;
  }

  .card-header,
  .employee-toolbar,
  .reports-toolbar,
  .user-toolbar,
  .toolbar,
  .command-hero-head,
  .settings-panel {
    display: block !important;
  }

  .stat-grid,
  .stats,
  .quick-grid,
  .info-grid,
  .seat-stat-grid,
  .ops-mini-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-status-pill {
    margin-top: 14px;
  }

  .settings-control-card {
    margin-top: 14px;
  }

  .settings-control-grid {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .stat-box {
    min-height: 96px !important;
  }

  .stat-num,
  .stat-value,
  .seat-stat-val {
    font-size: 28px !important;
  }

  .quick-card {
    min-height: 92px !important;
  }

  .table-responsive {
    margin-left: -2px;
    margin-right: -2px;
  }

  th,
  .table thead th,
  td,
  .table td {
    padding: 12px 13px !important;
  }
}

/* ============================================================
   WPModal — Premium Enterprise Modal System
   Replaces native alert() / confirm() browser dialogs
   ============================================================ */

/* Overlay / backdrop */
.wpm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 20, 26, 0.50);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  opacity: 0;
  transition: opacity 260ms cubic-bezier(.22, 1, .36, 1);
}

.wpm-overlay.wpm-visible {
  opacity: 1;
}

/* Modal card */
.wpm-box {
  position: relative;
  width: min(440px, 100%);
  padding: 40px 36px 36px;
  border-radius: 22px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, .99) 0%,
    rgba(246, 251, 252, .97) 100%
  );
  border: 1px solid rgba(255, 255, 255, .88);
  box-shadow:
    0 40px 100px rgba(8, 24, 34, .24),
    0 12px 32px rgba(8, 24, 34, .13),
    0 0 0 1px rgba(31, 122, 130, .07),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  text-align: center;
  transform: scale(.90) translateY(18px);
  opacity: 0;
  transition:
    transform 320ms cubic-bezier(.22, 1, .36, 1),
    opacity   280ms cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}

/* Subtle teal shimmer across the top */
.wpm-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(41, 167, 173, .55) 40%,
    rgba(41, 167, 173, .55) 60%,
    transparent 100%
  );
  pointer-events: none;
}

.wpm-box.wpm-box-in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Icon ring */
.wpm-icon-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  margin-bottom: 22px;
  transition: box-shadow .2s ease;
}

.wpm-icon-ring--info       { background: var(--wp-blue-soft, #eaf3ff);    color: var(--wp-blue, #3178c6);    box-shadow: 0 0 0 8px rgba(49,120,198,.08); }
.wpm-icon-ring--warning    { background: var(--wp-amber-soft, #fff4df);   color: var(--wp-amber, #b76a0b);   box-shadow: 0 0 0 8px rgba(183,106,11,.08); }
.wpm-icon-ring--error      { background: var(--wp-red-soft, #fff0ee);     color: var(--wp-red, #bd3328);     box-shadow: 0 0 0 8px rgba(189,51,40,.08); }
.wpm-icon-ring--success    { background: var(--wp-green-soft, #e6f8ef);   color: var(--wp-green, #139064);   box-shadow: 0 0 0 8px rgba(19,144,100,.08); }
.wpm-icon-ring--destructive { background: var(--wp-red-soft, #fff0ee);    color: var(--wp-red, #bd3328);     box-shadow: 0 0 0 8px rgba(189,51,40,.08); }
.wpm-icon-ring--confirm    { background: var(--wp-teal-soft, #e7f6f7);    color: var(--wp-teal, #1f7a82);    box-shadow: 0 0 0 8px rgba(31,122,130,.10); }

.wpm-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wpm-icon svg {
  width: 100%;
  height: 100%;
}

/* Typography */
.wpm-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--wp-ink, #102a2f);
  line-height: 1.22;
  letter-spacing: -.015em;
  margin: 0 0 10px;
}

.wpm-message {
  font-size: 14.5px;
  color: var(--wp-text, #22373c);
  line-height: 1.62;
  margin: 0 0 4px;
}

.wpm-detail {
  font-size: 13px;
  color: var(--wp-muted, #6a7e83);
  line-height: 1.58;
  margin-top: 12px;
  padding: 11px 14px;
  background: rgba(16, 42, 47, .045);
  border-radius: 10px;
  border-left: 3px solid rgba(41, 167, 173, .30);
  text-align: left;
}

/* Action buttons row */
.wpm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.wpm-actions--dual {
  flex-direction: row-reverse;
}

/* Base button */
.wpm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 11px 24px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.005em;
  cursor: pointer;
  border: none;
  outline: none;
  transition:
    transform    140ms cubic-bezier(.22, 1, .36, 1),
    box-shadow   140ms ease,
    background   140ms ease,
    opacity      100ms ease;
  -webkit-tap-highlight-color: transparent;
}

.wpm-btn:focus-visible {
  outline: 2px solid rgba(41, 167, 173, .7);
  outline-offset: 2px;
}

.wpm-btn:active {
  transform: scale(.95) translateY(1px) !important;
}

/* Ghost / cancel */
.wpm-btn--ghost {
  background: rgba(16, 42, 47, .06);
  color: var(--wp-muted, #6a7e83);
  border: 1px solid rgba(16, 42, 47, .10);
}

.wpm-btn--ghost:hover,
.wpm-btn--ghost:focus-visible {
  background: rgba(16, 42, 47, .10);
  color: var(--wp-ink, #102a2f);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 42, 47, .10);
}

/* Solid primary — shared base */
.wpm-btn--solid {
  color: #fff;
}

/* Teal — info / confirm */
.wpm-btn--info,
.wpm-btn--confirm {
  background: linear-gradient(135deg, #1a6e75 0%, #29a7ad 100%);
  box-shadow: 0 4px 16px rgba(31, 122, 130, .36);
}

.wpm-btn--info:hover,    .wpm-btn--info:focus-visible,
.wpm-btn--confirm:hover, .wpm-btn--confirm:focus-visible {
  background: linear-gradient(135deg, #155d63 0%, #1f8f94 100%);
  box-shadow: 0 6px 22px rgba(31, 122, 130, .48);
  transform: translateY(-1px);
}

/* Amber — warning */
.wpm-btn--warning {
  background: linear-gradient(135deg, #9d5a09 0%, #d4820e 100%);
  box-shadow: 0 4px 16px rgba(183, 106, 11, .38);
}

.wpm-btn--warning:hover,
.wpm-btn--warning:focus-visible {
  background: linear-gradient(135deg, #804807 0%, #b76a0b 100%);
  box-shadow: 0 6px 22px rgba(183, 106, 11, .50);
  transform: translateY(-1px);
}

/* Red — error / destructive */
.wpm-btn--error,
.wpm-btn--destructive {
  background: linear-gradient(135deg, #a52b20 0%, #d94336 100%);
  box-shadow: 0 4px 16px rgba(189, 51, 40, .38);
}

.wpm-btn--error:hover,       .wpm-btn--error:focus-visible,
.wpm-btn--destructive:hover, .wpm-btn--destructive:focus-visible {
  background: linear-gradient(135deg, #8c231a 0%, #bd3328 100%);
  box-shadow: 0 6px 22px rgba(189, 51, 40, .52);
  transform: translateY(-1px);
}

/* Green — success */
.wpm-btn--success {
  background: linear-gradient(135deg, #0e7251 0%, #17a877 100%);
  box-shadow: 0 4px 16px rgba(19, 144, 100, .38);
}

.wpm-btn--success:hover,
.wpm-btn--success:focus-visible {
  background: linear-gradient(135deg, #0b5c41 0%, #139064 100%);
  box-shadow: 0 6px 22px rgba(19, 144, 100, .50);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 480px) {
  .wpm-box {
    padding: 32px 22px 26px;
    border-radius: 20px;
  }

  .wpm-icon-ring {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }

  .wpm-title { font-size: 17px; }

  .wpm-actions {
    flex-direction: column;
    gap: 9px;
  }

  .wpm-actions--dual {
    flex-direction: column;
  }

  .wpm-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   Theme toggle button
   ============================================================ */

.nav-theme-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--wp-muted);
  font-size: 15px;
  cursor: pointer;
  transition:
    transform .15s ease,
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    box-shadow .15s ease;
}

.nav-theme-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 130, .12);
  background: rgba(231, 246, 247, .7);
  color: var(--wp-ink);
  box-shadow: var(--wp-shadow-low);
}

.nav-theme-btn:active {
  transform: translateY(1px);
}

/* ============================================================
   Dark Mode — html[data-theme="dark"]
   ============================================================ */

/* ── CSS variable overrides ── */
html[data-theme="dark"] {
  /* Soft tint backgrounds become dark-tinted */
  --wp-teal-soft:   rgba(41, 167, 173, .14);
  --wp-green-soft:  rgba(19, 144, 100, .14);
  --wp-blue-soft:   rgba(49, 120, 198, .15);
  --wp-amber-soft:  rgba(183, 106, 11, .16);
  --wp-red-soft:    rgba(189, 51, 40, .15);
  --wp-purple-soft: rgba(105, 82, 199, .15);

  /* Text */
  --wp-ink:    #ddedf1;
  --wp-text:   #a8c4cc;
  --wp-muted:  #6a8d97;
  --wp-muted-2: #4d6e79;

  /* Surfaces */
  --wp-bg:      #0d1820;
  --wp-surface: rgba(18, 32, 42, .97);
  --wp-surface-2: rgba(14, 26, 34, .94);

  /* Borders */
  --wp-border:        rgba(255, 255, 255, .07);
  --wp-border-strong: rgba(255, 255, 255, .13);

  /* Shadows (deeper) */
  --wp-shadow-low:  0 3px 10px rgba(0, 0, 0, .32);
  --wp-shadow-mid:  0 14px 32px rgba(0, 0, 0, .42);
  --wp-shadow-high: 0 28px 72px rgba(0, 0, 0, .58);

  /* Focus ring */
  --wp-ring: rgba(41, 167, 173, .30);

  /* Derived tokens */
  --card:      #131f2a;
  --bg:        var(--wp-bg);
  --text:      var(--wp-text);
  --muted:     var(--wp-muted);
  --border:    var(--wp-border);
  --row-hover: rgba(41, 167, 173, .07);

  --success-bg: rgba(19, 144, 100, .13);
  --danger-bg:  rgba(189, 51, 40, .13);
  --warning-bg: rgba(183, 106, 11, .14);

  /* Bootstrap overrides */
  --bs-body-color: #a8c4cc;
  --bs-body-bg: #0d1820;
}

/* ── html / body ── */
html[data-theme="dark"] {
  background: #0d1820;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 62% 52% at 10% 0%, rgba(41, 167, 173, .07), transparent 62%),
    radial-gradient(ellipse 46% 42% at 86% 10%, rgba(41, 167, 173, .05), transparent 64%),
    radial-gradient(ellipse 56% 48% at 78% 92%, rgba(19, 144, 100, .04), transparent 66%),
    linear-gradient(135deg, #0b1720 0%, #0f1e28 50%, #0c1a22 100%) !important;
  color: var(--wp-text) !important;
}

html[data-theme="dark"] body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .016) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .013) 1px, transparent 1px);
  background-size: 34px 34px;
}

html[data-theme="dark"] body::after {
  background: conic-gradient(from 130deg, transparent, rgba(41, 167, 173, .04), transparent, rgba(0, 0, 0, .08), transparent);
  opacity: .4;
}

/* ── Cards ── */
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .billing-card,
html[data-theme="dark"] .modal-content {
  border-color: rgba(255, 255, 255, .06) !important;
  background:
    linear-gradient(180deg, rgba(22, 36, 48, .97), rgba(17, 28, 38, .94)) !important;
  box-shadow:
    var(--wp-shadow-mid),
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 1px rgba(41, 167, 173, .04) !important;
}

html[data-theme="dark"] .admin-card::before,
html[data-theme="dark"] .billing-card::before {
  background: linear-gradient(90deg, transparent, rgba(41, 167, 173, .22), transparent);
}

html[data-theme="dark"] .admin-card:hover,
html[data-theme="dark"] .billing-card:hover {
  border-color: rgba(41, 167, 173, .14) !important;
  box-shadow:
    var(--wp-shadow-high),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 0 1px rgba(41, 167, 173, .06) !important;
}

/* ── Nav ── */
html[data-theme="dark"] .admin-nav {
  border-color: rgba(255, 255, 255, .06);
  background:
    linear-gradient(180deg, rgba(16, 28, 38, .92), rgba(12, 22, 30, .88));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .07);
}

html[data-theme="dark"] .admin-nav::before {
  background:
    radial-gradient(ellipse 36% 80% at 0% 50%, rgba(41, 167, 173, .08), transparent 68%),
    linear-gradient(90deg, rgba(41, 167, 173, .03), transparent 40%);
}

html[data-theme="dark"] .nav-brand {
  color: var(--wp-ink);
}

html[data-theme="dark"] .nav-brand-name {
  color: var(--wp-ink);
}

html[data-theme="dark"] .nav-item {
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] .nav-item:hover {
  border-color: rgba(41, 167, 173, .1);
  background: rgba(41, 167, 173, .08);
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] .nav-item.active {
  border-color: rgba(41, 167, 173, .2);
  background: linear-gradient(180deg, rgba(31, 52, 64, .96), rgba(22, 38, 50, .88));
  color: var(--wp-teal-2) !important;
}

html[data-theme="dark"] .nav-theme-btn {
  color: var(--wp-muted);
}

html[data-theme="dark"] .nav-theme-btn:hover {
  border-color: rgba(41, 167, 173, .1);
  background: rgba(41, 167, 173, .08);
  color: var(--wp-ink);
}

html[data-theme="dark"] .nav-user-chip {
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] .nav-suspension-banner {
  background: rgba(183, 106, 11, .18);
  color: #f0b860;
}

/* ── Stat / quick / seat cards ── */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .stat-box,
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .info-item,
html[data-theme="dark"] .seat-stat {
  border-color: rgba(255, 255, 255, .05) !important;
  background:
    linear-gradient(180deg, rgba(20, 34, 44, .96), rgba(15, 26, 35, .90)) !important;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, .18),
    0 14px 28px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .stat-box:hover,
html[data-theme="dark"] .quick-card:hover,
html[data-theme="dark"] .quick-card:focus,
html[data-theme="dark"] .seat-stat:hover {
  border-color: rgba(41, 167, 173, .16) !important;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, .18),
    0 22px 46px rgba(41, 167, 173, .1),
    inset 0 1px 0 rgba(255, 255, 255, .07) !important;
}

html[data-theme="dark"] .ops-mini-card {
  border-color: rgba(255, 255, 255, .05);
  background: rgba(18, 30, 40, .72);
}

html[data-theme="dark"] .ops-mini-card i {
  background: linear-gradient(180deg, rgba(31, 122, 130, .24), rgba(31, 122, 130, .14));
}

html[data-theme="dark"] .settings-control-card {
  border-color: rgba(255, 255, 255, .05);
  background: rgba(18, 30, 40, .62);
}

html[data-theme="dark"] .quick-card {
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] .quick-card:hover,
html[data-theme="dark"] .quick-card:focus {
  color: var(--wp-ink) !important;
}

/* ── Soft icon backgrounds (in dark mode, these need flipping to tinted darks) ── */
html[data-theme="dark"] .bg-teal-soft   { background: linear-gradient(180deg, rgba(31,122,130,.22), rgba(31,122,130,.14)) !important; }
html[data-theme="dark"] .bg-green-soft  { background: linear-gradient(180deg, rgba(19,144,100,.20), rgba(19,144,100,.12)) !important; }
html[data-theme="dark"] .bg-blue-soft   { background: linear-gradient(180deg, rgba(49,120,198,.22), rgba(49,120,198,.14)) !important; }
html[data-theme="dark"] .bg-purple-soft { background: linear-gradient(180deg, rgba(105,82,199,.22), rgba(105,82,199,.14)) !important; }

/* ── Forms ── */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .field,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  border-color: rgba(255, 255, 255, .1) !important;
  background:
    linear-gradient(180deg, rgba(16, 28, 38, .96), rgba(12, 22, 30, .92)) !important;
  color: var(--wp-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 1px 2px rgba(0, 0, 0, .12) !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .field:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color: rgba(41, 167, 173, .5) !important;
  background: rgba(16, 28, 40, .98) !important;
  box-shadow:
    0 0 0 4px rgba(41, 167, 173, .2),
    0 0 24px rgba(41, 167, 173, .08),
    inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .field::placeholder {
  color: rgba(168, 196, 204, .38) !important;
}

html[data-theme="dark"] input[type="date"].form-control,
html[data-theme="dark"] input[type="date"].form-control-sm {
  color-scheme: dark;
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  background-color: rgba(41, 167, 173, .12);
  filter: invert(0.7);
}

html[data-theme="dark"] .form-check-input {
  border-color: rgba(255, 255, 255, .18) !important;
  background-color: rgba(16, 28, 38, .9);
}

html[data-theme="dark"] .form-check-input:checked {
  background-color: var(--wp-teal) !important;
  border-color: var(--wp-teal) !important;
}

html[data-theme="dark"] .timepicker-popover {
  border-color: rgba(255, 255, 255, .07);
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(41, 167, 173, .08), transparent 62%),
    linear-gradient(180deg, rgba(18, 30, 42, .99), rgba(14, 24, 34, .97));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

html[data-theme="dark"] .timepicker-hour,
html[data-theme="dark"] .timepicker-minute {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(14, 24, 32, .8);
  color: var(--wp-ink);
}

html[data-theme="dark"] .timepicker-meridiem,
html[data-theme="dark"] .timepicker-presets {
  border-color: rgba(255, 255, 255, .06);
  background: rgba(12, 20, 28, .5);
}

html[data-theme="dark"] .timepicker-meridiem button,
html[data-theme="dark"] .timepicker-presets button {
  color: var(--wp-muted);
}

html[data-theme="dark"] .timepicker-meridiem button:hover,
html[data-theme="dark"] .timepicker-presets button:hover {
  background: rgba(41, 167, 173, .12);
  color: var(--wp-teal-2);
}

html[data-theme="dark"] .timepicker-meridiem button.active {
  border-color: rgba(41, 167, 173, .24);
  background: linear-gradient(180deg, rgba(22, 48, 58, .96), rgba(17, 36, 46, .86));
  color: var(--wp-teal-2);
}

html[data-theme="dark"] .timepicker-presets button {
  border-color: rgba(255, 255, 255, .06);
  background: rgba(14, 24, 32, .5);
}

/* ── Buttons — outline / secondary variants ── */
html[data-theme="dark"] .btn-outline-teal,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-secondary {
  border-color: rgba(255, 255, 255, .1) !important;
  background:
    linear-gradient(180deg, rgba(22, 36, 48, .95), rgba(16, 28, 38, .88)) !important;
  color: var(--wp-teal-2) !important;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, .14),
    0 8px 18px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

html[data-theme="dark"] .btn-outline-teal:hover,
html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-secondary:hover {
  border-color: rgba(41, 167, 173, .3) !important;
  background: rgba(41, 167, 173, .1) !important;
  color: var(--wp-teal-2) !important;
}

html[data-theme="dark"] .btn-danger,
html[data-theme="dark"] .btn-outline-danger {
  border-color: rgba(189, 51, 40, .24) !important;
  background: rgba(189, 51, 40, .12) !important;
  color: #f08880 !important;
}

html[data-theme="dark"] .btn-danger:hover,
html[data-theme="dark"] .btn-outline-danger:hover {
  background: var(--wp-red) !important;
  color: #fff !important;
}

html[data-theme="dark"] .btn-outline-success {
  border-color: rgba(19, 144, 100, .24) !important;
  background: rgba(19, 144, 100, .12) !important;
  color: #5bdb9e !important;
}

html[data-theme="dark"] .btn-ghost {
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] .btn-ghost:hover {
  background: rgba(41, 167, 173, .1) !important;
  color: var(--wp-ink) !important;
}

/* ── Tables ── */
html[data-theme="dark"] .table-responsive {
  border-color: rgba(255, 255, 255, .06);
  background: rgba(14, 24, 34, .6);
}

html[data-theme="dark"] thead,
html[data-theme="dark"] .table-light {
  background:
    linear-gradient(180deg, rgba(18, 30, 42, .96), rgba(14, 24, 34, .92)) !important;
}

html[data-theme="dark"] th,
html[data-theme="dark"] .table thead th {
  border-bottom-color: rgba(255, 255, 255, .07) !important;
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] td,
html[data-theme="dark"] .table td {
  border-bottom-color: rgba(255, 255, 255, .05) !important;
  color: var(--wp-text) !important;
}

html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .table-hover tbody tr:hover {
  background: rgba(41, 167, 173, .06) !important;
}

/* ── Tab bar ── */
html[data-theme="dark"] .tab-btn {
  border-color: rgba(255, 255, 255, .07) !important;
  background: rgba(14, 24, 34, .58) !important;
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] .tab-btn:hover {
  border-color: rgba(41, 167, 173, .16) !important;
  background: rgba(41, 167, 173, .08) !important;
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] .tab-btn.active {
  border-color: rgba(41, 167, 173, .22) !important;
  background: linear-gradient(180deg, rgba(22, 42, 54, .96), rgba(16, 32, 44, .88)) !important;
  color: var(--wp-teal-2) !important;
}

/* ── Filter bar, period cards, diff-box, empty-state ── */
html[data-theme="dark"] .filter-bar {
  border-color: rgba(255, 255, 255, .06);
  background: rgba(14, 24, 34, .58);
}

html[data-theme="dark"] .period-card,
html[data-theme="dark"] .diff-box,
html[data-theme="dark"] .empty-state {
  border-color: rgba(255, 255, 255, .06) !important;
  background: rgba(14, 24, 34, .62) !important;
}

html[data-theme="dark"] .period-card:hover {
  border-color: rgba(41, 167, 173, .14) !important;
}

/* ── Badges / pills — keep colors, just darken backgrounds ── */
html[data-theme="dark"] .pill.ok,
html[data-theme="dark"] .badge-emp,
html[data-theme="dark"] .inv-paid,
html[data-theme="dark"] .kiosk-pill {
  border-color: rgba(19, 144, 100, .22) !important;
  background: rgba(19, 144, 100, .14) !important;
  color: #5dcea0 !important;
}

html[data-theme="dark"] .pill.bad,
html[data-theme="dark"] .badge-forced,
html[data-theme="dark"] .badge-user-del {
  border-color: rgba(189, 51, 40, .22) !important;
  background: rgba(189, 51, 40, .14) !important;
  color: #f08880 !important;
}

html[data-theme="dark"] .badge-manual,
html[data-theme="dark"] .badge-emp-warn,
html[data-theme="dark"] .inv-open,
html[data-theme="dark"] .canceling-badge {
  border-color: rgba(183, 106, 11, .24) !important;
  background: rgba(183, 106, 11, .14) !important;
  color: #f0b860 !important;
}

html[data-theme="dark"] .badge-user,
html[data-theme="dark"] .badge-adjusted {
  border-color: rgba(49, 120, 198, .22) !important;
  background: rgba(49, 120, 198, .14) !important;
  color: #7ab4f0 !important;
}

html[data-theme="dark"] .badge-ot {
  border-color: rgba(105, 82, 199, .22) !important;
  background: rgba(105, 82, 199, .14) !important;
  color: #b09af0 !important;
}

html[data-theme="dark"] .badge-pending {
  border-color: rgba(183, 106, 11, .24) !important;
  background: rgba(183, 106, 11, .14) !important;
  color: #f0b860 !important;
}

html[data-theme="dark"] .badge-approved {
  border-color: rgba(19, 144, 100, .22) !important;
  background: rgba(19, 144, 100, .13) !important;
  color: #5dcea0 !important;
}

html[data-theme="dark"] .badge-rejected {
  border-color: rgba(189, 51, 40, .22) !important;
  background: rgba(189, 51, 40, .13) !important;
  color: #f08880 !important;
}

/* ── Status banners ── */
html[data-theme="dark"] .status-banner,
html[data-theme="dark"] .seat-banner {
  border-color: rgba(255, 255, 255, .06) !important;
  background:
    linear-gradient(180deg, rgba(20, 34, 46, .96), rgba(15, 26, 36, .92)) !important;
}

html[data-theme="dark"] .status-banner.active {
  border-color: rgba(19, 144, 100, .18) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(19, 144, 100, .1), transparent 68%),
    linear-gradient(180deg, rgba(18, 34, 28, .96), rgba(14, 26, 22, .92)) !important;
}

html[data-theme="dark"] .status-banner.trialing {
  border-color: rgba(49, 120, 198, .18) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(49, 120, 198, .1), transparent 68%),
    linear-gradient(180deg, rgba(16, 28, 46, .96), rgba(12, 22, 36, .92)) !important;
}

html[data-theme="dark"] .status-banner.past-due {
  border-color: rgba(183, 106, 11, .2) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(183, 106, 11, .1), transparent 68%),
    linear-gradient(180deg, rgba(28, 22, 10, .96), rgba(22, 18, 8, .92)) !important;
}

html[data-theme="dark"] .status-banner.canceled,
html[data-theme="dark"] .status-banner.inactive {
  border-color: rgba(189, 51, 40, .2) !important;
  background:
    radial-gradient(ellipse 42% 90% at 0% 50%, rgba(189, 51, 40, .1), transparent 68%),
    linear-gradient(180deg, rgba(28, 14, 12, .96), rgba(22, 10, 8, .92)) !important;
}

html[data-theme="dark"] .status-icon {
  background: rgba(41, 167, 173, .14);
}

html[data-theme="dark"] .status-banner.active .status-icon,
html[data-theme="dark"] .status-banner.trialing .status-icon {
  background: rgba(19, 144, 100, .14);
}

html[data-theme="dark"] .status-banner.past-due .status-icon {
  background: rgba(183, 106, 11, .14);
}

html[data-theme="dark"] .status-banner.canceled .status-icon,
html[data-theme="dark"] .status-banner.inactive .status-icon {
  background: rgba(189, 51, 40, .14);
}

/* ── Progress bars ── */
html[data-theme="dark"] .seat-bar,
html[data-theme="dark"] .seat-progress-bar {
  background: rgba(255, 255, 255, .08) !important;
}

/* ── Modals (Bootstrap) ── */
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: rgba(255, 255, 255, .07) !important;
}

html[data-theme="dark"] .modal-backdrop.show {
  background: rgba(4, 10, 16, .72);
}

/* ── WPModal (custom dialog system) ── */
html[data-theme="dark"] .wpm-overlay {
  background: rgba(4, 10, 18, .62);
}

html[data-theme="dark"] .wpm-box {
  background: linear-gradient(
    160deg,
    rgba(20, 34, 46, .99) 0%,
    rgba(15, 26, 36, .98) 100%
  );
  border-color: rgba(255, 255, 255, .07);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, .6),
    0 12px 32px rgba(0, 0, 0, .36),
    0 0 0 1px rgba(41, 167, 173, .06),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

html[data-theme="dark"] .wpm-title {
  color: var(--wp-ink);
}

html[data-theme="dark"] .wpm-message {
  color: var(--wp-text);
}

html[data-theme="dark"] .wpm-detail {
  color: var(--wp-muted);
  background: rgba(255, 255, 255, .04);
  border-left-color: rgba(41, 167, 173, .24);
}

html[data-theme="dark"] .wpm-btn--ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--wp-muted);
  border-color: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .wpm-btn--ghost:hover,
html[data-theme="dark"] .wpm-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, .10);
  color: var(--wp-ink);
}

/* ── Icon rings (WPModal) ── */
html[data-theme="dark"] .wpm-icon-ring--info    { background: rgba(49,120,198,.16);  box-shadow: 0 0 0 8px rgba(49,120,198,.06); }
html[data-theme="dark"] .wpm-icon-ring--warning  { background: rgba(183,106,11,.16);  box-shadow: 0 0 0 8px rgba(183,106,11,.06); }
html[data-theme="dark"] .wpm-icon-ring--error    { background: rgba(189,51,40,.16);   box-shadow: 0 0 0 8px rgba(189,51,40,.06); }
html[data-theme="dark"] .wpm-icon-ring--success  { background: rgba(19,144,100,.16);  box-shadow: 0 0 0 8px rgba(19,144,100,.06); }
html[data-theme="dark"] .wpm-icon-ring--destructive { background: rgba(189,51,40,.16); box-shadow: 0 0 0 8px rgba(189,51,40,.06); }
html[data-theme="dark"] .wpm-icon-ring--confirm  { background: rgba(31,122,130,.16);  box-shadow: 0 0 0 8px rgba(31,122,130,.08); }

/* ── Help page elements ── */
html[data-theme="dark"] .help-icon {
  border-color: rgba(41, 167, 173, .18) !important;
  background: linear-gradient(180deg, rgba(31,122,130,.22), rgba(31,122,130,.12)) !important;
}

html[data-theme="dark"] .toc-link {
  border-color: rgba(255, 255, 255, .07) !important;
  background: rgba(14, 24, 34, .62) !important;
  color: var(--wp-text) !important;
}

html[data-theme="dark"] .toc-link:hover {
  border-color: rgba(41, 167, 173, .2) !important;
  background: rgba(41, 167, 173, .08) !important;
  color: var(--wp-teal-2) !important;
}

html[data-theme="dark"] .callout-info {
  background: rgba(49, 120, 198, .12) !important;
  color: #7ab4f0 !important;
  border-color: rgba(49, 120, 198, .24) !important;
}

html[data-theme="dark"] .callout-warn {
  background: rgba(183, 106, 11, .12) !important;
  color: #f0b860 !important;
  border-color: rgba(183, 106, 11, .24) !important;
}

html[data-theme="dark"] .callout-tip {
  background: rgba(41, 167, 173, .10) !important;
  color: var(--wp-teal-2) !important;
  border-color: rgba(41, 167, 173, .22) !important;
}

/* ── Dividers / HR ── */
html[data-theme="dark"] .billing-divider,
html[data-theme="dark"] hr {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent) !important;
}

/* ── Invoice rows, toggle rows ── */
html[data-theme="dark"] .invoice-row,
html[data-theme="dark"] .toggle-row {
  border-bottom-color: rgba(255, 255, 255, .06) !important;
}

html[data-theme="dark"] .settings-save-row {
  border-top-color: rgba(255, 255, 255, .07) !important;
}

/* ── User role badges (user.html) ── */
html[data-theme="dark"] .role-owner   { background: rgba(105,82,199,.16)  !important; color: #c4b2ff !important; border-color: rgba(105,82,199,.24) !important; }
html[data-theme="dark"] .role-admin   { background: rgba(31,122,130,.16)  !important; color: #5ddde6 !important; border-color: rgba(31,122,130,.24) !important; }
html[data-theme="dark"] .role-billing_manager { background: rgba(49,120,198,.16) !important; color: #7ab4f0 !important; border-color: rgba(49,120,198,.24) !important; }
html[data-theme="dark"] .role-payroll_manager { background: rgba(41,167,173,.14) !important; color: #5ddde6 !important; border-color: rgba(41,167,173,.22) !important; }
html[data-theme="dark"] .role-hr_manager      { background: rgba(19,144,100,.14) !important; color: #5dcea0 !important; border-color: rgba(19,144,100,.22) !important; }
html[data-theme="dark"] .role-manager         { background: rgba(183,106,11,.14) !important; color: #f0b860 !important; border-color: rgba(183,106,11,.22) !important; }
html[data-theme="dark"] .role-scheduler       { background: rgba(79,95,170,.16) !important;  color: #a8b8f8 !important; border-color: rgba(79,95,170,.24) !important; }
html[data-theme="dark"] .role-auditor         { background: rgba(100,120,130,.14) !important; color: #98b4bc !important; border-color: rgba(100,120,130,.22) !important; }
html[data-theme="dark"] .role-employee        { background: rgba(60,60,60,.2) !important;    color: #8899a6 !important; border-color: rgba(100,100,100,.22) !important; }

/* ── Bootstrap alerts ── */
html[data-theme="dark"] .alert-success {
  background: rgba(19, 144, 100, .12) !important;
  border-color: rgba(19, 144, 100, .22) !important;
  color: #5dcea0 !important;
}

html[data-theme="dark"] .alert-danger {
  background: rgba(189, 51, 40, .12) !important;
  border-color: rgba(189, 51, 40, .22) !important;
  color: #f08880 !important;
}

html[data-theme="dark"] .alert-warning {
  background: rgba(183, 106, 11, .12) !important;
  border-color: rgba(183, 106, 11, .22) !important;
  color: #f0b860 !important;
}

html[data-theme="dark"] .alert-info {
  background: rgba(49, 120, 198, .12) !important;
  border-color: rgba(49, 120, 198, .22) !important;
  color: #7ab4f0 !important;
}

/* ── Nav suspension banner ── */
html[data-theme="dark"] .nav-suspension-banner {
  background: rgba(183, 106, 11, .18);
  border-color: rgba(183, 106, 11, .22);
}

html[data-theme="dark"] .nav-suspension-banner a {
  color: #f0b860;
}

/* ── Access denied page ── */
html[data-theme="dark"] .access-denied-card {
  border-color: rgba(189, 51, 40, .16) !important;
  background: linear-gradient(180deg, rgba(28, 14, 20, .96), rgba(20, 10, 14, .92)) !important;
}

/* ── Command hero card (admin.html) ── */
html[data-theme="dark"] .command-hero {
  background:
    radial-gradient(ellipse 62% 80% at 0% 0%, rgba(41, 167, 173, .08), transparent 62%),
    radial-gradient(ellipse 50% 60% at 100% 18%, rgba(19, 144, 100, .06), transparent 68%),
    linear-gradient(180deg, rgba(22, 36, 48, .97), rgba(17, 28, 38, .94)) !important;
}

/* ── App legacy header ── */
html[data-theme="dark"] .app-header {
  border-bottom-color: rgba(255, 255, 255, .07);
  background: rgba(14, 24, 34, .92);
}

/* ── Transitions — smooth theme switching ── */
html,
body,
.admin-card,
.billing-card,
.modal-content,
.admin-nav,
.stat-card,
.stat-box,
.quick-card,
.seat-stat,
.form-control,
.form-select,
.table-responsive,
.wpm-box,
.tab-btn,
.filter-bar,
.period-card {
  transition:
    background .22s ease,
    background-color .22s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR APP SHELL v2 — Fixed left sidebar + sticky topbar + content
   ═══════════════════════════════════════════════════════════════════════ */

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

/* Sidebar */
.wp-sidebar {
  width: 256px; flex-shrink: 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 300; display: flex; flex-direction: column;
  background: var(--wp-surface); border-right: 1px solid var(--wp-border);
  transition: width 240ms cubic-bezier(.4,0,.2,1), transform 240ms cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.wp-sidebar.is-collapsed { width: 64px; }

/* Sidebar brand */
.wp-sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px 14px; border-bottom: 1px solid var(--wp-border);
  text-decoration: none; flex-shrink: 0; min-height: 60px;
}
.wp-sb-brand-link {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1;
  color: inherit; text-decoration: none;
}
.wp-sb-brand-link:hover { color: inherit; text-decoration: none; }
.wp-sb-brand-icon {
  width: 32px; height: 32px; border-radius: 9px; background: var(--wp-teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.wp-sb-brand-icon svg { width: 17px; height: 17px; }
.wp-sb-brand-copy {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  transition: opacity 180ms ease, width 240ms cubic-bezier(.4,0,.2,1);
}
.wp-sb-brand-name {
  font-weight: 800; font-size: 13.5px; color: var(--wp-ink);
  white-space: nowrap; line-height: 1.2; overflow: hidden; text-overflow: ellipsis;
}
.wp-sb-brand-meta {
  font-size: 9.5px; font-weight: 700; color: var(--wp-muted);
  text-transform: uppercase; letter-spacing: .7px; white-space: nowrap;
}
.wp-sb-collapse-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 8px;
  color: var(--wp-muted); background: transparent; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .12s ease;
}
.wp-sb-collapse-btn:hover {
  background: var(--wp-teal-soft); border-color: var(--wp-teal-2); color: var(--wp-teal);
}
.wp-sidebar.is-collapsed .wp-sb-brand-copy { opacity: 0; width: 0; pointer-events: none; }
.wp-sidebar.is-collapsed .wp-sb-collapse-btn { display: none; }

/* Sidebar scrollable nav */
.wp-sb-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: var(--wp-border) transparent;
}
.wp-sb-nav::-webkit-scrollbar { width: 4px; }
.wp-sb-nav::-webkit-scrollbar-thumb { background: var(--wp-border); border-radius: 4px; }

/* Nav group */
.wp-nav-group { margin-bottom: 2px; }
.wp-nav-group-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 18px 3px 20px; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; color: var(--wp-muted);
  white-space: nowrap; overflow: hidden; cursor: pointer; list-style: none;
  transition: opacity 180ms ease, max-height 240ms ease, padding 240ms ease;
}
.wp-nav-group-label::-webkit-details-marker { display: none; }
.wp-nav-group-label i {
  font-size: 10px; transition: transform .16s ease; color: currentColor; opacity: .72;
}
.wp-nav-group[open] > .wp-nav-group-label i { transform: rotate(180deg); }
.wp-nav-group:not([open]) { margin-bottom: 5px; }
.wp-sidebar.is-collapsed .wp-nav-group-label {
  opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; pointer-events: none;
}

/* Nav item */
.wp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; margin: 1px 8px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--wp-text);
  text-decoration: none; cursor: pointer; border: none;
  background: transparent; width: calc(100% - 16px);
  text-align: left; white-space: nowrap;
  transition: background .14s ease, color .12s ease; position: relative;
}
.wp-nav-item i { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.wp-nav-label,
.wp-nav-item-label {
  flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: opacity 180ms ease, max-width 240ms cubic-bezier(.4,0,.2,1);
}
.wp-nav-item:hover { background: var(--wp-teal-soft); color: var(--wp-teal); }
.wp-nav-item.active { background: var(--wp-teal-soft); color: var(--wp-teal); font-weight: 600; }
.wp-nav-item.active i { color: var(--wp-teal); }
.wp-nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--wp-teal);
}
.wp-sidebar.is-collapsed .wp-nav-item { justify-content: center; padding: 9px 8px; }
.wp-sidebar.is-collapsed .wp-nav-label,
.wp-sidebar.is-collapsed .wp-nav-item-label { opacity: 0; max-width: 0; overflow: hidden; }
.wp-nav-badge {
  font-size: 9px; font-weight: 800; background: var(--wp-red);
  color: #fff; padding: 1px 5px; border-radius: 100px; flex-shrink: 0;
}

/* Sidebar suspension banner */
.wp-sb-suspension {
  margin: 8px 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--wp-amber-soft); border: 1px solid rgba(183,106,11,.22);
  font-size: 11px; color: var(--wp-amber);
  display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0;
}
.wp-sb-suspension i { margin-top: 1px; flex-shrink: 0; }
.wp-sb-suspension a { color: var(--wp-amber); font-weight: 600; }
.wp-sidebar.is-collapsed .wp-sb-suspension { display: none; }

/* Sidebar footer */
.wp-sb-footer { border-top: 1px solid var(--wp-border); padding: 8px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }

/* Main area */
.wp-main {
  flex: 1; min-width: 0; margin-left: 256px;
  display: flex; flex-direction: column; min-height: 100vh;
  transition: margin-left 240ms cubic-bezier(.4,0,.2,1);
}
.wp-sidebar.is-collapsed ~ .wp-main { margin-left: 64px; }

/* Topbar */
.wp-topbar {
  height: 56px; flex-shrink: 0; position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: rgba(255,255,255,.94); border-bottom: 1px solid var(--wp-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.wp-topbar-inner {
  width: 100%; min-width: 0;
  display: flex; align-items: center; gap: 12px;
}
.wp-topbar-start { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.wp-topbar-end { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wp-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.wp-sidebar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; background: transparent;
  border-radius: 8px; color: var(--wp-muted); cursor: pointer; flex-shrink: 0;
  transition: background .14s ease, color .12s ease;
}
.wp-sidebar-toggle:hover { background: var(--wp-teal-soft); color: var(--wp-teal); }
.wp-sidebar-toggle i { font-size: 18px; }
.wp-topbar-breadcrumb {
  font-size: 14px; font-weight: 600; color: var(--wp-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wp-topbar-org {
  display: flex; align-items: center; gap: 7px;
  max-width: 240px; min-width: 0;
  padding: 5px 10px; border-radius: 999px;
  background: var(--wp-surface-2); border: 1px solid var(--wp-border);
  font-size: 12px; font-weight: 700; color: var(--wp-text);
}
.wp-topbar-org span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-topbar-org i { color: var(--wp-teal); font-size: 13px; flex-shrink: 0; }
.wp-topbar-search {
  width: min(28vw, 280px); min-width: 160px;
  height: 34px; display: flex; align-items: center; gap: 7px;
  padding: 0 10px; margin: 0; border-radius: 9px;
  background: var(--wp-surface-2); border: 1px solid var(--wp-border);
  color: var(--wp-muted);
}
.wp-topbar-search input {
  width: 100%; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--wp-text);
  font: inherit; font-size: 12.5px;
}
.wp-topbar-search input::placeholder { color: var(--wp-muted); }
.wp-topbar-suspension {
  padding: 5px 11px; border-radius: 20px; font-size: 11px;
  background: var(--wp-amber-soft); border: 1px solid rgba(183,106,11,.22);
  color: var(--wp-amber); display: flex; align-items: center; gap: 6px;
}
.wp-topbar-suspension a { color: var(--wp-amber); font-weight: 700; }
.wp-topbar-user {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 20px; background: var(--wp-surface-2);
  border: 1px solid var(--wp-border); font-size: 12.5px; font-weight: 600;
  color: var(--wp-text); white-space: nowrap; cursor: pointer;
}
.wp-topbar-user i { font-size: 14px; color: var(--wp-muted); }
.wp-topbar-user:hover { background: var(--wp-teal-soft); border-color: var(--wp-teal-2); color: var(--wp-teal); }
.wp-user-chevron { font-size: 10px !important; }
.wp-profile-menu {
  min-width: 220px; padding: 7px;
  border: 1px solid var(--wp-border); border-radius: 12px;
  box-shadow: var(--wp-shadow-high);
}
.wp-profile-menu-header {
  display: grid; gap: 2px; padding: 8px 10px 6px;
  font-size: 12px; color: var(--wp-text);
}
.wp-profile-menu-header strong { color: var(--wp-ink); font-size: 13px; }
.wp-profile-menu-header span { color: var(--wp-muted); overflow: hidden; text-overflow: ellipsis; }
.wp-topbar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--wp-border);
  background: var(--wp-surface-2); border-radius: 8px; color: var(--wp-muted);
  cursor: pointer; text-decoration: none; font-size: 14px;
  transition: background .14s ease, color .12s ease, border-color .12s ease;
}
.wp-topbar-btn:hover { background: var(--wp-teal-soft); color: var(--wp-teal); border-color: var(--wp-teal-2); }

/* Content area */
.wp-content { flex: 1; padding: 28px 28px 60px; min-width: 0; }
.wp-content > .page,
.wp-content .page { margin-top: 0 !important; margin-bottom: 0 !important; }
.wp-content.wp-content--centered { display: flex; align-items: center; justify-content: center; }

/* Mobile backdrop */
.wp-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 299; background: rgba(10,22,30,.4); backdrop-filter: blur(2px); }
.wp-sidebar-backdrop.is-visible,
.wp-sidebar-backdrop.is-active { display: block; }

/* Responsive */
@media (max-width: 1023px) {
  .wp-sidebar { transform: translateX(-260px); width: 260px !important; box-shadow: var(--wp-shadow-high); }
  .wp-sidebar.is-open { transform: translateX(0); }
  .wp-main { margin-left: 0 !important; }
  .wp-topbar { padding: 0 16px; }
  .wp-topbar-search { display: none; }
  .wp-content { padding: 20px 16px 60px; }
  .wp-nav-group-label { opacity: 1 !important; max-height: none !important; padding-top: 10px !important; padding-bottom: 3px !important; }
  .wp-nav-item { justify-content: flex-start !important; padding: 8px 14px !important; }
  .wp-nav-label,
  .wp-nav-item-label { opacity: 1 !important; max-width: none !important; }
}
@media (max-width: 767px) {
  .wp-topbar-user span { display: none; }
  .wp-topbar-org,
  .wp-topbar-search,
  .wp-topbar-suspension { display: none; }
  .wp-content { padding: 16px 12px 56px; }
}

/* Dark mode */
html[data-theme="dark"] .wp-sidebar { background: rgba(12,22,30,.97); border-right-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .wp-sb-brand-name { color: #ddedf1; }
html[data-theme="dark"] .wp-sb-brand-meta { color: #3d5e66; }
html[data-theme="dark"] .wp-sb-collapse-btn { color: #6a8d97; }
html[data-theme="dark"] .wp-sb-collapse-btn:hover {
  background: rgba(41,167,173,.08); border-color: rgba(41,167,173,.18); color: #5ddde6;
}
html[data-theme="dark"] .wp-nav-group-label { color: #3d5e66; }
html[data-theme="dark"] .wp-nav-item { color: #98b4bc; }
html[data-theme="dark"] .wp-nav-item:hover { background: rgba(41,167,173,.08); color: #5ddde6; }
html[data-theme="dark"] .wp-nav-item.active { background: rgba(41,167,173,.12); color: #5ddde6; }
html[data-theme="dark"] .wp-nav-item.active i { color: #5ddde6; }
html[data-theme="dark"] .wp-nav-item.active::before { background: #29a7ad; }
html[data-theme="dark"] .wp-sb-footer { border-top-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .wp-sb-suspension { background: rgba(183,106,11,.1); border-color: rgba(183,106,11,.18); }
html[data-theme="dark"] .wp-topbar { background: rgba(12,22,30,.93); border-bottom-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .wp-topbar-breadcrumb { color: #ddedf1; }
html[data-theme="dark"] .wp-topbar-org,
html[data-theme="dark"] .wp-topbar-search {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); color: #98b4bc;
}
html[data-theme="dark"] .wp-topbar-search input { color: #ddedf1; }
html[data-theme="dark"] .wp-topbar-user { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); color: #98b4bc; }
html[data-theme="dark"] .wp-topbar-user:hover { background: rgba(41,167,173,.1); color: #5ddde6; border-color: rgba(41,167,173,.22); }
html[data-theme="dark"] .wp-profile-menu { background: #12202c; border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .wp-profile-menu .dropdown-item { color: #98b4bc; }
html[data-theme="dark"] .wp-profile-menu .dropdown-item:hover { background: rgba(41,167,173,.1); color: #5ddde6; }
html[data-theme="dark"] .wp-profile-menu-header strong { color: #ddedf1; }
html[data-theme="dark"] .wp-profile-menu-header span { color: #6a8d97; }
html[data-theme="dark"] .wp-profile-menu .dropdown-divider { border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .wp-topbar-btn { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); color: #6a8d97; }
html[data-theme="dark"] .wp-topbar-btn:hover { background: rgba(41,167,173,.1); color: #5ddde6; border-color: rgba(41,167,173,.22); }
html[data-theme="dark"] .wp-sidebar-toggle { color: #6a8d97; }
html[data-theme="dark"] .wp-sidebar-toggle:hover { background: rgba(41,167,173,.08); color: #5ddde6; }
html[data-theme="dark"] .wp-topbar-suspension { background: rgba(183,106,11,.1); border-color: rgba(183,106,11,.18); }
html[data-theme="dark"] .wp-topbar-suspension a { color: #f0b860; }

/* Theme-transition inclusions for new shell elements */
.wp-sidebar, .wp-topbar, .wp-sb-brand-name, .wp-nav-item, .wp-topbar-user, .wp-topbar-btn, .wp-sidebar-toggle, .wp-topbar-org, .wp-topbar-search {
  transition: background .22s ease, background-color .22s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}
