/* ==========================================================================
   WPT Studio — Auth pages (Sign in / Sign up / Forgot password)
   Design language: "press & paper" — deep ink panel with a halftone dot
   texture (a nod to print production) next to a clean paper-white form card.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink-900: #101c33;
  --ink-800: #16233f;
  --ink-700: #1f325a;
  --ink-line: rgba(255, 255, 255, 0.14);
  --press-cyan: #12b3c9;
  --press-cyan-dark: #0a8a9c;
  --press-amber: #f5b942;
  --press-amber-dark: #c98a1d;
  --press-violet: #8b6cf2;
  --press-violet-dark: #5f3fd6;
  --press-rose: #ef5f9e;
  --press-rose-dark: #c93c7c;
  --press-green: #3fb87f;
  --press-green-dark: #1f9463;
  --press-blue: #4d8ef2;
  --press-blue-dark: #2a63d6;
  --paper: #faf9f6;
  --paper-dim: #f1efe8;
  --paper-line: #e4e0d4;
  --ink-text: #16233f;
  --text-muted: #6b7280;
  --success: #1a9c56;
  --success-bg: #e8f6ee;
  --error: #d3402f;
  --error-bg: #fdecea;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 24px 60px -24px rgba(16, 28, 51, 0.35);
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink-text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
}

a {
  color: var(--press-cyan-dark);
}

/* ------------------------------------------------------------------------
   Toast message box
   ------------------------------------------------------------------------ */

.message-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 1000;
  min-width: 280px;
  max-width: 520px;
  padding: 14px 44px 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  background: var(--ink-900);
  color: #fff;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.message-box:empty {
  display: none;
}

.message-box.visible,
.message-box.show,
.message-box:not(:empty) {
  transform: translate(-50%, 0);
  opacity: 1;
}

.message-box.success {
  background: var(--success);
}

.message-box.error {
  background: var(--error);
}

.close-message-btn {
  position: fixed;
  top: 20px;
  right: calc(50% - 250px);
  z-index: 1001;
  display: none;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.message-box:not(:empty) ~ .close-message-btn {
  display: block;
}

/* ------------------------------------------------------------------------
   Page shell
   ------------------------------------------------------------------------ */

.auth-page {
  display: grid;
  grid-template-columns: minmax(340px, 44%) 1fr;
  min-height: 100vh;
}

/* ------------------------------------------------------------------------
   Left brand panel
   ------------------------------------------------------------------------ */

.auth-brand {
  position: relative;
  overflow: hidden;
  min-height: min-content;
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.10) 1.6px, transparent 1.6px)
      0 0 / 26px 26px,
    linear-gradient(160deg, var(--ink-900) 0%, var(--ink-800) 55%, var(--ink-700) 100%);
}

.auth-brand::after {
  /* soft press-cyan glow, referencing an ink drum */
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 179, 201, 0.35), transparent 70%);
  pointer-events: none;
}

.brand-logo {
  height: auto;
  width: 24rem;
  margin-bottom: 40px;
}

.auth-brand h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 420px;
}

.brand-text {
  margin-top: 14px;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.brand-features {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

/* Green "included" check — every feature line is a promise, not a bullet */
.brand-features li i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 11px;
}

.brand-features li i::before {
  content: "\2713";
  font-style: normal;
}

.brand-illustration {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 36px;
}

/* ------------------------------------------------------------------------
   Illustration: workspace dashboard mock (sign in)
   ------------------------------------------------------------------------ */

.workspace-dashboard {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(6px);
}

/* Window chrome so this unmistakably reads as "a screenshot of the app",
   not a literal readout of WPT's own numbers. */
.workspace-dashboard::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5594f;
  box-shadow: 16px 0 0 #f0b429, 32px 0 0 #2fb35c;
}

.workspace-dashboard .dashboard-header {
  padding-top: 10px;
}

/* Sits on the card corner and says, plainly, "this is a sample" */
.preview-pill {
  position: absolute;
  top: -10px;
  right: 16px;
  z-index: 2;
  background: var(--press-amber);
  color: var(--ink-900);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 14px -6px rgba(245, 185, 66, 0.6);
}

.illustration-caption {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--ink-line);
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.dashboard-title i {
  color: var(--press-cyan);
}

.dashboard-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(26, 156, 86, 0.6);
  animation: statusPulse 2.4s ease-out infinite;
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 156, 86, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(26, 156, 86, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 156, 86, 0); }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-widget {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ink-line);
}

