:root {
  --bg-1: #070b14;
  --bg-2: #0d1525;
  --bg-3: #121f35;
  --ink: #e7f0ff;
  --muted: #93a8c6;
  --card: #101a2b;
  --border: rgba(130, 165, 220, 0.25);
  --accent: #2a8bff;
  --accent-2: #1462d9;
  --accent-3: #11c5ff;
  --error: #ff7272;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 180, 216, 0.26), transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(120, 210, 255, 0.24), transparent 42%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3));
}

html {
  min-width: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.tutorial-active {
  overflow: hidden;
}

body.auth-locked .shell,
body.auth-locked .help-fab {
  display: none;
}

.auth-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-card {
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(143, 210, 255, 0.36);
  background:
    radial-gradient(circle at 12% 0, rgba(127, 233, 200, 0.16), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(42, 139, 255, 0.22), transparent 38%),
    linear-gradient(165deg, rgba(16, 30, 50, 0.98), rgba(7, 15, 28, 0.99));
  box-shadow:
    0 30px 80px rgba(1, 7, 16, 0.72),
    inset 0 1px 0 rgba(230, 247, 255, 0.08);
  animation: panelIn 520ms cubic-bezier(.2,.8,.2,1);
}

.auth-brand {
  text-align: center;
  margin-bottom: 18px;
}

.auth-mark {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 22px;
  border: 1px solid rgba(127, 233, 200, 0.48);
  background: linear-gradient(145deg, rgba(16, 89, 100, 0.72), rgba(10, 43, 74, 0.9));
  box-shadow: 0 18px 38px rgba(6, 48, 70, 0.36);
}

.auth-mark svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #d8fff2;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-kicker {
  margin: 0 0 8px;
  color: #7fe9c8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-brand h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.12;
}

.auth-brand p {
  margin: 0 auto;
  max-width: 420px;
  color: #a9bedb;
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin: 18px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(94, 129, 184, 0.36);
  background: rgba(6, 14, 26, 0.64);
}

.auth-tab {
  height: 42px;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #bcd5f7;
}

