/*
  WellnessPlace AI global design layer.
  This file intentionally upgrades existing markup without replacing page-specific designs.
*/
:root {
  --wp-primary: #0f766e;
  --wp-primary-dark: #064e3b;
  --wp-primary-soft: #dff7ee;
  --wp-leaf: #22c55e;
  --wp-mint: #ecfdf5;
  --wp-gold: #f6b73c;
  --wp-blue: #2563eb;
  --wp-purple: #7c3aed;
  --wp-warning: #d97706;
  --wp-danger: #dc2626;
  --wp-bg: #f6faf8;
  --wp-bg-soft: #f0f7f4;
  --wp-card: #ffffff;
  --wp-card-subtle: #fbfefd;
  --wp-border: #dcebe5;
  --wp-border-strong: #bad8ce;
  --wp-text: #10201c;
  --wp-muted: #66756f;
  --wp-muted-2: #899792;
  --wp-focus: 0 0 0 4px rgba(15, 118, 110, .18);
  --wp-shadow-sm: 0 8px 20px rgba(15, 32, 28, .06);
  --wp-shadow: 0 16px 42px rgba(15, 32, 28, .09);
  --wp-shadow-lg: 0 24px 60px rgba(15, 32, 28, .14);
  --wp-radius-sm: 8px;
  --wp-radius: 14px;
  --wp-radius-lg: 22px;
  --wp-radius-pill: 999px;
  --wp-page-pad: clamp(14px, 2.4vw, 32px);
  --wp-card-pad: clamp(16px, 2vw, 24px);
  --wp-gap: clamp(12px, 1.8vw, 22px);
  --wp-font: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --wp-content-max: 1440px;
}

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

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--wp-text);
  background: var(--wp-bg);
  font-family: var(--wp-font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--wp-primary);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

a:hover {
  color: var(--wp-primary-dark);
}

:focus-visible {
  outline: none;
  box-shadow: var(--wp-focus);
}

h1,
.page-title,
.wp-page-title,
.ng-hero h1,
.zhe-hero h1 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 850;
}

h2,
.section-title,
.wp-section-title {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
}

h3,
.wp-card-title {
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 780;
}

p,
li,
td,
th,
label,
input,
select,
textarea,
button {
  line-height: 1.55;
}

.page-shell,
.wp-page-shell,
.ng-page,
.zhe-research,
.content-wrapper > .container,
.content-wrapper > .container-fluid {
  width: min(100%, var(--wp-content-max));
  margin-inline: auto;
  padding-inline: var(--wp-page-pad);
}

.page-header,
.wp-page-header,
.section,
.wp-section {
  margin-bottom: var(--wp-gap);
}

.page-subtitle,
.wp-page-subtitle,
.wp-card-subtitle {
  color: var(--wp-muted);
  max-width: 900px;
}

.card-grid,
.wp-card-grid,
.metric-grid,
.wp-metric-grid,
.ng-grid,
.zhe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--wp-gap);
  min-width: 0;
}

.wp-card,
.content-card,
.action-card,
.metric-card,
.ng-card,
.ng-panel,
.zhe-card,
.zhe-panel,
.plan-card,
.demo-card,
.card {
  background: var(--wp-card);
  border: 1px solid rgba(15, 118, 110, .11);
  border-radius: var(--wp-radius);
  box-shadow: var(--wp-shadow-sm);
  min-width: 0;
  overflow-wrap: anywhere;
}

.wp-card,
.content-card,
.action-card,
.metric-card {
  padding: var(--wp-card-pad);
}

.wp-card:hover,
.action-card:hover,
.metric-card:hover,
.demo-card:hover,
.plan-card:hover {
  box-shadow: var(--wp-shadow);
  transform: translateY(-1px);
}

