:root {
  --background: #080b12;
  --surface: #0d1420;
  --surface-raised: #111a28;
  --surface-soft: #151e2e;
  --border: #253247;
  --border-soft: rgba(90, 113, 143, 0.24);
  --text: #f4f7fb;
  --text-secondary: #9aa9bc;
  --text-muted: #69798e;
  --cyan: #21d4fd;
  --cyan-strong: #0bbce8;
  --violet: #8b5cf6;
  --green: #2de2a6;
  --amber: #f7b84b;
  --red: #ff6b7d;
  --blue: #5b8cff;
  --shadow: 0 22px 70px rgba(0, 3, 10, 0.34);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(33, 212, 253, 0.08), transparent 30rem),
    radial-gradient(circle at 92% 16%, rgba(139, 92, 246, 0.08), transparent 34rem),
    var(--background);
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.boot-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.boot-screen > div {
  display: grid;
  gap: 3px;
}

.boot-screen small {
  color: var(--text-muted);
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(420px, 1fr) auto;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(18px, 2.6vw, 42px);
  border-bottom: 1px solid rgba(92, 118, 149, 0.22);
  background: rgba(8, 11, 18, 0.91);
  box-shadow: 0 10px 30px rgba(1, 5, 12, 0.2);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(33, 212, 253, 0.58);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(33, 212, 253, 0.15), rgba(139, 92, 246, 0.13));
  box-shadow: inset 0 0 18px rgba(33, 212, 253, 0.08), 0 0 20px rgba(33, 212, 253, 0.08);
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.08em;
  transform: skew(-5deg);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 11px;
}

.app-nav {
  display: flex;
  align-self: stretch;
  justify-content: center;
  gap: 5px;
  margin-inline: 24px;
}

.app-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
}

.app-nav button:hover,
.app-nav button:focus-visible,
.app-nav button.active {
  color: var(--text);
}

.app-nav button::after {
  position: absolute;
  right: 13px;
  bottom: 0;
  left: 13px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--cyan), #65e9ff);
  box-shadow: 0 0 13px rgba(33, 212, 253, 0.55);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 150ms ease, transform 150ms ease;
}

.app-nav button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-count {
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid rgba(33, 212, 253, 0.22);
  border-radius: 999px;
  background: rgba(33, 212, 253, 0.08);
  color: var(--cyan);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(17, 26, 40, 0.75);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mode-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(247, 184, 75, 0.65);
  content: "";
}

.mode-pill.live::before {
  background: var(--green);
  box-shadow: 0 0 8px rgba(45, 226, 166, 0.65);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(17, 26, 40, 0.76);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.icon-button:hover:not(:disabled),
.icon-button:focus-visible {
  border-color: rgba(33, 212, 253, 0.45);
  background: rgba(33, 212, 253, 0.08);
  color: var(--cyan);
}

.icon-button:active:not(:disabled) {
  transform: translateY(1px);
}

.icon-button.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.profile-chip {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(33, 212, 253, 0.14));
  color: #e6ddff;
  font-size: 11px;
  font-weight: 800;
}

.app-content {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 2.7vw, 42px);
}

.page-intro,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-intro > div:first-child,
.section-heading > div:first-child {
  max-width: 850px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 9px;
  font-size: clamp(29px, 3.2vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.section-heading h1 {
  margin-top: 7px;
  font-size: clamp(28px, 2.6vw, 42px);
}

.page-intro p,
.section-heading p {
  max-width: 740px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 11px 13px;
  border: 1px solid rgba(45, 226, 166, 0.18);
  border-radius: 12px;
  background: rgba(45, 226, 166, 0.055);
  color: var(--green);
  font-size: 13px;
  line-height: 1.25;
}

.security-note small {
  color: var(--text-muted);
}

.panel {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17, 26, 40, 0.95), rgba(11, 17, 27, 0.96));
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(250px, 1.45fr) minmax(230px, 1fr) minmax(130px, 0.44fr) minmax(160px, 0.52fr) auto;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(67, 89, 118, 0.38);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17, 26, 40, 0.96), rgba(11, 17, 27, 0.97));
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field > span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
}

.input-shell,
.compact-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(7, 11, 18, 0.72);
  color: var(--text-muted);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-shell:focus-within,