.auth-tab.active {
  background: linear-gradient(135deg, #2a8bff, #11c5ff);
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-link-btn {
  height: 38px;
  background: transparent;
  border-color: rgba(127, 233, 200, 0.28);
  color: #bdfbe9;
  box-shadow: none;
}

.reset-confirm-fields {
  display: grid;
  gap: 12px;
}

.auth-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #a9bedb;
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-status.error {
  color: #ff9f9f;
}

.auth-status.success {
  color: #7fe9c8;
}

.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -18px 0 18px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(116, 152, 207, 0.28);
  background: rgba(6, 15, 28, 0.5);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #7fe9c8, #2a8bff);
  color: #04101d;
  font-weight: 800;
}

.user-label {
  min-width: 0;
  color: #cfe4ff;
  font-size: 0.82rem;
  word-break: break-word;
}

.logout-btn {
  width: auto;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(160deg, #13243d, #0d1b31);
  color: #cfe3ff;
  box-shadow: none;
}

.customer-order-summary {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(127, 233, 200, 0.34);
  background: rgba(8, 44, 40, 0.42);
}

.customer-order-summary span {
  color: #8fe7d1;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.customer-order-summary strong {
  color: #eafff7;
  font-size: 0.92rem;
  word-break: break-all;
}

.language-picker {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(116, 152, 207, 0.32);
  background: rgba(9, 19, 35, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(2, 7, 14, 0.28);
}

.language-picker label {
  color: #bcd5f7;
  font-size: 0.76rem;
  font-weight: 650;
}

.language-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.language-menu-shell {
  position: relative;
}

.language-menu-button {
  min-width: 128px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(143, 210, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(18, 39, 68, 0.94), rgba(8, 20, 38, 0.96)),
    radial-gradient(circle at 18% 0, rgba(17, 197, 255, 0.08), transparent 56%);
  color: #e7f0ff;
  font: inherit;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(218, 241, 255, 0.08),
    0 6px 14px rgba(0, 7, 20, 0.22);
}

.language-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: #8fdcff;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.language-menu-shell.open .language-chevron {
  transform: translateY(2px) rotate(225deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 130;
  width: 188px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(83, 190, 255, 0.24);
  background:
    radial-gradient(circle at 100% 0, rgba(17, 197, 255, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(13, 29, 52, 0.98), rgba(5, 13, 26, 0.98));
  box-shadow:
    0 16px 34px rgba(0, 7, 19, 0.46),
    inset 0 1px 0 rgba(230, 247, 255, 0.07);
  backdrop-filter: blur(12px);
  animation: menuIn 130ms ease-out;
}

.language-menu button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #cfe5ff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.language-menu button:hover,
.language-menu button:focus-visible {
  background: rgba(17, 197, 255, 0.08);
  color: #f0fbff;
  outline: none;
}

.language-menu button.active {
  background:
    linear-gradient(135deg, rgba(42, 139, 255, 0.16), rgba(17, 197, 255, 0.1));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(143, 220, 255, 0.14);
}

.language-menu button.active::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7fe9c8;
  box-shadow: 0 0 0 3px rgba(127, 233, 200, 0.08);
}

.help-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(116, 152, 207, 0.5);
  background: linear-gradient(135deg, #153157, #0f2443);
  color: #d8e9ff;
  font-size: 0.83rem;
  cursor: pointer;
}

.help-fab::before {
  content: "↘";
  position: absolute;
  left: -22px;
  top: -10px;
  color: #9bd2ff;
  font-size: 1.1rem;
  animation: helpArrow 1s ease-in-out infinite;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vh, 30px) clamp(12px, 3vw, 24px) clamp(16px, 3vh, 24px);
  position: relative;
}

.panel {
  width: min(640px, 100%);
  max-width: calc(100vw - 24px);
  min-width: 0;
  padding: 42px 30px 30px;
  border-radius: 22px;
  background: linear-gradient(165deg, #101a2b, #0e1828 60%, #0b1523);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(2, 7, 14, 0.75);
  animation: panelIn 520ms cubic-bezier(.2,.8,.2,1);
}

.form,
.guide,
.attempts-panel,
.process-panel,
.status,
.result-card {
  min-width: 0;
  max-width: 100%;
}

input,
select,
button {
  max-width: 100%;
}

.hero {
  margin-bottom: 18px;
  text-align: center;
}

.hero-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #1551ac, #0b2f70);
  border: 1px solid #3b84e9;
  margin-bottom: 10px;
}

.hero-icon-floating {
  width: 90px;
  height: 90px;
  border-radius: 26px;
  margin: 0 auto -32px;
  z-index: 2;
  box-shadow: 0 18px 38px rgba(3, 44, 76, 0.45);
  animation: iconFloat 3.4s ease-in-out infinite;
}

.hero-icon svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: #d6e8ff;
  stroke-width: 1.8;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.hero p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero,
.form,
.guide {
  opacity: 0;
  transform: translateY(10px);
  animation: riseIn 540ms cubic-bezier(.2,.8,.2,1) forwards;
}

.hero { animation-delay: 110ms; }
.form { animation-delay: 190ms; }
.guide { animation-delay: 270ms; }

.guide {
  margin-top: 16px;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 35, 58, 0.95), rgba(12, 23, 38, 0.98)),
    radial-gradient(circle at 85% 10%, rgba(42, 139, 255, 0.18), transparent 48%);
  border: 1px solid rgba(102, 137, 192, 0.36);
  box-shadow: inset 0 1px 0 rgba(178, 210, 255, 0.08), 0 12px 28px rgba(2, 9, 19, 0.42);
}

.view-tabs {
  margin: 6px 0 14px;
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(94, 129, 184, 0.38);
  background: linear-gradient(165deg, rgba(12, 23, 40, 0.9), rgba(8, 17, 30, 0.92));
}

.view-tab {
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(90, 126, 182, 0.34) !important;
  background: linear-gradient(160deg, rgba(15, 29, 49, 0.88), rgba(10, 20, 35, 0.92)) !important;
  color: #c7dcfb !important;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: none !important;
}

.view-tab::after {
  display: none !important;
}

.view-tab.active {
  border-color: rgba(58, 161, 255, 0.68) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2a8bff, #1462d9 70%, #11c5ff) !important;
  box-shadow: 0 10px 20px rgba(5, 58, 112, 0.35) !important;
}

.logs-card {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(104, 145, 206, 0.34);
  background:
    radial-gradient(circle at 92% -5%, rgba(17, 197, 255, 0.2), transparent 40%),
    linear-gradient(165deg, rgba(12, 24, 42, 0.94), rgba(8, 17, 31, 0.96));
  box-shadow: inset 0 1px 0 rgba(185, 216, 255, 0.08), 0 14px 30px rgba(2, 8, 18, 0.48);
}

