@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --ethora-bg: #07191C;
  --ethora-bg-2: #0B1B21;
  --ethora-surface: #0E3D3A;
  --ethora-surface-2: #0A2A2E;
  --ethora-card: rgba(14, 61, 58, 0.72);
  --ethora-card-soft: rgba(11, 27, 33, 0.88);
  --ethora-border: rgba(20, 184, 166, 0.24);
  --ethora-border-strong: rgba(20, 184, 166, 0.48);
  --ethora-primary: #14B8A6;
  --ethora-primary-light: #7EE6C7;
  --ethora-text: #F2F4F5;
  --ethora-muted: #8AB7B0;
  --ethora-danger: #FF5A6A;
  --ethora-warning: #FACC15;
  --ethora-success: #34D399;
  --ethora-radius-sm: 10px;
  --ethora-radius-md: 16px;
  --ethora-radius-lg: 24px;
  --ethora-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --ethora-teal: var(--ethora-primary);

  --bg-dark: var(--ethora-bg-2);
  --green-petroleum: var(--ethora-surface);
  --green-tech: #123A34;
  --turquoise: #14B8A6;
  --aqua-light: #7EE6C7;
  --ice-white: #F2F4F5;
  --gray-light: #F5F7F2;
  --text-dark: #0D1B1E;

  --bg: var(--ethora-bg);
  --sidebar: #081418;
  --sidebar-hover: rgba(20, 184, 166, 0.08);
  --sidebar-active: rgba(20, 184, 166, 0.16);
  --surface: var(--green-petroleum);
  --surface-elevated: var(--green-tech);
  --text: var(--ethora-text);
  --text-muted: var(--ethora-muted);
  --border: var(--ethora-border);
  --border-soft: rgba(242, 244, 245, 0.08);

  --high: #F87171;
  --high-bg: rgba(248, 113, 113, 0.14);
  --high-border: rgba(248, 113, 113, 0.35);
  --medium: #FBBF24;
  --medium-bg: rgba(251, 191, 36, 0.14);
  --medium-border: rgba(251, 191, 36, 0.35);
  --low: var(--turquoise);
  --low-bg: rgba(20, 184, 166, 0.14);
  --low-border: rgba(20, 184, 166, 0.35);

  --gradient-btn: linear-gradient(135deg, #0E3D3A 0%, #14B8A6 100%);
  --gradient-brand: linear-gradient(135deg, #14B8A6 0%, #7EE6C7 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-width: 276px;
  --ethora-sidebar-width: var(--sidebar-width);
  --ethora-z-header: 60;
  --ethora-z-sidebar: 100;
  --ethora-z-overlay: 200;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  background: radial-gradient(ellipse at top left, rgba(20, 184, 166, 0.08), transparent 45%),
              radial-gradient(ellipse at bottom right, rgba(18, 58, 52, 0.5), transparent 50%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html.ethora-shell-active,
html:has(.ethora-app-shell) {
  height: 100%;
  overflow: hidden;
}

body.ethora-shell-active,
body:has(.ethora-app-shell) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Application shell (CSS Grid) ── */
.ethora-app-shell,
.app-shell.ethora-app-shell {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  min-width: 0;
  display: grid;
  grid-template-columns: var(--ethora-sidebar-width) minmax(0, 1fr);
  overflow: hidden;
}

.ethora-app-shell .ethora-sidebar,
.ethora-app-shell .sidebar.ethora-sidebar {
  grid-column: 1;
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  z-index: var(--ethora-z-sidebar);
}

.ethora-app-shell .ethora-sidebar-nav,
.ethora-app-shell .sidebar-nav {
  grid-row: 2;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.ethora-workspace {
  grid-column: 2;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.ethora-global-header {
  grid-row: 1;
  position: relative;
  z-index: var(--ethora-z-header);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--ethora-card-soft);
  border-bottom: 1px solid var(--border-soft);
}

.ethora-quick-access {
  flex: none;
  background: linear-gradient(180deg, #061214 0%, var(--ethora-bg-2) 100%);
  border-bottom: 1px solid rgba(20, 184, 166, 0.14);
  padding: 0.45rem 1rem;
  min-height: 0;
}

.ethora-quick-access[hidden] {
  display: none !important;
}

.ethora-quick-access-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
}

.ethora-profile-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.4fr) auto auto;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 1rem;
  min-height: 0;
  position: relative;
}

.ethora-profile-bar-context {
  min-width: 0;
}

.ethora-profile-bar-context .timezone-indicator-wrap {
  margin: 0;
}

.ethora-profile-bar-search {
  min-width: 0;
}

.ethora-profile-bar-user {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.ethora-profile-bar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ethora-main-scroll {
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ethora-main-scroll [id] {
  scroll-margin-top: 20px;
}

.ethora-page-intro {
  margin-bottom: 1rem;
}

.ethora-page-title {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ethora-page-subtitle {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.ethora-notify-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 1rem;
  z-index: calc(var(--ethora-z-header) + 10);
}

.app-shell { display: flex; min-height: 100vh; }

.ethora-app-shell.app-shell {
  display: grid;
  min-height: 0;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar) 0%, #0B1B21 100%);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.sidebar-brand {
  padding: 0;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

/* ── Brand ── */
.brand-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 28px 20px 22px;
}

.brand-area-link {
  display: block;
  width: 100%;
  text-decoration: none;
}

.brand-logo-horizontal {
  display: block;
  width: 160px;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  object-position: left center;
  border: none;
  background: none;
}

.brand-tagline {
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--text-muted);
  padding: 0;
  text-align: left;
}

/* legacy aliases */
.brand { display: block; }
.brand-text-wrap, .brand-text, .brand-subtitle, .sidebar-tagline { display: none; }
.brand-logo--header { display: none; }

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.25);
  flex-shrink: 0;
}

.sidebar-logo svg { width: 22px; height: 22px; stroke: var(--text-dark); }

.sidebar-brand h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ice-white);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.5rem 0.65rem 12px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.ethora-sidebar-nav .nav-link,
.sidebar-nav .nav-link {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.ethora-sidebar-footer {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 10px 14px 14px;
  gap: 0.45rem;
  background: rgba(3, 18, 22, 0.96);
  border-top: 1px solid rgba(44, 215, 196, 0.12);
}

.sidebar-footer {
  flex: 0 0 auto;
  background: rgba(3, 18, 22, 0.96);
  border-top: 1px solid rgba(44, 215, 196, 0.12);
}

.ethora-sidebar-plan-card {
  padding: 0.65rem 0.75rem;
}

.ethora-page-back-row {
  margin: 0 0 1rem;
}

.ethora-upgrade-gate-page .ethora-upgrade-gate {
  max-width: 42rem;
}

.ethora-back-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.main.ethora-main,
.main {
  min-height: 100vh;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(20, 184, 166, 0.28);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(242, 244, 245, 0.72);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--aqua-light);
}

.nav-link.active {
  background: var(--sidebar-active);
  color: var(--turquoise);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.25);
}

.sidebar-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.6875rem;
  color: rgba(126, 230, 199, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-logout {
  width: 100%;
  justify-content: center;
  font-size: 0.8125rem;
}

/* ── Main ── */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
}

.ethora-main,
.main.ethora-main {
  flex: 1;
  width: calc(100vw - var(--sidebar-width));
  max-width: calc(100vw - var(--sidebar-width));
  min-width: 0;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .ethora-main,
  .main.ethora-main {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

.ethora-shell,
.app-shell.ethora-shell {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
}

.ethora-content,
.ethora-page,
.ethora-panel,
.ethora-card {
  max-width: 100%;
  min-width: 0;
}

.ethora-content {
  overflow-x: hidden;
}

.topbar {
  background: rgba(11, 27, 33, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar-title p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.timezone-indicator-wrap {
  margin: 0.35rem 0 0;
}

.timezone-indicator {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.topbar-actions { display: flex; gap: 0.75rem; align-items: center; flex-shrink: 0; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(11, 27, 33, 0.45);
  border: 1px solid var(--border-soft);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.lang-btn:hover { color: var(--turquoise); }

.lang-btn.active {
  color: var(--turquoise);
  background: rgba(20, 184, 166, 0.12);
}

.lang-divider {
  color: rgba(126, 230, 199, 0.35);
  font-size: 0.6875rem;
  user-select: none;
}

.ethora-intelligence-tutor-box::before {
  content: attr(data-ready-label);
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aqua-light);
  margin-bottom: 0.5rem;
}

.content {
  padding: 1.75rem;
  max-width: 1440px;
  min-width: 0;
  overflow-x: hidden;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn:hover { opacity: 0.95; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-btn);
  color: var(--ice-white);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.28);
}

.btn-secondary {
  background: rgba(18, 58, 52, 0.6);
  color: var(--aqua-light);
  border: 1px solid var(--border);
}

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.8125rem; }

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.4);
}

.card-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--turquoise);
  letter-spacing: -0.03em;
}

.card.alert-high .card-value { color: var(--high); }
.card.alert-medium .card-value { color: var(--medium); }
.card.alert-low .card-value { color: var(--aqua-light); }

/* ── Risk banner ── */
.risk-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
}

.risk-banner.high {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(14, 61, 58, 0.6));
  border-color: var(--high-border);
}

.risk-banner.medium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(14, 61, 58, 0.6));
  border-color: var(--medium-border);
}

.risk-banner.low {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(14, 61, 58, 0.6));
  border-color: var(--low-border);
}

.risk-banner-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.risk-banner-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.risk-banner.high .risk-banner-value { color: var(--high); }
.risk-banner.medium .risk-banner-value { color: var(--medium); }
.risk-banner.low .risk-banner-value { color: var(--turquoise); }

.risk-banner-clinic {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ice-white);
}

/* ── Sections ── */
.section {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.88), rgba(18, 58, 52, 0.75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ice-white);
}

.section-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.section-desc a {
  color: var(--turquoise);
  font-weight: 600;
}

.section-desc a:hover { color: var(--aqua-light); }

/* ── Pet attention cards ── */
.pet-attention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.pet-attention-card {
  background: rgba(11, 27, 33, 0.45);
  border: 1px solid var(--high-border);
  border-radius: var(--radius-sm);
  padding: 1.125rem;
}

.pet-attention-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.pet-attention-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pet-attention-card p {
  font-size: 0.8125rem;
  color: rgba(242, 244, 245, 0.82);
  line-height: 1.5;
}

/* ── Sensor info box ── */
.info-panel {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(20, 184, 166, 0.08);
  border: 1px dashed rgba(20, 184, 166, 0.35);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.info-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(20, 184, 166, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-panel-icon svg { width: 20px; height: 20px; stroke: var(--turquoise); fill: none; stroke-width: 1.75; }

.info-panel strong { display: block; font-size: 0.875rem; margin-bottom: 0.25rem; }
.info-panel span { font-size: 0.8125rem; color: var(--text-muted); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }

table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }

th, td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}

th {
  background: rgba(11, 27, 33, 0.55);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(20, 184, 166, 0.06); }
tbody tr:last-child td { border-bottom: none; }

td strong { color: var(--turquoise); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 180px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid transparent;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.badge.high, .badge.critical {
  background: var(--high-bg);
  color: var(--high);
  border-color: var(--high-border);
}

.badge.medium {
  background: var(--medium-bg);
  color: var(--medium);
  border-color: var(--medium-border);
}

.badge.low {
  background: var(--low-bg);
  color: var(--aqua-light);
  border-color: var(--low-border);
}

.badge.open {
  background: rgba(59, 130, 246, 0.15);
  color: #93C5FD;
  border-color: rgba(59, 130, 246, 0.35);
}

.badge.acknowledged {
  background: var(--medium-bg);
  color: var(--medium);
  border-color: var(--medium-border);
}

.badge.resolved {
  background: var(--low-bg);
  color: var(--aqua-light);
  border-color: var(--low-border);
}

/* ── Forms ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--aqua-light);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.875rem;
  background: rgba(11, 27, 33, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ice-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder { color: rgba(126, 230, 199, 0.35); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.form-group select option { background: var(--green-tech); color: var(--ice-white); }
.form-group small { font-size: 0.75rem; color: var(--text-muted); }
.form-actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.form-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.form-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.form-section-title {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.form-field,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label,
.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--aqua-light);
}

.form-field input,
.form-field select,
.form-field textarea,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 0.95rem;
  background: rgba(11, 27, 33, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ice-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field textarea,
.form-group textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.form-field input::placeholder,
.form-group input::placeholder,
.form-field textarea::placeholder,
.form-group textarea::placeholder {
  color: rgba(126, 230, 199, 0.35);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.entity-registry-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1180px;
}

.entity-form-card {
  padding: 1.5rem 1.75rem;
}

.entity-list-card {
  padding: 1.25rem 1.5rem;
}

.data-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.data-card {
  background: rgba(11, 27, 33, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.data-card:hover {
  border-color: rgba(20, 184, 166, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.data-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.data-card-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ice-white);
}

.data-card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.data-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.details-section + .details-section {
  margin-top: 1rem;
}

.data-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.data-card-body-icons {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.data-card-subtitle .ethora-icon-row {
  margin-top: 0.35rem;
}

.ethora-inline-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--ethora-primary-light);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.ethora-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ethora-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ethora-icon-row strong,
.ethora-icon-row span {
  color: var(--ethora-text);
}

.data-card-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.data-card-field span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.data-card-field strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

.data-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.data-card-geo {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.data-card-geo .form-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}

.data-card-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.data-card-details[hidden] {
  display: none;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}

.details-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.details-grid-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.details-grid-item strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

.badge-success {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.badge-muted {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.checkbox-field {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--turquoise);
}

.form-note {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.form-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .entity-form-card {
    padding: 1.15rem;
  }
}

@media (max-width: 640px) {
  .data-card-header {
    flex-direction: column;
  }
}

/* ── Messages ── */
.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
}

.alert-box.success {
  background: var(--low-bg);
  color: var(--aqua-light);
  border-color: var(--low-border);
}

.alert-box.error {
  background: var(--high-bg);
  color: var(--high);
  border-color: var(--high-border);
}

.alert-box.info {
  background: rgba(20, 184, 166, 0.1);
  color: var(--aqua-light);
  border-color: var(--border);
}

.alert-box.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.loading, .empty {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(20, 184, 166, 0.15);
  border-top-color: var(--turquoise);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
}

.inline-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.clinical-disclaimer {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--turquoise);
  background: rgba(20, 184, 166, 0.06);
  border-radius: var(--radius-sm);
}

.clinical-validation-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.clinical-ref-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start;
  scroll-margin-top: 5.5rem;
}

.clinical-references-page {
  scroll-margin-top: 5.5rem;
  padding-top: 0.25rem;
}

.clinical-references-page-intro {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.08);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.clinical-references-list-section {
  margin-top: 0.5rem;
  scroll-margin-top: 5.5rem;
}

.clinical-ref-card {
  padding: 1.1rem 1.2rem;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.clinical-ref-card--provisional {
  border-color: rgba(255, 193, 7, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.12);
}

.clinical-ref-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.clinical-ref-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.clinical-ref-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.clinical-ref-vet-badge {
  white-space: nowrap;
  font-size: 0.7rem;
}

.clinical-ref-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.clinical-ref-card-meta {
  display: grid;
  gap: 0.45rem;
  font-size: 0.8125rem;
}

.clinical-ref-card-meta div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.5rem;
}