.compact-control:focus-within {
  border-color: rgba(33, 212, 253, 0.6);
  box-shadow: 0 0 0 3px rgba(33, 212, 253, 0.08);
}

.input-shell input,
.input-shell select,
.compact-control input,
.compact-control select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.input-shell input::placeholder,
.compact-control input::placeholder {
  color: #536176;
}

.input-shell select,
.compact-control select {
  cursor: pointer;
}

.search-button,
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.search-button {
  align-self: end;
  min-height: 48px;
  padding: 0 21px;
  background: linear-gradient(135deg, var(--cyan-strong), #5790ff 58%, var(--violet));
  box-shadow: 0 10px 28px rgba(33, 212, 253, 0.16);
  color: #041018;
  white-space: nowrap;
}

.search-button:hover:not(:disabled),
.button-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(33, 212, 253, 0.24);
}

.search-button:disabled,
.button:disabled {
  cursor: not-allowed;
  filter: saturate(0.5);
  opacity: 0.58;
}

.search-helper {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.button {
  padding: 9px 13px;
}

.button-primary {
  background: linear-gradient(135deg, var(--cyan-strong), #5b8cff);
  color: #06121a;
}

.button-secondary {
  border-color: rgba(33, 212, 253, 0.28);
  background: rgba(33, 212, 253, 0.085);
  color: #9ceeff;
}

.button-agenda {
  border-color: rgba(45, 226, 166, 0.3);
  background: rgba(45, 226, 166, 0.09);
  color: var(--green);
}

.button-ghost {
  border-color: var(--border-soft);
  background: rgba(17, 26, 40, 0.6);
  color: var(--text-secondary);
}

.button-danger {
  border-color: rgba(255, 107, 125, 0.28);
  background: rgba(255, 107, 125, 0.08);
  color: var(--red);
}

.button-secondary:hover,
.button-agenda:hover,
.button-ghost:hover,
.button-danger:hover {
  border-color: currentColor;
  transform: translateY(-1px);
}

.metrics-grid,
.validation-grid,
.usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric-card,
.validation-card,
.usage-stat {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: rgba(13, 20, 32, 0.8);
}

.metric-card::before,
.usage-stat::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--tone);
  box-shadow: 0 0 16px var(--tone);
  content: "";
}

.metric-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
}

.metric-card > div:last-child,
.usage-stat {
  min-width: 0;
}

