:root {
  --pine-900: #122225;
  --pine-800: #182f34;
  --pine-700: #20393f;
  --pine-600: #2b4a51;
  --mint-200: #cdf3e6;
  --mint-300: #a7e8d4;
  --mint-400: #84dcc0;
  --mint-500: #4db894;
  --mint-600: #2f9e81;
  --mint-700: #237a63;
  --amber-100: #fdf3df;
  --amber-300: #f0d9ab;
  --amber-600: #b0741a;
  --red-500: #c4574e;
  --red-100: #fbeae8;
  --paper: #f2f5f2;
  --card: #ffffff;
  --line: #e1e8e2;
  --line-strong: #cfd9d1;
  --ink: #1c2b2e;
  --ink-soft: #4f6469;
  --ink-faint: #84999e;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(18, 34, 37, 0.05), 0 10px 28px -20px rgba(18, 34, 37, 0.3);
  --shadow-lift: 0 2px 4px rgba(18, 34, 37, 0.06), 0 14px 32px -18px rgba(18, 34, 37, 0.35);
  --shadow-modal: 0 24px 64px -16px rgba(18, 34, 37, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input {
  font: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

::selection {
  background: var(--mint-200);
}

:focus-visible {
  outline: 2px solid var(--mint-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.hidden {
  display: none !important;
}

.shell {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100vh;
  padding: 26px 20px 22px;
  background: linear-gradient(168deg, var(--pine-700) 0%, var(--pine-800) 58%, var(--pine-900) 100%);
  color: rgba(233, 246, 242, 0.82);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  border-radius: var(--radius-md);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--mint-400);
  background: rgba(132, 220, 192, 0.1);
  border: 1px solid rgba(132, 220, 192, 0.28);
  box-shadow: inset 0 0 18px rgba(132, 220, 192, 0.08);
}


.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f2faf7;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(167, 232, 212, 0.62);
}

.nav-label {
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(167, 232, 212, 0.45);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: -14px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-weight: 500;
  color: rgba(233, 246, 242, 0.68);
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ecf7f3;
}

.nav-item.active {
  background: rgba(132, 220, 192, 0.12);
  color: #ffffff;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--mint-400);
}

.nav-icon {
  display: grid;
  place-items: center;
  color: rgba(167, 232, 212, 0.75);
}

.nav-item.active .nav-icon {
  color: var(--mint-300);
}

.nav-dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--mint-400);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.nav-item.active .nav-dot {
  opacity: 1;
}

.side-card {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(233, 246, 242, 0.66);
}

.side-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mint-300);
}

.side-card p {
  margin: 0 0 10px;
}

.side-card a {
  font-weight: 600;
  color: var(--mint-300);
  transition: color 0.15s ease;
}

.side-card a:hover {
  color: var(--mint-200);
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(242, 245, 242, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--mint-600);
  background: var(--pine-700);
}

.topbar-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(77, 184, 148, 0.1);
  border: 1px solid rgba(77, 184, 148, 0.22);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mint-700);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}

.topbar-owner {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pine-700);
  border: 1px solid rgba(132, 220, 192, 0.35);
  color: var(--mint-300);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.mobile-nav {
  display: none;
  gap: 8px;
  padding: 12px 32px 0;
  overflow-x: auto;
}

