:root {
  color-scheme: light;
  --blue: #2f6df3;
  --blue-strong: #2358d7;
  --ink: #111827;
  --muted: #667085;
  --line: #d8e2f2;
  --soft: #f5f8fd;
  --white: #ffffff;
  --green: #07966f;
  --red: #dc2626;
  --shadow: 0 24px 70px rgba(22, 42, 87, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 18%, rgba(47, 109, 243, 0.16), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, #edf3fd 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--blue);
  background: linear-gradient(180deg, #3d7af6, #2d60df);
  color: #ffffff;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.ghost {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.portal-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.brand-panel,
.access-panel,
.app-panel,
.request-card,
.orders-section,
.summary-grid article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-panel {
  min-height: 620px;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo {
  width: min(360px, 88%);
  height: auto;
  margin-bottom: 52px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.08;
}

.lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.55;
}

.service-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.service-strip span,
.channel-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2456c8;
  font-weight: 800;
  font-size: 0.82rem;
}

.access-panel {
  padding: 24px;
  margin-top: 118px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  background: #eaf2ff;
  border: 1px solid #cfe0fb;
  border-radius: 8px;
  margin-bottom: 20px;
}

.tab {
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: #52637d;
  box-shadow: none;
}

.tab.active {
  background: #ffffff;
  color: var(--blue);
  border-color: #b9d0fa;
}

.auth-form,
.hidden {
  display: none;
}

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

.text-link {
  min-height: 38px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.text-link:hover {
  text-decoration: underline;
}

.field-hint,
.form-title span {
  display: block;
  margin-top: -8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.field-hint[data-type="success"] {
  color: var(--green);
}

.field-hint[data-type="warn"] {
  color: #9a6800;
}

.form-title {
  display: grid;
  gap: 4px;
}

.form-title strong {
  color: var(--ink);
  font-size: 1rem;
}

label {
  display: grid;
  gap: 8px;
  color: #27364a;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  min-height: 48px;
  padding: 12px 14px;
  outline: none;
  font-weight: 700;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: #52637d;
  box-shadow: none;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: #b9d0fa;
  background: #eef5ff;
  color: var(--blue);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 109, 243, 0.12);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-off,
.password-toggle[data-visible="true"] .eye-on {
  display: none;
}

.password-toggle[data-visible="true"] .eye-off {
  display: block;
}

textarea {
  min-height: 96px;
  resize: vertical;
  font-weight: 650;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 109, 243, 0.12);
}

.message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.message[data-type="success"] {
  color: var(--green);
}

.message[data-type="error"] {
  color: var(--red);
}

.turnstile-box {
  display: none;
}

.turnstile-box.active {
  display: block;
}

.app-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
  padding: 24px;
}

.app-panel.hidden {
  display: none;
}

.app-header,
.section-head,
.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.summary-grid article {
  padding: 20px;
  box-shadow: none;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 10px;
}

.summary-grid strong {
  font-size: 1.6rem;
}

.request-card,
.orders-section {
  padding: 20px;
  box-shadow: none;
}

.verification-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #f6c76d;
  border-radius: 8px;
  background: #fff8ea;
}

.verification-card.hidden {
  display: none;
}

.verification-card p {
  margin: 8px 0 0;
  color: #805c18;
  font-weight: 750;
}

.order-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
  align-items: end;
}

.wide {
  grid-column: span 2;
}

.quote-box {
  min-height: 112px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quote-box span,
.quote-box small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.quote-box strong {
  display: block;
  margin: 4px 0;
  font-size: 1.6rem;
}

.orders-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
}

.live-status[data-type="success"] {
  border-color: #b7ead6;
  color: #0f9f6e;
  background: #edfbf5;
}

.live-status[data-type="warn"] {
  border-color: #f6d58b;
  color: #9a6800;
  background: #fff8ea;
}

.live-status[data-type="error"] {
  border-color: #fac2c9;
  color: #dc3f49;
  background: #fff1f3;
}

.order-card {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
}

.order-top strong {
  display: block;
  font-size: 1.05rem;
}

.order-service,
.order-meta,
.payment-block,
.item-list {
  color: var(--muted);
  font-weight: 750;
}

.order-meta,
.payment-block,
.item-list {
  margin-top: 12px;
  line-height: 1.45;
}

.payment-block {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.item-row {
  padding: 8px 0;
  border-bottom: 1px solid #edf2fb;
}

.item-row:last-child {
  border-bottom: 0;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
}

@media (max-width: 920px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    padding: 32px;
  }

  .access-panel {
    margin-top: 0;
  }

  .order-form,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: span 1;
  }
}