.logs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.logs-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  color: #d2e6ff;
}

.logs-status {
  margin: 0 0 10px;
  min-height: 18px;
  font-size: 0.82rem;
  color: #97b0d5;
}

.logs-status.error {
  color: #ff9f9f;
}

.logs-table-wrap {
  border-radius: 12px;
  overflow: auto;
  border: 1px solid rgba(92, 127, 181, 0.32);
}

.logs-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.79rem;
}

.logs-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 10px 10px;
  color: #cbe0ff;
  background: linear-gradient(180deg, #13243c, #0d1b30);
  border-bottom: 1px solid rgba(95, 132, 191, 0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.logs-table tbody td {
  padding: 9px 10px;
  color: #d3e6ff;
  border-bottom: 1px solid rgba(74, 105, 151, 0.28);
  vertical-align: top;
}

.logs-table tbody tr:nth-child(odd) td {
  background: rgba(10, 20, 36, 0.74);
}

.logs-table tbody tr:nth-child(even) td {
  background: rgba(12, 24, 41, 0.68);
}

.logs-table tbody tr:hover td {
  background: rgba(20, 40, 66, 0.8);
}

.log-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  text-transform: uppercase;
}

.log-status-pill.success {
  color: #caffe9;
  background: rgba(30, 110, 86, 0.82);
  border-color: rgba(108, 236, 184, 0.52);
}

.log-status-pill.failed {
  color: #ffd4d4;
  background: rgba(111, 37, 45, 0.84);
  border-color: rgba(255, 130, 146, 0.52);
}

.log-status-pill.blocked {
  color: #ffe9ba;
  background: rgba(96, 72, 25, 0.84);
  border-color: rgba(255, 209, 114, 0.52);
}

.log-order-id {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  color: #9fc4f8;
}

.guide-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.guide-sub {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

.examples p {
  margin: 0 0 6px;
  font-size: 0.86rem;
}

.bad {
  color: #ff8e8e;
}

.good {
  color: #7fe9c8;
}

.steps {
  margin: 10px 0 0;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(14, 26, 42, 0.92), rgba(8, 16, 29, 0.96)),
    radial-gradient(circle at 105% -20%, rgba(17, 197, 255, 0.22), transparent 40%);
  border: 1px solid rgba(110, 150, 210, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(176, 210, 255, 0.09),
    0 10px 24px rgba(1, 8, 17, 0.42);
  font-size: 0.84rem;
  color: #b8cdea;
}

.steps li {
  margin: 0;
}

.manual-steps {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 8px;
}

.manual-steps li {
  position: relative;
  padding: 9px 10px 9px 14px;
  border-radius: 10px;
  background: rgba(10, 20, 35, 0.62);
  border: 1px solid rgba(96, 132, 186, 0.28);
  color: #c9dcf7;
  line-height: 1.35;
}

.manual-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a8bff, #11c5ff);
  opacity: 0.95;
}

.manual-steps li:first-child {
  border-color: rgba(127, 232, 201, 0.38);
  background:
    linear-gradient(180deg, rgba(12, 34, 40, 0.88), rgba(8, 22, 28, 0.9));
  color: #d5fff2;
}

.manual-steps li:first-child::before {
  background: linear-gradient(180deg, #53f0bd, #1fcf9b);
}

.wait-warning {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 207, 116, 0.55);
  background: rgba(255, 207, 116, 0.12);
  color: #ffe9b0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.wait-warning strong {
  color: #fff3c9;
}

.provided-email-warning {
  position: relative;
  margin: 12px 0 14px;
  padding: 14px 15px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255, 207, 89, 0.64);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 207, 89, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(65, 48, 8, 0.9), rgba(35, 28, 10, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 210, 0.12),
    0 14px 30px rgba(8, 7, 3, 0.34);
  color: #fff0b8;
}

.provided-email-warning::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4d5f, #ffb020);
  box-shadow: 0 0 18px rgba(255, 77, 95, 0.35);
}

.provided-email-warning-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.provided-email-warning-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 94, 112, 0.62);
  background: rgba(255, 63, 86, 0.16);
  color: #ff9aa7;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.provided-email-warning strong {
  color: #fff8dd;
  font-size: 0.92rem;
}

