/* ==========================================================================
   WS GLASS — Componentes compartilhados
   Regra de uso do verde (#00FF00): ação principal, seleção, estado ativo, foco,
   progresso e status relevantes. Nunca como cor decorativa de fundo extenso.
   ========================================================================== */

/* ---------- Ícones (sprite SVG) ---------- */
.ws-icon {
  width: 1.25rem; height: 1.25rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.ws-icon--sm { width: 1rem; height: 1rem; }
.ws-icon--lg { width: 1.5rem; height: 1.5rem; }

/* ---------- Superfícies glass ---------- */
.ws-glass {
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  box-shadow: var(--ws-highlight), var(--ws-shadow-sm);
  -webkit-backdrop-filter: blur(var(--ws-blur)) saturate(var(--ws-saturate));
  backdrop-filter: blur(var(--ws-blur)) saturate(var(--ws-saturate));
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ws-glass { background: var(--ws-surface-solid); }
}

/* ---------- Cards ---------- */
.ws-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--ws-space-3);
  padding: var(--ws-card-pad, var(--ws-space-6));
  border-radius: var(--ws-radius-lg);
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  box-shadow: var(--ws-highlight), var(--ws-shadow-sm);
  -webkit-backdrop-filter: blur(var(--ws-blur)) saturate(var(--ws-saturate));
  backdrop-filter: blur(var(--ws-blur)) saturate(var(--ws-saturate));
  min-width: 0;
}
.ws-card--compact { --ws-card-pad: var(--ws-space-4); border-radius: var(--ws-radius-md); }
.ws-card--interactive {
  transition: transform var(--ws-dur) var(--ws-ease), border-color var(--ws-dur) var(--ws-ease), box-shadow var(--ws-dur) var(--ws-ease);
}
.ws-card--interactive:hover { transform: translateY(-2px); border-color: var(--ws-border-strong); box-shadow: var(--ws-highlight), var(--ws-shadow-md); }
.ws-card__title { margin: 0; font-size: var(--ws-text-lg); font-weight: var(--ws-weight-semibold); letter-spacing: -0.01em; line-height: var(--ws-leading-snug); }
.ws-card__text { margin: 0; color: var(--ws-text-2); font-size: var(--ws-text-sm); }
.ws-card__footer { margin-top: auto; padding-top: var(--ws-space-2); display: flex; flex-wrap: wrap; gap: var(--ws-space-2); }
.ws-card__icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--ws-radius-md);
  background: var(--ws-surface-3); color: var(--ws-text);
}
.ws-card__icon .ws-icon { width: 1.375rem; height: 1.375rem; }
/* Link que torna o card inteiro clicável sem aninhar elementos interativos */
.ws-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ws-card__link { text-decoration: none; }
.ws-card__link:focus-visible { outline: none; }
.ws-card:has(.ws-card__link:focus-visible) { outline: 2px solid var(--ws-focus); outline-offset: 2px; }

