:root {
  color: #142237;
  background: #eef5fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 99, 182, 0.12), transparent 42%),
    linear-gradient(225deg, rgba(22, 128, 122, 0.1), transparent 38%),
    #eef5fb;
}

button,
input {
  font: inherit;
}

.auth-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid #d4e2ee;
  background: rgba(255, 255, 255, 0.88);
}

.brand,
.back-link {
  color: #142237;
  text-decoration: none;
  font-weight: 850;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f63b6, #16807a);
  color: #fff;
  font-weight: 900;
}

.back-link {
  color: #0f63b6;
  font-size: 14px;
}

.auth-layout {
  width: min(1160px, calc(100% - 36px));
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
  padding: 44px 0;
}

.auth-intro h1 {
  max-width: 650px;
  margin: 10px 0 18px;
  color: #10233d;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-intro > p:not(.eyebrow) {
  max-width: 610px;
  color: #51667e;
  font-size: 19px;
  line-height: 1.55;
}

.eyebrow {
  margin: 0;
  color: #0f63b6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trust-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.trust-list span {
  border-left: 3px solid #16807a;
  padding: 3px 0 3px 14px;
  color: #536981;
}

.trust-list strong {
  color: #17324f;
}

.auth-panel {
  border: 1px solid #cbddea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: 0 24px 70px rgba(28, 62, 96, 0.15);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 26px;
  border: 1px solid #d3e1ec;
  border-radius: 8px;
  background: #edf4fa;
  padding: 4px;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #536981;
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs button.active {
  background: #fff;
  color: #0f63b6;
  box-shadow: 0 2px 8px rgba(23, 50, 79, 0.1);
}

.form-heading h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 0;
}

.form-heading p,
.pilot-note {
  color: #61758b;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: #263c55;
  font-weight: 750;
}

input {
  width: 100%;
  border: 1px solid #c7d7e8;
  border-radius: 8px;
  background: #fbfdff;
  color: #142237;
  padding: 13px;
  outline: none;
}

input:focus {
  border-color: #0f63b6;
  box-shadow: 0 0 0 3px rgba(15, 99, 182, 0.14);
}

.primary-button,
.text-button {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.primary-button {
  border: 1px solid #0f63b6;
  background: #0f63b6;
  color: #fff;
}

.text-button {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #0f63b6;
}

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

.setup-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  border: 1px solid #e5c782;
  border-radius: 8px;
  background: #fff9e9;
  padding: 13px;
  color: #76550c;
}

.setup-notice span,
.pilot-note {
  font-size: 13px;
}

.form-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: #526980;
  line-height: 1.45;
}

.form-status[data-type="success"] {
  color: #126f55;
}

.form-status[data-type="error"] {
  color: #a12e3c;
}

.pilot-note {
  margin: 20px 0 0;
  border-top: 1px solid #e1eaf2;
  padding-top: 16px;
}

.workspace-loader {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.workspace-loader h1 {
  margin: 18px 0 4px;
  letter-spacing: 0;
}

.workspace-loader p {
  color: #5d7187;
}

.workspace-loader a {
  color: #0f63b6;
}

@media (max-width: 850px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .auth-intro h1 {
    font-size: clamp(36px, 11vw, 56px);
  }

  .trust-list {
    display: none;
  }
}

@media (max-width: 540px) {
  .auth-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .back-link {
    display: none;
  }

  .auth-layout {
    width: min(100% - 24px, 500px);
    min-height: auto;
    padding: 28px 0;
  }

  .auth-panel {
    padding: 20px;
  }
}
