:root {
  --wa-ink: #0f1a17;
  --wa-ink-soft: #1c2b26;
  --wa-panel: #ffffff;
  --wa-panel-2: #f4f7f5;
  --wa-line: rgba(15, 26, 23, 0.08);
  --wa-muted: #5f726b;
  --wa-text: #17241f;
  --wa-accent: #0f8a65;
  --wa-accent-2: #16a34a;
  --wa-accent-soft: rgba(15, 138, 101, 0.12);
  --wa-warn: #c27803;
  --wa-danger: #c24141;
  --wa-info: #0e7490;
  --wa-radius: 14px;
  --wa-radius-sm: 10px;
  --wa-shadow: 0 10px 30px rgba(15, 26, 23, 0.08);
  --wa-shadow-sm: 0 4px 14px rgba(15, 26, 23, 0.06);
  --wa-sidebar: 268px;
  --wa-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --wa-display: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--wa-font);
  color: var(--wa-text);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(15, 138, 101, 0.16), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(14, 116, 144, 0.10), transparent 50%),
    linear-gradient(180deg, #eef3f0 0%, #e7ece9 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 26, 23, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 26, 23, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

a {
  color: var(--wa-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--wa-accent-2);
}

/* ── Shell ── */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--wa-sidebar) 1fr;
}

.app-shell.is-guest {
  grid-template-columns: 1fr;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.15rem 0.9rem;
  background:
    linear-gradient(180deg, #12201b 0%, #0f1a17 55%, #0c1512 100%);
  color: #e8f2ed;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 8px 0 28px rgba(8, 14, 12, 0.22);
  z-index: 30;
  animation: sidebarIn 0.45s ease both;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  color: #fff !important;
  border-radius: 12px;
}

.app-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #22c55e, #0f8a65);
  box-shadow: 0 8px 18px rgba(15, 138, 101, 0.35);
  font-size: 1.25rem;
}

.app-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.app-brand-text strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.app-brand-text span {
  font-size: 0.78rem;
  color: rgba(232, 242, 237, 0.65);
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1;
  padding-inline: 0.15rem;
}

.app-nav-label {
  margin: 0.85rem 0.55rem 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(232, 242, 237, 0.45);
  text-transform: uppercase;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  color: rgba(232, 242, 237, 0.82) !important;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-nav-link i {
  width: 1.25rem;
  text-align: center;
  opacity: 0.9;
}

.app-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  transform: translateX(-2px);
}

.app-nav-link.active {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(15, 138, 101, 0.08));
  color: #fff !important;
  box-shadow: inset 3px 0 0 #22c55e;
}

.app-sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.app-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-user-meta strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-meta span {
  font-size: 0.75rem;
  color: rgba(232, 242, 237, 0.55);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.35rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wa-line);
}

.app-topbar-title {
  font-family: var(--wa-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--wa-ink);
}

.app-content {
  flex: 1;
  padding: 1.35rem 1.35rem 2rem;
  animation: contentIn 0.4s ease both;
}

.app-footer {
  padding: 0.9rem 1.35rem 1.25rem;
  color: var(--wa-muted);
  font-size: 0.85rem;
}

/* Guest / auth */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-shell .app-footer {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  text-align: center;
}

.auth-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(15, 26, 23, 0.14);
  overflow: hidden;
  animation: contentIn 0.45s ease both;
}