.wp-metric,
.ng-card strong,
.zhe-card strong,
.metric-value,
.stat-value {
  display: block;
  color: var(--wp-primary-dark);
  font-size: clamp(1.7rem, 4vw, 2.65rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.wp-metric-label,
.ng-card span,
.zhe-card span,
.metric-label,
.stat-label {
  display: block;
  color: var(--wp-muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wp-icon-badge {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--wp-primary-soft);
  color: var(--wp-primary);
}

.wp-btn,
.ng-btn,
.zhe-btn,
.ng-actions a,
.ng-actions button,
.btn,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 42px;
  border-radius: var(--wp-radius-pill);
  border: 1px solid transparent;
  padding: .64rem 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}

.wp-btn:hover,
.ng-btn:hover,
.zhe-btn:hover,
.ng-actions a:hover,
.ng-actions button:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
}

.wp-btn-primary,
.btn-primary,
button[type="submit"],
input[type="submit"] {
  background: var(--wp-primary);
  color: #fff;
  border-color: var(--wp-primary);
}

.wp-btn-secondary,
.btn-secondary {
  background: var(--wp-primary-soft);
  color: var(--wp-primary-dark);
  border-color: var(--wp-border);
}

.wp-btn-success,
.btn-success {
  background: var(--wp-leaf);
  color: #fff;
}

.wp-btn-warning,
.btn-warning {
  background: var(--wp-warning);
  color: #fff;
}

.wp-btn-danger,
.btn-danger {
  background: var(--wp-danger);
  color: #fff;
}

.wp-btn-ghost,
.wp-btn-outline,
.btn-outline-primary {
  background: transparent;
  color: var(--wp-primary);
  border-color: var(--wp-border-strong);
}

.wp-btn-sm,
.btn-sm {
  min-height: 34px;
  padding: .42rem .72rem;
  font-size: .85rem;
}

.wp-btn-lg,
.btn-lg {
  min-height: 50px;
  padding: .82rem 1.25rem;
}

.wp-btn-block,
.btn-block {
  width: 100%;
}

.wp-form,
.ng-form,
form {
  min-width: 0;
}

.wp-form-group,
.form-group,
.mb-3 {
  margin-bottom: 1rem;
}

.wp-label,
label {
  color: var(--wp-text);
  font-weight: 750;
  margin-bottom: .36rem;
}

.wp-input,
.wp-select,
.wp-textarea,
.form-control,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--wp-border);
  border-radius: 12px;
  background: #fff;
  color: var(--wp-text);
  padding: .68rem .78rem;
  box-shadow: none;
}

textarea,
.wp-textarea {
  min-height: 108px;
  resize: vertical;
}

.wp-input:focus,
.wp-select:focus,
.wp-textarea:focus,
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--wp-primary);
  outline: none;
  box-shadow: var(--wp-focus);
}

.wp-help,
.form-text,
small {
  color: var(--wp-muted);
  font-size: .86rem;
}

.wp-alert,
.alert,
.ng-flash {
  border: 1px solid transparent;
  border-radius: var(--wp-radius);
  padding: .9rem 1rem;
  font-weight: 700;
}

.wp-alert-success,
.alert-success,
.ng-flash {
  color: #065f46;
  background: #e7f8ef;
  border-color: #b9ebd0;
}

.wp-alert-warning,
.alert-warning {
  color: #7c3d00;
  background: #fff7e6;
  border-color: #ffd993;
}

.wp-alert-danger,
.alert-danger,
.ng-flash.error,
.error {
  color: #991b1b;
  background: #fff1f2;
  border-color: #fecdd3;
}

.wp-alert-info,
.alert-info {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.wp-table-wrapper,
.table-responsive,
.wp-auto-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--wp-radius);
}

.wp-table,
.ng-table,
.zhe-table,
table {
  max-width: 100%;
  border-collapse: collapse;
}

.wp-table,
.ng-table,
.zhe-table {
  width: 100%;
}

.wp-table th,
.wp-table td,
.ng-table th,
.ng-table td,
.zhe-table th,
.zhe-table td,
table th,
table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.wp-table th,
.ng-table th,
.zhe-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbf9;
}

.wp-status,
.zhe-badge,
.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: var(--wp-radius-pill);
  padding: .32rem .62rem;
  font-size: .76rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.wp-status-approved,