.clinical-ref-card-meta dt {
  color: var(--text-muted);
  font-weight: 500;
}

.clinical-ref-card-meta dd {
  margin: 0;
  word-break: break-word;
}

.clinical-ref-card-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.clinical-references-filters {
  margin-bottom: 1rem;
}

.clinical-ref-table-wrap {
  margin-top: 1.5rem;
}

.clinical-ref-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.clinical-ref-confidence-method {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.clinical-ref-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.clinical-ref-modal[hidden] {
  display: none !important;
}

.clinical-ref-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 18, 0.72);
  backdrop-filter: blur(4px);
}

.clinical-ref-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  margin: 0;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-grid-2, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ethora-app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .ethora-app-shell .ethora-sidebar,
  .ethora-app-shell .sidebar.ethora-sidebar {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .ethora-workspace {
    grid-column: 1;
    grid-row: 2;
  }

  .ethora-profile-bar {
    grid-template-columns: 1fr 1fr;
  }

  .ethora-profile-bar-search {
    grid-column: 1 / -1;
  }

  .ethora-quick-access-track {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }

  .sidebar { width: 88px; }
  .brand-tagline, .sidebar-footer, .nav-link span:last-of-type { display: none; }
  .brand-area { padding: 1rem 0.75rem; align-items: center; }
  .brand-logo-horizontal:not(.ethora-sidebar-logo):not(.ethora-header-logo):not(.ethora-login-logo) { width: 56px; max-width: 100%; margin: 0 auto; }
  .sidebar.ethora-sidebar { width: var(--sidebar-width); }
  .sidebar.ethora-sidebar .ethora-sidebar-logo {
    width: 170px;
    max-width: 170px;
    max-height: 76px;
    margin: 0;
  }
  .main { margin-left: 88px; }
  .main.ethora-main { margin-left: var(--sidebar-width); }
  .nav-link { justify-content: center; padding: 0.85rem; }
}

@media (max-width: 640px) {
  .ethora-profile-bar {
    grid-template-columns: 1fr;
  }

  .ethora-profile-bar-user,
  .ethora-profile-bar-tools {
    justify-content: flex-start;
  }

  .sidebar:not(.ethora-app-shell .sidebar) {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: auto;
  }
  .main { margin-left: 0; }
  .app-shell { flex-direction: column; }
  .content { padding: 1rem; }
}

/* ── Login ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.login-brand .ethora-login-logo,
.login-brand .ethora-brand-logo {
  max-width: 260px;
  max-height: 110px;
  height: auto;
}

.login-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 300px;
}

.login-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.login-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.btn-block {
  width: 100%;
}

/* ── Pet detail ── */
.pet-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pet-detail-body .risk-banner {
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.25rem;
}

.pet-detail-recommendation {
  max-width: 520px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(242, 244, 245, 0.88);
  text-align: right;
}

.pet-detail-cards {
  margin-bottom: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem;
}

.pet-detail-cards .card {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
}

.pet-detail-cards .card-label {
  font-size: 0.6875rem;
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
}

.pet-detail-cards .card-value {
  font-size: 1.45rem;
}

.pet-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
  margin-bottom: 0;
}

.pet-detail-grid .section,
.pet-detail-body > .section {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

#monitoring-history {
  scroll-margin-top: 5.5rem;
}

/* ── Ethora Intelligence ── */
.ethora-intelligence {
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.98), rgba(11, 27, 33, 0.72));
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-left: 4px solid var(--turquoise);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(126, 230, 199, 0.08);
}

.ethora-intelligence.risk-high {
  border-left-color: var(--high);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(248, 113, 113, 0.08);
}

.ethora-intelligence.risk-medium {
  border-left-color: var(--medium);
}

.ethora-intelligence-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(20, 184, 166, 0.16);
}

.ethora-intelligence-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.ethora-intelligence-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(20, 184, 166, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ethora-intelligence-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--turquoise);
  fill: none;
  stroke-width: 1.75;
}

.ethora-intelligence h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ice-white);
  margin-bottom: 0.2rem;
}

.ethora-intelligence-subtitle {
  margin: 0;
  font-size: 0.8125rem;
}

.ethora-intelligence-body {
  display: grid;
  gap: 1rem;
}

.ethora-intelligence-block h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--turquoise);
  margin-bottom: 0.45rem;
}

.ethora-intelligence-block p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(242, 244, 245, 0.9);
}

.ethora-intelligence-tutor-box {
  padding: 1rem 1.125rem;
  border-radius: var(--radius-sm);
  background: rgba(11, 27, 33, 0.55);
  border: 1px dashed rgba(20, 184, 166, 0.42);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ice-white);
  white-space: pre-wrap;
}

.ethora-intelligence-header .badge {
  text-transform: none;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.ethora-intelligence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.ethora-intelligence-copy-feedback {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--aqua-light);
}

.ethora-intelligence-disclaimer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 184, 166, 0.12);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .ethora-intelligence-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Monitoring page ── */
.monitoring-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  align-items: start;
}

.monitoring-form-section,
.monitoring-rules-section {
  padding: 1.25rem;
  margin-bottom: 0;
}

.monitoring-mvp-note {
  margin-bottom: 1.25rem;
}

.monitoring-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.monitoring-form-grid .form-group--highlight label {
  color: var(--turquoise);
}

.monitoring-form-grid .form-group--highlight input:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.monitoring-rules-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ice-white);
  margin-bottom: 0.875rem;
}

.monitoring-rules-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.monitoring-rules-list li {
  padding: 0.75rem 0.875rem;
  background: rgba(11, 27, 33, 0.45);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--turquoise);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(242, 244, 245, 0.88);
}

.monitoring-rules-list strong {
  color: var(--turquoise);
  font-weight: 600;
}

.monitoring-success {
  display: grid;
  gap: 1rem;
}

.monitoring-success-text {
  margin: 0;
  line-height: 1.55;
}

.monitoring-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .monitoring-layout { grid-template-columns: 1fr; }
  .monitoring-form-grid { grid-template-columns: 1fr; }
}

.detail-list {
  display: grid;
  gap: 0.875rem;
}

.detail-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.detail-item dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.detail-item dd {
  font-size: 0.9375rem;
  color: var(--ice-white);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .pet-detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .pet-detail-grid { grid-template-columns: 1fr; }
  .pet-detail-recommendation { text-align: left; margin-top: 0.75rem; }
  .detail-item { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ── Alerts center ── */
.alerts-page,
.ethora-alerts-page {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.alerts-center-intro {
  margin-bottom: 1rem;
}

.alerts-kpi-row,
.alerts-page .ethora-kpi-row,
.ethora-kpi-row.alerts-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  width: 100%;
}

.alerts-summary-cards {
  margin-bottom: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
}

.alerts-summary-cards .card {
  padding: 0.9rem 1rem;
}

.alerts-summary-cards .card-value {
  font-size: 1.65rem;
}

.alerts-filters-section,
.alerts-table-section {
  padding: 1.25rem;
  margin-bottom: 1rem;
  max-width: 100%;
  min-width: 0;
}

.alerts-filters-grid {
  max-width: 100%;
}

.ethora-table-card.alerts-table-card,
.alerts-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid rgba(20, 184, 166, 0.14);
  background: rgba(7, 25, 28, 0.35);
}

.alerts-table-wrap table,
.alerts-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.alerts-table-wrap th,
.alerts-table-wrap td {
  padding: 0.65rem 0.55rem;
  vertical-align: top;
  font-size: 0.8125rem;
}

.alerts-table-wrap th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ethora-muted);
  border-bottom: 1px solid rgba(20, 184, 166, 0.14);
}

.alerts-table-wrap tbody tr {
  border-bottom: 1px solid rgba(20, 184, 166, 0.08);
}

.alerts-table-wrap .col-pet { width: 8%; }
.alerts-table-wrap .col-meta { width: 14%; }
.alerts-table-wrap .col-message { width: 30%; }
.alerts-table-wrap .col-origin { width: 14%; }
.alerts-table-wrap .col-status { width: 10%; }
.alerts-table-wrap .col-date { width: 12%; }
.alerts-table-wrap .col-actions { width: 12%; }

.alert-message-cell {
  word-break: break-word;
  line-height: 1.35;
  color: rgba(242, 244, 245, 0.88);
}

.alert-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.alert-meta-cell .alert-title-sub {
  font-size: 0.75rem;
  color: var(--ethora-muted);
  word-break: break-word;
}

.alert-origin-cell,
.alert-status-cell,
.alert-date-cell {
  white-space: normal;
}

.alert-actions-cell {
  overflow: visible;
}

.alert-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.alert-actions .ethora-button-primary,
.alert-actions .ethora-button-secondary,
.alert-actions .btn {
  white-space: normal;
  min-width: auto;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.25;
}

.ethora-action-menu {
  position: relative;
  display: inline-flex;
}

.ethora-action-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 210px;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--ethora-border-strong);
  background: rgba(11, 27, 33, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ethora-action-menu-panel[hidden] {
  display: none !important;
}

.ethora-action-menu-panel a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--ethora-text);
  text-decoration: none;
}

.ethora-action-menu-panel a:hover {
  background: rgba(20, 184, 166, 0.12);
  color: var(--ethora-primary-light);
}

.alerts-table-wrap td.message-cell {
  max-width: none;
  white-space: normal;
  line-height: 1.35;
}

.alerts-table-wrap td.actions-cell {
  white-space: normal;
}

.ethora-badge,
.ethora-status-badge,
.alerts-table-wrap .badge {
  white-space: normal;
  max-width: 100%;
}

@media (max-width: 900px) {
  .alerts-table-wrap table,
  .alerts-table {
    table-layout: auto;
  }

  .alerts-table-wrap thead {
    display: none;
  }

  .alerts-table-wrap tbody tr {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(20, 184, 166, 0.12);
  }

  .alerts-table-wrap tbody td {
    display: block;
    width: 100% !important;
    padding: 0.25rem 0;
    border: none;
  }

  .alerts-table-wrap tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ethora-muted);
    margin-bottom: 0.2rem;
  }

  .ethora-action-menu-panel {
    right: auto;
    left: 0;
  }
}

.badge.open {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.resolved {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

/* ── Subscription / Pricing ── */
.section-intro {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.subscription-empty {
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.subscription-current-card {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.subscription-current-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.subscription-plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--aqua-light);
}

.subscription-summary-cards .card-value.subscription-price {
  font-size: 1.5rem;
}

.subscription-summary-cards .card-value.subscription-date {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ice-white);
}

.tutor-subscription-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 1rem;
}

.tutor-subscription-kpi-card {
  min-height: 120px;
  padding: 18px;
  border-radius: 18px;
  overflow-wrap: anywhere;
}

.tutor-subscription-kpi-card strong,
.tutor-subscription-kpi-value {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ice-white);
  margin-top: 0.35rem;
}

.tutor-subscription-kpi-card .date-value {
  font-size: 22px;
  line-height: 1.25;
}

.tutor-subscription-kpi-card .subscription-price {
  color: var(--aqua-light);
}

@media (max-width: 1200px) {
  .tutor-subscription-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .tutor-subscription-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Clinic Reports ── */
.clinic-reports-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.clinic-reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

/* Opt-in: clinic reports uses DS eds-kpi-strip; keep delta color tokens */
.clinic-reports-kpi-strip {
  margin: 0;
}
.clinic-reports-kpi-card {
  min-height: 118px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: rgba(7, 25, 28, 0.72);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.clinic-reports-kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.72);
}

.clinic-reports-kpi-value {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ice-white);
  margin: 0.35rem 0;
}

.clinic-reports-kpi-delta {
  font-size: 0.65rem;
  font-weight: 500;
}

.clinic-reports-kpi-delta.is-positive { color: #2dd4bf; }
.clinic-reports-kpi-delta.is-negative { color: #f87171; }
.clinic-reports-kpi-delta.is-neutral { color: rgba(226, 232, 240, 0.55); }
.clinic-reports-kpi-delta.is-warning { color: #fbbf24; }

.clinic-reports-charts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.clinic-reports-chart-card {
  border-radius: 18px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  background: rgba(7, 25, 28, 0.78);
  padding: 1rem 1.1rem 0.85rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.clinic-reports-chart-card.is-wide {
  grid-column: span 1;
}

.clinic-reports-chart-card h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ice-white);
}

.clinic-reports-chart-wrap {
  position: relative;
  flex: 1;
  min-height: 240px;
  max-height: 280px;
}

.clinic-reports-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.9rem;
  padding: 1rem;
}

.clinic-reports-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

.clinic-reports-panel {
  border-radius: 18px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  background: rgba(7, 25, 28, 0.78);
  padding: 1.1rem 1.2rem;
}

.clinic-reports-panel h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.clinic-reports-metric-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.clinic-reports-metric-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.5rem;
}

.clinic-reports-metric-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.clinic-reports-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.clinic-reports-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.clinic-reports-top-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.clinic-reports-top-list li:last-child {
  border-bottom: none;
}

.clinic-reports-top-rank {
  color: #2dd4bf;
  font-weight: 700;
  min-width: 1.5rem;
}

.clinic-reports-top-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.clinic-reports-detail-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: rgba(45, 212, 191, 0.55);
  cursor: not-allowed;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.clinic-reports-detail-link:disabled {
  opacity: 0.65;
}

@media (max-width: 1200px) {
  .clinic-reports-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .clinic-reports-charts-row,
  .clinic-reports-bottom-grid,
  .clinic-reports-top-grid {
    grid-template-columns: 1fr;
  }

  .clinic-reports-chart-wrap {
    min-height: 200px;
    max-height: 220px;
  }
}

@media (max-width: 560px) {
  .clinic-reports-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Admin executive dashboard ── */
.ethora-admin-dashboard-page .ethora-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.admin-dashboard-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ethora-primary-light);
  margin-bottom: 0.2rem;
}

.admin-dashboard-snapshot {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--ethora-muted);
}

.admin-dashboard-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.admin-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.admin-dashboard-kpi-card {
  background: var(--ethora-card);
  border: 1px solid var(--ethora-border);
  border-radius: var(--ethora-radius-sm);
  padding: 0.55rem 0.65rem;
  min-height: 4.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-dashboard-kpi-label {
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--ethora-muted);
}

.admin-dashboard-kpi-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ethora-primary-light);
  line-height: 1.1;
}

.admin-kpi-updated {
  animation: adminKpiPulse 0.9s ease;
}

@keyframes adminKpiPulse {
  0% {
    transform: scale(1);
    color: var(--ethora-primary-light);
  }
  35% {
    transform: scale(1.08);
    color: #ffffff;
    text-shadow: 0 0 18px rgba(126, 230, 199, 0.75);
  }
  100% {
    transform: scale(1);
    color: var(--ethora-primary-light);
  }
}

.admin-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.32);
  background: rgba(3, 20, 24, 0.48);
  color: var(--ethora-primary-light);
  font-size: 12px;
  font-weight: 800;
}

.admin-live-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
}

.admin-live-status.is-warning span,
.admin-live-status.is-polling span {
  background: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.8);
}

.admin-live-status.is-error span {
  background: #ff5a6a;
  box-shadow: 0 0 12px rgba(255, 90, 106, 0.8);
}

.admin-dashboard-charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.65rem;
}