/* ---------- Botões ---------- */
.ws-btn {
  --_bg: var(--ws-surface-2); --_fg: var(--ws-text); --_bd: var(--ws-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ws-space-2);
  min-height: var(--ws-touch); padding: 0 var(--ws-space-5);
  border-radius: var(--ws-radius-pill); border: 1px solid var(--_bd);
  background: var(--_bg); color: var(--_fg);
  font-size: var(--ws-text-sm); font-weight: var(--ws-weight-semibold); line-height: 1; letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; max-width: 100%;
  transition: background-color var(--ws-dur-fast) var(--ws-ease), border-color var(--ws-dur-fast) var(--ws-ease), transform var(--ws-dur-fast) var(--ws-ease), box-shadow var(--ws-dur-fast) var(--ws-ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.ws-btn:hover { --_bd: var(--ws-text-3); }
.ws-btn:active { transform: scale(0.98); }
.ws-btn:focus-visible { outline: 2px solid var(--ws-focus); outline-offset: 3px; border-radius: var(--ws-radius-pill); }

.ws-btn--primary { --_bg: var(--ws-green); --_fg: var(--ws-on-green); --_bd: var(--ws-accent-border); box-shadow: 0 6px 20px -10px rgba(0, 200, 0, 0.7); }
.ws-btn--primary:hover { --_bg: #39ff39; --_bd: var(--ws-accent-border); }
.ws-btn--secondary { --_bg: var(--ws-surface); --_fg: var(--ws-text); }
.ws-btn--ghost { --_bg: transparent; --_bd: transparent; }
.ws-btn--ghost:hover { --_bg: var(--ws-surface-2); --_bd: transparent; }
.ws-btn--danger { --_bg: var(--ws-danger-soft); --_fg: var(--ws-danger); --_bd: transparent; }
.ws-btn--danger:hover { --_bd: var(--ws-danger); }

.ws-btn--sm { min-height: 2.25rem; padding: 0 var(--ws-space-4); font-size: var(--ws-text-xs); }
.ws-btn--lg { min-height: 3.25rem; padding: var(--ws-space-2) var(--ws-space-8); font-size: var(--ws-text-md); }
.ws-btn--lg, .ws-btn--block { white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 400px) { .ws-btn--lg { padding-inline: var(--ws-space-5); } }
.ws-btn--block { width: 100%; }
.ws-btn--icon { width: var(--ws-touch); padding: 0; }
.ws-btn--icon.ws-btn--sm { width: 2.25rem; }

.ws-btn:disabled, .ws-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.ws-btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.ws-btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2px solid var(--_fg); border-right-color: transparent; animation: ws-spin 0.7s linear infinite;
}

/* ---------- Badges e status ---------- */
.ws-badge {
  --_bg: var(--ws-surface-3); --_fg: var(--ws-text-2);
  display: inline-flex; align-items: center; gap: var(--ws-space-1);
  min-height: 1.5rem; padding: 0 var(--ws-space-2);
  border-radius: var(--ws-radius-pill); background: var(--_bg); color: var(--_fg);
  font-size: var(--ws-text-xs); font-weight: var(--ws-weight-semibold); line-height: 1; white-space: nowrap; max-width: 100%;
}
.ws-badge--accent  { --_bg: var(--ws-accent-soft);  --_fg: var(--ws-accent-ink); }
.ws-badge--success { --_bg: var(--ws-success-soft); --_fg: var(--ws-success); }
.ws-badge--warning { --_bg: var(--ws-warning-soft); --_fg: var(--ws-warning); }
.ws-badge--danger  { --_bg: var(--ws-danger-soft);  --_fg: var(--ws-danger); }
.ws-badge--info    { --_bg: var(--ws-info-soft);    --_fg: var(--ws-info); }
.ws-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Chips de filtro ---------- */
.ws-chips { display: flex; gap: var(--ws-space-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ws-chips::-webkit-scrollbar { display: none; }
.ws-chip {
  flex: none; display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 var(--ws-space-4);
  border-radius: var(--ws-radius-pill); border: 1px solid var(--ws-border-strong);
  background: var(--ws-surface); color: var(--ws-text-2);
  font-size: var(--ws-text-sm); font-weight: var(--ws-weight-medium); text-decoration: none; white-space: nowrap;
  transition: background-color var(--ws-dur-fast) var(--ws-ease), color var(--ws-dur-fast) var(--ws-ease);
}
.ws-chip:hover { color: var(--ws-text); }
.ws-chip[aria-pressed="true"], .ws-chip[aria-current="page"] {
  background: var(--ws-text); color: var(--ws-bg); border-color: var(--ws-text);
}

/* ---------- Formulários ---------- */
.ws-field { display: flex; flex-direction: column; gap: var(--ws-space-2); min-width: 0; }
.ws-label { font-size: var(--ws-text-sm); font-weight: var(--ws-weight-semibold); color: var(--ws-text); }
.ws-label .ws-optional { font-weight: var(--ws-weight-regular); color: var(--ws-text-3); }
.ws-input, .ws-select, .ws-textarea {
  width: 100%; min-height: 3rem; padding: 0 var(--ws-space-4);
  border-radius: var(--ws-radius-md); border: 1px solid var(--ws-border-strong);
  background: var(--ws-surface-solid); color: var(--ws-text);
  font-size: max(16px, var(--ws-text-md)); /* evita zoom automático no iOS */
  transition: border-color var(--ws-dur-fast) var(--ws-ease), box-shadow var(--ws-dur-fast) var(--ws-ease);
}
.ws-textarea { min-height: 7rem; padding: var(--ws-space-3) var(--ws-space-4); resize: vertical; }
.ws-select { appearance: none; padding-right: var(--ws-space-10);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; }
.ws-input::placeholder, .ws-textarea::placeholder { color: var(--ws-text-3); }
.ws-input:hover, .ws-select:hover, .ws-textarea:hover { border-color: var(--ws-text-3); }
.ws-input:focus, .ws-select:focus, .ws-textarea:focus {
  outline: none; border-color: var(--ws-focus); box-shadow: 0 0 0 3px var(--ws-accent-soft);
}
.ws-input[aria-invalid="true"], .ws-select[aria-invalid="true"], .ws-textarea[aria-invalid="true"] { border-color: var(--ws-danger); }
.ws-input:disabled { opacity: 0.55; cursor: not-allowed; }
.ws-hint { font-size: var(--ws-text-xs); color: var(--ws-text-3); margin: 0; }
.ws-field-error { display: flex; gap: var(--ws-space-1); align-items: center; font-size: var(--ws-text-xs); color: var(--ws-danger); margin: 0; font-weight: var(--ws-weight-medium); }
.ws-field-error:empty { display: none; }

.ws-input-group { position: relative; }
.ws-input-group .ws-input { padding-right: 3.25rem; }
.ws-input-group__action { position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); }

/* Switch (alternador) */
.ws-switch { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-space-4); min-height: var(--ws-touch); cursor: pointer; }
.ws-switch input {
  appearance: none; flex: none; position: relative; width: 3.1rem; height: 1.85rem; margin: 0;
  border-radius: var(--ws-radius-pill); background: var(--ws-surface-3); border: 1px solid var(--ws-border-strong);
  transition: background-color var(--ws-dur) var(--ws-ease); cursor: pointer;
}
.ws-switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.85rem - 6px); height: calc(1.85rem - 6px);
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform var(--ws-dur) var(--ws-ease);
}
.ws-switch input:checked { background: var(--ws-green); border-color: var(--ws-accent-border); }
.ws-switch input:checked::after { transform: translateX(1.25rem); background: #000; }
.ws-switch input:focus-visible { outline: 2px solid var(--ws-focus); outline-offset: 2px; }

/* Checkbox */
.ws-check { display: flex; align-items: flex-start; gap: var(--ws-space-3); cursor: pointer; font-size: var(--ws-text-sm); }
.ws-check input {
  appearance: none; flex: none; width: 1.375rem; height: 1.375rem; margin: 0.05rem 0 0;
  border-radius: var(--ws-radius-xs); border: 1.5px solid var(--ws-text-3); background: var(--ws-surface-solid); cursor: pointer;
  display: grid; place-items: center;
}
.ws-check input:checked { background: var(--ws-green); border-color: var(--ws-green); }
.ws-check input:checked::after { content: ""; width: 0.4rem; height: 0.7rem; border: solid #000; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* Controle segmentado (ex.: tema, escala) */
.ws-segmented {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  border-radius: var(--ws-radius-md); background: var(--ws-surface-3); border: 1px solid var(--ws-border);
}
.ws-segmented label { position: relative; }
.ws-segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ws-segmented span {
  display: inline-flex; align-items: center; gap: var(--ws-space-2); min-height: 2.5rem; padding: 0 var(--ws-space-4);
  border-radius: calc(var(--ws-radius-md) - 3px); font-size: var(--ws-text-sm); font-weight: var(--ws-weight-medium); color: var(--ws-text-2);
  transition: background-color var(--ws-dur-fast) var(--ws-ease), color var(--ws-dur-fast) var(--ws-ease);
}
.ws-segmented input:checked + span { background: var(--ws-surface-solid); color: var(--ws-text); box-shadow: var(--ws-shadow-sm); }
.ws-segmented input:focus-visible + span { outline: 2px solid var(--ws-focus); outline-offset: 1px; }

/* ---------- Alertas ---------- */
.ws-alert {
  --_bg: var(--ws-info-soft); --_fg: var(--ws-info);
  display: flex; gap: var(--ws-space-3); align-items: flex-start;
  padding: var(--ws-space-4); border-radius: var(--ws-radius-md);
  background: var(--_bg); color: var(--ws-text); font-size: var(--ws-text-sm);
  border: 1px solid color-mix(in srgb, var(--_fg) 25%, transparent);
}
.ws-alert > .ws-icon { color: var(--_fg); margin-top: 1px; }
.ws-alert p { margin: 0; }
.ws-alert strong { display: block; margin-bottom: 2px; }
.ws-alert--success { --_bg: var(--ws-success-soft); --_fg: var(--ws-success); }
.ws-alert--warning { --_bg: var(--ws-warning-soft); --_fg: var(--ws-warning); }
.ws-alert--danger  { --_bg: var(--ws-danger-soft);  --_fg: var(--ws-danger); }

/* ---------- Conteúdo pendente (aguardando definição do proprietário) ---------- */
.ws-pending {
  display: flex; gap: var(--ws-space-3); align-items: flex-start;
  padding: var(--ws-space-4) var(--ws-space-5); border-radius: var(--ws-radius-md);
  border: 1.5px dashed var(--ws-border-strong); color: var(--ws-text-3); font-size: var(--ws-text-sm);
  background: transparent;
}
.ws-pending strong { color: var(--ws-text-2); font-weight: var(--ws-weight-semibold); }

/* ---------- Estados: vazio, carregando ---------- */
.ws-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--ws-space-3);
  padding: var(--ws-space-10) var(--ws-space-6); border-radius: var(--ws-radius-lg);
  border: 1px dashed var(--ws-border-strong); color: var(--ws-text-2);
}
.ws-empty__icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--ws-surface-3); color: var(--ws-text-2); }
.ws-empty__icon .ws-icon { width: 1.6rem; height: 1.6rem; }
.ws-empty h3 { margin: 0; font-size: var(--ws-text-lg); color: var(--ws-text); }
.ws-empty p { margin: 0; max-width: 28rem; font-size: var(--ws-text-sm); }

