/* Shared styles for the three hub auth-flow pages — /auth/org, /auth/signin,
   /auth/callback. Tokens mirror dvia-client-web's signed-out flow so the
   visual transition between hub pages and the platform sign-in stays
   consistent. */
:root {
  --brand-500: #ff850d; --brand-600: #db6609; --brand-50: #fff7e5;
  --gray-900: #141414; --gray-700: #424242; --gray-500: #737373;
  --gray-300: #d6d6d6; --gray-200: #e5e5e5; --gray-100: #f5f5f5; --gray-50: #f9fafb;
  --divider:    #7b7b7b;
  --error-600:  #d92d20;
  --shadow-xs:  0 0.0625rem 0.125rem 0 rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; }
body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-700);
  background:
    linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15)),
    url("/static/signin-bg.png") center/cover no-repeat,
    #ffffff;
  min-height: 100vh;
  display: flex; flex-direction: row;
  padding: 24px;
}
.card {
  flex: 0 0 28.75rem; width: 28.75rem; max-width: 100%;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 0.75rem; box-shadow: var(--shadow-xs);
  padding: 2rem; margin: 5rem auto 0; align-self: flex-start;
  display: flex; flex-direction: column;
}
.logo { display: block; height: 40px; width: 250px; object-fit: contain; object-position: left center; }

h1.title {
  font-size: 1.5rem; line-height: 2rem; font-weight: 600;
  color: var(--gray-700); margin: 1.5rem 0 0.25rem; letter-spacing: -.01em;
}
p.subdomain {
  font-size: 0.75rem; color: var(--gray-500);
  letter-spacing: 0.04em; margin: 0;
}
p.lead {
  margin-top: 1.75rem; color: var(--gray-700); font-weight: 500; font-size: 0.9375rem;
}

/* Outlined / default button (Microsoft, "Use email") — white with grey
   border, brand-coloured hover, matches dvia-client-web's CButton default. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  width: 100%; height: 2.75rem; padding: 0.6875rem 1.375rem;
  background: #fff; color: var(--gray-700);
  border: 1px solid var(--gray-300); border-radius: 0.5rem;
  font-family: inherit; font-size: 1rem; line-height: 1.5rem; font-weight: 600;
  cursor: pointer; transition: border-color .12s, color .12s, background-color .12s;
}
.btn:hover:not(:disabled) { border-color: var(--brand-500); color: var(--brand-500); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ms-icon { width: 20px; height: 20px; flex: 0 0 20px; }

/* Primary button (Continue, Sign in) — solid orange brand-500. */
.btn.primary {
  background: var(--brand-500); border-color: var(--brand-500); color: #fff;
}
.btn.primary:hover:not(:disabled) { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn.primary:disabled { background: var(--gray-300); border-color: var(--gray-300); color: #fff; }

/* Link-style button used by the "Forgot password?" link. */
.btn-link {
  background: none; border: 0; padding: 0;
  color: var(--brand-500); font-family: inherit; font-size: 0.875rem;
  font-weight: 600; cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }

/* Inputs match CInput: 44px, 10px×14px, 1px gray-300, 8px radius, brand focus + 24% ring. */
label.field { display: block; }
label.field + label.field { margin-top: 1.25rem; }
label.field > .lbl {
  display: block; font-size: 0.875rem; font-weight: 500;
  color: var(--gray-700); margin-bottom: 0.375rem;
}
input.text {
  width: 100%; height: 2.75rem; padding: 0.625rem 0.875rem;
  font-family: inherit; font-size: 0.9375rem; line-height: 1.25rem; color: var(--gray-900);
  background: #fff; border: 1px solid var(--gray-300); border-radius: 0.5rem;
  outline: none; transition: border-color .12s, box-shadow .12s;
}
input.text:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--brand-500) 24%, transparent),
              var(--shadow-xs);
}
input.text:disabled { background: var(--gray-50); color: var(--gray-500); }
.input-wrap { position: relative; }
.input-wrap .suffix {
  position: absolute; right: 0.875rem; top: 50%; transform: translateY(-50%);
  color: var(--gray-500); font-size: 0.875rem; pointer-events: none; user-select: none;
}

/* "Or" divider — Ant Design Divider look with text in middle on a #7B7B7B line. */
.divider {
  display: flex; align-items: center; gap: 0.875rem;
  color: var(--divider); font-size: 0.875rem; font-weight: 500;
  margin: 1.125rem 0 0.5rem;
}
.divider::before, .divider::after {
  content: ""; flex: 1; border-bottom: 1px solid var(--divider);
}

/* Remember-me + Forgot-password row. */
.row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1rem;
}
.row .check { display: flex; align-items: center; gap: 0.5rem;
              font-size: 0.875rem; color: var(--gray-700); }
.row .check input { width: 16px; height: 16px; accent-color: var(--brand-500); }

/* Inline error banner — error-50 bg, error-600 text + border. */
.err {
  display: none; margin-top: 0.875rem; padding: 0.625rem 0.875rem;
  background: #fef3f2; border: 1px solid #fecdca; border-radius: 0.5rem;
  color: var(--error-600); font-size: 0.8125rem;
}
.err.visible { display: block; }
.err a { color: var(--brand-500); font-weight: 600; text-decoration: none; }
.err a:hover { text-decoration: underline; }

/* Page-foot link ("Use a different workspace", etc.). */
.foot {
  margin-top: 1.5rem; padding-top: 1.125rem; border-top: 1px solid var(--gray-100);
  font-size: 0.75rem; color: var(--gray-500); text-align: center;
}
.foot a { color: var(--brand-500); font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* Spinner (callback page). */
.spin {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  border: 2.5px solid var(--gray-100); border-top-color: var(--brand-500);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.row-spin { display: flex; align-items: center; gap: 0.875rem; margin-top: 1.5rem; }