.provided-email-warning p {
  margin: 0;
  color: #ffe9a3;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.5;
}

.step-zero-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 210, 255, 0.35);
  background: rgba(14, 34, 58, 0.7);
  color: #cbe3ff;
  font-size: 0.84rem;
}

.form {
  display: grid;
  gap: 14px;
}

input,
button {
  border-radius: 14px;
  border: 1px solid var(--border);
  font-family: inherit;
}

input {
  height: 50px;
  font-size: 0.97rem;
  padding: 0 14px;
  background: #0a1423;
  color: #e8f2ff;
  border: 1px solid rgba(116, 152, 207, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

input::placeholder {
  color: #8ca2c0;
}

input:focus {
  outline: none;
  border-color: rgba(49, 142, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(42, 139, 255, 0.2);
  transform: translateY(-1px);
}

.form input:nth-child(1) {
  animation: riseIn 480ms cubic-bezier(.2,.8,.2,1) 220ms both;
}

.form input:nth-child(2) {
  animation: riseIn 480ms cubic-bezier(.2,.8,.2,1) 280ms both;
}

button {
  height: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 65%, var(--accent-3));
  color: #fff;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 220ms ease, filter 220ms ease;
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 28px rgba(2, 54, 95, 0.38);
  filter: saturate(1.1);
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.35), transparent 80%);
  transform: translateX(-130%);
  transition: transform 460ms ease;
}

button:hover::after {
  transform: translateX(130%);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.success-pulse {
  animation: successPulse 520ms ease;
}

.status {
  margin: 16px 2px 0;
  min-height: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.status.error {
  color: var(--error);
}

.status.success {
  color: #8fd2ff;
}

.form-alert {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 114, 114, 0.45);
  background: rgba(71, 19, 24, 0.65);
  color: #ffc3c3;
  font-size: 0.86rem;
  line-height: 1.4;
  animation: riseIn 220ms ease;
}

.attempts-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(127, 233, 200, 0.45);
  background:
    radial-gradient(circle at 85% 10%, rgba(144, 255, 219, 0.26), transparent 42%),
    linear-gradient(160deg, rgba(9, 64, 49, 0.78), rgba(8, 46, 36, 0.84));
  color: #c9ffef;
  font-size: 0.86rem;
  line-height: 1.4;
  box-shadow:
    inset 0 1px 0 rgba(205, 255, 236, 0.18),
    0 10px 24px rgba(6, 38, 30, 0.45);
  position: relative;
  overflow: hidden;
  animation: attemptsIn 360ms cubic-bezier(.2,.8,.2,1);
}

.attempts-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(220, 255, 242, 0.32), transparent 80%);
  transform: translateX(-130%);
  animation: attemptsShine 1.2s ease;
}

.attempts-box.bump {
  animation: attemptsBump 420ms ease;
}

.attempts-count {
  display: inline-block;
  margin-left: 6px;
  font-weight: 700;
  color: #eafff7;
  text-shadow: 0 0 12px rgba(170, 255, 226, 0.42);
}

.url-actions {
  margin-top: 8px;
}

.ghost-btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(116, 152, 207, 0.42);
  background: linear-gradient(160deg, #13243d, #0d1b31);
  color: #cfe3ff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(2, 9, 19, 0.42);
}

.url-box {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(165deg, #0e1a2d, #0a1526);
  border: 1px solid rgba(116, 152, 207, 0.32);
  animation: riseIn 300ms ease;
}

.url-box-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #8ca2c0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.url-box a {
  color: #8fd2ff;
  text-decoration: none;
  word-break: break-all;
}

.url-box a:hover {
  text-decoration: underline;
}

.url-tools {
  margin-top: 10px;
}

.video-guide-card {
  position: relative;
  margin: 22px auto 0;
  padding: 22px;
  width: min(760px, 100%);
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(143, 210, 255, 0.28);
  background:
    radial-gradient(circle at 12% 0, rgba(110, 231, 183, 0.16), transparent 36%),
    radial-gradient(circle at 100% 10%, rgba(96, 165, 250, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(13, 31, 50, 0.82), rgba(5, 14, 28, 0.9));
  box-shadow:
    0 22px 54px rgba(0, 6, 16, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: panelIn 520ms cubic-bezier(.2,.8,.2,1);
}

.video-guide-card::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 255, 224, 0.5), rgba(143, 210, 255, 0.4), transparent);
}

.video-guide-copy {
  margin-bottom: 15px;
}

