:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #1d2433;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 247, 249, 0.98)), #f6f7f9;
}

button,
input,
select {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 48px;
}

.page-content {
  width: min(100%, 720px);
}

.page-content--narrow {
  width: min(100%, 520px);
}

.page-content--wide {
  width: min(100%, 1180px);
}

.admin-page {
  align-items: flex-start;
  padding: 28px 32px 56px;
}

.admin-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.admin-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.admin-page-header h1 {
  max-width: none;
  font-size: 40px;
  line-height: 1.08;
}

.admin-page-header p:not(.eyebrow) {
  max-width: 720px;
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.admin-header-link {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #1f6feb;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-header-link:hover {
  background: #eef2f7;
}

.eyebrow {
  margin: 0 0 12px;
  color: #1f6feb;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.page h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.page p:not(.eyebrow) {
  max-width: 580px;
  margin: 22px 0 0;
  color: #4d596d;
  font-size: 18px;
  line-height: 1.55;
}

.test-order-panel,
.order-meta {
  width: min(100%, 560px);
  margin-top: 28px;
  padding: 16px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
}

.bridge-dashboard {
  width: 100%;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.bridge-panel {
  width: 100%;
  margin-top: 0;
}

.bridge-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.bridge-panel__header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.bridge-panel__header p {
  margin: 3px 0 0;
  color: #647084;
  font-size: 12px;
  line-height: 1.35;
}

.bridge-step {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 800;
}

.test-order-panel label {
  display: block;
  margin: 12px 0 8px;
  color: #364154;
  font-size: 14px;
  font-weight: 700;
}

.test-order-panel__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.test-order-panel input,
.test-order-panel select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 0 12px;
}

.test-order-panel select {
  background: #ffffff;
  color: #1d2433;
}

.test-order-panel button {
  width: 100%;
  margin-top: 14px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: #1f6feb;
  color: #ffffff;
  cursor: pointer;
}

.admin-login {
  margin-top: 28px;
}

.admin-login .admin-error {
  max-width: none;
  margin: 12px 0 0;
  color: #c51f46;
  font-size: 14px;
  line-height: 1.4;
}

.admin-topbar {
  width: 100%;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d9dee7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #647084;
  font-size: 14px;
  font-weight: 700;
}

.admin-topbar form {
  margin: 0;
}

.admin-topbar button {
  min-height: 38px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 0 14px;
  background: #ffffff;
  color: #364154;
  cursor: pointer;
}

.admin-topbar button:hover {
  background: #eef2f7;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav a {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  color: #364154;
  text-decoration: none;
}

.admin-nav a[aria-current="page"] {
  border-color: #cbd3df;
  background: #ffffff;
  color: #1f6feb;
}

.copy-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.copy-input .copy-input__button {
  width: 42px;
  min-height: 42px;
  margin-top: 0;
  padding: 0;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #364154;
  font-size: 18px;
  line-height: 1;
}

.copy-input .copy-input__button:hover {
  background: #eef2f7;
}

.bridge-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.bridge-actions .bridge-link {
  min-height: 42px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #1f6feb;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.bridge-output {
  min-height: 20px;
  display: block;
  margin-top: 12px;
  color: #364154;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.bridge-json {
  min-height: 180px;
  max-height: 380px;
  margin: 14px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  background: #f8fafc;
  color: #1d2433;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.receipt-admin-layout {
  width: 100%;
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.receipt-config-panel {
  width: 100%;
  margin-top: 18px;
  padding: 18px;
}

.receipt-config-panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.integrations-panel {
  width: 100%;
  margin-top: 0;
}

.integration-list {
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.integration-row {
  min-height: 76px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.integration-row h3 {
  margin: 0;
  color: #09090b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.integration-row p {
  max-width: none;
  margin: 4px 0 0;
  color: #71717a;
  font-size: 13px;
  line-height: 1.45;
}

.integration-row__control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.integration-switch {
  width: 48px;
  height: 28px;
  margin: 0;
  padding: 3px;
  border: 1px solid #d4d4d8;
  border-radius: 999px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 48px;
  background: #e4e4e7;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.integration-switch__thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: block;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.24);
  transition: transform 0.15s ease;
}

.integration-switch.is-on {
  border-color: #18181b;
  background: #18181b;
}

.integration-switch.is-on .integration-switch__thumb {
  transform: translateX(20px);
}

.integration-switch:focus-visible {
  outline: 2px solid rgba(24, 24, 27, 0.28);
  outline-offset: 2px;
}

.integration-output {
  margin-top: 10px;
}

.admin-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.admin-section-header p {
  max-width: 640px;
  margin: 6px 0 0;
  color: #647084;
  font-size: 13px;
  line-height: 1.45;
}

.admin-section-kicker {
  margin: 0 0 4px;
  color: #1f6feb;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-section-actions .admin-primary-button {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 0 14px;
  white-space: nowrap;
}

.admin-badge {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #cbd3df;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #364154;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-badge--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.admin-badge--warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.admin-badge--neutral {
  border-color: #d9dee7;
  background: #f8fafc;
  color: #4d596d;
}

.receipt-toggle {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  color: #1d2433;
  font-size: 14px;
  font-weight: 800;
}

.receipt-toggle--switch {
  width: 100%;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  background: #f8fafc;
}

.receipt-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.receipt-toggle--switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.receipt-switch {
  width: 38px;
  height: 22px;
  border: 1px solid #cbd3df;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  background: #ffffff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.receipt-switch::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  position: absolute;
  top: 1px;
  left: 1px;
  background: #94a3b8;
  transition: transform 0.15s ease, background 0.15s ease;
}

.receipt-toggle input:checked + .receipt-switch {
  border-color: #1f6feb;
  background: #dbeafe;
}

.receipt-toggle input:checked + .receipt-switch::after {
  transform: translateX(16px);
  background: #1f6feb;
}

.receipt-toggle strong,
.receipt-toggle small {
  display: block;
}

.receipt-toggle small {
  margin-top: 2px;
  color: #647084;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.receipt-secret-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.receipt-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-workflow-header {
  margin: 28px 0 12px;
}

.admin-workflow-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.admin-workflow-header p {
  max-width: 720px;
  margin: 6px 0 0;
  color: #647084;
  font-size: 13px;
  line-height: 1.45;
}

.receipt-config-note {
  margin: 12px 0 0;
  color: #647084;
  font-size: 13px;
  line-height: 1.45;
}

.receipt-lookup-panel h2,
.receipt-recent-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.25;
}

.receipt-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: end;
}

.receipt-search-row button,
.receipt-recent-header button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: #1f6feb;
  color: #ffffff;
  cursor: pointer;
}

.receipt-admin-empty {
  margin: 0;
  color: #647084;
  font-size: 14px;
  line-height: 1.45;
}

.receipt-admin-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.receipt-admin-details div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  background: #f8fafc;
}

