:root {
  color-scheme: light;
  --bg: #f3f7f5;
  --bg-accent: #e2f4ec;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --surface-strong: #eef5f2;
  --text: #17231f;
  --text-soft: #64746e;
  --text-faint: #8a9893;
  --line: #dce6e2;
  --line-strong: #c8d6d1;
  --primary: #087f5b;
  --primary-hover: #066848;
  --primary-soft: #dff6ec;
  --header: #0b3027;
  --header-soft: #12473a;
  --blue: #2677d9;
  --blue-soft: #e7f1ff;
  --amber: #b86d00;
  --amber-soft: #fff3d9;
  --danger: #c53b3b;
  --danger-soft: #fff0f0;
  --shadow-sm: 0 3px 10px rgba(19, 46, 37, 0.06);
  --shadow-md: 0 14px 34px rgba(19, 46, 37, 0.09);
  --shadow-lg: 0 28px 70px rgba(7, 38, 29, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --content-width: 1180px;
}

body.dark {
  color-scheme: dark;
  --bg: #0e1714;
  --bg-accent: #14251f;
  --surface: #17231f;
  --surface-soft: #1c2a25;
  --surface-strong: #21312b;
  --text: #edf5f2;
  --text-soft: #a6b6b0;
  --text-faint: #7e9089;
  --line: #30423b;
  --line-strong: #42564e;
  --primary: #32c48d;
  --primary-hover: #49d7a2;
  --primary-soft: #143c2e;
  --header: #061b15;
  --header-soft: #0b2d23;
  --blue: #6ba8f2;
  --blue-soft: #1c314a;
  --amber: #f1ad45;
  --amber-soft: #3a2b16;
  --danger: #ff8585;
  --danger-soft: #3e2424;
  --shadow-sm: 0 3px 12px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, var(--bg-accent), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 32%, transparent);
  outline-offset: 2px;
}

svg {
  display: block;
}

code {
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: linear-gradient(115deg, var(--header), var(--header-soft));
  box-shadow: 0 7px 24px rgba(3, 30, 22, 0.2);
}