.mobile-nav a {
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.mobile-nav a.active {
  background: var(--pine-700);
  border-color: var(--pine-700);
  color: #ffffff;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 1120px;
  padding: 28px 32px 48px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.page-sub {
  margin-top: 5px;
  font-size: 14px;
  color: var(--ink-soft);
}

.page-sub strong {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--pine-700);
  color: #f2faf7;
  box-shadow: 0 1px 2px rgba(18, 34, 37, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-primary:hover {
  background: var(--pine-600);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--pine-600);
  color: var(--ink);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-sm svg {
  flex-shrink: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
  transition: border-color 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  border-color: var(--pine-600);
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(77, 184, 148, 0.12);
  color: var(--mint-600);
}

.stat-icon.is-muted {
  background: #eef1ee;
  color: var(--ink-faint);
}

.stat-icon.is-warm {
  background: var(--amber-100);
  color: var(--amber-600);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stat-value {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.stat-hint {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.panel-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--ink-faint);
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  min-width: 250px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-faint);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search:focus-within {
  border-color: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(77, 184, 148, 0.15);
  background: var(--card);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.search input::placeholder {
  color: var(--ink-faint);
}

.chips {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: #e8ede8;
  border: 1px solid var(--line);
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.chip:hover {
  color: var(--ink);
}

.chip.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(18, 34, 37, 0.14);
}

.track-list {
  display: flex;
  flex-direction: column;
}

.track-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  transition: background 0.14s ease;
}

.track-row + .track-row {
  border-top: 1px solid var(--line);
}

.track-row:hover {
  background: #f7faf7;
}

.track-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.track-tick {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.track-tick:hover {
  transform: scale(1.15);
}

.track-tick.is-sent {
  color: var(--ink-faint);
}

.track-tick.is-opened {
  color: var(--mint-500);
}

.track-tick.is-opened svg {
  filter: drop-shadow(0 0 1px rgba(77, 184, 148, 0.25));
}

.track-main {
  min-width: 0;
}

.track-recipient {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-subject {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-opened {
  background: rgba(77, 184, 148, 0.13);
  border: 1px solid rgba(77, 184, 148, 0.3);
  color: var(--mint-700);
}

.badge-sent {
  background: var(--amber-100);
  border: 1px solid var(--amber-300);
  color: var(--amber-600);
}

.track-time {
  min-width: 88px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 52px 24px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #eef2ee;
  color: var(--ink-faint);
}

.empty-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
}

.empty-text {
  max-width: 380px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

.skeleton-row {
  height: 58px;
}

.skeleton-row + .skeleton-row {
  border-top: 1px solid var(--line);
}

.skeleton-row::after {
  content: "";
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #eef1ee 25%, #f6f8f5 45%, #eef1ee 65%);
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 34, 37, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.18s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  width: min(460px, 100%);
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-modal);
  animation: pop-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  overflow: hidden;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
}

.modal-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 20px 20px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fafcfa;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.input {
  height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input:focus {
  outline: none;
  border-color: var(--mint-500);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(77, 184, 148, 0.15);
}

textarea.input {
  height: auto;
  min-height: 74px;
  padding: 10px 13px;
  resize: vertical;
}

.form-error {
  font-size: 13px;
  font-weight: 500;
  color: var(--red-500);
}

.prose-panel {
  padding: 24px 26px;
}

.prose {
  max-width: 64ch;
  font-size: 14px;
  color: var(--ink-soft);
}

.prose h3 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 10px;
}

.prose ul {
  margin: 0 0 10px;
  padding-left: 18px;
  list-style: disc;
}

.prose li {
  margin-bottom: 5px;
}

.prose strong {
  color: var(--ink);
}

.codeblock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 13px 14px 13px 16px;
  border-radius: var(--radius-md);
  background: var(--pine-900);
  color: var(--mint-300);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.codeblock code {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.codeblock .icon-btn {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--mint-300);
}

.codeblock .icon-btn:hover {
  border-color: var(--mint-400);
  color: var(--mint-200);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--pine-800);
  border: 1px solid rgba(132, 220, 192, 0.3);
  color: #eefaf5;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-modal);
  transform: translateX(-50%);
  animation: toast-in 0.22s ease;
}

.toast svg {
  color: var(--mint-400);
}

.toast.toast-error {
  border-color: rgba(196, 87, 78, 0.5);
}

.toast.toast-error svg {
  color: #eda9a2;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #ccd6cd;
  border-radius: 999px;
  border: 3px solid var(--paper);
}

::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-color: transparent;
}

@media (max-width: 1060px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .topbar {
    padding: 12px 20px;
  }

  .page {
    padding: 22px 20px 44px;
  }
}

@media (max-width: 640px) {
  .topbar-owner {
    display: none;
  }

  .topbar-tag {
    display: none;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    justify-content: flex-end;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .panel-tools {
    width: 100%;
  }

  .track-row {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }

  .track-side {
    grid-column: 2;
    justify-content: space-between;
    width: 100%;
  }

  .track-time {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(47, 158, 129, 0.32);
  background: linear-gradient(135deg, rgba(132, 220, 192, 0.18), rgba(32, 57, 63, 0.04));
  box-shadow: var(--shadow-card);
}

.banner-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--pine-700);
  color: var(--mint-300);
}

.banner-body {
  min-width: 0;
}

.banner-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}

.banner-text {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.banner-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.sync-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: #f0f7f4;
  border: 1px solid rgba(77, 184, 148, 0.28);
  font-size: 13px;
  color: var(--ink-soft);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(77, 184, 148, 0.18);
}

.sync-strip .sync-email {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
}

.sync-strip .spacer {
  margin-left: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-gmail {
  background: rgba(77, 184, 148, 0.14);
  color: var(--mint-700);
  border: 1px solid rgba(77, 184, 148, 0.3);
}

.tag-manual {
  background: #eef1ee;
  color: var(--ink-faint);
  border: 1px solid var(--line-strong);
}

.steps {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 34px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pine-700);
  color: var(--mint-300);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.steps code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #eef1ee;
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.setting-row:first-child {
  border-top: 0;
}

.setting-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.setting-meta {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 25px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.18s ease;
}

.switch .track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(18, 34, 37, 0.3);
  transition: transform 0.18s ease;
}

.switch input:checked + .track {
  background: var(--mint-500);
}

.switch input:checked + .track::before {
  transform: translateX(19px);
}

.switch input:focus-visible + .track {
  outline: 2px solid var(--mint-500);
  outline-offset: 2px;
}

.btn-danger {
  background: var(--card);
  border: 1px solid var(--red-500);
  color: var(--red-500);
}

.btn-danger:hover {
  background: var(--red-100);
}

.link-btn {
  font-weight: 600;
  color: var(--mint-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--mint-600);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--pine-800);
  color: var(--mint-300);
  padding: 2px 7px;
  border-radius: 6px;
}

.banner-info {
  border-color: rgba(26, 115, 232, 0.32);
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.08), rgba(26, 115, 232, 0.02));
}