.metric-card strong,
.validation-card strong,
.usage-stat strong {
  display: block;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric-card span,
.validation-card span,
.usage-stat > span,
.usage-stat small {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 13px;
}

.tone-cyan,
.usage-stat-cyan { --tone: var(--cyan); }
.tone-blue,
.usage-stat-blue { --tone: var(--blue); }
.tone-green,
.usage-stat-green { --tone: var(--green); }
.tone-violet,
.usage-stat-violet { --tone: var(--violet); }

.results-panel {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(12, 18, 29, 0.9);
  box-shadow: var(--shadow);
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px 14px;
}

.results-title {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.results-title h2,
.panel-heading h2,
.settings-drawer h2 {
  margin: 4px 0 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.result-count {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: #cdbdff;
  font-size: 12px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-control {
  min-height: 40px;
  padding-inline: 11px;
}

.compact-control input {
  width: 190px;
  font-size: 14px;
}

.compact-control select {
  font-size: 14px;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 15px;
  scrollbar-width: thin;
}

.filter-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.filter-chip.active {
  border-color: rgba(33, 212, 253, 0.36);
  background: rgba(33, 212, 253, 0.09);
  color: var(--cyan);
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(17, 26, 40, 0.56);
}

.selection-summary {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1110px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 13px;
  border-bottom: 1px solid rgba(76, 99, 129, 0.16);
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(7, 11, 18, 0.43);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--text-secondary);
  font-size: 14px;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover,
tbody tr.selected-row {
  background: rgba(33, 212, 253, 0.035);
}

.checkbox-cell {
  width: 42px;
  text-align: center;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan-strong);
  cursor: pointer;
}

.company-cell {
  display: flex;
  min-width: 250px;
  align-items: flex-start;
  gap: 11px;
}

.company-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(33, 212, 253, 0.08);
  color: var(--cyan);
}

.company-cell strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.company-cell > div > span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 11px;
  margin-top: 6px;
}

.contact-links a,
.contact-links span,
.whatsapp-link,
.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.contact-links a:hover,
.whatsapp-link:hover,
.maps-link:hover {
  color: var(--cyan);
}

.phone-cell {
  display: grid;
  gap: 2px;
  min-width: 132px;
}

.phone-cell span {
  color: var(--text);
  white-space: nowrap;
}

.phone-cell small,
.city-cell {
  color: var(--text-muted);
  font-size: 12px;
}

.city-cell,
.rating-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.rating-cell {
  color: var(--amber);
}

.rating-cell small {
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.status-valid { color: var(--green); background: rgba(45, 226, 166, 0.07); }
.status-invalid,
.status-error { color: var(--red); background: rgba(255, 107, 125, 0.07); }
.status-pending,
.status-eligible { color: var(--amber); background: rgba(247, 184, 75, 0.07); }
.status-landline,
.status-unavailable { color: var(--text-muted); background: rgba(105, 121, 142, 0.07); }

.whatsapp-link {
  color: var(--green);
  white-space: nowrap;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

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

.pagination > span {
  min-width: 28px;
  text-align: center;
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 235px;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 30px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state h3,
.empty-state h2 {
  margin: 2px 0 0;
  color: var(--text);
}

.empty-state p {
  margin: 0;
}

.validation-card {
  display: grid;
  grid-template-columns: auto 1fr;
  color: var(--tone);
}

.validation-card svg {
  grid-row: span 2;
}

.validation-card span {
  margin-top: 0;
}

.validation-card.valid { --tone: var(--green); }
.validation-card.pending { --tone: var(--amber); }
.validation-card.invalid { --tone: var(--red); }
.validation-card.neutral { --tone: var(--text-muted); }

.info-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
}

.info-illustration {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  background: rgba(45, 226, 166, 0.08);
  color: var(--green);
}

.info-panel h2 {
  margin: 6px 0 5px;
  font-size: 21px;
}

.info-panel p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.integration-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.integration-status.connected {
  background: rgba(45, 226, 166, 0.09);
  color: var(--green);
}

.integration-status.waiting {
  background: rgba(247, 184, 75, 0.09);
  color: var(--amber);
}

.history-panel {
  display: grid;
  gap: 11px;
}

.history-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto auto;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(13, 20, 32, 0.82);
}

.history-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
  color: #b89cff;
}

.history-main,
.history-meta {
  display: grid;
  gap: 4px;
}

.history-main span,
.history-meta span,
.history-card time {
  color: var(--text-muted);
  font-size: 12px;
}

.history-main span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.history-meta {
  text-align: center;
}

.usage-counter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.usage-counter,
.usage-panel {
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: 17px;
  background: rgba(13, 20, 32, 0.86);
}

.usage-counter > header,
.usage-panel > header,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.usage-counter > header > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.usage-counter > header > strong {
  color: var(--cyan);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}

.usage-explanation {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}

.usage-explanation span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.usage-counter footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.usage-counter footer a {
  color: var(--cyan);
}

.usage-free-list,
.usage-sku-list {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.usage-free-item > div:first-child,
.usage-sku-heading,
.usage-sku-meta {
  display: flex;
  justify-content: space-between;
  gap: 13px;
}

.usage-free-item span,
.usage-sku-heading span,
.usage-sku-meta,
.usage-updated {
  color: var(--text-muted);
  font-size: 12px;
}

.usage-free-item strong {
  font-variant-numeric: tabular-nums;
}

.usage-free-item small {
  margin: 0 3px;
  color: var(--text-muted);
}

.progress {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(92, 112, 137, 0.18);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.usage-stat {
  display: block;
}

.usage-stat strong {
  margin-top: 9px;
}

.usage-stat small {
  line-height: 1.4;
}

.usage-panel > header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.usage-sku {
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  background: rgba(8, 12, 20, 0.36);
}

.usage-sku-heading > div:first-child {
  display: grid;
  gap: 4px;
}

.usage-sku-count {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  text-align: right;
}

.usage-sku-count strong {
  font-size: 20px;
}

.usage-sku-meta {
  flex-wrap: wrap;
  margin-top: 9px;
}

.usage-note {
  display: flex;
  gap: 11px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(33, 212, 253, 0.15);
  border-radius: 12px;
  background: rgba(33, 212, 253, 0.045);
  color: var(--cyan);
}

.usage-note p {
  margin: 5px 0 7px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.usage-note a {
  display: inline-flex;
  margin-right: 13px;
  color: var(--cyan);
  font-size: 12px;
}

.drawer-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(4px);
}

.settings-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, calc(100% - 28px));
  overflow-y: auto;
  padding: 24px;
  border-left: 1px solid var(--border);
  background: #0c121d;
  box-shadow: -20px 0 65px rgba(0, 0, 0, 0.45);
}

.settings-drawer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.drawer-copy {
  margin: 18px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.integration-list {
  display: grid;
  gap: 10px;
}

.integration-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(17, 26, 40, 0.56);
}

.integration-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(33, 212, 253, 0.08);
  color: var(--cyan);
}