.receipt-admin-details dt {
  margin: 0 0 4px;
  color: #647084;
  font-size: 12px;
  font-weight: 700;
}

.receipt-admin-details dd {
  margin: 0;
  color: #1d2433;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.receipt-status-ok {
  color: #15803d;
  font-weight: 800;
}

.receipt-status-bad {
  color: #b42318;
  font-weight: 800;
}

.receipt-copy-block {
  margin-top: 14px;
}

.receipt-copy-block label {
  display: block;
  margin: 0 0 8px;
  color: #364154;
  font-size: 13px;
  font-weight: 800;
}

.receipt-copy-block a {
  display: inline-flex;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.receipt-admin-subtitle {
  margin: 18px 0 10px;
  font-size: 15px;
}

.receipt-admin-files {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.receipt-admin-files li {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  background: #ffffff;
}

.receipt-admin-files a {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.receipt-admin-files span {
  display: block;
  margin-top: 4px;
  color: #647084;
  font-size: 12px;
}

.receipt-recent-panel {
  width: 100%;
  margin-top: 16px;
}

.receipt-recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.receipt-admin-table-wrap {
  overflow-x: auto;
}

.receipt-admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.receipt-admin-table th,
.receipt-admin-table td {
  padding: 10px;
  border-top: 1px solid #d9dee7;
  text-align: left;
  vertical-align: top;
}

.receipt-admin-table th {
  color: #647084;
  font-size: 12px;
  text-transform: uppercase;
}

.receipt-link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #1f6feb;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.order-meta p {
  margin: 10px 0 0;
  color: #647084;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.receipt-upload {
  width: min(100%, 560px);
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
}

.receipt-upload label:not(.receipt-upload__confirm) {
  display: block;
  margin: 0 0 8px;
  color: #364154;
  font-size: 14px;
  font-weight: 700;
}

.receipt-upload input[type="file"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 9px 12px;
  background: #ffffff;
}

.receipt-upload__confirm {
  margin: 14px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4d596d;
  font-size: 14px;
  line-height: 1.4;
}

.receipt-upload__confirm input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}

.receipt-upload button {
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: #1f6feb;
  color: #ffffff;
  cursor: pointer;
}

.receipt-upload button:disabled {
  cursor: not-allowed;
  background: #aeb7c6;
}

.page a {
  color: #1f6feb;
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  width: auto;
}

.chat-launcher {
  position: relative;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #302829;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(29, 24, 25, 0.24);
  cursor: pointer;
}

.chat-launcher__dot {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
}

.chat-widget.has-unread .chat-launcher::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 38px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff3b30;
  box-shadow: 0 0 0 2px #302829;
}

