:root {
  --paper: #f8f3e8;
  --paper-deep: #efe5d3;
  --card: rgba(255, 252, 245, 0.86);
  --ink: #20342f;
  --muted: #6d7771;
  --line: rgba(39, 70, 62, 0.14);
  --teal: #0a766b;
  --teal-deep: #07544e;
  --mint: #cfe6d9;
  --orange: #d8793d;
  --orange-soft: #f4d7b7;
  --rose: #b65d66;
  --rose-soft: #f2d9d7;
  --sand: #c6a35d;
  --shadow: 0 20px 60px rgba(50, 62, 53, 0.09);
  --serif: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
  --sans: "Aptos", "Segoe UI Variable", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 8% 8%, rgba(216, 121, 61, 0.16), transparent 27rem),
    radial-gradient(circle at 94% 24%, rgba(10, 118, 107, 0.15), transparent 31rem),
    linear-gradient(135deg, #fbf7ee 0%, #f6efdf 58%, #f4ead8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(rgba(45, 70, 62, 0.24) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}

.ambient-one {
  width: 28rem;
  height: 28rem;
  left: -15rem;
  top: 34%;
  border: 1px solid rgba(10, 118, 107, 0.12);
}

.ambient-two {
  width: 19rem;
  height: 19rem;
  right: -9rem;
  bottom: 10%;
  border: 1px solid rgba(216, 121, 61, 0.16);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-card {
  width: min(430px, 100%);
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 32px 32px 32px 10px;
  background: rgba(255, 251, 242, 0.88);
  box-shadow: 0 30px 90px rgba(38, 64, 55, 0.18);
  backdrop-filter: blur(18px);
  animation: card-in 0.7s cubic-bezier(.2,.8,.2,1) both;
}

.login-mark {
  width: 76px;
  height: 76px;
  margin-bottom: 1.35rem;
  filter: drop-shadow(0 12px 22px rgba(10, 84, 78, 0.2));
}

.login-card h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 3.9rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.login-copy {
  margin: 0.7rem 0 2rem;
  color: var(--muted);
  line-height: 1.7;
}

.login-form,
.settings-form {
  display: grid;
  gap: 1rem;
}

.login-form label,
.settings-form label {
  display: grid;
  gap: 0.45rem;
}

.login-form label > span,
.settings-form label > span {
  color: #4c5f57;
  font-size: 0.82rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid rgba(45, 70, 62, 0.18);
  border-radius: 12px;
  outline: 0;
  padding: 0.82rem 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus {
  border-color: var(--teal);
  background: #fffdf8;
  box-shadow: 0 0 0 4px rgba(10, 118, 107, 0.1);
}

input::placeholder {
  color: #9a9d94;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.button.primary {
  color: #fffdf6;
  background: var(--teal);
  box-shadow: 0 10px 25px rgba(10, 118, 107, 0.19);
}

.button.primary:hover {
  background: var(--teal-deep);
}

.button.dark {
  color: #fffaf0;
  background: var(--ink);
}

.button.outline {
  border-color: rgba(10, 118, 107, 0.34);
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.4);
}

.button.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
}

.button.danger {
  color: var(--rose);
}

.button.small {
  min-height: 36px;
  padding: 0.48rem 0.85rem;
  font-size: 0.78rem;
}

.button.wide {
  width: 100%;
}

.form-error {
  min-height: 1.2rem;
  margin: 0;
  color: var(--rose);
  font-size: 0.8rem;
}

.login-foot {
  margin: 1.5rem 0 0;
  color: #8b9088;
  font-size: 0.72rem;
  text-align: center;
}

.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0.7rem max(1.2rem, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(50, 73, 65, 0.1);
  background: rgba(248, 243, 232, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand span {
  display: grid;
  line-height: 1.15;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.brand small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.09em;
}

.topbar-actions,
.action-buttons,
.account-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

main {
  width: min(1240px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 4.8rem 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  min-height: 340px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.hero h1 em {
  color: var(--teal);
  font-style: italic;
  font-weight: 500;
}

.hero-copy {
  max-width: 640px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.pulse-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(10, 118, 107, 0.22);
}

.ring-one {
  width: 260px;
  height: 260px;
  animation: slow-spin 18s linear infinite;
}

.ring-one::before,
.ring-two::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.ring-one::before {
  top: 23px;
  left: 47px;
}

.ring-two {
  width: 205px;
  height: 205px;
  border-style: dashed;
  opacity: 0.8;
  animation: slow-spin 28s linear infinite reverse;
}

.ring-two::before {
  right: 8px;
  bottom: 58px;
  background: var(--teal);
}

.pulse-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 166px;
  height: 166px;
  border-radius: 50%;
  color: #fffdf5;
  background:
    radial-gradient(circle at 32% 25%, rgba(255,255,255,.18), transparent 45%),
    var(--teal-deep);
  box-shadow: 0 24px 60px rgba(7, 84, 78, 0.25);
}

.pulse-core strong {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 3.1rem;
  font-weight: 500;
  line-height: 0.9;
}

.pulse-core span {
  color: var(--mint);
  font-size: 0.93rem;
}

.pulse-core small {
  margin-top: -0.6rem;
  color: rgba(255,255,255,.65);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.alert-banner,
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(182, 93, 102, 0.2);
  border-radius: 16px;
  color: #6d3036;
  background: rgba(250, 234, 230, 0.88);
}

.verify-banner {
  border-color: rgba(10, 118, 107, 0.2);
  color: var(--teal-deep);
  background: rgba(224, 240, 230, 0.88);
}

.verify-banner p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.verify-banner strong {
  font-family: var(--serif);
  font-size: 1.15rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  right: -25px;
  bottom: -32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.23);
}

.metric-card.teal {
  color: #f7fff9;
  background: linear-gradient(145deg, #0a766b, #07544e);
}

.metric-card.orange {
  color: #5a341e;
  background: linear-gradient(145deg, #f3d5b0, #e7bd8c);
}

.metric-card.rose {
  color: #66353a;
  background: linear-gradient(145deg, #f3dedb, #eac7c4);
}

.metric-card.sand {
  color: #554625;
  background: linear-gradient(145deg, #f0e4bf, #e3d09d);
}

.metric-card > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.metric-card strong {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-family: var(--serif);
  font-size: 2.65rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-card small {
  font-size: 0.72rem;
  opacity: 0.76;
}

.action-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 3rem 0 1rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.action-strip h2,
.panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 1rem;
  margin-top: 1rem;
}

.panel {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
  white-space: nowrap;
}

.chip.neutral {
  color: #5d6b64;
  background: rgba(72, 91, 82, 0.09);
}

.chip.good {
  color: #075c54;
  background: #d9eee3;
}

.chip.warm {
  color: #875020;
  background: #f5dfc7;
}

.chip.bad {
  color: #8c3d46;
  background: #f3d7d5;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 270px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.empty-state p {
  max-width: 340px;
  line-height: 1.7;
}

.empty-glyph {
  display: block;
  color: var(--teal);
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 1;
  opacity: 0.42;
}

.task-summary {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.7fr;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.task-summary > div {
  min-height: 82px;
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(239, 231, 214, 0.55);
}

.task-summary small {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.task-summary strong {
  font-size: 0.84rem;
}

.task-summary code {
  color: var(--teal-deep);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.sms-box {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px dashed rgba(216, 121, 61, 0.35);
  border-radius: 14px;
  background: rgba(250, 235, 215, 0.5);
}

.sms-box label {
  color: #7a512f;
  font-size: 0.74rem;
  font-weight: 700;
}

.sms-box > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.event-list {
  position: relative;
  display: grid;
  gap: 0;
  max-height: 390px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.event-item {
  position: relative;
  display: grid;
  grid-template-columns: 82px 12px 1fr;
  gap: 0.65rem;
  min-height: 45px;
  padding: 0.48rem 0;
}

.event-item time {
  padding-top: 0.12rem;
  color: #8b918b;
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
}

.event-dot {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 0.3rem;
  border: 2px solid #f9f4e9;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(10, 118, 107, 0.35);
}

.event-item:not(:last-child) .event-dot::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 2px;
  width: 1px;
  height: 39px;
  background: rgba(10, 118, 107, 0.18);
}

.event-item p {
  margin: 0;
  color: #50625a;
  font-size: 0.76rem;
  line-height: 1.6;
}

.event-item.warning .event-dot {
  background: var(--orange);
  box-shadow: 0 0 0 1px rgba(216, 121, 61, 0.38);
}

.event-item.error .event-dot {
  background: var(--rose);
  box-shadow: 0 0 0 1px rgba(182, 93, 102, 0.36);
}

.event-item.success .event-dot {
  background: #2f8b58;
}

.settings-form {
  margin-top: 1.25rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.unit-input {
  position: relative;
  display: flex;
  align-items: center;
}

.unit-input b {
  position: absolute;
  right: 0.8rem;
  color: #8c928a;
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
}

.unit-input b:first-child {
  left: 0.8rem;
  right: auto;
}

.unit-input b:first-child + input {
  padding-left: 1.8rem;
}

.field-note {
  margin: -0.15rem 0 0.1rem;
  color: #878b83;
  font-size: 0.68rem;
  line-height: 1.6;
}

.target-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
}

.target-presets {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.target-presets button {
  min-width: 32px;
  height: 32px;
  border: 1px solid rgba(10, 118, 107, 0.2);
  border-radius: 9px;
  color: var(--teal-deep);
  background: rgba(207, 230, 217, 0.42);
  font-size: 0.68rem;
  font-weight: 750;
}

.target-presets button:hover {
  border-color: var(--teal);
  background: rgba(207, 230, 217, 0.8);
}

.toggle-list {
  display: grid;
  gap: 0.7rem;
  margin: 0.3rem 0;
}

.toggle {
  position: relative;
  display: grid !important;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 0.75rem !important;
  padding: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c9cbc4;
  transition: background 0.2s;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-track {
  background: var(--teal);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle input:disabled + .toggle-track {
  opacity: 0.35;
}

.toggle > span:last-child {
  display: grid;
  gap: 0.15rem;
}

.toggle strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.toggle small {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.activity-panel {
  margin-top: 1rem;
}

.scheduler-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.scheduler-strip > span {
  display: grid;
  gap: 0.3rem;
  min-height: 68px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(239, 231, 214, 0.44);
}

.scheduler-strip b {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.scheduler-strip strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.activity-list {
  max-height: 460px;
  margin-top: 1.1rem;
}

.empty-state.compact {
  min-height: 150px;
  padding: 1.2rem;
}

.empty-state.compact .empty-glyph {
  font-size: 2.6rem;
}

.accounts-panel {
  margin-top: 1rem;
}

.accounts-head {
  align-items: center;
}

.account-tools input {
  width: 230px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.account-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-wrap {
  margin-top: 1.2rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

th {
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--line);
  color: #7e857f;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(39, 70, 62, 0.08);
  color: #44564f;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.42);
}

.empty-row td {
  padding: 2.5rem;
  color: #7a837c;
  text-align: center;
}

.phone-cell {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
}

.key-cell {
  color: #738078;
  font-family: "Cascadia Mono", "SFMono-Regular", monospace;
  font-size: 0.7rem;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge {
  padding: 0.25rem 0.52rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
}

.badge.valid {
  color: #07645b;
  background: #dbefe4;
}

.badge.lapsed {
  color: #8d3f47;
  background: #f2d7d4;
}

.badge.active {
  color: #805021;
  background: #f5dfc6;
}

.balance-zero {
  color: #8b5a32;
  font-weight: 700;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1240px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: #8b918b;
  font-size: 0.68rem;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1.4rem;
  bottom: 1.4rem;
  max-width: min(430px, calc(100vw - 2.8rem));
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  color: #fffdf6;
  background: var(--ink);
  box-shadow: 0 18px 50px rgba(30, 48, 42, 0.24);
  font-size: 0.78rem;
  line-height: 1.5;
  animation: toast-in 0.25s ease both;
}

.reveal {
  animation: rise-in 0.65s cubic-bezier(.2,.8,.2,1) both;
}

.metrics.reveal {
  animation-delay: 0.08s;
}

.action-strip.reveal {
  animation-delay: 0.14s;
}

.work-grid .reveal:nth-child(1) {
  animation-delay: 0.2s;
}

.work-grid .reveal:nth-child(2) {
  animation-delay: 0.26s;
}

.accounts-panel.reveal {
  animation-delay: 0.32s;
}

.activity-panel.reveal {
  animation-delay: 0.3s;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr 260px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .action-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .topbar-actions {
    width: 100%;
    overflow-x: auto;
  }

  main {
    width: min(100% - 1.25rem, 1240px);
    padding-top: 2.5rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 15vw, 4.4rem);
  }

  .pulse-orbit {
    min-height: 250px;
    margin-top: 1rem;
    transform: scale(0.9);
  }

  .action-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .action-buttons .button {
    flex: 1 1 150px;
  }

  .task-summary {
    grid-template-columns: 1fr;
  }

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

  .accounts-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .account-tools input {
    width: 100%;
  }

  .verify-banner,
  .alert-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .scheduler-strip {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    width: calc(100% - 1.25rem);
  }
}

@media (max-width: 460px) {
  .login-card {
    padding: 2rem 1.35rem;
    border-radius: 24px 24px 24px 8px;
  }

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

  .metric-card {
    min-height: 130px;
  }

  .panel {
    padding: 1.1rem;
    border-radius: 20px;
  }

  .sms-box > div {
    grid-template-columns: 1fr;
  }

  .event-item {
    grid-template-columns: 65px 10px 1fr;
    gap: 0.45rem;
  }

  .target-input {
    grid-template-columns: 1fr;
  }
}