.auth-card-head {
  padding: 1.75rem 1.5rem 1.1rem;
  text-align: center;
  background:
    radial-gradient(500px 180px at 50% 0%, rgba(34, 197, 94, 0.18), transparent 70%),
    linear-gradient(180deg, #f8fbf9, #ffffff);
}

.auth-card-head .auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.8rem;
  background: linear-gradient(145deg, #22c55e, #0f8a65);
  box-shadow: 0 12px 24px rgba(15, 138, 101, 0.28);
}

.auth-card-head h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.auth-card-head p {
  margin: 0.35rem 0 0;
  color: var(--wa-muted);
  font-size: 0.92rem;
}

.auth-card-body {
  padding: 0.5rem 1.5rem 1.6rem;
}

/* ── Surfaces ── */
.page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-hero h1,
.page-hero h2,
.page-hero h3 {
  margin: 0;
  font-family: var(--wa-display);
  font-weight: 700;
  color: var(--wa-ink);
}

.page-hero p {
  margin: 0.3rem 0 0;
  color: var(--wa-muted);
}

.panel,
.card {
  background: var(--wa-panel);
  border: 1px solid var(--wa-line);
  border-radius: var(--wa-radius);
  box-shadow: var(--wa-shadow-sm);
}

.card {
  overflow: hidden;
}

.card-header {
  background: linear-gradient(180deg, #fbfcfb, #f5f8f6);
  border-bottom: 1px solid var(--wa-line);
  padding: 0.95rem 1.15rem;
  font-weight: 600;
}

.card-header .card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.card-body {
  padding: 1.15rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (max-width: 991px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  position: relative;
  padding: 1.1rem 1.15rem;
  border-radius: var(--wa-radius);
  background: var(--wa-panel);
  border: 1px solid var(--wa-line);
  box-shadow: var(--wa-shadow-sm);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: contentIn 0.45s ease both;
}

.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--wa-shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--wa-accent-soft);
}

.stat-card .label {
  position: relative;
  z-index: 1;
  color: var(--wa-muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.stat-card .value {
  position: relative;
  z-index: 1;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--wa-ink);
}

.stat-card .icon {
  position: absolute;
  inset-inline-end: 0.9rem;
  top: 0.9rem;
  z-index: 1;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--wa-accent-soft);
  color: var(--wa-accent);
}

.stat-card.is-green .icon { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.stat-card.is-teal .icon { background: rgba(14, 116, 144, 0.14); color: #0e7490; }
.stat-card.is-amber .icon { background: rgba(194, 120, 3, 0.14); color: #b45309; }
.stat-card.is-rose .icon { background: rgba(194, 65, 65, 0.12); color: #b91c1c; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.nav-tile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem;
  border-radius: var(--wa-radius);
  background: var(--wa-panel);
  border: 1px solid var(--wa-line);
  color: var(--wa-text) !important;
  box-shadow: var(--wa-shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.nav-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--wa-shadow);
  border-color: rgba(15, 138, 101, 0.28);
  color: var(--wa-ink) !important;
}

.nav-tile .tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--wa-accent-soft);
  color: var(--wa-accent);
  font-size: 1.1rem;
}

.nav-tile strong {
  font-size: 1rem;
}

.nav-tile span {
  color: var(--wa-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.home-banner {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  color: #f4fff8;
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(34, 197, 94, 0.35), transparent 55%),
    linear-gradient(135deg, #12201b 0%, #0f8a65 55%, #0e7490 120%);
  box-shadow: var(--wa-shadow);
  margin-bottom: 1.25rem;
  animation: contentIn 0.4s ease both;
}

.home-banner h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
}

.home-banner p {
  margin: 0.45rem 0 1rem;
  max-width: 42rem;
  color: rgba(244, 255, 248, 0.85);
}

.home-banner .btn {
  border: 0;
}

.activity-stats-card .card-header {
  background: linear-gradient(180deg, #f8fbf9 0%, #f2f6f4 100%);
}

.activity-chart-wrap {
  position: relative;
  height: 280px;
}

.activity-stats-table {
  max-height: 420px;
  overflow: auto;
}

.activity-stats-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-danger-soft > * {
  --bs-table-bg-type: rgba(194, 65, 65, 0.08);
  --bs-table-bg-state: rgba(194, 65, 65, 0.12);
}

/* ── Forms & tables ── */
.form-label {
  font-weight: 600;
  color: var(--wa-ink-soft);
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  border-radius: var(--wa-radius-sm);
  border-color: rgba(15, 26, 23, 0.12);
  padding: 0.6rem 0.85rem;
  background-color: #fff;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(15, 138, 101, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(15, 138, 101, 0.15);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  --bs-btn-bg: var(--wa-accent);
  --bs-btn-border-color: var(--wa-accent);
  --bs-btn-hover-bg: #0c7455;
  --bs-btn-hover-border-color: #0c7455;
  --bs-btn-active-bg: #0a6449;
  --bs-btn-active-border-color: #0a6449;
  box-shadow: 0 8px 16px rgba(15, 138, 101, 0.22);
}

.btn-outline-primary {
  --bs-btn-color: var(--wa-accent);
  --bs-btn-border-color: rgba(15, 138, 101, 0.45);
  --bs-btn-hover-bg: var(--wa-accent);
  --bs-btn-hover-border-color: var(--wa-accent);
  --bs-btn-hover-color: #fff;
}

.btn-success {
  --bs-btn-bg: #15803d;
  --bs-btn-border-color: #15803d;
}

.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.8rem 0.85rem;
  vertical-align: middle;
}

.table thead th,
.table-dark {
  --bs-table-bg: #15221d !important;
  --bs-table-color: #eef7f2 !important;
  background: #15221d !important;
  color: #eef7f2 !important;
  border-color: transparent !important;
  font-weight: 600;
  font-size: 0.86rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: rgba(15, 138, 101, 0.035);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: rgba(15, 138, 101, 0.07);
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.4em 0.7em;
}

.alert {
  border: 0;
  border-radius: var(--wa-radius-sm);
  box-shadow: none;
}

.alert-success { background: rgba(22, 163, 74, 0.12); color: #166534; }
.alert-danger { background: rgba(194, 65, 65, 0.12); color: #991b1b; }
.alert-info { background: rgba(14, 116, 144, 0.12); color: #155e75; }
.alert-secondary { background: rgba(15, 26, 23, 0.06); color: #334155; }

.section-block {
  padding: 1rem 1.1rem;
  border: 1px solid var(--wa-line);
  border-radius: var(--wa-radius-sm);
  background: var(--wa-panel-2);
  margin-bottom: 1rem;
}

.section-block h5 {
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.progress {
  background: rgba(15, 26, 23, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--wa-accent), var(--wa-accent-2));
}

.settings-switch .form-check {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--wa-line);
  height: 100%;
}

.app-sidebar-backdrop {
  display: none;
}

.mobile-nav-toggle {
  display: none;
  border: 1px solid var(--wa-line);
  background: #fff;
  border-radius: 10px;
  width: 42px;
  height: 42px;
}

@media (max-width: 991.98px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--wa-sidebar));
    transform: translateX(-110%);
    transition: transform 0.28s ease;
    animation: none;
  }

  html[dir="rtl"] .app-sidebar {
    inset: 0 0 0 auto;
    transform: translateX(110%);
  }

  .app-shell.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 12, 0.45);
    z-index: 25;
  }

  .app-shell.sidebar-open .app-sidebar-backdrop {
    display: block;
  }

  .app-shell.sidebar-open .app-sidebar {
    z-index: 30;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
    position: relative;
    z-index: 40;
  }

  .app-shell.sidebar-open .mobile-nav-toggle {
    position: fixed;
    top: 0.85rem;
    inset-inline-end: 1rem;
    z-index: 50;
    box-shadow: var(--wa-shadow-sm);
  }
}

/* ── Filters / toolbar ── */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  margin-bottom: 1.15rem;
  border-radius: var(--wa-radius);
  border: 1px solid var(--wa-line);
  background: linear-gradient(180deg, #ffffff, #f7faf8);
}

.filter-bar .field { grid-column: span 3; }
.filter-bar .field.wide { grid-column: span 4; }
.filter-bar .field.narrow { grid-column: span 2; }
.filter-bar .actions {
  grid-column: span 2;
  display: flex;
  align-items: flex-end;
}

@media (max-width: 991.98px) {
  .filter-bar .field,
  .filter-bar .field.wide,
  .filter-bar .field.narrow,
  .filter-bar .actions {
    grid-column: span 12;
  }
}

.filter-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(15, 26, 23, 0.04);
}