.chat-shell {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(400px, calc(100vw - 48px));
  height: min(620px, calc(100vh - 116px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(29, 36, 51, 0.12);
}

.chat-shell[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e4e8ef;
  background: #ffffff;
}

.chat-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.chat-header p {
  margin: 4px 0 0;
  color: #647084;
  font-size: 13px;
}

.chat-close-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #364154;
  cursor: pointer;
  font-size: 18px;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.message {
  width: fit-content;
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e1e6ee;
}

.message.is-me {
  align-self: flex-end;
  background: #e8f1ff;
  border-color: #cfe0ff;
}

.message__author {
  display: block;
  margin-bottom: 4px;
  color: #647084;
  font-size: 12px;
}

.message__content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message__attachment {
  display: block;
  margin-top: 8px;
  color: #1f6feb;
  overflow-wrap: anywhere;
}

.message__attachment img {
  display: block;
  width: min(220px, 100%);
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.composer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 64px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #e4e8ef;
  background: #ffffff;
}

.composer-file {
  display: none;
}

.composer button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #1f6feb;
  color: #ffffff;
  cursor: pointer;
}

.composer button:disabled {
  cursor: not-allowed;
  background: #aeb7c6;
}

.composer-attach {
  width: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  background: #eef2f7 !important;
  color: #364154 !important;
}

.composer input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 0 12px;
}

.composer-file-name {
  grid-column: 2 / 4;
  margin: -2px 0 0;
  color: #647084;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-page {
  min-height: 100vh;
  align-items: flex-start;
  padding: 24px 32px 64px;
  background: #f8fafc;
}

.admin-page .admin-shell {
  width: min(100%, 1280px);
}

.admin-page .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -24px -32px 24px;
  padding: 12px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.admin-page .admin-nav {
  gap: 4px;
}

.admin-page .admin-nav a {
  min-height: 36px;
  border-radius: 6px;
  color: #52525b;
  font-size: 14px;
  font-weight: 700;
}

.admin-page .admin-nav a:hover {
  background: #f4f4f5;
  color: #18181b;
}

.admin-page .admin-nav a[aria-current="page"] {
  border-color: #e4e4e7;
  background: #18181b;
  color: #ffffff;
}

.admin-page .admin-topbar button,
.admin-page .admin-header-link,
.admin-page .bridge-link {
  min-height: 36px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background: #ffffff;
  color: #18181b;
  font-size: 14px;
  font-weight: 700;
}

.admin-page .admin-topbar button:hover,
.admin-page .admin-header-link:hover,
.admin-page .bridge-link:hover {
  background: #f4f4f5;
}

.admin-page .admin-page-header {
  align-items: center;
  margin: 0 0 20px;
}

.admin-page .admin-page-header h1,
.admin-login-page h1 {
  max-width: none;
  color: #09090b;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.18;
}

.admin-page .admin-page-header p:not(.eyebrow),
.admin-login__header p:not(.eyebrow) {
  max-width: 760px;
  margin: 6px 0 0;
  color: #71717a;
  font-size: 14px;
  line-height: 1.5;
}