.video-guide-kicker {
  margin: 0 0 7px;
  color: #90f2d1;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.video-guide-card h2 {
  margin: 0;
  color: #f4fbff;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  line-height: 1.16;
}

.video-guide-card p:not(.video-guide-kicker) {
  max-width: 620px;
  margin: 8px 0 0;
  color: #cde3ff;
  font-size: 0.96rem;
  line-height: 1.55;
}

.video-guide-frame-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(143, 210, 255, 0.24);
  background: rgba(2, 10, 22, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 9;
}

.video-guide-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-guide-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 14px;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 8, 16, 0.76);
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  width: min(460px, 100%);
  padding: 18px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(143, 210, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(15, 29, 47, 0.96), rgba(10, 20, 35, 0.98)),
    radial-gradient(circle at 100% 0, rgba(17, 197, 255, 0.2), transparent 45%);
  box-shadow: 0 20px 44px rgba(2, 7, 14, 0.62);
}

.modal-card h3 {
  margin: 0 0 8px;
  color: #d8ecff;
  font-size: 1rem;
}

.modal-card p {
  margin: 0;
  color: #bdd8fb;
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal-card .ghost-btn {
  margin-top: 14px;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(166, 205, 255, 0.28);
  border-radius: 12px;
  background: rgba(5, 13, 25, 0.62);
  color: #cfe4ff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.url-reveal-card {
  position: relative;
  width: min(640px, 100%);
  padding: 30px;
  overflow: hidden;
  border-radius: 26px;
  border-color: rgba(105, 231, 190, 0.5);
  background:
    radial-gradient(circle at 12% 0, rgba(110, 231, 183, 0.22), transparent 36%),
    radial-gradient(circle at 100% 10%, rgba(96, 165, 250, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(13, 31, 50, 0.98), rgba(5, 14, 28, 0.99));
  box-shadow:
    0 30px 80px rgba(0, 6, 16, 0.74),
    0 0 0 1px rgba(111, 231, 203, 0.08) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  animation: riseIn 260ms ease;
}

.url-reveal-card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 255, 224, 0.62), rgba(143, 210, 255, 0.44), transparent);
}

.url-reveal-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 22px;
  border: 1px solid rgba(110, 231, 183, 0.54);
  background: linear-gradient(145deg, rgba(31, 115, 90, 0.52), rgba(12, 44, 62, 0.72));
  box-shadow: 0 18px 36px rgba(12, 186, 134, 0.16);
}

.url-reveal-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #a7ffe1;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.url-reveal-card h3 {
  margin: 0 0 10px;
  color: #f4fbff;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.12;
}

.url-reveal-card p:not(.wait-modal-kicker) {
  max-width: 460px;
  margin: 0 auto;
  color: #cce4ff;
  font-size: 1rem;
}