.ws-spinner { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2.5px solid var(--ws-surface-3); border-top-color: var(--ws-green); animation: ws-spin 0.8s linear infinite; }
.ws-loading { display: flex; align-items: center; justify-content: center; gap: var(--ws-space-3); padding: var(--ws-space-10); color: var(--ws-text-3); font-size: var(--ws-text-sm); }

.ws-skeleton {
  display: block; border-radius: var(--ws-radius-sm); min-height: 1em;
  background: linear-gradient(90deg, var(--ws-surface-3) 0%, var(--ws-surface-2) 50%, var(--ws-surface-3) 100%);
  background-size: 200% 100%; animation: ws-shimmer 1.4s ease-in-out infinite;
}

@keyframes ws-spin { to { transform: rotate(360deg); } }
@keyframes ws-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes ws-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ws-spinner, .ws-skeleton, .ws-btn[aria-busy="true"]::after { animation-duration: 2.4s; }
}

/* ---------- Listas ---------- */
.ws-list { list-style: none; margin: 0; padding: 0; border-radius: var(--ws-radius-lg); overflow: hidden; border: 1px solid var(--ws-border); background: var(--ws-surface); }
.ws-list > li + li { border-top: 1px solid var(--ws-border); }
.ws-list__item { display: flex; align-items: center; gap: var(--ws-space-3); min-height: 3.5rem; padding: var(--ws-space-3) var(--ws-space-4); }
.ws-list__item--link { text-decoration: none; transition: background-color var(--ws-dur-fast) var(--ws-ease); }
.ws-list__item--link:hover { background: var(--ws-surface-2); }
.ws-list__body { flex: 1; min-width: 0; }
.ws-list__title { display: block; font-weight: var(--ws-weight-medium); }
.ws-list__meta { display: block; font-size: var(--ws-text-xs); color: var(--ws-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Métricas ---------- */
.ws-stat { display: flex; flex-direction: column; gap: var(--ws-space-1); }
.ws-stat__label { font-size: var(--ws-text-xs); font-weight: var(--ws-weight-semibold); color: var(--ws-text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.ws-stat__value { font-family: var(--ws-font-display); font-size: var(--ws-text-2xl); font-weight: var(--ws-weight-bold); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }

.ws-progress { height: 0.5rem; border-radius: var(--ws-radius-pill); background: var(--ws-surface-3); overflow: hidden; }
.ws-progress > span { display: block; height: 100%; width: var(--value, 0%); background: var(--ws-green); border-radius: inherit; transition: width var(--ws-dur-slow) var(--ws-ease); }

/* ---------- Tabelas ---------- */
.ws-table-wrap { overflow-x: auto; border-radius: var(--ws-radius-lg); border: 1px solid var(--ws-border); background: var(--ws-surface); }
.ws-table { width: 100%; border-collapse: collapse; font-size: var(--ws-text-sm); }
.ws-table th, .ws-table td { padding: var(--ws-space-3) var(--ws-space-4); text-align: left; border-bottom: 1px solid var(--ws-border); white-space: nowrap; }
.ws-table th { font-size: var(--ws-text-xs); font-weight: var(--ws-weight-semibold); color: var(--ws-text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ws-table tr:last-child td { border-bottom: 0; }

/* ---------- Toasts ---------- */
.ws-toast-region {
  position: fixed; z-index: var(--ws-z-toast); left: 50%; transform: translateX(-50%);
  bottom: calc(var(--ws-toast-offset, 0px) + var(--ws-space-4) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: var(--ws-space-2); width: min(26rem, calc(100vw - 2rem)); pointer-events: none;
}
.ws-toast {
  display: flex; gap: var(--ws-space-3); align-items: center; padding: var(--ws-space-3) var(--ws-space-4);
  border-radius: var(--ws-radius-md); background: var(--ws-surface-inverse); color: var(--ws-text-inverse);
  box-shadow: var(--ws-shadow-lg); font-size: var(--ws-text-sm); font-weight: var(--ws-weight-medium);
  animation: ws-rise var(--ws-dur-slow) var(--ws-ease); pointer-events: auto;
}
.ws-toast .ws-icon { color: var(--ws-green); }
.ws-toast--danger .ws-icon { color: #ff6b61; }

/* ---------- Modal (elemento <dialog>) ---------- */
.ws-modal {
  width: min(32rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0;
  border: 1px solid var(--ws-border); border-radius: var(--ws-radius-xl);
  background: var(--ws-surface-solid); color: var(--ws-text); box-shadow: var(--ws-shadow-lg);
}
.ws-modal::backdrop { background: var(--ws-overlay); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ws-modal[open] { animation: ws-rise var(--ws-dur-slow) var(--ws-ease); }
.ws-modal__body { padding: var(--ws-space-6); display: flex; flex-direction: column; gap: var(--ws-space-4); }
.ws-modal__title { margin: 0; font-size: var(--ws-text-xl); }
.ws-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ws-space-2); }

/* ---------- Divisor ---------- */
.ws-divider { height: 1px; background: var(--ws-border); border: 0; margin: var(--ws-space-6) 0; }

/* ---------- Marca: logo oficial WS Trainer (icons/ws-logo.svg) + nome ---------- */
.ws-wordmark {
  display: inline-flex; align-items: center; gap: var(--ws-space-2); text-decoration: none;
  font-family: var(--ws-font-display); font-weight: 800; letter-spacing: -0.03em; font-size: 1.125rem; line-height: 1; white-space: nowrap;
}
.ws-wordmark__logo { display: block; height: 1.75rem; width: auto; flex: none; }

/* ---------- Calculadoras (calculators-ui.js — site e App) ---------- */
.ws-calc { display: flex; flex-direction: column; gap: var(--ws-space-5); }
.ws-calc__result { padding: var(--ws-space-5); border-radius: var(--ws-radius-md); background: var(--ws-surface-2); border: 1px solid var(--ws-border); display: flex; flex-direction: column; gap: var(--ws-space-3); align-items: flex-start; }
.ws-calc__label { margin: 0; font-size: var(--ws-text-sm); font-weight: var(--ws-weight-semibold); color: var(--ws-text-3); }
.ws-calc__value { margin: 0; font-family: var(--ws-font-display); font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem); font-weight: var(--ws-weight-bold); letter-spacing: -0.03em; line-height: 1; color: var(--ws-text); }
.ws-calc__unit { font-size: var(--ws-text-lg); font-weight: var(--ws-weight-medium); color: var(--ws-text-3); letter-spacing: 0; }
.ws-calc__details { display: grid; grid-template-columns: auto 1fr; gap: var(--ws-space-1) var(--ws-space-4); margin: 0; font-size: var(--ws-text-sm); }
.ws-calc__details dt { color: var(--ws-text-3); }
.ws-calc__details dd { margin: 0; font-weight: var(--ws-weight-semibold); }
.ws-calc .ws-table-wrap { width: 100%; }
.ws-calc-volume__rows { display: grid; gap: var(--ws-space-2); }
.ws-calc-volume__row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--ws-space-2); align-items: center; }
.ws-calc-volume__index { font-size: var(--ws-text-sm); color: var(--ws-text-3); font-weight: var(--ws-weight-semibold); }
@media (max-width: 420px) { .ws-calc-volume__row { grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1fr) auto; } }

/* ---------- Central de notificações (js/notification-center.js) ---------- */
.ws-notif-bell { position: relative; }
.ws-notif-bell__count {
  position: absolute; top: 4px; right: 2px; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem;
  border-radius: 999px; background: var(--ws-green); color: #000; font-size: 0.6875rem; font-weight: 800;
  line-height: 1.25rem; text-align: center; pointer-events: none;
}
.ws-notif { width: min(30rem, calc(100vw - 2rem)); }
.ws-notif .ws-modal__body { gap: var(--ws-space-3); }
.ws-notif__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-space-2); }
.ws-notif__actions { display: flex; justify-content: flex-end; }
.ws-notif__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: min(60dvh, 32rem); overflow-y: auto; overscroll-behavior: contain; }
.ws-notif__item {
  display: flex; gap: var(--ws-space-3); align-items: flex-start; width: 100%; min-height: var(--ws-touch);
  padding: var(--ws-space-3); border: 0; border-radius: var(--ws-radius-md); background: none; color: inherit;
  font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.ws-notif__item:hover, .ws-notif__item:focus-visible { background: var(--ws-surface-2); }
.ws-notif__dot { flex: none; width: 0.5rem; height: 0.5rem; margin-top: 0.45rem; border-radius: 50%; background: transparent; }
.ws-notif__item--unread .ws-notif__dot { background: var(--ws-green); box-shadow: 0 0 0 2px var(--ws-accent-soft); }
.ws-notif__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ws-notif__title { font-weight: var(--ws-weight-medium); overflow-wrap: anywhere; }
.ws-notif__item--unread .ws-notif__title { font-weight: var(--ws-weight-bold); }
.ws-notif__text { font-size: var(--ws-text-sm); color: var(--ws-text-2); overflow-wrap: anywhere; }
.ws-notif__time { font-size: var(--ws-text-xs); color: var(--ws-text-3); }

/* ---------- Arrastar para atualizar (js/pull-refresh.js) ---------- */
html.ws-pull-enabled, html.ws-pull-enabled body { overscroll-behavior-y: contain; }
.ws-pull {
  position: fixed; top: 0; left: 50%; z-index: 90; pointer-events: none; opacity: 0;
  transform: translate(-50%, calc(var(--ws-pull-y, 0px) - 3rem));
  transition: transform var(--ws-dur) var(--ws-ease), opacity var(--ws-dur) var(--ws-ease);
}
.ws-pull--dragging { transition: none; }
.ws-pull--visible { opacity: 1; }
.ws-pull__circle {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  margin-top: env(safe-area-inset-top, 0px);
  background: var(--ws-surface-solid); color: var(--ws-text-2); border: 1px solid var(--ws-border); box-shadow: var(--ws-shadow-md, var(--ws-shadow-lg));
}
.ws-pull__circle .ws-icon { transform: rotate(var(--ws-pull-turn, 0deg)); }
.ws-pull--ready .ws-pull__circle { background: var(--ws-green); color: #000; border-color: transparent; }
.ws-pull--busy .ws-pull__circle .ws-icon { animation: ws-pull-spin 0.8s linear infinite; }
@keyframes ws-pull-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ws-pull--busy .ws-pull__circle .ws-icon { animation: none; } }
html[data-motion="reduced"] .ws-pull--busy .ws-pull__circle .ws-icon { animation: none; }