.integration-item > div {
  display: grid;
  gap: 3px;
}

.integration-item small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.connection-dot {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.connection-dot.ok {
  background: rgba(45, 226, 166, 0.09);
  color: var(--green);
}

.connection-dot.pending {
  background: rgba(247, 184, 75, 0.09);
  color: var(--amber);
}

.drawer-callout {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.055);
  color: #bda9ff;
}

.drawer-callout p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

#toast-root {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(390px, calc(100% - 40px));
  gap: 8px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--tone);
  border-radius: 12px;
  background: rgba(12, 18, 29, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--tone);
}

.toast span {
  flex: 1;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.toast button {
  display: grid;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.toast-success { --tone: var(--green); }
.toast-error { --tone: var(--red); }
.toast-warning { --tone: var(--amber); }
.toast-info { --tone: var(--cyan); }

.spin {
  animation: spin 0.85s linear infinite;
}

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

@media (max-width: 1180px) {
  .app-header {
    grid-template-columns: auto 1fr auto;
    padding-top: 10px;
  }

  .app-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 50px;
    justify-content: flex-start;
    overflow-x: auto;
    margin: 0 -4px;
  }

  .app-nav button {
    padding: 0 12px;
  }

  .search-panel {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 150px 170px;
  }

  .search-button {
    grid-column: 1 / -1;
  }

  .bulk-bar,
  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .bulk-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .app-content {
    padding: 20px 15px 28px;
  }

  .brand-copy small,
  .profile-chip {
    display: none;
  }

  .page-intro,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading .button {
    width: 100%;
  }

  .security-note {
    min-width: 0;
  }

  .search-panel {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
  }

  .field-wide,
  .field-city,
  .search-button,
  .search-helper {
    grid-column: 1 / -1;
  }

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

  .usage-counter-grid {
    grid-template-columns: 1fr;
  }

  .history-card {
    grid-template-columns: auto 1fr auto;
  }

  .history-card time {
    grid-column: 2;
  }

  .history-card .button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .info-panel {
    grid-template-columns: auto 1fr;
  }

  .info-panel .integration-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .toolbar-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .compact-control input {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .app-header {
    grid-template-columns: 1fr auto;
    padding: 9px 13px 0;
  }

  .app-nav {
    min-height: 52px;
  }

  .app-nav button {
    font-size: 13px;
  }

  .mode-pill {
    width: 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .mode-pill::before {
    width: 9px;
    height: 9px;
  }

  h1 {
    font-size: 31px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .field,
  .field-wide,
  .field-city,
  .search-button,
  .search-helper {
    grid-column: 1;
  }

  .metrics-grid,
  .validation-grid,
  .usage-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card,
  .validation-card,
  .usage-stat {
    padding: 13px;
  }

  .metric-icon {
    width: 38px;
    height: 38px;
  }

  .metric-card strong,
  .validation-card strong,
  .usage-stat strong {
    font-size: 21px;
  }

  .results-toolbar,
  .bulk-bar {
    padding-inline: 14px;
  }

  .results-title {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .bulk-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .bulk-actions .button {
    padding-inline: 8px;
    font-size: 12px;
  }

  .history-card {
    grid-template-columns: auto 1fr;
  }

  .history-meta,
  .history-card time,
  .history-card .button {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    text-align: left;
  }

  .usage-free-item > div:first-child,
  .usage-sku-heading,
  .usage-counter footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #toast-root {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

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