.url-reveal-value-wrap {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid rgba(143, 210, 255, 0.34);
  border-radius: 18px;
  background: rgba(2, 10, 22, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.url-reveal-value-wrap a {
  display: block;
  color: #9be7ff;
  text-decoration: none;
  word-break: break-all;
  font-size: 0.92rem;
  line-height: 1.45;
}

.url-reveal-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.url-copy-primary {
  min-width: 190px;
  border-color: rgba(110, 231, 183, 0.62);
  background: linear-gradient(135deg, #76ffd2, #55c7ff);
  color: #041524;
  box-shadow: 0 16px 34px rgba(69, 211, 188, 0.22);
}

.url-copy-primary:hover {
  box-shadow: 0 18px 38px rgba(69, 211, 188, 0.32);
}

.wait-modal-card {
  position: relative;
  width: min(620px, 100%);
  min-height: 360px;
  padding: 30px 30px 26px;
  overflow: hidden;
  border-radius: 24px;
  border-color: rgba(83, 190, 255, 0.62);
  background:
    radial-gradient(circle at 12% 0, rgba(42, 139, 255, 0.26), transparent 34%),
    radial-gradient(circle at 105% 12%, rgba(17, 197, 255, 0.26), transparent 34%),
    linear-gradient(180deg, rgba(16, 31, 52, 0.98), rgba(7, 16, 30, 0.99));
  box-shadow:
    0 26px 70px rgba(1, 7, 16, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.wait-modal-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% -20%;
  height: 210px;
  background: linear-gradient(90deg, rgba(42, 139, 255, 0), rgba(42, 139, 255, 0.18), rgba(17, 197, 255, 0));
  transform: rotate(-4deg);
  pointer-events: none;
}

.wait-modal-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  border-radius: 24px;
  border: 1px solid rgba(83, 190, 255, 0.62);
  background: rgba(17, 197, 255, 0.12);
  box-shadow: 0 18px 38px rgba(17, 197, 255, 0.16);
}

.wait-modal-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: #8fdcff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wait-modal-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: #8fdcff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wait-modal-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 auto 14px;
  max-width: 520px;
  color: #f1f8ff;
  font-size: 1.72rem;
  line-height: 1.12;
}

.wait-modal-card p:not(.wait-modal-kicker) {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
  color: #cfe4ff;
  font-size: 1rem;
  line-height: 1.55;
}

.wait-modal-email-alert {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 16px auto 0;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 91, 111, 0.62);
  background:
    radial-gradient(circle at 0 0, rgba(255, 91, 111, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(79, 20, 34, 0.82), rgba(38, 13, 24, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 216, 0.12),
    0 12px 26px rgba(46, 5, 15, 0.34);
  text-align: left;
}

.wait-modal-email-alert strong {
  display: block;
  margin-bottom: 5px;
  color: #ffd7dd;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wait-modal-email-alert p {
  margin: 0;
  color: #ffe5e9;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.wait-modal-points {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 440px;
  margin: 20px auto 8px;
  text-align: left;
}

.wait-modal-points span {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 210, 255, 0.22);
  background: rgba(5, 13, 25, 0.44);
  color: #d9ebff;
  font-size: 0.9rem;
  font-weight: 650;
}

.wait-modal-points span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 999px;
  background: #7fe9c8;
  box-shadow: 0 0 0 4px rgba(127, 233, 200, 0.12);
}

.wait-modal-card .ghost-btn {
  position: relative;
  z-index: 1;
  min-width: 190px;
  margin-top: 18px;
}

.inventory-picker-card {
  max-width: 560px;
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 28px 80px rgba(14, 165, 233, 0.26), inset 0 0 0 1px rgba(103, 232, 249, 0.18);
}

.inventory-picker-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
}

.inventory-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  color: #e0f2fe;
  font-weight: 700;
  cursor: pointer;
}

.inventory-choice:hover {
  border-color: rgba(34, 211, 238, 0.62);
  background: rgba(8, 47, 73, 0.58);
}

.inventory-choice input {
  width: 18px;
  height: 18px;
  accent-color: #22d3ee;
}

.tour-spotlight {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(4, 8, 16, 0.78);
  border: 2px solid rgba(143, 210, 255, 0.9);
  pointer-events: none;
  transition: all 220ms ease;
}

.tour-card {
  position: fixed;
  right: 20px;
  top: 20px;
  width: min(360px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(165deg, #101f35, #0b1727);
  border: 1px solid rgba(116, 152, 207, 0.38);
  pointer-events: auto;
}

.tour-card.mobile {
  left: 12px;
  right: 12px;
  width: auto;
}

.tour-step-title {
  margin: 0 0 6px;
  font-weight: 600;
}

.tour-step-text {
  margin: 0;
  color: #a8bfde;
  font-size: 0.86rem;
  line-height: 1.4;
}

.tour-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tour-actions .ghost-btn {
  height: 36px;
  font-size: 0.8rem;
}

.process-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% -10%, rgba(17, 197, 255, 0.18), transparent 40%),
    linear-gradient(160deg, #111f35, #0b1627 58%, #081221);
  border: 1px solid rgba(116, 152, 207, 0.34);
  box-shadow: inset 0 1px 0 rgba(178, 210, 255, 0.12), 0 14px 32px rgba(2, 9, 19, 0.52);
  animation: riseIn 360ms ease;
}

.process-top {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.timer {
  margin: 0;
  font-weight: 600;
  color: #b9d3f9;
}

.keep-open {
  margin: 0;
  color: #93a8c6;
  font-size: 0.84rem;
}

.process-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(34, 61, 98, 0.55);
  border: 1px solid rgba(93, 128, 179, 0.28);
  overflow: hidden;
  margin-bottom: 10px;
}

.process-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2a8bff, #11c5ff);
  transition: width 320ms linear;
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.process-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(7, 14, 26, 0.62);
  border: 1px solid rgba(93, 128, 179, 0.3);
  font-size: 0.84rem;
  transition: border-color 180ms ease, transform 180ms ease;
}