.banner-info .banner-icon {
  background: #1a73e8;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   WebSocket live indicator
   ═══════════════════════════════════════════════════════════ */
.ws-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
  margin-right: 8px;
  user-select: none;
}

.ws-dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-500);
  transition: background 0.4s;
}

.ws-status.connected .ws-dot-inner {
  background: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(77, 184, 148, 0.25);
  animation: ws-pulse 2s ease-in-out infinite;
}

.ws-status.connected .ws-label {
  color: var(--mint-700);
}

@keyframes ws-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(77, 184, 148, 0.25); }
  50%      { box-shadow: 0 0 0 6px rgba(77, 184, 148, 0.08); }
}

/* ═══════════════════════════════════════════════════════════
   Track row animations
   ═══════════════════════════════════════════════════════════ */
.track-row {
  transition: background 0.3s;
}

.track-row-new {
  animation: slide-in 0.35s ease-out;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.track-opened-flash {
  animation: open-flash 2s ease-out;
}

@keyframes open-flash {
  0%   { background: rgba(77, 184, 148, 0.15); }
  100% { background: transparent; }
}

.track-tick {
  transition: transform 0.3s ease;
}

.track-tick.is-opened {
  animation: tick-pop 0.4s ease-out;
}

@keyframes tick-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Stat value pulse on change */
.stat-pulse {
  animation: stat-bump 0.5s ease-out;
}

@keyframes stat-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); color: var(--mint-600); }
  100% { transform: scale(1); }
}