.admin-dashboard-chart-card,
.admin-dashboard-panel {
  background: var(--ethora-card);
  border: 1px solid var(--ethora-border);
  border-radius: var(--ethora-radius-md);
  padding: 0.75rem 0.85rem;
  min-height: 0;
}

.admin-dashboard-chart-card h4,
.admin-dashboard-panel h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ethora-text);
  margin-bottom: 0.5rem;
}

.admin-dashboard-chart-wrap {
  position: relative;
  height: 168px;
}

.admin-dashboard-chart-fallback {
  font-size: 0.78rem;
  color: var(--ethora-muted);
  text-align: center;
  padding: 2rem 0.5rem;
}

.admin-dashboard-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.admin-dashboard-queue-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--ethora-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(20, 184, 166, 0.12);
}

.admin-dashboard-queue-list li:last-child {
  border-bottom: none;
}

.admin-dashboard-queue-list strong {
  color: var(--ethora-primary-light);
  font-size: 0.95rem;
}

.admin-dashboard-panels-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.admin-dashboard-panels-row .ethora-panel {
  margin: 0;
  min-height: 0;
}

.admin-dashboard-panels-row .ethora-panel-body {
  max-height: 200px;
  overflow: auto;
}

.admin-dashboard-list-item {
  padding: 0.35rem 0;
}

.admin-dashboard-quick-panel {
  margin-top: 0.15rem;
}

@media (max-width: 1280px) {
  .admin-dashboard-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-dashboard-panels-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .admin-dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-dashboard-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-panels-row {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-chart-wrap {
    height: 200px;
  }
}

.subscription-limits,
.subscription-features,
.subscription-commercial {
  margin-top: 1.25rem;
}

.subscription-limits h5,
.subscription-features h5,
.subscription-commercial h5 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.subscription-limit-list,
.plan-feature-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.subscription-limit-list li,
.plan-feature-list li {
  color: var(--text);
  font-size: 0.9375rem;
}

.plan-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.plan-card {
  position: relative;
  background: linear-gradient(160deg, rgba(14, 61, 58, 0.92), rgba(11, 27, 33, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.45);
}

.plan-card-recommended {
  border-color: rgba(20, 184, 166, 0.65);
  box-shadow: 0 12px 40px rgba(20, 184, 166, 0.15);
}

.plan-card-current {
  background: linear-gradient(180deg, rgba(14, 58, 54, 0.98) 0%, rgba(8, 31, 35, 1) 100%);
  border: 1px solid rgba(44, 215, 196, 0.55);
  box-shadow:
    0 0 0 1px rgba(44, 215, 196, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(35, 214, 195, 0.14);
  opacity: 1;
}

.plan-badge-recommended {
  align-self: flex-start;
  background: var(--gradient-btn);
  color: var(--ice-white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plan-card-name {
  font-size: 1.35rem;
  font-weight: 700;
}

.plan-card-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--turquoise);
}

.plan-card-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.plan-feature-included {
  color: var(--aqua-light);
}

.plan-feature-excluded {
  color: rgba(242, 244, 245, 0.45);
}

.plan-feature-icon {
  display: inline-block;
  width: 1.25rem;
  font-weight: 700;
}

.plan-card .btn {
  margin-top: auto;
}

.commercial-form {
  margin-top: 1rem;
}

.form-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.badge.trial {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.active {
  background: rgba(126, 230, 199, 0.14);
  color: var(--aqua-light);
  border-color: rgba(126, 230, 199, 0.35);
}

.badge.past_due {
  background: rgba(251, 191, 36, 0.14);
  color: var(--medium);
  border-color: rgba(251, 191, 36, 0.35);
}

.badge.cancelled,
.badge.expired {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

/* ── Medical Records ── */
.section-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.medical-records-list {
  display: grid;
  gap: 1rem;
}

.medical-record-card {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, border-color 0.2s;
}

.medical-record-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.45);
}

.medical-record-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.medical-record-title {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ice-white);
}

.medical-record-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.medical-record-description,
.medical-record-meta {
  color: rgba(242, 244, 245, 0.88);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.medical-record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.badge.medical-record-type {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.medical-record-type.vaccine,
.badge.medical-record-type.exam {
  background: rgba(126, 230, 199, 0.14);
  color: var(--aqua-light);
  border-color: rgba(126, 230, 199, 0.35);
}

.badge.medical-record-type.diagnosis,
.badge.medical-record-type.treatment {
  background: rgba(251, 191, 36, 0.14);
  color: var(--medium);
  border-color: rgba(251, 191, 36, 0.35);
}

/* ── Tutor Communications ── */
.tutor-communications-list {
  display: grid;
  gap: 1rem;
}

.tutor-communication-card {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, border-color 0.2s;
}

.tutor-communication-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.45);
}

.tutor-communication-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.tutor-communication-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tutor-communication-subject {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ice-white);
  margin-bottom: 0.5rem;
}

.tutor-communication-message {
  color: rgba(242, 244, 245, 0.88);
  font-size: 0.9375rem;
  white-space: pre-wrap;
}

.tutor-communication-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tutor-communication-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.tutor-communication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge.communication-type,
.badge.communication-channel {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.communication-status.draft {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.badge.communication-status.sent,
.badge.communication-status.delivered,
.badge.communication-status.read {
  background: rgba(126, 230, 199, 0.14);
  color: var(--aqua-light);
  border-color: rgba(126, 230, 199, 0.35);
}

.badge.communication-status.failed {
  background: rgba(248, 113, 113, 0.14);
  color: var(--high);
  border-color: rgba(248, 113, 113, 0.35);
}

.badge.communication-status.cancelled {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.ethora-intelligence-copy-feedback a {
  color: var(--turquoise);
  text-decoration: underline;
}

/* ── Follow-ups ── */
.follow-ups-list {
  display: grid;
  gap: 1rem;
}

.follow-up-card {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, border-color 0.2s;
}

.follow-up-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.45);
}

.follow-up-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.follow-up-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.follow-up-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ice-white);
  margin-bottom: 0.5rem;
}

.follow-up-description {
  color: rgba(242, 244, 245, 0.88);
  font-size: 0.9375rem;
}

.follow-up-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.follow-up-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.follow-up-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Care sessions ── */
.care-sessions-list {
  display: grid;
  gap: 1rem;
}

.care-session-card {
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.95), rgba(18, 58, 52, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, border-color 0.2s;
}

.care-session-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.45);
}

.care-session-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.care-session-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.care-session-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ice-white);
  margin-bottom: 0.5rem;
}

.care-session-meta {
  color: rgba(242, 244, 245, 0.88);
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.care-session-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.care-session-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.care-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.care-session-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-soft);
  display: grid;
  gap: 0.75rem;
}

.care-session-details dl {
  display: grid;
  gap: 0.35rem;
}

.care-session-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.care-session-details dd {
  color: rgba(242, 244, 245, 0.92);
  font-size: 0.9375rem;
  margin: 0;
}

.care-sessions-list-compact .care-session-card {
  padding: 1rem 1.1rem;
}

.badge.care-session-type {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.care-session-status.scheduled,
.badge.care-session-status.in_progress {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.badge.care-session-status.completed {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.badge.care-session-status.cancelled,
.badge.care-session-status.no_show {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.badge.follow-up-type {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.follow-up-status.pending,
.badge.follow-up-status.in_progress {
  background: rgba(251, 191, 36, 0.14);
  color: var(--medium);
  border-color: rgba(251, 191, 36, 0.35);
}

.badge.follow-up-status.completed {
  background: rgba(126, 230, 199, 0.14);
  color: var(--aqua-light);
  border-color: rgba(126, 230, 199, 0.35);
}

.badge.follow-up-status.overdue {
  background: rgba(248, 113, 113, 0.14);
  color: var(--high);
  border-color: rgba(248, 113, 113, 0.35);
}

.badge.follow-up-status.cancelled {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.badge.follow-up-priority.low {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.badge.follow-up-priority.medium {
  background: rgba(20, 184, 166, 0.14);
  color: var(--turquoise);
  border-color: rgba(20, 184, 166, 0.35);
}

.badge.follow-up-priority.high,
.badge.follow-up-priority.urgent {
  background: rgba(248, 113, 113, 0.14);
  color: var(--high);
  border-color: rgba(248, 113, 113, 0.35);
}

.tutor-address-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.tutor-address-title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tutors-address-grid,
.tutors-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tutors-form-section .form-actions {
  margin-top: 1.25rem;
}

.tutor-address-detail-row td {
  background: rgba(15, 23, 42, 0.35);
  border-top: none;
  padding-top: 0;
}

.tutor-address-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  padding: 0.75rem 0 1rem;
}

.tutor-address-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tutor-address-detail-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tutor-address-detail-item strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.tutor-address-detail-empty {
  margin: 0;
  padding: 0.5rem 0 1rem;
}

.tutors-table-wrap {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .tutors-address-grid,
  .tutors-form-grid {
    grid-template-columns: 1fr;
  }
}

.clinics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.clinics-side-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.clinics-form-section {
  max-height: calc(100vh - 8rem);
  overflow: auto;
}

.clinics-proximity-note {
  margin-bottom: 1rem;
}

.clinics-proximity-note p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.clinics-checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--turquoise);
}

.clinics-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.clinics-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.clinics-nearby-section {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .clinics-layout {
    grid-template-columns: 1fr;
  }

  .clinics-form-section {
    max-height: none;
  }
}

/* ══ Ethora Premium Design System (ethora-*) ══ */
.ethora-shell { min-height: 100vh; }
.ethora-sidebar, .sidebar.ethora-sidebar {
  background: linear-gradient(180deg, #061214 0%, var(--ethora-bg-2) 55%, var(--ethora-bg) 100%);
  border-right: 1px solid var(--ethora-border);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.25);
}
.ethora-main, .main.ethora-main { background: transparent; }
.ethora-topbar, .topbar.ethora-topbar {
  background: var(--ethora-card-soft);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ethora-border);
}
.ethora-topbar-user { display: flex; align-items: center; gap: 0.75rem; }
.ethora-topbar-user-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}
.ethora-topbar-profile-badge { flex-shrink: 0; }
.ethora-topbar-greeting { font-size: 0.8125rem; font-weight: 600; color: var(--ethora-text); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ethora-topbar-bell { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ethora-border); background: rgba(7,25,28,0.6); color: var(--ethora-primary-light); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ethora-topbar-bell svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.ethora-topbar-profile-chip { font-size: 0.6875rem; color: var(--ethora-muted); }

/* Insurance network — compact layout */
.ethora-insurance-page { display: flex; flex-direction: column; gap: 1rem; }
.ethora-insurance-page .ethora-panel { padding: 1.25rem 1.5rem; }
.ethora-insurance-page .ethora-insurance-disclaimer { margin-bottom: 0.25rem; font-size: 0.8125rem; }
.ethora-insurance-coverage-card { padding: 1.25rem 1.5rem !important; min-height: 0; }
.insurance-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.insurance-header-row h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.insurance-pet-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 260px;
  max-width: 320px;
}
.insurance-pet-toolbar .ethora-input { width: 100%; }
.insurance-pet-toolbar .ethora-button-secondary { align-self: flex-start; }
.insurance-pet-toolbar .ethora-field-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ethora-muted);
}
.insurance-empty-state {
  margin: 12px 0 18px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ethora-muted);
  min-height: auto;
  text-align: left;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.insurance-empty-state[hidden] { display: none !important; }
.insurance-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--ethora-muted);
}
.insurance-status-strip strong { color: var(--ethora-text); font-weight: 600; }
.insurance-status-strip[hidden] { display: none !important; }
.insurance-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 0;
}
.insurance-form-grid .ethora-field { gap: 0.3rem; }
.insurance-form-grid .ethora-field-readonly input {
  background: rgba(7, 25, 28, 0.45);
  color: var(--ethora-muted);
  cursor: default;
}
.insurance-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
  grid-column: 1 / -1;
}
.ethora-insurance-manual-toggle {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--ethora-teal);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
}
.ethora-insurance-manual-fields { display: none; grid-column: 1 / -1; }
.ethora-insurance-manual-fields.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}
.ethora-insurance-rank-position { font-size: 0.75rem; color: var(--ethora-muted); margin-bottom: 0.25rem; }

@media (max-width: 900px) {
  .insurance-form-grid,
  .ethora-insurance-manual-fields.is-open {
    grid-template-columns: 1fr;
  }
  .insurance-pet-toolbar {
    min-width: 100%;
    max-width: 100%;
  }
  .insurance-header-row { flex-direction: column; }
  .ethora-topbar-user-meta { flex-direction: row; }
}

@media (max-width: 640px) {
  .ethora-insurance-page .ethora-panel { padding: 1rem; }
  .insurance-actions-row { flex-direction: column; align-items: stretch; }
  .insurance-actions-row .ethora-button-primary { width: 100%; }
}

.insurance-info-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px 20px;
  align-items: start;
  max-width: 720px;
}

.insurance-info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ethora-muted);
  font-weight: 700;
}

.insurance-info-value {
  font-size: 15px;
  color: var(--ethora-text);
  word-break: break-word;
}

.health-plan-info-grid {
  margin-bottom: 0.5rem;
}

.health-plan-consent-note {
  margin-top: 0.75rem;
  margin-bottom: 0;
  max-width: 720px;
}

.insurance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.insurance-actions button,
.insurance-actions a {
  width: auto;
  max-width: 360px;
}

@media (max-width: 700px) {
  .insurance-info-grid {
    grid-template-columns: 1fr;
  }
}

.ethora-card { background: var(--ethora-card); border: 1px solid var(--ethora-border); border-radius: var(--ethora-radius-md); padding: 1.25rem; box-shadow: var(--ethora-shadow); backdrop-filter: blur(8px); }
.ethora-card,
.home-card,
.ethora-panel,
.ethora-mini-panel,
.data-card,
.card:not(.ethora-kpi-card) {
  background: linear-gradient(180deg, rgba(11, 39, 45, 0.72), rgba(7, 25, 28, 0.88));
  border: 1px solid rgba(20, 184, 166, 0.14);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.ethora-chart-card,
.home-chart-card {
  padding: 1rem;
  min-width: 0;
}

.ethora-pet-card,
.home-pet-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.ethora-pet-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ethora-pet-card-body { flex: 1; min-width: 0; }

.ethora-pet-detail-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
}

.ethora-pet-grid,
.data-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ethora-message-card,
.ethora-plan-card,
.ethora-action-card,
.home-plan-card,
.home-quick-actions {
  min-width: 0;
}

.ethora-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: 1rem;
}

.ethora-content-grid,
.ethora-main-grid,
.ethora-two-column-grid,
.ethora-three-column-grid,
.home-grid {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ethora-main-grid,
.home-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  align-items: start;
}

.ethora-right-column,
.home-right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.ethora-list-row,
.data-card-field {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.8125rem;
}

.ethora-action-grid,
.data-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ethora-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: min(100%, 220px);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: rgba(7, 25, 28, 0.75);
}

.ethora-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ethora-text);
  font: inherit;
  font-size: 0.8125rem;
  outline: none;
}

