/* Mother Site / Product Engineer parity — owner auth shell (/auth) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

:root {
  --auth-bg: #f7f8fa;
  --auth-surface: #ffffff;
  --auth-text: #1f1f1f;
  --auth-muted: #5c6370;
  --auth-border: rgba(31, 31, 31, 0.08);
  --auth-primary: #dc5056;
  --auth-primary-deep: #c74349;
  --auth-primary-ring: rgba(220, 80, 86, 0.22);
  --auth-success: #2f9d62;
  --auth-radius-card: 28px;
  --auth-radius-btn: 999px;
  --auth-shadow-card:
    0 18px 42px rgba(31, 31, 31, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.auth-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(circle at 20% 8%, rgba(220, 80, 86, 0.06), transparent 52%),
    radial-gradient(circle at 88% 0%, rgba(31, 31, 31, 0.03), transparent 48%),
    var(--auth-bg);
  color: var(--auth-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-shell__wrap {
  width: 100%;
  max-width: 640px;
  min-width: 0;
}

.auth-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 32px 32px 28px;
  border-radius: var(--auth-radius-card);
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow-card);
}

.auth-shell__header {
  margin-bottom: 24px;
}

.auth-shell__title {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-align: left;
  overflow-wrap: anywhere;
}

.auth-shell__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--auth-muted);
  text-align: left;
  overflow-wrap: anywhere;
}

.auth-shell__session {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--auth-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-shell__session[hidden] {
  display: none !important;
}

.form-group {
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}

.form-group input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(31, 31, 31, 0.12);
  border-radius: 14px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #fff;
  color: var(--auth-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(220, 80, 86, 0.45);
  box-shadow: 0 0 0 4px var(--auth-primary-ring);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 10px 24px rgba(199, 67, 73, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  filter: brightness(0.96);
}

.btn-secondary {
  color: var(--auth-text);
  background: #fff;
  border-color: rgba(31, 31, 31, 0.12);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #f9fafb;
  border-color: rgba(31, 31, 31, 0.16);
}

.btn-link {
  width: auto;
  padding: 8px 0;
  background: none;
  border: none;
  color: var(--auth-muted);
  box-shadow: none;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:hover,
.btn-link:focus-visible {
  color: var(--auth-text);
  filter: none;
}

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

.btn-create-ai {
  min-height: 52px;
  padding: 16px 22px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--auth-radius-btn);
}

.auth-shell__create-block {
  margin-top: 20px;
  padding-top: 4px;
  min-width: 0;
  max-width: 100%;
}

.error {
  color: #b91c1c;
  font-size: 0.875rem;
  margin-top: 8px;
}

.step {
  display: none;
  min-width: 0;
  max-width: 100%;
}

.step.active {
  display: block;
}

.timer {
  font-size: 0.875rem;
  color: var(--auth-muted);
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.auth-business-list {
  display: grid;
  gap: 12px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.auth-business-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.04);
}

.auth-business-card__main {
  min-width: 0;
  flex: 1;
}

.auth-business-card__name {
  display: block;
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-business-card__slug {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--auth-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-business-card .btn-open-tenant {
  width: auto;
  min-width: 108px;
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: var(--auth-radius-btn);
  font-size: 14px;
}

.auth-business-empty {
  margin: 0;
  padding: 28px 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  color: var(--auth-muted);
  border: 1px dashed rgba(31, 31, 31, 0.12);
  border-radius: 20px;
  background: #fafbfc;
}

.auth-shell__choice-actions {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 12px;
    align-items: flex-start;
  }

  .auth-card {
    padding: 20px 16px 18px;
    border-radius: 24px;
    margin-top: 8px;
  }

  .form-group input:focus {
    box-shadow: 0 0 0 3px var(--auth-primary-ring);
  }

  .auth-business-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .auth-business-card .btn-open-tenant {
    width: 100%;
    min-width: 0;
  }

  .btn-create-ai {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
  }
}