.wp-status-active,
.badge-success {
  color: #065f46;
  background: #dff7ee;
}

.wp-status-pending,
.wp-status-draft,
.badge-warning {
  color: #7c3d00;
  background: #fff1cc;
}

.wp-status-danger,
.wp-status-blocked,
.badge-danger {
  color: #991b1b;
  background: #ffe4e6;
}

.wp-status-research,
.wp-status-ready,
.badge-info {
  color: #3730a3;
  background: #ede9fe;
}

.wp-empty,
.empty-state {
  padding: clamp(20px, 4vw, 38px);
  text-align: center;
  border: 1px dashed var(--wp-border-strong);
  border-radius: var(--wp-radius-lg);
  background: linear-gradient(180deg, #fff, var(--wp-card-subtle));
  color: var(--wp-muted);
}

.wp-empty strong,
.empty-state strong {
  display: block;
  color: var(--wp-text);
  font-size: 1.1rem;
  margin-bottom: .25rem;
}

.sidebar,
.sidebar-menu,
.sidebar-menu-container,
.mobile-nav,
.dropdown-menu {
  max-width: 100vw;
}

.sidebar-menu a,
.navbar a,
.top-navbar a,
.mobile-nav a {
  -webkit-tap-highlight-color: transparent;
}

.top-navbar,
.navbar {
  min-width: 0;
}

.content-wrapper,
.main-content,
.wrapper,
main,
section,
article {
  min-width: 0;
}

.demo-login-cards,
.wp-demo-login-cards {
  width: 100%;
  max-width: 100%;
}

details summary {
  min-height: 44px;
  cursor: pointer;
}

@media (min-width: 1440px) {
  :root {
    --wp-content-max: 1560px;
  }
}

@media (max-width: 1024px) {
  .content-wrapper {
    padding-inline: clamp(12px, 2vw, 22px);
  }

  .ng-hero,
  .zhe-hero {
    padding: clamp(20px, 3vw, 28px);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .page-shell,
  .wp-page-shell,
  .ng-page,
  .zhe-research,
  .content-wrapper > .container,
  .content-wrapper > .container-fluid {
    padding-inline: 14px;
  }

  .ng-grid,
  .zhe-grid,
  .ng-form,
  .zhe-two {
    grid-template-columns: 1fr !important;
  }

  .ng-hero,
  .zhe-hero,
  .wp-card,
  .content-card,
  .action-card,
  .metric-card {
    border-radius: 16px;
  }

  .ng-actions,
  .zhe-actions,
  .page-actions,
  .wp-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .ng-actions > *,
  .zhe-actions > *,
  .page-actions > *,
  .wp-page-actions > * {
    flex: 1 1 160px;
  }

  .btn,
  .wp-btn,
  button[type="submit"],
  input[type="submit"] {
    min-height: 46px;
  }

  .navbar .logo,
  .sidebar-brand-copy,
  .search-box .sublogo {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  :root {
    --wp-page-pad: 12px;
    --wp-card-pad: 14px;
    --wp-gap: 12px;
  }

  h1,
  .page-title,
  .wp-page-title,
  .ng-hero h1,
  .zhe-hero h1 {
    font-size: clamp(1.55rem, 8vw, 1.9rem);
  }

  h2,
  .section-title,
  .wp-section-title {
    font-size: clamp(1.24rem, 6vw, 1.55rem);
  }

  .wp-metric,
  .ng-card strong,
  .zhe-card strong,
  .metric-value,
  .stat-value {
    font-size: clamp(1.55rem, 10vw, 2rem);
  }

  .top-navbar,
  .navbar {
    padding-inline: 12px !important;
  }

  .wp-table-wrapper,
  .table-responsive,
  .wp-auto-table-wrap {
    margin-inline: -2px;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 14px;
  }

  .wp-btn,
  .btn,
  button[type="submit"],
  input[type="submit"] {
    width: 100%;
    padding-inline: .8rem;
  }
}

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