.ethora-search svg {
  width: 16px;
  height: 16px;
  stroke: var(--ethora-muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.ethora-topbar-bell,
.ethora-notify-btn {
  position: relative;
  text-decoration: none;
  color: inherit;
}

.ethora-notify-badge { position: absolute; top: -4px; right: -4px; }

.ethora-pet-avatar--md { width: 64px; height: 64px; }

.ethora-donut-chart { position: relative; width: 132px; height: 132px; }

.ethora-mini-chart svg,
.home-mini-chart { width: 100%; max-width: 100%; }

.ethora-empty-state,
.empty,
.ethora-fallback-note {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(20, 184, 166, 0.2);
  background: rgba(7, 25, 28, 0.45);
  color: var(--ethora-muted);
  font-size: 0.875rem;
}

.ethora-topbar-user { flex-wrap: wrap; }

@media (max-width: 1280px) {
  .ethora-main-grid,
  .home-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ethora-search { min-width: 0; flex: 1; }
  .ethora-pet-grid,
  .data-card-list { grid-template-columns: 1fr; }
}
.ethora-kpi-card { background: linear-gradient(145deg, rgba(14,61,58,0.85), rgba(10,42,46,0.72)); border: 1px solid var(--ethora-border); border-radius: var(--ethora-radius-md); padding: 1.1rem 1.25rem; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 12px 40px rgba(0,0,0,0.22); }
.ethora-kpi-label { font-size: 0.75rem; color: var(--ethora-muted); }
.ethora-kpi-value { font-size: 1.65rem; font-weight: 700; color: var(--ethora-primary-light); }
.ethora-dashboard-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ethora-dashboard-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.ethora-dashboard-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.ethora-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ethora-section-header h3 { font-size: 1rem; font-weight: 600; }
.ethora-section-body { display: flex; flex-direction: column; gap: 0.75rem; }
.ethora-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 180px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--ethora-border);
  color: var(--ethora-muted);
  background: rgba(7,25,28,0.5);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.ethora-badge-success { color: var(--ethora-success); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.12); }
.ethora-badge-warning { color: var(--ethora-warning); border-color: rgba(250,204,21,0.35); background: rgba(250,204,21,0.1); }
.ethora-badge-danger { color: var(--ethora-danger); border-color: rgba(255,90,106,0.35); background: rgba(255,90,106,0.1); }
.ethora-button-primary { display: inline-flex; padding: 0.65rem 1.1rem; border: none; border-radius: var(--ethora-radius-sm); font-weight: 600; font-size: 0.8125rem; cursor: pointer; color: var(--ethora-bg); background: linear-gradient(135deg, var(--ethora-surface), var(--ethora-primary)); }
.ethora-button-secondary { display: inline-flex; padding: 0.6rem 1rem; border-radius: var(--ethora-radius-sm); font-weight: 600; font-size: 0.8125rem; cursor: pointer; color: var(--ethora-primary-light); background: transparent; border: 1px solid var(--ethora-border-strong); }
.ethora-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--ethora-primary), var(--ethora-primary-light)); color: var(--ethora-bg); font-size: 0.8125rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ethora-mini-chart { height: 48px; border-radius: var(--ethora-radius-sm); background: linear-gradient(90deg, rgba(20,184,166,0.15), rgba(126,230,199,0.35), rgba(20,184,166,0.2)); border: 1px solid var(--ethora-border); }
.ethora-progress { height: 8px; border-radius: 999px; background: rgba(7,25,28,0.6); border: 1px solid var(--ethora-border); overflow: hidden; }
.ethora-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ethora-primary), var(--ethora-primary-light)); }
.ethora-alert-card { padding: 0.9rem 1rem; border-radius: var(--ethora-radius-sm); border: 1px solid var(--ethora-border); background: rgba(11,27,33,0.65); }
.ethora-quick-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* Legacy card quick-access (deprecated — use fixed header bar) */
.ethora-quick-access-panel,
.ethora-quick-access-header,
.ethora-quick-access-subtitle,
.dashboard-quick-access-card,
.quick-access-card,
.quick-access-section {
  display: none !important;
}

.admin-breeders-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-breeders-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-breeders-kpis {
  margin-bottom: 1rem;
}

.admin-breeders-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-breeders-table .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-breeder-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.admin-breeder-detail-actions {
  margin-top: 1rem;
  flex-wrap: wrap;
}

.ethora-quick-access-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--ethora-radius-lg);
  border: 1px solid rgba(44, 215, 196, 0.2);
  background: linear-gradient(180deg, rgba(11, 45, 44, 0.72) 0%, rgba(7, 26, 31, 0.88) 100%);
}
.ethora-quick-access-header h3 {
  margin: 0;
  color: var(--ethora-primary-light);
  font-size: 1rem;
}
.ethora-quick-access-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--ethora-muted);
}
.ethora-quick-access-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.ethora-quick-access-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  border: 1px solid rgba(44, 215, 196, 0.28);
  color: #dffaf5;
  background: rgba(7, 26, 31, 0.72);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.ethora-quick-access-btn.is-active,
.ethora-quick-access-btn--primary {
  color: #062824;
  background: rgba(44, 215, 196, 0.92);
  border-color: rgba(44, 215, 196, 0.95);
}
.ethora-quick-access-btn:hover,
.ethora-quick-access-btn:focus-visible {
  border-color: rgba(44, 215, 196, 0.55);
  background: rgba(44, 215, 196, 0.14);
  color: #f4fffd;
  outline: 2px solid rgba(44, 215, 196, 0.35);
  outline-offset: 2px;
}
.ethora-quick-access-btn--primary:hover,
.ethora-quick-access-btn--primary:focus-visible {
  background: rgba(44, 215, 196, 1);
  color: #062824;
}
.ethora-quick-access-icon {
  width: 1.15rem;
  text-align: center;
  flex-shrink: 0;
}
.ethora-quick-access-label {
  white-space: nowrap;
}
.ethora-quick-access-more {
  position: relative;
}
.ethora-quick-access-more summary {
  list-style: none;
  cursor: pointer;
}
.ethora-quick-access-more summary::-webkit-details-marker {
  display: none;
}
.ethora-quick-access-overflow-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}
@media (max-width: 900px) {
  .ethora-quick-access-grid {
    gap: 0.5rem;
  }
  .ethora-quick-access-btn {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    min-width: 9rem;
  }
}
@media (max-width: 520px) {
  .ethora-quick-access-btn {
    flex: 1 1 100%;
    min-width: 0;
  }
  .ethora-quick-access-label {
    white-space: normal;
    text-align: center;
  }
}
.ethora-list-item { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(20,184,166,0.12); }
.ethora-list-item:last-child { border-bottom: none; }
.ethora-fallback-note { font-size: 0.8125rem; color: var(--ethora-muted); font-style: italic; }
.ethora-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--ethora-radius-lg);
  border: 1px solid var(--ethora-border);
  background: linear-gradient(135deg, rgba(14,61,58,0.55), rgba(11,27,33,0.85));
  box-shadow: var(--ethora-shadow);
}
.ethora-dashboard-hero h2 { font-size: 1.25rem; font-weight: 700; color: var(--ethora-primary-light); }
.ethora-dashboard-hero p { font-size: 0.875rem; color: var(--ethora-muted); margin-top: 0.25rem; }

.ethora-operation-status {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--ethora-border);
  background: rgba(255, 255, 255, 0.035);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.ethora-operation-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ethora-muted);
}
.ethora-operation-status strong {
  font-size: 15px;
  color: var(--ethora-text);
}
.ethora-operation-status small {
  font-size: 12px;
  color: var(--ethora-muted);
  line-height: 1.4;
}
.ethora-operation-status-normal {
  border-color: rgba(52, 211, 153, 0.42);
}
.ethora-operation-status-warning {
  border-color: rgba(250, 204, 21, 0.45);
}
.ethora-operation-status-critical {
  border-color: rgba(255, 90, 106, 0.48);
}

#dashboard-loading.ethora-page-loading {
  display: flex;
}
#dashboard-loading[hidden],
#dashboard-loading.is-hidden {
  display: none !important;
}
#dashboard-body[hidden] {
  display: none !important;
}
#dashboard-body.is-visible {
  display: block;
}
.ethora-mobile-preview-safe { padding-bottom: env(safe-area-inset-bottom, 0); }
@media (max-width: 1280px) { .ethora-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ethora-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ethora-dashboard-grid-2, .ethora-dashboard-grid-3 { grid-template-columns: 1fr; } .ethora-topbar-greeting { display: none; } }
@media (max-width: 600px) { .ethora-dashboard-grid { grid-template-columns: 1fr; } }

/* ── Ethora operational pages ── */
.ethora-page { display: flex; flex-direction: column; gap: 1.25rem; }
.ethora-page-header { margin-bottom: 0.25rem; }
.ethora-page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--ethora-primary-light); letter-spacing: -0.02em; }
.ethora-page-header p { font-size: 0.875rem; color: var(--ethora-muted); margin-top: 0.25rem; }

.ethora-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.ethora-kpi-row .ethora-kpi-card {
  min-height: 72px;
  padding: 0.85rem 1rem;
}
.ethora-kpi-row .ethora-kpi-value { font-size: 1.35rem; }

.ethora-content-grid {
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
}

.care-requests-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr) minmax(260px, 340px);
}

.ethora-panel-left,
.ethora-panel-center,
.ethora-panel-right,
.care-requests-side {
  min-width: 0;
  max-width: 100%;
  position: relative;
}

.care-requests-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.care-requests-side > .ethora-panel {
  margin-top: 0 !important;
}

.ethora-panel {
  background: var(--ethora-card);
  border: 1px solid var(--ethora-border);
  border-radius: var(--ethora-radius-md);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}
.ethora-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(20, 184, 166, 0.12);
}
.ethora-panel-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ethora-text);
}
.ethora-panel-header .ethora-button-secondary,
.ethora-panel-header .ethora-button-primary { padding: 0.4rem 0.75rem; font-size: 0.75rem; }

.ethora-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
}
.ethora-form-grid .ethora-field-full { grid-column: 1 / -1; }
.ethora-field { display: flex; flex-direction: column; gap: 0.35rem; }
.ethora-field label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ethora-muted);
}
.ethora-field input,
.ethora-field select,
.ethora-field textarea,
.ethora-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid var(--ethora-border);
  background: rgba(7, 25, 28, 0.55);
  color: var(--ethora-text);
  font-family: inherit;
  font-size: 0.8125rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ethora-field textarea { resize: vertical; min-height: 72px; }
.ethora-field input::placeholder,
.ethora-field textarea::placeholder { color: rgba(138, 183, 176, 0.45); }
.ethora-field input:focus,
.ethora-field select:focus,
.ethora-field textarea:focus,
.ethora-input:focus {
  outline: none;
  border-color: var(--ethora-border-strong);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.ethora-field select option { background: var(--ethora-bg-2); color: var(--ethora-text); }
.ethora-form-actions { margin-top: 0.85rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.ethora-table-card { overflow: hidden; }
.ethora-table-wrap { overflow-x: auto; border-radius: var(--ethora-radius-sm); border: 1px solid rgba(20, 184, 166, 0.1); }
.ethora-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ethora-table thead { background: rgba(7, 25, 28, 0.65); }
.ethora-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ethora-muted);
  border-bottom: 1px solid var(--ethora-border);
}
.ethora-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(20, 184, 166, 0.08);
  color: var(--ethora-text);
  vertical-align: middle;
}
.ethora-table tbody tr:hover { background: rgba(20, 184, 166, 0.06); }
.ethora-table tbody tr:last-child td { border-bottom: none; }
.ethora-table-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.ethora-empty-state {
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--ethora-muted);
}
.ethora-empty-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid var(--ethora-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ethora-primary-light);
}
.ethora-empty-state-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.ethora-empty-state h4 { font-size: 0.9375rem; font-weight: 600; color: var(--ethora-text); margin-bottom: 0.35rem; }
.ethora-empty-state p { font-size: 0.8125rem; line-height: 1.5; margin-bottom: 0.85rem; }
.ethora-empty-state-action { display: flex; justify-content: center; }

.ethora-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
}
.ethora-action-grid a,
.ethora-action-grid button {
  width: auto;
  min-width: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .ethora-action-grid {
    grid-template-columns: 1fr;
  }
  .ethora-action-grid a,
  .ethora-action-grid button {
    width: 100%;
  }
}

.ethora-queue-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ethora-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--ethora-radius-sm);
  background: rgba(7, 25, 28, 0.45);
  border: 1px solid rgba(20, 184, 166, 0.12);
}
.ethora-queue-item span:first-child { font-size: 0.8125rem; color: var(--ethora-text); }
.ethora-queue-item strong { font-size: 1rem; color: var(--ethora-primary-light); }