.process-list em {
  font-style: normal;
  color: #9ab3d7;
}

.step-scanning em {
  color: #8fd2ff;
  animation: flickerSoft 1s ease-in-out infinite;
}

.step-scanning {
  border-color: rgba(143, 210, 255, 0.52) !important;
  transform: translateX(2px);
}

.step-done em {
  color: #7fe9c8;
}

.step-not-found em {
  color: #ffcf7a;
}

.step-failed em {
  color: #ff8e8e;
}

.process-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #a9bedb;
  line-height: 1.4;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flickerSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.58; }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes successPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(17, 197, 255, 0.35); }
  45% { transform: scale(1.015); box-shadow: 0 0 0 10px rgba(17, 197, 255, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(17, 197, 255, 0); }
}

@keyframes attemptsIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes attemptsShine {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

@keyframes attemptsBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes helpArrow {
  0%, 100% { transform: translate(0, 0); opacity: 1; }
  50% { transform: translate(4px, 4px); opacity: 0.55; }
}

@media (max-width: 560px) {
  .shell {
    align-items: start;
    padding-top: 72px;
  }

  .panel {
    width: 100%;
    max-width: 100%;
    padding: 38px 22px 22px;
    border-radius: 18px;
  }

  .hero-icon-floating {
    width: 78px;
    height: 78px;
    margin-bottom: -28px;
  }

  .help-fab {
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
    font-size: 0.78rem;
  }

  .language-picker {
    top: 10px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .language-picker label {
    display: none;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .language-menu-button {
    min-width: 112px;
  }
}

@media (max-height: 760px) and (min-width: 700px) {
  .shell {
    align-items: start;
  }

  .panel {
    margin-block: 12px;
  }
}

/* Public URL page layout repairs. Keep these late so they win over older rules. */
.help-fab::before {
  content: "";
  left: -15px;
  top: -8px;
  width: 10px;
  height: 10px;
  border-left: 2px solid #9bd2ff;
  border-bottom: 2px solid #9bd2ff;
  color: transparent;
  font-size: 0;
  transform: rotate(-18deg);
}

@media (max-width: 560px) {
  .shell {
    padding-top: 86px;
    padding-bottom: 82px;
  }

  .help-fab {
    height: auto;
    min-height: 42px;
    white-space: normal;
    line-height: 1.25;
  }

  .language-picker {
    left: 10px;
    justify-content: flex-end;
    max-width: none;
  }

  .language-menu {
    right: 0;
    width: min(188px, calc(100vw - 20px));
  }

  .video-guide-card {
    width: 100%;
    padding: 18px;
    border-radius: 20px;
  }
}

body.auth-locked {
  overflow: hidden !important;
}

body.auth-locked .shell,
body.auth-locked .help-fab,
body.auth-locked .video-guide-card {
  display: none !important;
}

body:not(.auth-locked) #auth-gate {
  display: none !important;
}

#auth-gate.auth-gate {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  display: grid !important;
  place-items: center !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  padding: 24px !important;
  overflow: auto !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 180, 216, 0.26), transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(120, 210, 255, 0.24), transparent 42%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3)) !important;
}

#auth-gate.hidden {
  display: none !important;
}

#auth-gate .auth-card {
  width: min(520px, calc(100vw - 32px)) !important;
  margin: auto !important;
  padding: 30px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(143, 210, 255, 0.36) !important;
  background:
    radial-gradient(circle at 12% 0, rgba(127, 233, 200, 0.16), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(42, 139, 255, 0.22), transparent 38%),
    linear-gradient(165deg, rgba(16, 30, 50, 0.98), rgba(7, 15, 28, 0.99)) !important;
  box-shadow:
    0 30px 80px rgba(1, 7, 16, 0.72),
    inset 0 1px 0 rgba(230, 247, 255, 0.08) !important;
}

#auth-gate .auth-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
}

#auth-gate .auth-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  width: 100% !important;
}

#auth-gate .auth-form.hidden {
  display: none !important;
}

#auth-gate input,
#auth-gate button {
  width: 100% !important;
}

@media (max-width: 560px) {
  #auth-gate.auth-gate {
    align-items: start !important;
    padding: 18px !important;
  }

  #auth-gate .auth-card {
    padding: 24px 18px !important;
    border-radius: 20px !important;
  }
}