.dashboard-widget i {
  color: var(--press-cyan);
  font-size: 14px;
}

.dashboard-widget strong {
  font-size: 18px;
  font-family: var(--font-display);
  color: #fff;
}

.dashboard-widget small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
}

.dashboard-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-line);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.activity-item i {
  color: var(--press-cyan);
  font-size: 12px;
}

/* ------------------------------------------------------------------------
   Illustration: platform hub diagram (sign up)
   Mirrors a production hub — one hub, spokes out to every workflow.
   ------------------------------------------------------------------------ */

.platform-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.platform-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--press-cyan), var(--press-cyan-dark));
  box-shadow: 0 16px 30px -12px rgba(18, 179, 201, 0.55);
}

.platform-logo {
  font-size: 18px;
  color: #fff;
}

.platform-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.platform-subtitle {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
}

/* trunk line from hub down to the branch bar */
.platform-diagram::before {
  content: "";
  order: 1;
  width: 1px;
  height: 22px;
  background: var(--ink-line);
}

.platform-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
  padding-top: 22px;
  width: 100%;
}

/* horizontal branch bar across the first row of spokes */
.platform-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: var(--ink-line);
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ink-line);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

/* vertical stub connecting each card up to the branch bar */
.platform-card::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 1px;
  height: 22px;
  background: var(--ink-line);
}

.platform-card:nth-child(n + 4)::before {
  display: none;
}

.platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.5);
}

/* Each spoke of the hub gets its own color, so the diagram reads as six
   distinct workflows feeding one platform rather than six identical tiles. */
.plat-customers .platform-icon {
  background: linear-gradient(160deg, var(--press-cyan), var(--press-cyan-dark));
  box-shadow: 0 8px 16px -8px rgba(18, 179, 201, 0.6);
}
.plat-orders .platform-icon {
  background: linear-gradient(160deg, var(--press-amber), var(--press-amber-dark));
  box-shadow: 0 8px 16px -8px rgba(245, 185, 66, 0.55);
}
.plat-production .platform-icon {
  background: linear-gradient(160deg, var(--press-violet), var(--press-violet-dark));
  box-shadow: 0 8px 16px -8px rgba(139, 108, 242, 0.55);
}
.plat-delivery .platform-icon {
  background: linear-gradient(160deg, var(--press-green), var(--press-green-dark));
  box-shadow: 0 8px 16px -8px rgba(63, 184, 127, 0.55);
}
.plat-analytics .platform-icon {
  background: linear-gradient(160deg, var(--press-blue), var(--press-blue-dark));
  box-shadow: 0 8px 16px -8px rgba(77, 142, 242, 0.55);
}
.plat-security .platform-icon {
  background: linear-gradient(160deg, var(--press-rose), var(--press-rose-dark));
  box-shadow: 0 8px 16px -8px rgba(239, 95, 158, 0.55);
}

/* ------------------------------------------------------------------------
   Illustration: capability grid (sign in) — a simple 2x2 showcase, kept
   distinct from the hub diagram (sign up) and the dashboard mock
   (forgot password) so all three auth pages read differently.
   ------------------------------------------------------------------------ */

.capability-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 22px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 15px;
}

.capability-card {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ink-line);
  text-align: center;
}

.capability-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

/* Each capability gets its own color from the palette, so the row reads
   as a set of distinct steps rather than four identical tiles. */
.cap-customers .capability-icon {
  background: linear-gradient(160deg, var(--press-cyan), var(--press-cyan-dark));
  box-shadow: 0 10px 20px -10px rgba(18, 179, 201, 0.6);
}
.cap-printjobs .capability-icon {
  background: linear-gradient(160deg, var(--press-amber), var(--press-amber-dark));
  box-shadow: 0 10px 20px -10px rgba(245, 185, 66, 0.55);
}
.cap-deliveries .capability-icon {
  background: linear-gradient(160deg, var(--press-green), var(--press-green-dark));
  box-shadow: 0 10px 20px -10px rgba(63, 184, 127, 0.55);
}
.cap-production .capability-icon {
  background: linear-gradient(160deg, var(--press-violet), var(--press-violet-dark));
  box-shadow: 0 10px 20px -10px rgba(139, 108, 242, 0.55);
}

.capability-card span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.85);
}