.filter-chips .chip {
  border: 0;
  background: transparent;
  color: var(--wa-muted);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.filter-chips .chip.active,
.filter-chips a.chip.active {
  background: #fff;
  color: var(--wa-accent);
  box-shadow: var(--wa-shadow-sm);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border: 1px dashed rgba(15, 26, 23, 0.14);
  border-radius: var(--wa-radius);
  background: rgba(255, 255, 255, 0.55);
}

.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.9rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--wa-accent-soft);
  color: var(--wa-accent);
  font-size: 1.45rem;
}

.empty-state h4 {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.empty-state p {
  margin: 0 auto 1rem;
  max-width: 28rem;
  color: var(--wa-muted);
}

.btn-icon {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
}

.action-cluster {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--wa-radius-sm);
  background: var(--wa-panel-2);
  border: 1px solid var(--wa-line);
  margin-bottom: 1rem;
}

.meta-row .meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 7rem;
}

.meta-row .meta-item span {
  font-size: 0.78rem;
  color: var(--wa-muted);
}

.meta-row .meta-item strong {
  font-size: 0.98rem;
}

.contact-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.avatar-dot {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--wa-accent-soft);
  color: var(--wa-accent);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.contact-cell .title {
  font-weight: 600;
  line-height: 1.2;
}

