/* Matches app auth inputs (RegisterScreen / LoginScreen) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #c8102e;
  --color-icon: #0b4076;
  --color-title: #0c4b99;
  --color-text: #000;
  --color-placeholder: #999;
  --color-border: #e0e0e0;
  --color-error: #c8102e;
  --color-error-bg: #fffbfb;
  --color-success: #1b7e3a;
  --shadow-input: 0 1px 2px rgba(0, 0, 0, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: #fff;
  color: var(--color-text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Same assets as app: LoginScreen pattern height 220px + Logo 250×200 */
.hero {
  position: relative;
  z-index: 0;
  background: #fff;
}

.pattern {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #fff;
}

.pattern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 20px 4px;
  background: #fff;
}

.logo-img {
  width: 250px;
  height: auto;
  max-width: min(250px, 85vw);
  display: block;
}

.page-header {
  max-width: 440px;
  margin: 0 auto;
  padding: 4px 20px 16px;
  text-align: center;
  background: #fff;
}

.title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-title);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.2;
}

.subtitle {
  font-size: 15px;
  line-height: 1.55;
  color: #4b5563;
  text-align: center;
  margin: 0 auto;
  max-width: 36em;
}

.content {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 0 20px 40px;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
  background: #fff;
}

.form {
  margin: 0 6px;
}

.field-block {
  margin-bottom: 10px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 30px;
  /* Same horizontal inset as left lock / right eye (mirrors .input-icon margin-right below) */
  padding: 0 18px;
  min-height: 52px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-input);
  transition: border-color 0.2s, background 0.2s;
}

.input-wrapper:focus-within {
  border-color: #b8c9d9;
}

.input-wrapper.has-error {
  border: 1.5px solid var(--color-error);
  background: var(--color-error-bg);
}

.input-icon {
  flex-shrink: 0;
  width: 20px;
  margin-right: 16px;
  color: var(--color-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Confirm field: left icon reflects verification state */
.input-icon.input-icon--confirm {
  transition: color 0.2s ease;
}

.input-icon.input-icon--confirm-pending {
  color: #8a9aac;
}

.input-icon.input-icon--confirm-success {
  color: var(--color-success);
}

.input-icon.input-icon--confirm-error {
  color: var(--color-error);
}

.input-wrapper input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--color-text);
  padding: 10px 0;
  font-family: inherit;
}

.input-wrapper input::placeholder {
  color: var(--color-placeholder);
}

.eye-btn {
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  color: #666;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.eye-btn:hover {
  color: #333;
}

/* Eye: 16px from text (same as lock .input-icon margin-right), pill padding handles outer inset */
.input-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: 16px;
  padding: 0;
  align-self: stretch;
}

.input-trailing .eye-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  box-sizing: border-box;
}

.field-error {
  font-size: 11px;
  line-height: 14px;
  color: var(--color-error);
  margin: 3px 0 0 6px;
  font-weight: 500;
  min-height: 14px;
}

.submit-row {
  margin-top: 18px;
}

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 30px;
  padding: 16px 20px;
  min-height: 54px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s;
}

.submit-btn:hover:not(:disabled) {
  opacity: 0.95;
}

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

.hint {
  margin-top: 16px;
  font-size: 12px;
  color: #888;
  text-align: center;
  line-height: 1.4;
}

.page-footer {
  margin-top: auto;
  padding: 24px 20px 28px;
  text-align: center;
}

.page-footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #888;
}

@media (max-width: 640px) {
  .pattern {
    height: 130px;
  }
  .logo-img {
    width: 180px;
  }
}

@media (max-width: 380px) {
  .pattern {
    height: 100px;
  }
  .logo-img {
    width: 140px;
  }
  .page-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .logo-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .input-wrapper {
    padding: 0 14px;
  }
}