.admin-page .eyebrow,
.admin-login__header .eyebrow {
  margin: 0 0 6px;
  color: #71717a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-page .test-order-panel,
.admin-login {
  width: 100%;
  margin-top: 0;
  padding: 20px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-login-page {
  align-items: center;
}

.admin-login {
  max-width: 420px;
  margin: 0 auto;
}

.admin-login__header {
  margin-bottom: 18px;
}

.admin-page .test-order-panel label,
.admin-login label {
  margin: 12px 0 6px;
  color: #3f3f46;
  font-size: 13px;
  font-weight: 700;
}

.admin-page .test-order-panel input,
.admin-page .test-order-panel select,
.admin-login input {
  min-height: 40px;
  border-color: #d4d4d8;
  border-radius: 6px;
  background: #ffffff;
  color: #09090b;
  font-size: 14px;
}

.admin-page .test-order-panel input:focus,
.admin-page .test-order-panel select:focus,
.admin-login input:focus {
  border-color: #18181b;
  outline: 2px solid rgba(24, 24, 27, 0.12);
  outline-offset: 0;
}

.admin-page .test-order-panel button,
.admin-login button,
.admin-page .admin-primary-button,
.admin-page .receipt-search-row button,
.admin-page .receipt-recent-header button {
  width: auto;
  min-height: 40px;
  border: 1px solid #18181b;
  border-radius: 6px;
  padding: 0 14px;
  background: #18181b;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.admin-login button {
  width: 100%;
}

.admin-page .test-order-panel button:hover,
.admin-login button:hover,
.admin-page .admin-primary-button:hover,
.admin-page .receipt-search-row button:hover,
.admin-page .receipt-recent-header button:hover {
  background: #27272a;
}

.admin-page .copy-input .copy-input__button {
  width: 40px;
  min-height: 40px;
  border-color: #d4d4d8;
  background: #ffffff;
  color: #18181b;
}

.admin-page .bridge-dashboard,
.admin-page .receipt-admin-layout {
  margin-top: 0;
  gap: 16px;
}

.admin-page .bridge-panel__header h2,
.admin-page .receipt-lookup-panel h2,
.admin-page .receipt-recent-panel h2,
.admin-page .admin-workflow-header h2,
.admin-page .receipt-config-panel h2 {
  color: #09090b;
  font-size: 18px;
  font-weight: 800;
}

.admin-page .bridge-panel__header p,
.admin-page .admin-workflow-header p,
.admin-page .admin-section-header p {
  color: #71717a;
}

.admin-page .bridge-step {
  width: 28px;
  height: 28px;
  background: #18181b;
  font-size: 13px;
}

.admin-page .receipt-config-panel {
  margin-top: 0;
}

.admin-page .admin-section-kicker {
  color: #71717a;
}

.admin-page .admin-section-actions .admin-primary-button {
  margin-top: 0;
}

.admin-page .admin-badge {
  border-color: #e4e4e7;
  background: #fafafa;
  color: #52525b;
}

.admin-page .admin-badge--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.admin-page .admin-badge--warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.admin-page .integration-switch,
.admin-page .test-order-panel .integration-switch {
  width: 48px;
  min-height: 28px;
  height: 28px;
  margin: 0;
  padding: 3px;
  border: 1px solid #d4d4d8;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 48px;
  background: #e4e4e7;
}

.admin-page .integration-switch:hover,
.admin-page .test-order-panel .integration-switch:hover {
  background: #d4d4d8;
}

.admin-page .integration-switch.is-on,
.admin-page .test-order-panel .integration-switch.is-on {
  border-color: #18181b;
  background: #18181b;
}

.admin-page .integration-switch.is-on:hover,
.admin-page .test-order-panel .integration-switch.is-on:hover {
  background: #27272a;
}

.admin-page .receipt-toggle--switch {
  border-color: #e4e4e7;
  background: #fafafa;
}

.admin-page .receipt-switch {
  border-color: #d4d4d8;
}

.admin-page .receipt-toggle input:checked + .receipt-switch {
  border-color: #18181b;
  background: #e4e4e7;
}

.admin-page .receipt-toggle input:checked + .receipt-switch::after {
  background: #18181b;
}

.admin-page .receipt-admin-table {
  min-width: 760px;
}

.admin-page .receipt-admin-table th {
  color: #71717a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.admin-page .receipt-admin-table td {
  border-top-color: #e4e4e7;
  color: #27272a;
}

.admin-page .receipt-link-button {
  width: auto;
  min-height: 0;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #18181b;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-page .receipt-status-ok,
.admin-page .receipt-status-bad {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  align-items: center;
  font-size: 12px;
}

.admin-page .receipt-status-ok {
  background: #f0fdf4;
  color: #166534;
}

.admin-page .receipt-status-bad {
  background: #fef2f2;
  color: #991b1b;
}

.admin-page .bridge-json,
.admin-page .receipt-admin-details div,
.admin-page .receipt-admin-files li {
  border-color: #e4e4e7;
  background: #fafafa;
}

@media (max-width: 520px) {
  .page {
    align-items: flex-start;
    padding: 36px 20px 120px;
  }

  .page h1 {
    font-size: 38px;
  }

  .test-order-panel__row {
    grid-template-columns: 1fr;
  }

  .bridge-dashboard {
    grid-template-columns: 1fr;
  }

  .bridge-actions {
    grid-template-columns: 1fr;
  }

  .receipt-admin-layout,
  .receipt-admin-details,
  .receipt-config-grid,
  .receipt-search-row {
    grid-template-columns: 1fr;
  }

  .chat-widget {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .chat-widget.is-open {
    inset: 0;
    overflow: hidden;
  }

  .chat-widget.is-open .chat-launcher {
    display: none;
  }

  .chat-launcher {
    width: 100%;
    justify-content: center;
  }

  .chat-shell {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-header {
    padding: calc(14px + env(safe-area-inset-top)) 14px 12px;
  }

  .messages {
    padding: 16px 14px;
  }

  .composer {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }
}