.header-main,
.app-nav {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.brand-mark svg {
  width: 27px;
  fill: none;
  stroke: #66e3b4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 1.03rem;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  overflow: hidden;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.independent-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56dda9;
  box-shadow: 0 0 0 4px rgba(86, 221, 169, 0.13);
}

.icon-button {
  display: grid;
  width: 41px;
  height: 41px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.moon-icon,
body.dark .sun-icon {
  display: none;
}

body.dark .moon-icon {
  display: block;
}

.app-nav {
  display: flex;
  align-items: stretch;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.app-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  padding: 13px 18px 14px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.app-nav a::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #62ddb0;
  content: "";
  opacity: 0;
  transform: scaleX(0.65);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-nav a:hover,
.app-nav a.active {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.app-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.app-nav svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  width: min(calc(100% - 40px), var(--content-width));
  min-height: calc(100vh - 210px);
  margin: 0 auto;
  padding: 48px 0 60px;
}

.view {
  display: none;
  animation: view-in 0.28s ease both;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.page-heading.simple {
  align-items: center;
}

.page-heading h1,
.support-copy h1 {
  max-width: 720px;
  margin: 5px 0 7px;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-heading p,
.support-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.01rem;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.eyebrow.light {
  color: #75e3b8;
}

.summary-card {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.summary-card > div {
  display: grid;
  min-width: 78px;
}

.summary-card strong {
  color: var(--primary);
  font-size: 1.6rem;
  line-height: 1;
}

.summary-card span:not(.summary-divider) {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.summary-divider {
  width: 1px;
  height: 38px;
  background: var(--line);
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.composer-panel,
.link-builder,
.contacts-panel,
.history-panel {
  padding: 28px;
}

.csv-panel {
  align-self: start;
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 23px;
}

.panel-heading.compact {
  margin-bottom: 18px;
}

.panel-heading h2,
.qr-header h2,
.dialog-header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.panel-heading p,
.qr-header p,
.dialog-header p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.panel-icon {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
}

.panel-icon.green {
  background: var(--primary-soft);
  color: var(--primary);
}

.panel-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.panel-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.panel-icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.form-grid.two-columns {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 1.3fr);
  gap: 18px;
}

.field {
  margin-top: 18px;
}

.form-grid .field {
  margin-top: 0;
}

.field label,
.generated-link > label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-row span {
  color: var(--text-faint);
  font-size: 0.73rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input {
  min-height: 45px;
  padding: 10px 12px;
}

textarea {
  min-height: 132px;
  padding: 13px 14px;
  line-height: 1.55;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

.phone-grid {
  display: grid;
  grid-template-columns: 68px 72px minmax(140px, 1fr);
  gap: 7px;
}

.phone-grid > div {
  position: relative;
}

.phone-grid input {
  padding-top: 18px;
  padding-bottom: 4px;
  font-weight: 700;
}

.field-prefix {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 12px;
  color: var(--text-faint);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.button-row,
.queue-actions,
.heading-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.button-row {
  margin-top: 20px;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 7px 17px color-mix(in srgb, var(--primary) 20%, transparent);
}

.button.primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
}

.button.secondary:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: var(--surface-strong);
}

.button.danger-ghost {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}

.button.small {
  min-height: 37px;
  padding: 7px 12px;
  font-size: 0.8rem;
}

.button.full {
  width: 100%;
}

.text-button,
.text-link {
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.text-button:hover,
.text-link:hover {
  text-decoration: underline;
}

.message-preview {
  position: relative;
  margin-top: 16px;
  padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 6px 15px 15px 15px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.file-drop {
  display: grid;
  min-height: 148px;
  padding: 22px 16px;
  place-items: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.file-drop svg {
  width: 29px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.file-drop strong {
  font-size: 0.88rem;
}

.file-drop span {
  max-width: 230px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.csv-help {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.csv-help > span {
  width: 100%;
  margin-bottom: 3px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.csv-help code {
  font-size: 0.68rem;
}

.status-text {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.status-text.error {
  color: var(--danger);
}

.status-text.success {
  color: var(--primary);
}

.status-text.centered {
  text-align: center;
}

.stacked-actions {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.queue-panel {
  margin-top: 22px;
  padding: 25px 28px 28px;
}

.queue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.queue-header .panel-heading {
  margin: 0;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.progress-meta strong {
  color: var(--primary);
}

.progress-track {
  height: 8px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

#barraProgresso {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #43d39d);
  transition: width 0.25s ease;
}

.countdown {
  margin-top: 15px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--amber) 22%, var(--line));
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--text);
  font-size: 0.82rem;
}

.next-message {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.queue-list,
.history-list {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.queue-empty,
.history-empty,
.contacts-empty,
.loading-state {
  display: grid;
  min-height: 125px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-size: 0.86rem;
  text-align: center;
}

.queue-item,
.history-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.queue-item.sent {
  opacity: 0.68;
}

.queue-status,
.history-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.73rem;
  font-weight: 850;
}

.queue-item.sent .queue-status,
.history-avatar {
  background: var(--primary-soft);
  color: var(--primary);
}

.queue-content,
.history-content {
  min-width: 0;
  flex: 1;
}

.queue-line,
.history-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.queue-line strong,
.history-line strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-line span,
.history-line span {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 0.7rem;
}

.queue-content p,
.history-content p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.78rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.queue-remove {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.queue-remove:hover {
  color: var(--danger);
}

.link-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 22px;
}

.link-phone-grid {
  max-width: 450px;
}

.generated-link {
  margin-top: 22px;
  padding: 17px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: var(--radius-md);
  background: var(--primary-soft);
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-field input {
  min-width: 0;
  background: var(--surface);
  font-size: 0.8rem;
}

.generated-link .text-link {
  display: inline-block;
  margin-top: 10px;
}

.qr-panel {
  align-self: start;
  padding: 28px;
  text-align: center;
}

.qr-header h2 {
  margin-top: 5px;
  font-size: 1.3rem;
}

.qr-header p {
  max-width: 310px;
  margin: 5px auto 0;
}

.qr-placeholder,
.qr-output {
  display: grid;
  width: 100%;
  margin-top: 22px;
  place-items: center;
}

.qr-placeholder {
  min-height: 300px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text-soft);
}

.qr-placeholder svg {
  width: 82px;
  margin-bottom: 13px;
  fill: none;
  stroke: var(--line-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
}

.qr-placeholder span {
  max-width: 220px;
  font-size: 0.82rem;
}

.qr-output canvas,
.qr-output .qr-canvas img {
  display: block;
  width: min(100%, 320px) !important;
  height: auto !important;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.qr-output .qr-canvas {
  display: grid;
  width: 100%;
  place-items: center;
}

.qr-output .button {
  margin-top: 16px;
}

.phone-heading {
  margin-bottom: 24px;
}

.contacts-panel,
.history-panel {
  min-height: 360px;
}

.contacts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  width: min(100%, 610px);
}

.search-field svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 18px;
  fill: none;
  stroke: var(--text-faint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 43px;
}

.result-count {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.contacts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.contacts-list > .loading-state,
.contacts-list > .contacts-empty {
  grid-column: 1 / -1;
}

.contact-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.contact-card:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.contact-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 850;
}

.contact-info {
  min-width: 0;
  flex: 1;
}

.contact-info strong {
  display: block;
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.contact-meta {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.73rem;
}

.contact-phone {
  margin-top: 8px;
  color: var(--primary);
  font-size: 0.83rem;
  font-weight: 750;
}

.contact-notes {
  min-height: 1.2em;
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.contact-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.contact-actions .button {
  min-height: 36px;
  flex: 1;
  font-size: 0.75rem;
}

.history-list {
  margin: 0;
}

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: 48px;
  align-items: center;
  min-height: 500px;
  padding: clamp(34px, 7vw, 76px);
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 16% 2%, rgba(81, 220, 167, 0.2), transparent 22rem),
    linear-gradient(135deg, #092b22, #0c4e3a);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.support-copy h1 {
  margin-top: 9px;
}

.support-copy > p {
  color: rgba(255, 255, 255, 0.72);
}

.independent-note {
  max-width: 600px;
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

.pix-card {
  display: grid;
  padding: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: #17332a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.pix-card img {
  width: min(100%, 244px);
  border-radius: 13px;
}

.pix-card strong {
  margin-top: 14px;
}

.pix-card span {
  margin-top: 3px;
  color: #697a74;
  font-size: 0.75rem;
}

.site-footer {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding: 0 0 35px;
  color: var(--text-faint);
  font-size: 0.72rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.admin-dialog {
  width: min(calc(100% - 28px), 860px);
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.admin-dialog::backdrop {
  background: rgba(3, 18, 14, 0.68);
  backdrop-filter: blur(5px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.dialog-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.admin-login {
  max-width: 420px;
  margin: 0 auto;
  padding: 34px 24px 40px;
}

.admin-login > p:first-child {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.admin-editor {
  max-height: calc(88vh - 92px);
  padding: 22px 24px 26px;
  overflow-y: auto;
}

.admin-toolbar,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-toolbar p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.admin-contacts {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.admin-csv-import {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed color-mix(in srgb, var(--primary) 35%, var(--line));
  border-radius: var(--radius-md);
  background: var(--primary-soft);
}

.admin-csv-import strong {
  display: block;
  font-size: 0.88rem;
}

.admin-csv-import > div > p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.admin-csv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-csv-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

#adminCsvNomeArquivo {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-csv-import .status-text {
  min-height: 0;
  margin: 0;
}

.admin-contact {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.8fr 58px;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.admin-contact .wide {
  grid-column: span 2;
}

.admin-contact .full-row {
  grid-column: 1 / -1;
}

.admin-contact input {
  min-width: 0;
  min-height: 40px;
  font-size: 0.77rem;
}

.admin-remove {
  align-self: stretch;
  border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--line));
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 1.1rem;
  cursor: pointer;
}

.dialog-footer {
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.toast-container {
  position: fixed;
  z-index: 300;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(calc(100% - 40px), 360px);
  gap: 9px;
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #15372d;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 650;
  animation: toast-in 0.22s ease both;
}

.toast.error {
  background: #7e2929;
}

.toast.warning {
  background: #765018;
}

.toast.out {
  animation: toast-out 0.2s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .layout-grid,
  .link-layout {
    grid-template-columns: 1fr;
  }

  .csv-panel,
  .qr-panel {
    align-self: stretch;
  }

  .file-drop {
    min-height: 130px;
  }

  .qr-placeholder {
    min-height: 250px;
  }

  .support-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pix-card {
    width: min(100%, 340px);
  }
}

@media (max-width: 760px) {
  .header-main,
  .app-nav,
  .app-shell,
  .site-footer {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .header-main {
    min-height: 66px;
  }

  .independent-badge {
    display: none;
  }

  .app-nav a {
    min-width: 94px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .app-shell {
    padding-top: 34px;
  }

  .page-heading,
  .page-heading.simple,
  .phone-heading,
  .queue-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading {
    margin-bottom: 24px;
  }

  .summary-card {
    width: 100%;
    justify-content: center;
  }

  .summary-card > div {
    min-width: 110px;
    text-align: center;
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .queue-actions,
  .heading-buttons {
    width: 100%;
  }

  .queue-actions .button,
  .heading-buttons .button {
    flex: 1 1 145px;
  }

  .contacts-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .search-field {
    width: 100%;
  }

  .contacts-list {
    grid-template-columns: 1fr;
  }

  .admin-contact {
    grid-template-columns: 1fr 1fr;
  }

  .admin-csv-actions .button {
    flex: 1 1 150px;
  }

  .admin-contact .wide,
  .admin-contact .full-row {
    grid-column: 1 / -1;
  }

  .admin-remove {
    min-height: 40px;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .brand-copy strong {
    font-size: 0.9rem;
  }

  .brand-copy small {
    display: none;
  }

  .app-nav {
    width: 100%;
    padding: 0 8px;
  }

  .app-nav a {
    min-width: 86px;
    gap: 6px;
    padding: 11px 10px 13px;
    font-size: 0.73rem;
  }

  .app-nav svg {
    width: 16px;
  }

  .page-heading h1,
  .support-copy h1 {
    font-size: 2rem;
  }

  .composer-panel,
  .link-builder,
  .contacts-panel,
  .history-panel,
  .csv-panel,
  .queue-panel,
  .qr-panel {
    padding: 20px;
    border-radius: 18px;
  }

  .phone-grid {
    grid-template-columns: 62px 67px minmax(120px, 1fr);
    gap: 5px;
  }

  .phone-grid input {
    padding-right: 7px;
    padding-left: 9px;
    font-size: 0.87rem;
  }

  .field-prefix {
    left: 9px;
  }

  .button-row > .button {
    flex: 1 1 100%;
  }

  .copy-field {
    align-items: stretch;
    flex-direction: column;
  }

  .queue-line,
  .history-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .support-card {
    padding: 30px 20px;
    border-radius: 22px;
  }

  .toast-container {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
  }

  .admin-contact {
    grid-template-columns: 1fr;
  }

  .admin-contact .wide,
  .admin-contact .full-row {
    grid-column: 1;
  }

  .dialog-header,
  .admin-editor {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