.ethora-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 180px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--ethora-border);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.ethora-priority-low { color: #7EE6C7; border-color: rgba(126,230,199,0.35); background: rgba(126,230,199,0.08); }
.ethora-priority-medium { color: var(--ethora-warning); border-color: rgba(250,204,21,0.35); background: rgba(250,204,21,0.1); }
.ethora-priority-high { color: #FB923C; border-color: rgba(251,146,60,0.35); background: rgba(251,146,60,0.1); }
.ethora-priority-urgent { color: var(--ethora-danger); border-color: rgba(255,90,106,0.4); background: rgba(255,90,106,0.12); }
.ethora-status-open { color: var(--ethora-primary-light); border-color: rgba(20,184,166,0.35); background: rgba(20,184,166,0.1); }
.ethora-status-assigned, .ethora-status-accepted, .ethora-status-scheduled { color: var(--ethora-warning); border-color: rgba(250,204,21,0.35); background: rgba(250,204,21,0.08); }
.ethora-status-in_progress { color: #60A5FA; border-color: rgba(96,165,250,0.35); background: rgba(96,165,250,0.1); }
.ethora-status-completed { color: var(--ethora-success); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.1); }
.ethora-status-cancelled, .ethora-status-declined { color: var(--ethora-muted); border-color: rgba(138,183,176,0.25); background: rgba(138,183,176,0.08); }
.ethora-type-telemedicine { color: #7DD3FC; border-color: rgba(125,211,252,0.35); background: rgba(125,211,252,0.1); }
.ethora-type-in_person, .ethora-type-home_visit { color: var(--ethora-primary-light); border-color: rgba(20,184,166,0.35); background: rgba(20,184,166,0.08); }

.ethora-inline-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.ethora-sidebar-profile-plan {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ethora-muted, rgba(126, 230, 199, 0.55));
  line-height: 1.2;
}

.ethora-sidebar-profile--compact {
  padding: 0.5rem 0.45rem;
  margin-bottom: 0;
}

.ethora-sidebar--tutor-basic .ethora-sidebar-tagline {
  display: none;
}

.ethora-sidebar--tutor-basic .ethora-sidebar-brand-inner,
.ethora-sidebar--tutor-basic .brand-area {
  padding-bottom: 12px;
}

.ethora-sidebar-footer { gap: 0.65rem; }
.ethora-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.5rem;
  border-radius: var(--ethora-radius-sm);
  background: rgba(20, 184, 166, 0.06);
  border: 1px solid rgba(20, 184, 166, 0.12);
  margin-bottom: 0.25rem;
}
.ethora-sidebar-profile-meta { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ethora-sidebar-profile-name { font-size: 0.75rem; font-weight: 600; color: var(--ethora-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.ethora-avatar-sm { width: 32px; height: 32px; font-size: 0.6875rem; }
.ethora-sidebar-footer .btn-logout,
.ethora-sidebar-footer .ethora-button-secondary { width: 100%; justify-content: center; font-size: 0.75rem; padding: 0.5rem; }

.ethora-toast-inline {
  padding: 0.65rem 0.85rem;
  border-radius: var(--ethora-radius-sm);
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}
.ethora-toast-inline.error { background: rgba(255,90,106,0.12); border: 1px solid rgba(255,90,106,0.35); color: #FFB4BC; }
.ethora-toast-inline.success { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.35); color: #A7F3D0; }
.ethora-toast-inline.warning { background: rgba(250,204,21,0.1); border: 1px solid rgba(250,204,21,0.35); color: #FDE68A; }
.ethora-admin-downgrade-toast {
  position: sticky;
  top: 0.75rem;
  z-index: 120;
  max-width: 36rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ethora-admin-downgrade-toast p { margin: 0.35rem 0 0; }
.ethora-admin-pending-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
}
.ethora-notify-dropdown-foot {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--ethora-border);
  font-size: 0.75rem;
}
.ethora-notify-dropdown-foot a { color: var(--ethora-accent); text-decoration: none; }
.ethora-notify-item.is-unread { border-left: 3px solid var(--ethora-accent); }

.ethora-vet-picker { margin-top: 1rem; }
.ethora-vet-card {
  padding: 0.85rem;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid var(--ethora-border);
  background: rgba(7,25,28,0.45);
  margin-bottom: 0.5rem;
}
.ethora-vet-card h4 { font-size: 0.875rem; margin-bottom: 0.35rem; }
.ethora-vet-card p { font-size: 0.75rem; color: var(--ethora-muted); margin: 0.15rem 0; }

.brand-logo-horizontal { width: 148px; max-width: 168px; }

@media (max-width: 1280px) {
  .care-requests-grid,
  .ethora-content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .care-requests-grid .care-requests-side,
  .ethora-content-grid .ethora-panel-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}
@media (max-width: 960px) {
  .ethora-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ethora-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ethora-form-grid { grid-template-columns: 1fr; }
}

/* ── Ethora official logo ── */
.ethora-sidebar-logo,
.ethora-header-logo,
.ethora-login-logo,
.ethora-brand-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  image-rendering: auto;
}

.ethora-sidebar-logo {
  width: 170px;
  max-width: 170px;
  height: auto;
  max-height: 76px;
}

.ethora-header-logo {
  width: 180px;
  max-width: 180px;
  height: auto;
  max-height: 64px;
}

.ethora-login-logo {
  width: 260px;
  max-width: 260px;
  height: auto;
  max-height: 120px;
  margin: 0 auto;
}

.ethora-brand-logo {
  width: 220px;
  max-width: 220px;
  height: auto;
  max-height: 100px;
}

.ethora-sidebar-logo-wrap,
.ethora-logo-wrap,
.ethora-header-logo-wrap,
.public-flow-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.public-flow-brand img {
  width: 220px;
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

.ethora-icon-img,
.ethora-favicon-preview {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ethora-sidebar-brand .ethora-sidebar-logo,
.ethora-sidebar-logo-wrap .ethora-sidebar-logo,
.ethora-sidebar-logo-link .ethora-sidebar-logo {
  width: 170px;
  max-width: 170px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  border-radius: 0;
}

.ethora-sidebar-brand {
  padding: 1.25rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(20, 184, 166, 0.12);
}

.ethora-sidebar-logo-link {
  display: block;
  line-height: 0;
}

.ethora-sidebar-nav .nav-link.active {
  background: rgba(20, 184, 166, 0.14);
  color: var(--ethora-primary-light);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28), 0 0 20px rgba(20, 184, 166, 0.08);
}

.ethora-sidebar-plan-card {
  display: block;
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid var(--ethora-border-strong);
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.45), rgba(7, 25, 28, 0.65));
  box-shadow: 0 0 24px rgba(20, 184, 166, 0.08);
  margin-bottom: 0.35rem;
  transition: border-color 0.2s, transform 0.15s;
}

.ethora-sidebar-plan-card:hover {
  border-color: var(--ethora-primary);
  transform: translateY(-1px);
}

.ethora-sidebar-plan-kicker {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ethora-muted);
  margin-bottom: 0.2rem;
}

.ethora-sidebar-plan-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ethora-primary-light);
  margin-bottom: 0.15rem;
}

.ethora-sidebar-plan-cta {
  display: block;
  font-size: 0.6875rem;
  color: var(--ethora-muted);
}

.ethora-topbar-brand-mobile { display: none; margin-bottom: 0.35rem; }

.ethora-page-shell {
  padding: 1.25rem 1.5rem 2rem;
  background:
    radial-gradient(ellipse at top left, rgba(20, 184, 166, 0.06), transparent 42%),
    radial-gradient(ellipse at bottom right, rgba(10, 42, 46, 0.35), transparent 48%);
}

.ethora-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1600px;
}

.ethora-panel {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(20, 184, 166, 0.06);
}

.ethora-kpi-card {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2), 0 0 24px rgba(20, 184, 166, 0.06);
}

.ethora-table-list,
.ethora-table-wrap {
  border-radius: var(--ethora-radius-sm);
  border: 1px solid rgba(20, 184, 166, 0.14);
  background: rgba(7, 25, 28, 0.35);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.ethora-table-list .ethora-table {
  min-width: 0;
  table-layout: fixed;
}

.ethora-care-requests-page .ethora-table-list {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ethora-care-requests-page .ethora-table th,
.ethora-care-requests-page .ethora-table td {
  word-break: break-word;
  white-space: normal;
  vertical-align: middle;
}

.ethora-care-requests-page .ethora-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

#login-brand-wrap,
.login-brand {
  text-align: center;
  margin-bottom: 1rem;
}

#login-brand-wrap .ethora-login-logo,
.login-brand .ethora-login-logo {
  margin: 0 auto 0.75rem;
}

@media (max-width: 960px) {
  .ethora-topbar-brand-mobile { display: block; }
  .ethora-sidebar { transform: translateX(0); }
}

@media (max-width: 768px) {
  .ethora-page-shell { padding: 1rem; }
}

/* ══ Ethora Global Design System v2 — padronização visual ══ */

.ethora-sidebar-brand-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1rem 0.85rem;
}
.ethora-sidebar-tagline {
  font-size: 0.625rem;
  line-height: 1.45;
  color: var(--ethora-muted);
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0 0.15rem;
}

.ethora-page-shell.content {
  padding: 1.15rem 1.35rem;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.ethora-page-compact {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ethora-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.ethora-two-column-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
}
.ethora-three-column-grid {
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
}
.ethora-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.ethora-panel,
.section.ethora-panel {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 61, 58, 0.78), rgba(10, 42, 46, 0.82));
  border: 1px solid var(--ethora-border);
  box-shadow: var(--ethora-shadow);
  min-height: 0;
  margin-bottom: 0;
}
.ethora-mini-panel {
  padding: 18px 20px;
}
.ethora-panel-header,
.ethora-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.ethora-panel-header h3,
.ethora-section-header h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ethora-primary-light);
}
.ethora-panel-body,
.ethora-section-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ethora-empty-state {
  margin: 12px 0;
  padding: 14px 16px;
  min-height: auto;
  text-align: left;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ethora-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ethora-empty-state strong {
  color: var(--ethora-text);
  font-weight: 600;
}
.ethora-empty-state-desc {
  display: block;
}
.ethora-empty-state-action {
  margin-top: 0.25rem;
}
.ethora-empty-state--error {
  border: 1px solid rgba(255, 90, 106, 0.28);
  background: rgba(255, 90, 106, 0.06);
}

.ethora-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ethora-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.ethora-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  grid-column: 1 / -1;
}

.ethora-kpi-row--1 { grid-template-columns: 1fr; }
.ethora-kpi-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ethora-kpi-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ethora-kpi-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ethora-kpi-row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ethora-kpi-row--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.ethora-kpi-card {
  min-height: 68px;
  padding: 0.8rem 0.95rem;
}
.ethora-kpi-value {
  font-size: 1.45rem;
}
.ethora-kpi-card--danger .ethora-kpi-value { color: var(--ethora-danger); }
.ethora-kpi-card--warning .ethora-kpi-value { color: var(--ethora-warning); }
.ethora-kpi-card--success .ethora-kpi-value { color: var(--ethora-success); }
.ethora-kpi-helper {
  font-size: 0.6875rem;
  color: var(--ethora-muted);
}

.ethora-button-danger {
  display: inline-flex;
  padding: 0.6rem 1rem;
  border-radius: var(--ethora-radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #b91c1c, var(--ethora-danger));
  border: 1px solid rgba(255, 90, 106, 0.45);
}

.ethora-page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  color: var(--ethora-muted);
  font-size: 0.8125rem;
}
.ethora-page-loading .spinner {
  width: 28px;
  height: 28px;
}

.ethora-table-card {
  border-radius: var(--ethora-radius-sm);
  border: 1px solid rgba(20, 184, 166, 0.14);
  background: rgba(7, 25, 28, 0.35);
  overflow: hidden;
}
.ethora-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ethora-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(20, 184, 166, 0.1);
  font-size: 0.8125rem;
}
.ethora-list-row:last-child {
  border-bottom: none;
}

.ethora-compact-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.ethora-compact-filters .ethora-field {
  min-width: 140px;
  flex: 1 1 160px;
  max-width: 240px;
}

/* Legacy → Ethora bridge (padronização automática) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.card {
  padding: 0.85rem 1rem;
  min-height: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(14, 61, 58, 0.85), rgba(10, 42, 46, 0.78));
  border: 1px solid var(--ethora-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.card:hover {
  transform: none;
  border-color: var(--ethora-border-strong);
}
.card-label {
  font-size: 0.6875rem;
  margin-bottom: 0.35rem;
}
.card-value {
  font-size: 1.45rem;
}
.section {
  padding: 22px;
  border-radius: 22px;
  margin-bottom: 0.85rem;
  min-height: 0;
  background: linear-gradient(180deg, rgba(14, 61, 58, 0.78), rgba(10, 42, 46, 0.82));
  border: 1px solid var(--ethora-border);
  box-shadow: var(--ethora-shadow);
}
.section-header {
  margin-bottom: 0.65rem;
}
.section h3 {
  font-size: 0.9375rem;
}
.section-desc {
  margin-bottom: 0.65rem;
  font-size: 0.8125rem;
}
.loading,
.empty,
p.empty {
  margin: 12px 0;
  padding: 14px 16px;
  min-height: auto;
  text-align: left;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ethora-muted);
  font-size: 0.8125rem;
}
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 180px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--ethora-border);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.badge-success { color: var(--ethora-success); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.12); }
.badge-warning { color: var(--ethora-warning); border-color: rgba(250, 204, 21, 0.35); background: rgba(250, 204, 21, 0.1); }
.badge-muted { color: var(--ethora-muted); }

.alert-box {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  margin-bottom: 0.65rem;
}
.alert-box.success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--ethora-success);
}
.alert-box.error {
  background: rgba(255, 90, 106, 0.08);
  border: 1px solid rgba(255, 90, 106, 0.28);
  color: var(--ethora-danger);
}

@media (max-width: 1200px) {
  .ethora-two-column-grid,
  .ethora-three-column-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .care-requests-grid,
  .ethora-content-grid {
    grid-template-columns: 1fr;
  }

  .care-requests-grid .care-requests-side,
  .ethora-content-grid .ethora-panel-right {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .ethora-two-column-grid,
  .ethora-three-column-grid,
  .ethora-content-grid {
    grid-template-columns: 1fr;
  }
  .ethora-kpi-row--4,
  .ethora-kpi-row--5,
  .ethora-kpi-row--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .ethora-form-grid {
    grid-template-columns: 1fr;
  }
  .ethora-kpi-row,
  .ethora-kpi-row--2,
  .ethora-kpi-row--3,
  .ethora-kpi-row--4,
  .ethora-kpi-row--5,
  .ethora-kpi-row--6 {
    grid-template-columns: 1fr;
  }
  .ethora-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ethora-actions-row .ethora-button-primary {
    width: 100%;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Premium Home Dashboard ── */
.home-dashboard-active .ethora-topbar .topbar-title > h2,
.home-dashboard-active .ethora-topbar .topbar-title > p:not(.timezone-indicator-wrap) {
  display: none;
}

.home-dashboard,
.home-dashboard-body {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.home-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.home-greeting {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--ethora-primary-light);
  letter-spacing: -0.02em;
}

.home-subgreeting {
  margin-top: 0.25rem;
  color: var(--ethora-muted);
  font-size: 0.9rem;
}

.home-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: min(100%, 280px);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: rgba(7, 25, 28, 0.75);
}

.home-search svg {
  width: 16px;
  height: 16px;
  stroke: var(--ethora-muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.home-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ethora-text);
  font: inherit;
  font-size: 0.8125rem;
  outline: none;
}

.home-notify-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  background: rgba(11, 27, 33, 0.9);
  color: var(--ethora-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.home-notify-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.home-notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f59e0b;
  color: #07191c;
  font-size: 0.625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-topbar-user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background: rgba(11, 27, 33, 0.85);
}

.home-topbar-user-chip strong {
  display: block;
  font-size: 0.8125rem;
}

.home-alert-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(20, 184, 166, 0.08));
}

.home-alert-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  font-size: 1.1rem;
}

.home-alert-banner-copy {
  flex: 1;
  min-width: 200px;
}

.home-alert-banner-copy strong {
  display: block;
  margin-bottom: 0.2rem;
}

.home-alert-banner-copy p {
  color: rgba(242, 244, 245, 0.88);
  font-size: 0.875rem;
  line-height: 1.45;
}

.home-alert-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-alert-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ethora-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 1rem;
  align-items: start;
}

.home-grid-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.home-right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.home-card {
  border-radius: 18px;
  border: 1px solid rgba(20, 184, 166, 0.14);
  background: linear-gradient(180deg, rgba(11, 39, 45, 0.72), rgba(7, 25, 28, 0.88));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 1rem 1.05rem;
}

.home-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ethora-primary-light);
  margin-bottom: 0.75rem;
}

.home-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.home-card-head h3 {
  margin-bottom: 0;
}

.home-row {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.home-row-hero {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-row-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-pet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.home-pet-card h2 {
  font-size: 1.25rem;
  color: var(--ethora-text);
}

.home-pet-meta {
  color: var(--ethora-muted);
  font-size: 0.8125rem;
  margin: 0.35rem 0 0.75rem;
}

.home-pet-avatar {
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(20, 184, 166, 0.35);
  background: rgba(11, 27, 33, 0.9);
  display: grid;
  place-items: center;
}

.home-pet-avatar--lg {
  width: 96px;
  height: 96px;
}

.home-pet-avatar--sm {
  width: 48px;
  height: 48px;
  border-width: 2px;
}

.home-pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-pet-avatar-fallback {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.home-wellness-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-donut-score {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0.25rem 0 0.75rem;
}

.home-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.home-donut-track {
  fill: none;
  stroke: rgba(20, 184, 166, 0.12);
  stroke-width: 10;
}

.home-donut-fill {
  fill: none;
  stroke: #14b8a6;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

.home-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-donut-center strong {
  font-size: 1.1rem;
  color: var(--ethora-primary-light);
}

.home-donut-center span {
  font-size: 0.75rem;
  color: var(--ethora-muted);
}

.home-wellness-metrics {
  width: 100%;
  display: grid;
  gap: 0.45rem;
}

.home-wellness-metrics li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ethora-muted);
}

.home-wellness-metrics strong {
  color: var(--ethora-text);
}

.home-appointment-card .home-appointment-date {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ethora-text);
}

.home-appointment-vet,
.home-appointment-clinic {
  color: var(--ethora-muted);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.home-appointment-card .ethora-button-secondary {
  margin-top: 0.75rem;
}

.home-telemedicine-chip {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(20, 184, 166, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ethora-muted);
}

.home-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ethora-primary-light);
  margin-bottom: 0.65rem;
}