/* ------------------------------------------------------------------------
   Right panel — the actual form
   ------------------------------------------------------------------------ */

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--paper);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.card {
  background: #fff;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-text);
}

.auth-card h2 span {
  color: var(--press-cyan-dark);
}

.step-subtitle {
  margin: 8px 0 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-step {
  display: none;
}

.auth-step.visible {
  display: block;
  animation: stepIn 0.35s ease both;
}

.auth-step.hidden {
  display: none;
}

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

/* ------------------------------------------------------------------------
   Form fields
   ------------------------------------------------------------------------ */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-text);
}

.form-group input {
  width: 100%;
  padding: 11px 40px 11px 13px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--ink-text);
  background: var(--paper-dim);
  border: 1.5px solid var(--paper-line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.form-group input:focus {
  border-color: var(--press-cyan);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(18, 179, 201, 0.15);
}

.form-group input.input-error {
  border-color: var(--error);
  background-color: var(--error-bg);
}

/* Green check for validated fields — no icon-font dependency, pure SVG */
.form-group input.input-valid {
  border-color: var(--success);
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a9c56' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 12 9 18 20 6'/></svg>");
}

.field-warning {
  margin: -8px 0 14px;
  font-size: 12.5px;
  color: var(--error);
}

.field-warning.hidden,
.hidden {
  display: none !important;
}

/* ------------------------------------------------------------------------
   Buttons + spinner
   ------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink-900);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--press-cyan-dark);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-submit {
  margin-top: 4px;
}

#loading-spinner,
#sign-spinner {
  display: block;
  margin: 12px auto 0;
  font-size: 18px;
  color: var(--press-cyan-dark);
}

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

.fa-spin {
  animation: wptSpin 0.8s linear infinite;
}

.auth-switch {
  margin-top: 20px;
  font-size: 13.5px;
  text-align: center;
  color: var(--text-muted);
}

.auth-switch a {
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-switch + .auth-switch {
  margin-top: 8px;
}

/* Forgot password link, sits under the password field */
.forgot-link {
  display: block;
  margin: -8px 0 18px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

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

/* Success panel used on the forgot-password page after the link is sent */
.fp-success {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  color: var(--success);
  font-size: 13.5px;
  line-height: 1.5;
}

.fp-success i {
  flex: none;
  font-size: 18px;
}

.fp-note {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}

/* Triage: "what did you forget?" options on the forgot-password page */
.issue-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.issue-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--paper-dim);
  border: 1.5px solid var(--paper-line);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
  font-family: var(--font-body);
}

.issue-option:hover {
  background: #fff;
}

.issue-option:active {
  transform: translateY(1px);
}

.issue-option i {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
}

/* Each recovery path gets its own color, so the three options read as
   distinct choices at a glance instead of three identical rows. */
.issue-option[data-mode="password"] i {
  background: rgba(139, 108, 242, 0.12);
  color: var(--press-violet-dark);
}
.issue-option[data-mode="password"]:hover {
  border-color: var(--press-violet);
}

.issue-option[data-mode="email"] i {
  background: rgba(77, 142, 242, 0.12);
  color: var(--press-blue-dark);
}
.issue-option[data-mode="email"]:hover {
  border-color: var(--press-blue);
}

.issue-option[data-mode="domain"] i {
  background: rgba(18, 179, 201, 0.12);
  color: var(--press-cyan-dark);
}
.issue-option[data-mode="domain"]:hover {
  border-color: var(--press-cyan);
}

.issue-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.issue-option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-text);
}

.issue-option-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.step-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.step-back:hover {
  color: var(--ink-text);
}

.confirm-note {
  margin: 4px 0 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--paper-dim);
  border: 1px solid var(--paper-line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-text);
}

.confirm-note strong {
  font-weight: 700;
}

/* ------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */

@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
  }
}

/* Just above the breakpoint where the brand panel disappears entirely, its
   own width is at its narrowest (~340-430px) - tighten the single-row
   capability strip so four cards + arrows still fit comfortably. */
@media (min-width: 981px) and (max-width: 1240px) {
  .capability-card { padding: 10px 2px; gap: 6px; }
  .capability-icon { width: 32px; height: 32px; font-size: 15px; }
  .capability-card span { font-size: 9.5px; }
  .flow-arrow { width: 10px; font-size: 13px; }
}

@media (max-width: 480px) {
  .auth-panel {
    padding: 24px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-step.visible,
  .status-dot,
  .fa-spin {
    animation: none;
  }
}