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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.5;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  text-decoration: none;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav a,
.nav button {
  font-size: 14px;
}

.nav form {
  margin: 0;
}

.btn-link {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

main {
  padding: 32px 0 48px;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.card h1,
.card h2,
.card h3 {
  margin-top: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.stat-label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  vertical-align: middle;
}

.table th {
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
}

.table tbody tr:hover {
  background: #f8fafc;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table__cell--numeric,
.table td.table__cell--numeric,
.table th.table__cell--numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table__cell--actions,
.table td.table__cell--actions,
.table th.table__cell--actions {
  text-align: right;
  white-space: nowrap;
  min-width: 14rem;
}

.table__cell--checkbox,
.table td.table__cell--checkbox,
.table th.table__cell--checkbox {
  width: 40px;
  padding-left: 16px;
  padding-right: 8px;
  text-align: center;
}

.table__cell--checkbox input[type='checkbox'] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.table__action-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.sign-doc-cell,
.table-primary-cell {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: #0f172a;
}

.table-primary-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
}

.table-primary-link:hover .table-primary-cell {
  color: #2563eb;
}

.table-secondary-cell {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 13px;
  color: #334155;
}

.table-link-cell {
  display: inline-block;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
}

.table-link-cell:hover {
  text-decoration: underline;
}

.text-muted {
  color: #94a3b8;
}

.sign-email-inline {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  color: #334155;
  font-size: 13px;
}

.people-chip,
.progress-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.people-chip:hover,
.progress-chip:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

a.progress-chip--link {
  text-decoration: none;
}

a.progress-chip--link:hover {
  text-decoration: none;
}

.progress-chip:disabled {
  cursor: default;
  opacity: 1;
}

.people-chip__count,
.progress-chip__fraction {
  font-variant-numeric: tabular-nums;
}

.people-chip__label,
.progress-chip__hint {
  font-weight: 500;
  color: #64748b;
}

.people-chip:hover .people-chip__label,
.progress-chip:hover:not(:disabled) .progress-chip__hint {
  color: #2563eb;
}

span.progress-chip {
  cursor: default;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: nowrap;
}

.status-pill--success {
  background: #ecfdf5;
  color: #047857;
}

.status-pill--warning {
  background: #fffbeb;
  color: #b45309;
}

.status-pill--info {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-pill--muted {
  background: #f1f5f9;
  color: #475569;
}

.modal--people-list {
  max-width: 480px;
  padding: 0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.people-list-modal__body {
  padding: 8px 24px 24px;
}

.people-list-modal__count {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
}

.people-list-modal__list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: min(52vh, 360px);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.people-list-modal__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #0f172a;
  word-break: break-word;
}

.people-list-modal__list li:last-child {
  border-bottom: none;
}

.people-list-modal__empty {
  color: #94a3b8;
  font-style: italic;
}

.people-list-modal__list a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.people-list-modal__list a:hover {
  text-decoration: underline;
}

.table-inline-form {
  display: inline-flex;
  margin: 0;
  flex-shrink: 0;
}

[data-bulk-delete] {
  display: none !important;
}

[data-bulk-delete].is-visible {
  display: inline-flex !important;
}

.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;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-opened {
  background: #dcfce7;
  color: #15803d;
}

.badge-unopened {
  background: #f1f5f9;
  color: #64748b;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.auth-card p {
  margin: 0 0 24px;
  color: #64748b;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.form-group input[type='text'],
.form-group input[type='email'],
.form-group input[type='password'] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus {
  color: #fff;
  text-decoration: none;
}

a.btn-secondary,
a.btn-secondary:hover,
a.btn-secondary:focus {
  color: #0f172a;
  text-decoration: none;
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-outline {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

.btn.btn-outline {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

a.btn-outline,
a.btn.btn-outline,
a.btn-outline:hover,
a.btn.btn-outline:hover,
a.btn-outline:focus,
a.btn.btn-outline:focus,
a.btn-outline:focus-visible,
a.btn.btn-outline:focus-visible {
  color: #0f172a;
  text-decoration: none;
}

.btn-outline:hover,
.btn-outline:focus-visible,
.btn.btn-outline:hover,
.btn.btn-outline:focus-visible {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.error-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: #b91c1c;
  font-size: 14px;
}

.token-box {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  margin-top: 12px;
}

.detail-grid {
  display: grid;
  gap: 16px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

.meta-row span:last-child {
  color: #475569;
  text-align: right;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .table {
    display: block;
    overflow-x: auto;
  }
}

/* ── Mailsuite-style dashboard shell ── */

.dashboard-body {
  background: #f4f6f8;
  overflow: hidden;
  height: 100%;
}

html:has(.dashboard-body) {
  height: 100%;
}

.dashboard-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.dashboard-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #111827;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 18px 0 24px;
  height: 100vh;
  overflow-y: auto;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.dashboard-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 18px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.dashboard-sidebar__brand:hover {
  text-decoration: none;
}

.dashboard-sidebar__brand-mark {
  color: #22c55e;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-sidebar__brand .brand-logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}

.dashboard-sidebar__brand .brand-logo-img--icon {
  width: 36px;
  height: 36px;
}

.dashboard-sidebar__section {
  padding: 14px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.dashboard-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 14px;
  color: #cbd5e1;
  text-decoration: none;
}

.dashboard-sidebar__link i {
  width: 16px;
  text-align: center;
  color: #94a3b8;
}

.dashboard-sidebar__link.is-active i {
  color: #86efac;
}

.dashboard-sidebar__link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
}

.dashboard-sidebar__link.is-active {
  background: rgba(34, 197, 94, 0.18);
  color: #fff;
  border-left: 3px solid #22c55e;
  padding-left: 15px;
}

.dashboard-sidebar__link--soon {
  opacity: 0.72;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
}

.dashboard-topbar__lead {
  flex: 1;
  max-width: 420px;
}

.dashboard-topbar__extension-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

a.dashboard-topbar__extension-btn,
a.dashboard-topbar__extension-btn:hover,
a.dashboard-topbar__extension-btn:focus,
a.dashboard-topbar__extension-btn:focus-visible,
a.dashboard-topbar__extension-btn:active {
  color: #0f172a;
  text-decoration: none;
}

a.dashboard-topbar__extension-btn:hover,
a.dashboard-topbar__extension-btn:focus-visible {
  background: #f0fdfa;
  border-color: #14b8a6;
  color: #0f766e;
}

.dashboard-topbar__extension-btn i {
  color: #4285f4;
  font-size: 15px;
}

.dashboard-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #14b8a6;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.btn-upgrade:hover {
  background: #0d9488;
  text-decoration: none;
}

.dashboard-topbar__link {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
}

.dashboard-topbar__link:hover,
.dashboard-topbar__link:focus,
.dashboard-topbar__link:focus-visible,
.dashboard-topbar__link:active {
  text-decoration: none;
}

.dashboard-topbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
  color: #64748b;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-topbar__icon:hover,
.dashboard-topbar__icon:focus,
.dashboard-topbar__icon:focus-visible,
.dashboard-topbar__icon:active {
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  outline: none;
}

.dashboard-topbar__icon i {
  text-decoration: none;
  pointer-events: none;
}

.dashboard-topbar__profile {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-radius: 999px;
  transition: opacity 0.15s ease;
}

.dashboard-topbar__profile:hover,
.dashboard-topbar__profile:focus-visible {
  opacity: 0.9;
  outline: none;
  text-decoration: none;
}

.dashboard-topbar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-topbar__badge {
  position: absolute;
  right: -8px;
  bottom: -4px;
  background: #111827;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
}

.dashboard-topbar__badge--premium {
  background: #0f766e;
}

.dashboard-topbar__logout {
  margin: 0;
}

.dashboard-topbar__logout .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-content {
  padding: 28px 32px 48px;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.page-title {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 700;
}

.page-title--inline {
  font-size: 24px;
  margin-bottom: 16px;
}

.page-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.page-tabs a {
  padding: 0 0 12px;
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.page-tabs a.is-active {
  color: #0f172a;
  border-bottom: 2px solid #22c55e;
}

.page-toolbar {
  margin-bottom: 20px;
}

.page-toolbar__select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
}

.page-toolbar__select select {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.panel-card,
.settings-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 22px;
}

.track-detail.panel-card {
  padding: 0;
  overflow: hidden;
}

.track-detail__section {
  padding: 24px;
}

.track-detail__section + .track-detail__section {
  border-top: 1px solid #e5e7eb;
}

.track-detail h2,
.track-detail .data-table__header h2,
.track-detail .data-table__header h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
}

.track-detail__section .page-title--inline {
  margin-bottom: 20px;
}

.track-detail__section .data-table-card:not(.panel-card) {
  margin-top: 0;
}

.track-detail__ignored {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.track-detail__link-block + .track-detail__link-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.track-detail__link-block .meta-row:last-of-type {
  margin-bottom: 16px;
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: #64748b;
}

.empty-state p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #475569;
}

.empty-state__hint {
  margin-top: 8px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #94a3b8 !important;
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.activity-feed__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.activity-feed__item:last-child {
  border-bottom: none;
}

.activity-feed__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #16a34a;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.activity-feed__item--click .activity-feed__icon {
  background: #eff6ff;
  color: #2563eb;
}

.activity-feed__item--alert .activity-feed__icon {
  background: #fff7ed;
  color: #ea580c;
}

.activity-feed__body {
  flex: 1;
  min-width: 0;
}

.activity-feed__subject {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-feed__detail {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.activity-feed__time {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.table--dashboard th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  white-space: nowrap;
}

.table--dashboard td {
  color: #0f172a;
}

.table--dashboard th.table__cell--numeric,
.table--dashboard td.table__cell--numeric {
  padding-left: 12px;
  padding-right: 20px;
}

.table--dashboard td a {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}

.table--dashboard td a:hover {
  color: #0d9488;
  text-decoration: none;
}

.table--dashboard td a.btn {
  text-decoration: none;
  white-space: nowrap;
}

.table--dashboard td a.btn-secondary {
  color: #0f172a;
}

.table--dashboard td a.btn-secondary:hover {
  background: #cbd5e1;
  text-decoration: none;
}

.badge--click {
  background: #eff6ff;
  color: #2563eb;
}

.badge--alert {
  background: #fff7ed;
  color: #ea580c;
}

.badge i {
  margin-right: 4px;
}

.data-table-card {
  overflow: hidden;
}

.data-table-card:not(.panel-card) {
  margin-top: 16px;
}

.data-table__header h2,
.data-table__header h3 {
  margin: 0 0 16px;
}

.data-table__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.data-table__toolbar--standalone {
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: none;
  justify-content: center;
}

.data-table__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
}

.data-table__filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  flex: 1 1 520px;
}

.data-table__filters-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.data-table__search-field,
.data-table__date-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.data-table__search-field {
  flex: 1 1 260px;
}

.data-table__date-range {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.data-table__date-field {
  flex: 1 1 160px;
}

.data-table__date-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table__field-icon {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  color: #94a3b8;
  pointer-events: none;
  font-size: 14px;
  line-height: 1;
}

.data-table__search-input,
.data-table__date-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.data-table__search-input:focus,
.data-table__date-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.data-table__search-btn,
.data-table__clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.data-table__search-btn {
  border: 1px solid #16a34a;
  background: #22c55e;
  color: #fff;
}

.data-table__search-btn:hover {
  background: #16a34a;
}

.data-table__clear-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

.data-table__clear-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.flatpickr-calendar {
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #22c55e;
  border-color: #22c55e;
}

.data-table__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.data-table__scroll:focus {
  outline: 2px solid rgba(34, 197, 94, 0.35);
  outline-offset: 2px;
}

.data-table__scroll .table {
  margin: 0;
}

.data-table__scroll .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}

.data-table-empty {
  padding-top: 48px;
  padding-bottom: 48px;
}

.table__truncate {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pagination-wrap {
  margin-top: 0;
}

.table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.table-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.table-footer__per-page {
  margin: 0;
}

.table-footer__per-page-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
}

.table-footer__per-page-label select {
  padding: 8px 32px 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: 14px;
  color: #0f172a;
  appearance: none;
}

.table-footer__summary {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pagination__btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.pagination__btn--disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination__page,
.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pagination__page:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.pagination__page--active {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.pagination__ellipsis {
  border-color: transparent;
  background: transparent;
  color: #94a3b8;
  min-width: auto;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .data-table__toolbar,
  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .data-table__filters,
  .data-table__filters-row,
  .table-footer__meta {
    width: 100%;
  }

  .pagination-wrap {
    overflow-x: auto;
  }

  .pagination {
    justify-content: center;
    min-width: max-content;
  }

  .table th,
  .table td {
    padding: 12px 14px;
  }
}

.settings-subnav {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.settings-subnav a {
  padding: 0 0 12px;
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.settings-subnav a.is-active {
  color: #0f172a;
  border-bottom: 2px solid #22c55e;
}

.settings-panel h2 {
  margin-top: 0;
  font-size: 18px;
}

.settings-subtitle {
  margin: 24px 0 12px;
  font-size: 15px;
}

.settings-copy {
  color: #64748b;
  font-size: 14px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.settings-toggle p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.switch__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch input:checked + .switch__slider {
  background: #22c55e;
}

.switch input:checked + .switch__slider::before {
  transform: translateX(20px);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-danger:hover {
  background: #fecaca;
}

.coming-soon {
  text-align: center;
  padding: 72px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.coming-soon__badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

.coming-soon__hint {
  color: #64748b;
  max-width: 520px;
  margin: 12px auto 20px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.plan-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.plan-card--featured {
  border-color: #22c55e;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12);
}

.plan-card__price {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0 16px;
}

.plan-card__price span {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.plan-card__features {
  margin: 0 0 20px;
  padding-left: 18px;
  color: #475569;
  font-size: 14px;
}

.plan-card__current {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.back-link {
  margin: 0 0 16px;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
  text-decoration: none;
}

.back-link a:hover {
  color: #0f172a;
}

@media (max-width: 960px) {
  .dashboard-shell {
    flex-direction: column;
    height: 100vh;
  }

  .dashboard-sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    position: sticky;
    top: 0;
    z-index: 40;
    padding-bottom: 12px;
  }

  .dashboard-main {
    height: auto;
    min-height: 0;
    flex: 1;
  }

  .dashboard-sidebar__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 12px;
  }

  .dashboard-sidebar__section {
    display: none;
  }

  .dashboard-sidebar__link {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
  }

  .dashboard-sidebar__link.is-active {
    border-left: none;
    padding-left: 12px;
  }

  .dashboard-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-topbar__actions {
    flex-wrap: wrap;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }
}

.modal--confirm {
  max-width: 440px;
  padding: 0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal__header--confirm {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 0;
}

.modal__header-copy {
  flex: 1;
  min-width: 0;
}

.modal__icon--danger {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.modal__actions--confirm {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
  padding: 20px 24px 24px;
  border-top: 1px solid #e2e8f0;
}

/* UI chrome links — never show underline on hover/focus */
.dashboard-topbar a,
.dashboard-topbar a:hover,
.dashboard-topbar a:focus,
.dashboard-topbar a:focus-visible,
.dashboard-topbar a:active,
.dashboard-sidebar a,
.dashboard-sidebar a:hover,
.dashboard-sidebar a:focus,
.dashboard-sidebar a:focus-visible,
.dashboard-sidebar a:active,
.settings-sidebar a,
.settings-sidebar a:hover,
.settings-sidebar a:focus,
.settings-sidebar a:focus-visible,
.settings-sidebar a:active,
.page-tabs a,
.page-tabs a:hover,
.settings-subnav a,
.settings-subnav a:hover,
.admin-breadcrumbs a,
.admin-breadcrumbs a:hover,
.btn-upgrade,
.btn-upgrade:hover {
  text-decoration: none !important;
}