.home-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-chart-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.home-chart-card-head span {
  font-size: 0.75rem;
  color: var(--ethora-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-chart-card-head strong {
  font-size: 1rem;
  color: var(--ethora-text);
}

.home-mini-chart {
  width: 100%;
  height: 56px;
  display: block;
}

.home-message-list,
.home-alert-list,
.home-reminder-list,
.home-emergency-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.home-message-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
}

.home-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 184, 166, 0.15);
  color: var(--ethora-primary-light);
  font-size: 0.7rem;
  font-weight: 700;
}

.home-message-row p {
  color: var(--ethora-muted);
  font-size: 0.8125rem;
  margin-top: 0.15rem;
}

.home-message-row time {
  color: var(--ethora-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.home-alert-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.03);
}

.home-alert-item--warning {
  border-left: 3px solid #f59e0b;
}

.home-alert-item--info {
  border-left: 3px solid #38bdf8;
}

.home-alert-item--success {
  border-left: 3px solid #14b8a6;
}

.home-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.home-reminder-row,
.home-emergency-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(20, 184, 166, 0.08);
  font-size: 0.8125rem;
}

.home-reminder-row:last-child,
.home-emergency-row:last-child {
  border-bottom: none;
}

.home-emergency-actions {
  display: flex;
  gap: 0.35rem;
}

.home-my-pets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.home-my-pet-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 72px;
  text-decoration: none;
  color: var(--ethora-text);
  font-size: 0.8125rem;
}

.home-quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-quick-actions-list .ethora-button-primary,
.home-quick-actions-list .ethora-button-secondary {
  width: 100%;
  justify-content: center;
}

.home-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.home-plan-renewal,
.home-plan-pets {
  font-size: 0.8125rem;
  color: var(--ethora-muted);
  margin: 0.35rem 0 0.65rem;
}

.home-plan-benefits {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: rgba(242, 244, 245, 0.9);
}

.home-plan-benefits li::before {
  content: "✓ ";
  color: var(--ethora-primary);
}

.home-refer-card p {
  color: var(--ethora-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.home-sidebar-help {
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  background: rgba(7, 25, 28, 0.65);
}

.home-sidebar-help p {
  font-size: 0.8125rem;
  color: var(--ethora-muted);
  margin-bottom: 0.55rem;
}

.home-sidebar-help .ethora-button-primary {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1280px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-right-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-row-hero,
  .home-chart-grid,
  .home-row-duo,
  .home-right-column {
    grid-template-columns: 1fr;
  }
  .home-topbar-actions {
    width: 100%;
    margin-left: 0;
  }
  .home-search {
    flex: 1;
    min-width: 0;
  }
}

/* Tutor onboarding dashboard */
.home-onboarding-dashboard .home-dashboard-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 960px;
}

.home-onboarding-topbar {
  margin-bottom: 0.25rem;
}

.home-onboarding-plan-card,
.home-onboarding-progress-card,
.home-onboarding-empty-card {
  padding: 1.25rem 1.5rem;
}

.home-onboarding-plan-note {
  margin: 0.5rem 0 0;
  color: var(--ethora-text-muted, #64748b);
  font-size: 0.9rem;
}

.home-onboarding-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.15);
  overflow: hidden;
  margin: 1rem 0;
}

.home-onboarding-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #2dd4bf);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.home-onboarding-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.home-onboarding-steps li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(7, 25, 28, 0.04);
}

.home-onboarding-steps li.is-done {
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.home-onboarding-steps li.is-pending strong {
  color: #d97706;
}

.home-onboarding-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-onboarding-cta-row .is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.home-onboarding-hint {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ethora-text-muted, #64748b);
}

.home-onboarding-empty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 720px) {
  .home-onboarding-empty-grid {
    grid-template-columns: 1fr;
  }
}

.tutor-profile-form-card {
  margin-bottom: 1rem;
}

.tutor-profile-form-card.is-highlight {
  border: 1px solid rgba(20, 184, 166, 0.45);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.12);
}

/* Public self-service flow */
.public-flow-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at top, rgba(20, 184, 166, 0.12), transparent 55%), var(--ethora-bg, #07191c);
}

.public-flow-card {
  width: min(100%, 520px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.public-flow-card-wide {
  width: min(100%, 920px);
}

.public-flow-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.public-flow-brand .ethora-login-logo,
.public-flow-brand .ethora-brand-logo {
  margin-bottom: 1rem;
}

.public-flow-subtitle {
  color: var(--ethora-text-muted, #94a3b8);
  margin-bottom: 1.25rem;
}

.public-profile-grid,
.public-plan-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1.25rem 0;
}

.public-profile-card,
.public-plan-card {
  text-align: left;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 25, 28, 0.35);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.public-profile-card:hover,
.public-plan-card:hover,
.public-plan-card.is-selected {
  border-color: rgba(20, 184, 166, 0.65);
  transform: translateY(-2px);
}

.public-profile-card strong,
.public-plan-card strong {
  display: block;
  margin-bottom: 0.5rem;
}

.public-profile-card span,
.public-plan-card span {
  color: var(--ethora-text-muted, #94a3b8);
  font-size: 0.92rem;
}

.public-flow-form .form-group {
  margin-bottom: 0.9rem;
}

.public-terms {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.login-signup-link {
  text-align: center;
  margin-bottom: 1rem;
}

.login-signup-link a {
  color: #2dd4bf;
}

/* Pets page — tutor layout */
.pets-page-layout .entity-list-card {
  min-height: auto;
  height: auto;
}

.pet-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.pet-card {
  position: relative;
  min-height: auto;
  padding: 18px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(11, 27, 33, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.pet-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pet-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(20, 184, 166, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.pet-card-info {
  min-width: 0;
  flex: 1;
}

.pet-card-info h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
}

.pet-card-info p {
  margin: 4px 0 0;
  color: var(--ethora-muted, var(--text-muted));
  font-size: 0.9rem;
}

.pet-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pet-card-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pet-card-meta-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pet-card-meta-item strong {
  font-size: 0.92rem;
  word-break: break-word;
}

.pet-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pet-photo-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.pet-photo-preview,
.pet-detail-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(20, 184, 166, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.pet-detail-avatar {
  width: 96px;
  height: 96px;
}

.google-sync-card {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.google-sync-status {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
}

.google-sync-options {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tutor-profile-form-card.is-highlight {
  border-color: rgba(20, 184, 166, 0.45);
}

@media (max-width: 900px) {
  .pet-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Layout responsivo global (v3) ── */

.ethora-badge,
.ethora-status-badge,
.clinical-validation-table .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 180px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  font-size: 11px;
  flex-shrink: 0;
}

.ethora-row-actions,
.alert-actions,
.pet-actions,
.care-actions,
.ethora-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.ethora-row-actions button,
.alert-actions button,
.pet-actions button,
.care-actions button,
.ethora-table-actions button,
.ethora-table-actions .btn {
  white-space: normal;
  min-width: auto;
  max-width: 160px;
}

.clinical-validation-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.clinical-validation-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.clinical-validation-table th,
.clinical-validation-table td {
  word-break: break-word;
  white-space: normal;
  vertical-align: middle;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(20, 184, 166, 0.1);
}

.clinical-validation-table thead {
  background: rgba(7, 25, 28, 0.65);
}

.clinical-validation-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ethora-muted);
}

.clinical-validation-table .ethora-badge,
.clinical-validation-table .ethora-status-badge,
.clinical-validation-table .badge {
  max-width: 160px;
  white-space: normal;
  line-height: 1.25;
  font-size: 11px;
}

.clinical-validation-classification {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.clinical-validation-details-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(7, 25, 28, 0.55);
  border: 1px solid rgba(20, 184, 166, 0.14);
}

.clinical-validation-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.clinical-validation-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.clinical-validation-detail-item span {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ethora-muted);
}

.clinical-validation-detail-item strong {
  font-size: 0.8125rem;
  word-break: break-word;
}

.clinical-validation-details-row td {
  padding-top: 0;
  border-bottom: 1px solid rgba(20, 184, 166, 0.14);
}

.clinical-validation-details-btn {
  max-width: 140px;
  white-space: normal;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .clinical-validation-table thead {
    display: none;
  }

  .clinical-validation-table,
  .clinical-validation-table tbody,
  .clinical-validation-table tr.clinical-validation-row {
    display: block;
    width: 100%;
  }

  .clinical-validation-table tr.clinical-validation-row {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(20, 184, 166, 0.14);
    background: rgba(7, 25, 28, 0.45);
  }

  .clinical-validation-table tr.clinical-validation-details-row {
    display: block;
    margin: -6px 0 12px;
    border: none;
    background: transparent;
  }

  .clinical-validation-table tr.clinical-validation-details-row td {
    display: block;
    padding: 0 0 12px;
    border: none;
  }

  .clinical-validation-table tr.clinical-validation-row td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border: none;
  }

  .clinical-validation-table tr.clinical-validation-row td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ethora-muted);
  }

  .clinical-validation-classification {
    align-items: flex-end;
    text-align: right;
  }
}

.content,
#page-content,
.pet-detail-body,
.ethora-care-requests-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.ethora-care-requests-page--telemedicine .ethora-panel-left {
  border-color: rgba(20, 184, 166, 0.35);
}

.ethora-care-requests-page--telemedicine .ethora-kpi-card:first-child .ethora-kpi-value {
  color: var(--ethora-primary-light);
}

.ethora-toast-inline a.ethora-button-primary {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.cards,
.data-card-list,
.pet-card-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ── Telemedicina ── */
.telemedicine-room-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ethora-bg);
}

.telemedicine-room {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.telemedicine-room-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

.telemedicine-room-header h1 {
  font-size: 1.25rem;
  margin: 0;
}

.telemedicine-logo {
  width: 180px;
  max-width: 180px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
}

.telemedicine-room-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.telemedicine-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.telemedicine-video-card {
  min-width: 0;
}

.telemedicine-video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 14px;
  object-fit: cover;
}

.telemedicine-remote-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  border: 1px dashed rgba(20, 184, 166, 0.28);
  background: rgba(7, 25, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--ethora-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.telemedicine-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.telemedicine-consent-card p {
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 0.875rem;
}

.telemedicine-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--ethora-border);
  white-space: normal;
  line-height: 1.2;
  max-width: 180px;
}

.telemedicine-status-badge.scheduled,
.telemedicine-status-badge.waiting_tutor,
.telemedicine-status-badge.waiting_veterinarian {
  color: var(--ethora-warning);
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.1);
}

.telemedicine-status-badge.active {
  color: var(--ethora-success);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
}

.telemedicine-status-badge.completed,
.telemedicine-status-badge.cancelled,
.telemedicine-status-badge.expired {
  color: var(--ethora-muted);
}

.telemedicine-link-card label {
  display: block;
  font-size: 0.75rem;
  color: var(--ethora-muted);
  margin: 8px 0 4px;
}

.telemedicine-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.telemedicine-link-row .ethora-input {
  flex: 1;
  min-width: 0;
}

.telemedicine-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
}

.telemedicine-loading[hidden] {
  display: none !important;
}

.telemedicine-invalid-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.telemedicine-invalid-card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.telemedicine-invalid-card p {
  margin: 0 0 18px;
  color: var(--text-muted, #94a3b8);
}

.telemedicine-invalid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.telemedicine-room-main[hidden],
.telemedicine-invalid-card[hidden] {
  display: none !important;
}

.pet-camera-viewer {
  border-radius: 24px;
  border: 1px solid var(--ethora-border, var(--border));
  background: linear-gradient(180deg, rgba(14, 61, 58, 0.72), rgba(7, 25, 28, 0.92));
  padding: 22px;
}

.pet-camera-viewer-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pet-camera-viewer-header h3 {
  margin: 0 0 6px;
}

.pet-camera-viewer-subtitle {
  margin: 0;
}

.pet-camera-viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 14px;
}

.pet-camera-video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #020b0d;
  border: 1px solid rgba(20, 184, 166, 0.28);
}

.pet-camera-player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 11, 13, 0.72);
  color: #e2e8f0;
  text-align: center;
  padding: 16px;
  pointer-events: none;
  z-index: 2;
}

.pet-camera-player-overlay[hidden] {
  display: none;
}

.pet-camera-player-badge {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.pet-camera-media-host {
  width: 100%;
  height: 100%;
}

.pet-camera-frame,
.pet-camera-video,
.pet-camera-mjpeg {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
  background: #000;
}

.pet-camera-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ethora-muted, var(--text-muted, #94a3b8));
  padding: 24px;
}

.pet-camera-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pet-camera-embed-notice {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
}

.pet-camera-page-layout {
  display: grid;
  gap: 18px;
}

.pet-camera-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pet-camera-preview-section {
  width: 100%;
}

.pet-camera-list-item.is-active {
  border: 1px solid rgba(20, 184, 166, 0.45);
  background: rgba(20, 184, 166, 0.08);
  border-radius: var(--radius-sm);
}

.pet-camera-inline-viewer {
  margin-top: 14px;
}

.pet-camera-card {
  margin-bottom: 12px;
}

.pet-camera-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.pet-camera-meta {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 12px;
}

.pet-camera-list-item {
  margin-bottom: 10px;
}

.pet-camera-security-notice {
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .pet-camera-page-grid {
    grid-template-columns: 1fr;
  }
}

.telemedicine-jitsi-section {
  margin-top: 4px;
}

.telemedicine-jitsi-section h3 {
  margin: 0 0 8px;
}

.telemedicine-jitsi-container {
  width: 100%;
  min-height: 420px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0b1220;
}

.telemedicine-jitsi-container iframe {
  border: 0;
}

@media (max-width: 768px) {
  .telemedicine-jitsi-container {
    min-height: 320px;
  }
}

.telemedicine-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.telemedicine-modal[hidden] {
  display: none !important;
}

.telemedicine-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.telemedicine-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.telemedicine-inline-block {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.telemedicine-participants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.telemedicine-participants span {
  display: block;
  font-size: 0.6875rem;
  color: var(--ethora-muted);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .telemedicine-video-grid {
    grid-template-columns: 1fr;
  }
}

.ethora-notify-wrap {
  position: relative;
}

.ethora-notify-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  border-radius: 16px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  background: linear-gradient(180deg, rgba(14, 61, 58, 0.96), rgba(7, 25, 28, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 14px;
  z-index: 120;
}

.ethora-notify-dropdown[hidden] {
  display: none !important;
}

.ethora-notify-dropdown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ethora-notify-section h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--ethora-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ethora-notify-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ethora-notify-item-meta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--ethora-muted, #94a3b8);
}

.ethora-notify-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ethora-muted, #94a3b8);
}

.ethora-notify-alerts-link {
  font-size: 0.82rem;
  color: #2dd4bf;
}

#ethora-telemedicine-invite-popup-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 220;
  max-width: min(420px, calc(100vw - 24px));
}