.contact-cell .sub {
  color: var(--wa-muted);
  font-size: 0.82rem;
}

/* ── Chat ── */
.chat-layout {
  display: grid;
  gap: 1rem;
}

.chat-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.chat-panel {
  min-height: 360px;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding: 1.1rem;
  border-radius: var(--wa-radius);
  border: 1px solid var(--wa-line);
  background:
    linear-gradient(180deg, rgba(15, 138, 101, 0.05), transparent 120px),
    #edf3ef;
  scroll-behavior: smooth;
}

.chat-bubble-row {
  display: flex;
  margin-bottom: 0.85rem;
}

.chat-bubble-row.is-in { justify-content: flex-start; }
.chat-bubble-row.is-out { justify-content: flex-end; }

.chat-bubble {
  max-width: min(78%, 520px);
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 26, 23, 0.06);
  animation: contentIn 0.25s ease both;
}

.chat-bubble-row.is-in .chat-bubble {
  background: #fff;
  border: 1px solid rgba(15, 26, 23, 0.08);
  border-top-right-radius: 6px;
}

.chat-bubble-row.is-out .chat-bubble {
  background: linear-gradient(145deg, #128c7e, #0f8a65);
  color: #fff;
  border-top-left-radius: 6px;
}

.chat-bubble .time {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  opacity: 0.72;
}

.reply-box {
  padding: 1rem;
  border-radius: var(--wa-radius);
  border: 1px solid var(--wa-line);
  background: #fff;
  box-shadow: var(--wa-shadow-sm);
}

.form-shell {
  max-width: 920px;
  margin: 0 auto;
}

.table-card .card-body {
  padding: 0;
}

.table-card .table-responsive {
  padding: 0;
}

.table-card .card-body > .alert,
.table-card .card-body > .filter-bar,
.table-card .card-body > .empty-state,
.table-card .card-body > .p-3 {
  margin: 1rem;
}

.table-card .card-body > .filter-bar {
  margin-bottom: 0;
}

.badge-soft-success { background: rgba(22, 163, 74, 0.14); color: #166534; }
.badge-soft-warn { background: rgba(194, 120, 3, 0.16); color: #92400e; }
.badge-soft-info { background: rgba(14, 116, 144, 0.14); color: #155e75; }
.badge-soft-mute { background: rgba(15, 26, 23, 0.08); color: #334155; }

@keyframes contentIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Bootstrap modals must sit above the app shell stacking context */
.modal {
  z-index: 1080;
}

.modal-backdrop {
  z-index: 1070;
}

@keyframes sidebarIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
