/* ================================================================
   BIVA PLATFORM STANDARD
   Shared final-pass rules for every operational workspace.
================================================================ */

:root {
  --biva-standard-ink: #071b32;
  --biva-standard-muted: #61746e;
  --biva-standard-line: #dce6e1;
  --biva-standard-soft: #f6faf8;
  --biva-standard-panel: #ffffff;
  --biva-standard-green: #0a9d76;
  --biva-standard-green-dark: #08765c;
  --biva-standard-lime: #9bd82f;
  --biva-standard-blue: #1769e8;
  --biva-standard-danger: #c93645;
  --biva-standard-radius: 18px;
  --biva-standard-radius-lg: 26px;
  --biva-standard-shadow: 0 18px 48px rgba(8, 40, 31, 0.08);
}

body:has(.biva-admin-layout),
body:has(.hospitality-shell),
body:has(.talent-shell),
body:has(.client-sidebar) {
  color: var(--biva-standard-ink);
  background: #f3f7f5;
}

/* The legacy layout header is now a compact operational header. */
.biva-admin-layout .biva-admin-layout__header {
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 22px 26px;
  border: 1px solid var(--biva-standard-line);
  border-radius: var(--biva-standard-radius-lg);
  color: var(--biva-standard-ink);
  background:
    radial-gradient(circle at 91% 8%, rgba(66, 194, 159, 0.13), transparent 31%),
    linear-gradient(110deg, #ffffff 0%, #f7fbf8 60%, #eef8f6 100%);
  box-shadow: var(--biva-standard-shadow);
  overflow: visible;
}

.biva-admin-layout .biva-admin-layout__header::before {
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  border-radius: var(--biva-standard-radius-lg) 0 0 var(--biva-standard-radius-lg);
  background: linear-gradient(180deg, var(--biva-standard-lime), var(--biva-standard-green));
}

.biva-admin-layout .biva-admin-layout__header::after {
  display: none;
}

.biva-admin-layout .biva-admin-layout__eyebrow {
  margin-bottom: 5px;
  color: var(--biva-standard-green);
  font-size: 0.65rem;
  font-weight: 900;
}

.biva-admin-layout .biva-admin-layout__header h1 {
  max-width: none;
  color: var(--biva-standard-ink);
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.biva-admin-layout .biva-admin-layout__header p {
  max-width: 780px;
  margin-top: 7px;
  color: var(--biva-standard-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.biva-admin-layout .biva-admin-layout__header-actions {
  gap: 8px;
}

/* Compact legacy hero blocks while retaining profile/form context. */
.biva-admin-layout__page-content :is(
  [class$="-hero"],
  [class*="-hero "],
  [class$="__hero"],
  [class*="__hero "]
) {
  min-height: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: var(--biva-standard-radius-lg);
  box-shadow: var(--biva-standard-shadow);
}

.biva-admin-layout__page-content :is(
  [class$="-hero"],
  [class*="-hero "],
  [class$="__hero"],
  [class*="__hero "]
) h1 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

/* Unified cards and management surfaces. */
.biva-admin-layout__page-content :is(
  .card,
  [class$="-card"],
  [class*="-card "],
  [class$="__card"],
  [class*="__card "],
  [class$="-panel"],
  [class*="-panel "],
  [class$="__panel"],
  [class*="__panel "]
) {
  border-color: var(--biva-standard-line);
  border-radius: var(--biva-standard-radius);
}

/* Form controls now share one focus language across workspaces. */
:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: #d2dfd9;
  border-radius: 12px;
  color: var(--biva-standard-ink);
  background-color: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
):focus {
  border-color: var(--biva-standard-green);
  box-shadow: 0 0 0 3px rgba(10, 157, 118, 0.11);
  outline: 0;
}

/* Shared buttons retain semantic colours but use the same shape and motion. */
:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) :is(
  button,
  .btn,
  [role="button"]
) {
  border-radius: 11px;
}

:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) button:not(:disabled) {
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) button:not(:disabled):active {
  transform: translateY(1px);
}

/* Table directories share density, header contrast and row feedback. */
:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) table {
  border-color: var(--biva-standard-line);
}

:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) thead th {
  color: #5c716a;
  background: #f4f8f6;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) tbody tr {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

:is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) tbody tr:hover {
  background-color: #f7fcf9;
}

@media (max-width: 760px) {
  .biva-admin-layout .biva-admin-layout__content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .biva-admin-layout .biva-admin-layout__header {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 20px 18px;
    border-radius: 21px;
  }

  .biva-admin-layout .biva-admin-layout__header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .biva-admin-layout .biva-admin-layout__header-actions > * {
    min-height: 42px;
  }

  .biva-admin-layout__page-content :is(
    [class$="-hero"],
    [class*="-hero "],
    [class$="__hero"],
    [class*="__hero "]
  ) {
    padding: 20px 17px;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) *,
  :is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) *::before,
  :is(.biva-admin-layout, .hospitality-shell, .talent-shell, .client-sidebar) *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