.ethora-telemedicine-invite-popup {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: linear-gradient(180deg, rgba(14, 61, 58, 0.95), rgba(7, 25, 28, 0.98));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

.ethora-telemedicine-invite-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #2dd4bf;
  stroke-width: 1.6;
}

.ethora-telemedicine-invite-copy strong {
  display: block;
  margin-bottom: 4px;
}

.ethora-telemedicine-invite-pet {
  margin: 0;
  color: #2dd4bf;
  font-weight: 600;
}

.ethora-telemedicine-invite-message {
  margin: 6px 0 0;
  color: var(--ethora-muted, #94a3b8);
  font-size: 0.92rem;
}

.ethora-telemedicine-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ethora-telemedicine-live-label {
  color: #2dd4bf;
}

.telemedicine-session-actions {
  margin-top: 6px;
}

.telemedicine-pet-camera-viewer {
  margin-top: 14px;
}

.telemedicine-pet-camera-viewer[hidden] {
  display: none !important;
}

.home-telemedicine-invite-card {
  margin-bottom: 14px;
}

.portfolio-search-grid {
  align-items: end;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.portfolio-search-grid .form-group-wide {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .portfolio-search-grid {
    grid-template-columns: 1fr auto;
  }
  .portfolio-search-grid .form-group-wide {
    grid-column: auto;
  }
}

.portfolio-pet-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portfolio-subtitle {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.95rem;
}

.portfolio-tutor-card + .portfolio-tutor-card {
  margin-top: 0.75rem;
}

.empty-state-card {
  padding: 1rem;
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 12px;
  background: rgba(11, 27, 33, 0.6);
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.readonly-summary .data-card-body {
  margin-top: 0.5rem;
}

/* Veterinarian premium flow */
.vet-page-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.vet-page-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.vet-card {
  background: rgba(7, 25, 28, 0.72);
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.vet-card + .vet-card {
  margin-top: 0;
}

.vet-card-title {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #e2e8f0;
}

.vet-card-desc {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.86rem;
  color: var(--ethora-text-muted, #94a3b8);
}

.vet-search-panel {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.08), rgba(7, 25, 28, 0.5));
}

.vet-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
}

.vet-search-row input[type="search"],
.vet-search-row input[type="text"] {
  width: 100%;
  min-width: 0;
}

.vet-tutor-card {
  margin-top: 0.85rem;
}

.vet-pet-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 0.65rem;
}

.vet-pet-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.vet-pet-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.vet-pet-card-head h4 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.vet-pet-meta {
  font-size: 0.84rem;
  color: var(--ethora-text-muted, #94a3b8);
  margin: 0;
}

.vet-pet-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  font-size: 0.84rem;
}

.vet-pet-details span {
  color: var(--ethora-text-muted, #94a3b8);
  display: block;
}

.vet-pet-details strong {
  color: #e2e8f0;
  font-weight: 500;
}

.vet-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.vet-status-badge.is-linked {
  color: #5eead4;
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.35);
}

.vet-status-badge.is-pending {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
}

.vet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.vet-actions .btn {
  flex: 1 1 auto;
  min-width: fit-content;
}

.vet-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem 0.85rem;
}

.vet-summary-item span {
  display: block;
  font-size: 0.76rem;
  color: var(--ethora-text-muted, #94a3b8);
  margin-bottom: 0.15rem;
}

.vet-summary-item strong {
  font-size: 0.9rem;
  color: #f1f5f9;
  word-break: break-word;
}

.vet-empty-state {
  text-align: center;
  padding: 1.25rem 1rem;
  border: 1px dashed rgba(20, 184, 166, 0.35);
  border-radius: 12px;
  background: rgba(7, 25, 28, 0.45);
}

.vet-empty-state p {
  margin: 0 0 0.75rem;
  color: var(--ethora-text-muted, #94a3b8);
}

.vet-empty-state .vet-actions {
  justify-content: center;
}

.vet-signup-stack {
  display: grid;
  gap: 0.85rem;
}

.vet-signup-stack .vet-card .form-grid {
  gap: 0.65rem;
}

.vet-profile-options {
  display: grid;
  gap: 0.55rem;
}

.vet-profile-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 25, 28, 0.35);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.vet-profile-option:hover,
.vet-profile-option.is-selected {
  border-color: rgba(20, 184, 166, 0.55);
}

.vet-profile-option input {
  margin-top: 0.2rem;
}

.vet-profile-option strong {
  display: block;
  margin-bottom: 0.15rem;
}

.vet-profile-option span {
  font-size: 0.84rem;
  color: var(--ethora-text-muted, #94a3b8);
}

.vet-highlight-note {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.08);
  font-size: 0.86rem;
  color: #ccfbf1;
}

.vet-specialty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.45rem 0.75rem;
}

.vet-specialty-grid label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.vet-weekly-summary {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vet-weekly-summary li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.vet-weekly-summary li:last-child {
  border-bottom: none;
}

.vet-insurance-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 640px) {
  .vet-search-row {
    grid-template-columns: 1fr;
  }

  .vet-pet-grid {
    grid-template-columns: 1fr;
  }

  .vet-actions .btn {
    width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vet-agenda-card {
  padding: 28px;
  border-radius: 24px;
  overflow: hidden;
}

.vet-agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}

.vet-agenda-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.vet-agenda-header p {
  margin: 0;
  color: var(--ethora-muted);
  font-size: 15px;
}

.vet-save-agenda {
  min-width: 150px;
  height: 46px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.18);
}

.vet-agenda-table {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.vet-agenda-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 80px 130px 130px 110px minmax(520px, 2.6fr);
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(126, 230, 199, 0.12);
}

.vet-agenda-row-head {
  padding-top: 0;
  padding-bottom: 12px;
  color: var(--ethora-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vet-day-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.vet-day-icon {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(126, 230, 199, 0.35);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ethora-primary-light);
  font-size: 12px;
  flex-shrink: 0;
}

.vet-toggle {
  width: 52px;
  height: 30px;
  border: 1px solid rgba(126, 230, 199, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  cursor: pointer;
  transition: 0.2s ease;
}

.vet-toggle span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: 0.2s ease;
}

.vet-toggle.is-on {
  background: rgba(20, 184, 166, 0.24);
  border-color: rgba(20, 184, 166, 0.72);
}

.vet-toggle.is-on span {
  transform: translateX(21px);
  background: var(--ethora-primary);
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.55);
}

.vet-time-input,
.vet-interval-select {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(126, 230, 199, 0.18);
  background: rgba(3, 20, 24, 0.72);
  color: var(--ethora-text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  min-width: 0;
}

.vet-time-input:focus,
.vet-interval-select:focus {
  border-color: rgba(20, 184, 166, 0.75);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.vet-modality-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
}

.vet-modality-pill {
  height: 38px;
  min-width: auto;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  background: rgba(3, 20, 24, 0.46);
  color: var(--ethora-primary-light);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.vet-modality-pill:hover {
  border-color: rgba(20, 184, 166, 0.76);
  background: rgba(20, 184, 166, 0.12);
  transform: translateY(-1px);
}

.vet-modality-pill.is-active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(126, 230, 199, 0.12));
  border-color: rgba(20, 184, 166, 0.78);
  color: var(--ethora-text);
  box-shadow:
    inset 0 0 16px rgba(20, 184, 166, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.vet-modality-pill.is-active::before {
  content: "✓";
  font-size: 11px;
  font-weight: 900;
  color: var(--ethora-primary-light);
}

.vet-modality-pill[data-modality="in_person"]::after,
.vet-modality-pill[data-modality="home_care"]::after,
.vet-modality-pill[data-modality="telemedicine"]::after {
  content: "";
}

.vet-agenda-row.is-disabled {
  opacity: 0.58;
}

.vet-agenda-row.is-disabled .vet-time-input,
.vet-agenda-row.is-disabled .vet-interval-select {
  opacity: 0.65;
}

.vet-agenda-row.is-disabled .vet-modality-pill {
  background: rgba(3, 20, 24, 0.34);
  border-color: rgba(126, 230, 199, 0.12);
  color: rgba(167, 183, 181, 0.62);
  box-shadow: none;
  opacity: 1;
}

.vet-agenda-row.is-disabled .vet-modality-pill::before {
  opacity: 0.35;
}

.vet-agenda-row.is-disabled .vet-modality-pill:hover {
  transform: none;
  border-color: rgba(126, 230, 199, 0.12);
  background: rgba(3, 20, 24, 0.34);
}

.vet-agenda-timezone {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  color: var(--ethora-muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1350px) {
  .vet-agenda-row {
    grid-template-columns: minmax(140px, 1fr) 70px 120px 120px 105px minmax(470px, 2.4fr);
    gap: 10px;
  }

  .vet-modality-pill {
    height: 36px;
    padding: 0 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 1180px) {
  .vet-agenda-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 0;
  }

  .vet-agenda-row-head {
    display: none;
  }

  .vet-agenda-header {
    flex-direction: column;
  }

  .vet-save-agenda {
    width: 100%;
  }

  .vet-modality-group {
    flex-wrap: wrap;
    width: 100%;
  }

  .vet-modality-pill {
    min-width: 150px;
    flex: 1;
  }
}

.stress-intelligence-preview,
.stress-result-card,
.stress-intelligence-section .stress-intelligence-body {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--ethora-radius-md);
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: rgba(3, 20, 24, 0.42);
}

.stress-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.stress-result-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ethora-muted);
  margin-bottom: 0.2rem;
}

.stress-result-explanation,
.stress-result-recommendation,
.stress-result-base,
.stress-disclaimer {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ethora-muted);
}

.stress-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 52px;
  margin-top: 0.75rem;
  padding: 0.5rem 0;
}

.stress-trend-bar {
  flex: 1;
  min-width: 6px;
  max-width: 18px;
  border-radius: 4px 4px 0 0;
  background: rgba(20, 184, 166, 0.55);
}

.stress-trend-bar.is-alert {
  background: rgba(255, 90, 106, 0.75);
}

.form-group--optional label {
  opacity: 0.85;
}

/* Linha de cuidado Ethora */
.ethora-care-line-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ethora-care-line-grid {
  display: grid;
  gap: 1.25rem;
}

.ethora-care-line-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.ethora-care-line-kpi {
  padding: 0.9rem 1rem;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid var(--ethora-border);
  background: rgba(11, 27, 33, 0.72);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ethora-care-line-kpi-wide {
  grid-column: 1 / -1;
}

.ethora-care-line-kpi-label {
  font-size: 0.75rem;
  color: var(--ethora-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ethora-care-line-kpi strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ethora-text);
  line-height: 1.35;
}

.ethora-care-status-healthy {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.12);
}

.ethora-care-status-attention {
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.1);
}

.ethora-care-status-high {
  border-color: rgba(251, 146, 60, 0.5);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.12);
}

.ethora-care-status-critical {
  border-color: rgba(255, 90, 106, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 106, 0.15);
}

.ethora-care-status-muted {
  border-color: var(--ethora-border);
}

.ethora-care-line-actions h4,
.ethora-care-line-timeline-wrap h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--ethora-primary-light);
}

.ethora-care-line-actions .ethora-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ethora-care-line-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 420px;
  overflow-y: auto;
}

.ethora-care-line-timeline-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid rgba(20, 184, 166, 0.2);
  background: rgba(7, 25, 28, 0.55);
}

.ethora-care-line-timeline-item.ethora-severity-high,
.ethora-care-line-timeline-item.ethora-severity-critical {
  border-color: rgba(255, 90, 106, 0.35);
}

.ethora-care-line-timeline-icon {
  font-size: 1.1rem;
  line-height: 1;
  padding-top: 0.15rem;
}

.ethora-care-line-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ethora-care-line-timeline-body p {
  margin: 0.35rem 0;
  font-size: 0.8125rem;
  color: var(--ethora-muted);
}

.ethora-care-line-timeline-body small {
  display: block;
  font-size: 0.75rem;
  color: var(--ethora-muted);
  margin-top: 0.25rem;
}

.ethora-care-line-error {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 90, 106, 0.35);
  border-radius: var(--ethora-radius-sm);
  background: rgba(255, 90, 106, 0.08);
}

.ethora-badge-muted {
  color: var(--ethora-muted);
  border-color: var(--ethora-border);
  background: rgba(7, 25, 28, 0.5);
}

.ethora-attention-pet-item .ethora-attention-pet-status {
  margin-top: 0.35rem;
}

.ethora-attention-pet-item .ethora-badge {
  max-width: none;
}

/* Compact horizontal attention rows (Sprint 4.3.2 density) */
.ethora-attention-pet-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.ethora-attention-pet-row {
  align-items: center;
  padding: 0.4rem 0;
  gap: 0.65rem;
  min-width: 0;
}
.ethora-attention-pet-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.ethora-attention-pet-name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
}
.ethora-attention-pet-meta {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--ethora-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ethora-attention-pet-badge {
  flex: 0 0 auto;
}
.ethora-attention-pet-badge .ethora-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
}
.ethora-attention-pet-action {
  flex: 0 0 auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  min-height: 0;
}
@media (max-width: 720px) {
  .ethora-attention-pet-row {
    flex-wrap: wrap;
  }
  .ethora-attention-pet-main {
    flex: 1 1 calc(100% - 7rem);
  }
  .ethora-attention-pet-action {
    width: 100%;
    justify-content: center;
  }
}

.ethora-devices-ops-kpis {
  margin-bottom: 0.75rem;
}

.ethora-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(720px, 96vw);
}

.ethora-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.ethora-modal-content {
  padding: 1rem 1.25rem;
}

.ethora-raw-payload pre {
  max-height: 200px;
  overflow: auto;
  font-size: 0.75rem;
  background: rgba(7, 25, 28, 0.8);
  padding: 0.75rem;
  border-radius: var(--ethora-radius-sm);
}

.ethora-upgrade-card {
  border: 1px dashed rgba(20, 184, 166, 0.45);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  text-align: center;
}

.plan-card-featured {
  border-color: rgba(44, 215, 196, 0.45);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(35, 214, 195, 0.1);
}

.plan-card-premium,
.ethora-plan-premium {
  border-color: rgba(44, 215, 196, 0.38);
  background: linear-gradient(180deg, rgba(11, 45, 44, 0.96) 0%, rgba(7, 26, 31, 0.98) 100%);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.24),
    0 0 20px rgba(35, 214, 195, 0.08);
}

.plan-card.plan-card-current.plan-card-premium,
.plan-card.plan-card-current.ethora-plan-premium {
  border-color: rgba(44, 215, 196, 0.55);
  box-shadow:
    0 0 0 1px rgba(44, 215, 196, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(35, 214, 195, 0.14);
}

.ethora-commercial-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #f4fffd;
  overflow: hidden;
}

.plan-card.ethora-commercial-plan::before,
.ethora-commercial-plan.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(35, 214, 195, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(28, 177, 162, 0.1), transparent 30%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

.plan-card.ethora-commercial-plan > *,
.ethora-commercial-plan.plan-card > * {
  position: relative;
  z-index: 1;
}

.ethora-plan-badge,
.plan-card .ethora-badge.ethora-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(44, 215, 196, 0.45);
  background: rgba(34, 219, 195, 0.12);
  color: #7ef7e3;
  font-weight: 700;
}

.plan-card-current .ethora-plan-badge,
.plan-card-current .ethora-badge.ethora-plan-badge {
  background: rgba(34, 219, 195, 0.18);
  color: #a9fff1;
  border-color: rgba(34, 219, 195, 0.55);
}

.ethora-plan-features {
  flex: 1;
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}

.ethora-plan-features li {
  margin: 0.4rem 0;
  padding-left: 1.35rem;
  position: relative;
  color: #f5fffd;
}

.ethora-plan-check {
  position: absolute;
  left: 0;
  color: #22dbc3;
  font-weight: 700;
}

.ethora-plan-feature-inherit {
  font-weight: 600;
  color: rgba(232, 245, 243, 0.9);
}

.ethora-plan-pets {
  font-size: 1.05rem;
  margin: 0.35rem 0 0.85rem;
  color: rgba(232, 245, 243, 0.82);
}

.ethora-plan-pets strong {
  font-size: 1.35rem;
  color: #22dbc3;
}

.plan-card-desc,
.plan-card .plan-card-desc {
  margin: 0.25rem 0 0.75rem;
  line-height: 1.45;
  color: rgba(232, 245, 243, 0.82);
}

.plan-card.ethora-commercial-plan .plan-card-name,
.ethora-commercial-plan .plan-card-name {
  color: #ffffff;
}

.plan-card.ethora-commercial-plan .plan-card-price,
.ethora-commercial-plan .plan-card-price {
  color: #22dbc3;
  font-weight: 800;
}

.plan-card.ethora-commercial-plan .plan-card-price span,
.ethora-commercial-plan .plan-card-price span {
  color: rgba(228, 245, 241, 0.78);
  font-weight: 500;
}

.plan-card.ethora-commercial-plan .btn-primary,
.ethora-commercial-plan .btn-primary {
  background: linear-gradient(90deg, #149c92 0%, #21c8ba 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
}

.plan-card.ethora-commercial-plan .btn-secondary,
.ethora-commercial-plan .btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: #dffaf5;
  border: 1px solid rgba(44, 215, 196, 0.22);
  border-radius: 14px;
}

.silver-timeline-bar {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  min-height: 72px;
  padding-top: 8px;
}

.silver-timeline-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.silver-timeline-hour span {
  display: block;
  width: 100%;
  border-radius: 4px 4px 0 0;
}

.silver-timeline-hour small {
  font-size: 10px;
  color: var(--ethora-muted, #94a3b8);
}

.ethora-locked-feature-card {
  position: relative;
  opacity: 0.92;
  border: 1px dashed rgba(148, 163, 184, 0.35);
}

.ethora-locked-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
}

.ethora-info-tip {
  cursor: help;
  color: var(--ethora-accent, #2dd4bf);
}

.ethora-sleep-disclaimer,
.ethora-reference-disclaimer {
  font-size: 12px;
  opacity: 0.85;
}

.ethora-black-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.ethora-comparison-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.ethora-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ethora-comparison-table th,
.ethora-comparison-table td {
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.admin-subscriptions-page { display: flex; flex-direction: column; gap: 1rem; min-width: 0; max-width: 100%; }
.admin-subscriptions-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 0.5rem; }
.admin-subscriptions-toolbar { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-subscriptions-filters { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.admin-subscriptions-actions { justify-content: flex-end; flex-wrap: wrap; }
.admin-sub-pending-badge { cursor: pointer; text-decoration: none; }
.admin-subscription-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  background: var(--ethora-panel, #0d2226);
  border-left: 1px solid var(--ethora-border);
  z-index: 200;
  padding: 1rem;
  overflow-y: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}
.ethora-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.admin-subscriptions-cards-wrap { display: block; }
.admin-subscriptions-cards { display: grid; gap: 0.75rem; }
.admin-subscription-card header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.is-test-row { opacity: 0.85; }

/* ── Assinaturas: tabela operacional (colunas fixas + scroll duplo) ── */
.admin-subscriptions-table-shell {
  --admin-sub-sticky-bg: #0a2226;
  --admin-sub-sticky-bg-hover: #10333a;
  --admin-sub-sticky-head-bg: #071a1e;
  --admin-sub-sticky-line: rgba(20, 184, 166, 0.28);
  --admin-sub-row-line: rgba(20, 184, 166, 0.12);
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-sub-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  height: 14px;
  border-radius: var(--ethora-radius-sm) var(--ethora-radius-sm) 0 0;
  border: 1px solid rgba(20, 184, 166, 0.14);
  border-bottom: 0;
  background: rgba(7, 25, 28, 0.55);
}

.admin-sub-scroll-top[hidden] { display: none; }
.admin-sub-scroll-spacer { height: 1px; }

.admin-subscriptions-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  max-height: min(68vh, 720px);
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(20, 184, 166, 0.14);
  border-radius: 0 0 var(--ethora-radius-sm) var(--ethora-radius-sm);
  background: rgba(7, 25, 28, 0.35);
  overscroll-behavior-x: contain;
}

.admin-subscriptions-table-wrap:focus-visible {
  outline: 2px solid var(--ethora-primary);
  outline-offset: -2px;
}

.admin-subscriptions-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-subscriptions-table th,
.admin-subscriptions-table td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--admin-sub-row-line);
  vertical-align: middle;
  background-clip: padding-box;
}

.admin-subscriptions-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--admin-sub-sticky-head-bg);
  border-bottom: 1px solid var(--admin-sub-sticky-line);
  white-space: nowrap;
}

.admin-subscriptions-table th.col-holder,
.admin-subscriptions-table td.col-holder {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 13rem;
  max-width: 16rem;
  background: var(--admin-sub-sticky-bg);
  box-shadow: 1px 0 0 var(--admin-sub-sticky-line);
}

.admin-subscriptions-table th.col-actions,
.admin-subscriptions-table td.col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 1%;
  min-width: 9.5rem;
  background: var(--admin-sub-sticky-bg);
  box-shadow: -1px 0 0 var(--admin-sub-sticky-line);
}

.admin-subscriptions-table thead th.col-holder,
.admin-subscriptions-table thead th.col-actions {
  z-index: 4;
  background: var(--admin-sub-sticky-head-bg);
}

.admin-subscriptions-table tbody tr:hover td.col-holder,
.admin-subscriptions-table tbody tr:hover td.col-actions {
  background: var(--admin-sub-sticky-bg-hover);
}

.admin-subscriptions-table td.col-holder strong { display: block; }
.admin-subscriptions-table td.col-holder small {
  display: block;
  color: var(--ethora-muted);
  overflow-wrap: anywhere;
}

.admin-subscriptions-table td.col-plan { min-width: 11rem; }
.admin-subscriptions-table td.col-price,
.admin-subscriptions-table th.col-price { min-width: 8rem; white-space: nowrap; }
.admin-subscriptions-table td.col-cycle,
.admin-subscriptions-table td.col-started,
.admin-subscriptions-table td.col-renews { white-space: nowrap; min-width: 7rem; }
.admin-subscriptions-table td.col-subscription,
.admin-subscriptions-table td.col-payment { min-width: 8.5rem; }
.admin-subscriptions-table td.col-pending { min-width: 11rem; }
.admin-subscriptions-table td.col-empty { text-align: center; color: var(--ethora-muted); }

/* Badges de estado padronizados */
.admin-subscriptions-table .ethora-badge,
.admin-subscription-card .ethora-badge {
  white-space: nowrap;
  min-width: 5.5rem;
  max-width: none;
}

.admin-sub-plan-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.admin-sub-plan-flags .ethora-badge { min-width: 0; font-size: 10px; }

/* Ações em ícones */
.admin-sub-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.admin-sub-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.08);
  color: var(--ethora-primary-light);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-sub-action:hover {
  background: rgba(20, 184, 166, 0.2);
  border-color: var(--ethora-border-strong);
  color: #ffffff;
}

.admin-sub-action:focus-visible {
  outline: 2px solid var(--ethora-primary);
  outline-offset: 2px;
}

.admin-sub-action[disabled],
.admin-sub-action[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
  color: var(--ethora-muted);
  background: transparent;
}

.admin-sub-action-danger {
  border-color: rgba(255, 90, 106, 0.45);
  color: #ffb0b8;
  background: rgba(255, 90, 106, 0.1);
}

.admin-sub-action-danger:hover {
  background: rgba(255, 90, 106, 0.22);
  border-color: var(--ethora-danger);
  color: #ffffff;
}

.admin-sub-icon { flex: none; pointer-events: none; }

/* Menu "Mais ações" — renderizado no body para não ser cortado pelo overflow */
.admin-sub-menu {
  position: fixed;
  z-index: calc(var(--ethora-z-overlay) + 20);
  min-width: 14rem;
  max-width: min(20rem, calc(100vw - 1rem));
  padding: 0.35rem;
  border-radius: var(--ethora-radius-sm);
  border: 1px solid var(--ethora-border-strong);
  background: #08222a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-sub-menu[hidden] { display: none; }

.admin-sub-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ethora-text);
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.admin-sub-menu-item:hover { background: rgba(20, 184, 166, 0.16); }

.admin-sub-menu-item:focus-visible {
  outline: 2px solid var(--ethora-primary);
  outline-offset: -2px;
}

.admin-sub-menu-item-danger { color: #ffb0b8; }
.admin-sub-menu-item-danger:hover { background: rgba(255, 90, 106, 0.18); }

/* Tablet: compacta colunas secundárias, preserva o essencial */
@media (max-width: 1280px) {
  .admin-subscriptions-table { min-width: 900px; }
  .admin-subscriptions-table th.col-secondary,
  .admin-subscriptions-table td.col-secondary { display: none; }
  .admin-subscriptions-table th.col-holder,
  .admin-subscriptions-table td.col-holder { min-width: 11rem; }
}

/* Telas reduzidas / DevTools aberto */
@media (max-width: 1024px) {
  .admin-subscriptions-table-wrap { max-height: min(60vh, 560px); }
  .admin-subscriptions-table th.col-compact,
  .admin-subscriptions-table td.col-compact { display: none; }
  .admin-subscriptions-table { min-width: 720px; }
}

@media (max-width: 900px) {
  .admin-subscriptions-table-shell { display: none; }
  .admin-subscriptions-cards-wrap { display: block; }
  .admin-subscriptions-table[data-label] { display: none; }
  .admin-subscription-card { display: flex; flex-direction: column; gap: 0.5rem; }
  .admin-subscription-card header { flex-wrap: wrap; }
  .admin-subscription-card .admin-sub-actions { flex-wrap: wrap; }
}

.ethora-comparison-table th {
  background: rgba(15, 23, 42, 0.35);
}

/* Veterinary Coverage Hub */
.ethora-veterinary-coverage-page .ethora-coverage-disclaimer {
  font-size: 0.8125rem;
  color: var(--ethora-text-muted, #94a3b8);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.ethora-coverage-dashboard-card,
.ethora-coverage-digital-card {
  border: 1px solid rgba(44, 215, 196, 0.18);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: rgba(7, 25, 28, 0.55);
}
.ethora-coverage-dashboard-card--none { border-color: rgba(148, 163, 184, 0.25); }
.ethora-coverage-dashboard-card--expired { border-color: rgba(248, 113, 113, 0.35); }
.ethora-coverage-dashboard-card--pending { border-color: rgba(251, 191, 36, 0.35); }
.ethora-coverage-dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ethora-coverage-message { margin: 0.5rem 0 0.75rem; }
.ethora-coverage-source { font-size: 0.75rem; color: #94a3b8; }
.ethora-coverage-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.ethora-coverage-steps li {
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.ethora-coverage-steps li.is-active { border-color: #2cd7c4; color: #2cd7c4; }
.ethora-coverage-steps li.is-done { opacity: 0.65; }
.ethora-coverage-list { margin: 0.75rem 0 0; padding-left: 1rem; }
.ethora-coverage-care-banner {
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: rgba(251, 191, 36, 0.06);
}
.ethora-coverage-provider-label {
  font-size: 0.8125rem;
  color: #fbbf24;
}
.ethora-coverage-compare-card { align-items: flex-start; }
.ethora-coverage-wizard-actions { margin-top: 1rem; }

/* Device Center — Sprint 4.0 consolidation (presentation only) */
.device-center-lifecycle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.85rem;
}
.device-center-lifecycle[hidden] { display: none !important; }
.device-center-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(44, 215, 196, 0.35);
  color: #2cd7c4;
  text-decoration: none;
  background: rgba(44, 215, 196, 0.06);
}
.device-center-chip:hover { background: rgba(44, 215, 196, 0.14); }
.admin-devices-page .table-wrap,
.entity-table-card .table-wrap,
#pair-sessions-table,
#prov-table,
#admin-cameras-table {
  max-width: 100%;
}
.admin-devices-page .table-wrap,
.entity-table-card .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Sticky first/action columns — opaque bg required (inherit causes overlap on scroll). */
.admin-devices-page table th.col-device,
.admin-devices-page table td.col-device,
.data-table:not(.admin-subscriptions-table) th:first-child,
.data-table:not(.admin-subscriptions-table) td:first-child,
#pair-sessions-table th:first-child,
#pair-sessions-table td:first-child,
#prov-table th:first-child,
#prov-table td:first-child,
#admin-cameras-table th:first-child,
#admin-cameras-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0a2226;
  background-clip: padding-box;
  box-shadow: 1px 0 0 rgba(20, 184, 166, 0.28);
  min-width: 7.5rem;
  isolation: isolate;
}
.data-table:not(.admin-subscriptions-table) thead th:first-child,
.admin-devices-page table thead th.col-device,
#pair-sessions-table thead th:first-child,
#prov-table thead th:first-child,
#admin-cameras-table thead th:first-child {
  z-index: 4;
  background: #071a1e;
}
.data-table:not(.admin-subscriptions-table) th.col-actions,
.data-table:not(.admin-subscriptions-table) td.col-actions,
.admin-devices-page table th.col-actions,
.admin-devices-page table td.col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #0a2226;
  background-clip: padding-box;
  box-shadow: -1px 0 0 rgba(20, 184, 166, 0.28);
  isolation: isolate;
  white-space: nowrap;
}
.data-table:not(.admin-subscriptions-table) thead th.col-actions,
.admin-devices-page table thead th.col-actions {
  z-index: 4;
  background: #071a1e;
}
.data-table:not(.admin-subscriptions-table) tbody tr:hover td:first-child,
.data-table:not(.admin-subscriptions-table) tbody tr:hover td.col-actions,
.admin-devices-page table tbody tr:hover td.col-device,
.admin-devices-page table tbody tr:hover td.col-actions {
  background: #10333a;
}
.admin-devices-page .table-wrap,
.entity-table-card .table-wrap,
.admin-devices-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
}
@media (max-width: 900px) {
  .ethora-filters-row,
  .admin-devices-filters {
    gap: 0.4rem;
  }
  .ethora-filters-row .input,
  .admin-devices-filters .input {
    max-width: 100%;
  }
  .device-center-lifecycle {
    margin-bottom: 0.65rem;
  }
}

/* Sprint 4.3.2 - reusable checkbox field alias */
.ethora-checkbox-field,
.ethora-checkbox-field.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  cursor: pointer;
  line-height: 1.3;
}
.ethora-checkbox-field input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}
