:root {
  --auth-bg-1: #f7efe2;
  --auth-bg-2: #efe3cf;
  --auth-accent: #a74a26;
  --auth-accent-dark: #7d3118;
  --auth-highlight: #c7912b;
  --auth-text: #2f2117;
  --auth-muted: #645448;
  --auth-surface: #fffdfa;
  --auth-border: #e6d5bc;
  --auth-danger-bg: #fff0f0;
  --auth-danger-border: #f1b8b8;
  --auth-danger-text: #842029;
  --auth-shadow: 0 18px 45px rgba(72, 33, 16, 0.2);
}

.login-screen .site-topbar {
  display: none;
}

.login-screen .app-page-shell {
  max-width: none;
  margin: 0;
  padding: 0;
}

.login-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 540px at 0% 0%, rgba(255, 236, 209, 0.45) 0%, rgba(255, 236, 209, 0) 66%),
    radial-gradient(900px 540px at 100% 100%, rgba(255, 224, 188, 0.35) 0%, rgba(255, 224, 188, 0) 66%),
    linear-gradient(120deg, #f5c08b 0%, #efb67e 40%, #f3c28f 100%);
}

.login-card-shell {
  width: 100%;
  max-width: 440px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(67, 33, 16, 0.3);
  background: #fff;
}

.login-brand-panel {
  background:
    radial-gradient(460px 260px at 50% -10%, rgba(255, 183, 102, 0.35) 0%, rgba(255, 183, 102, 0) 70%),
    linear-gradient(170deg, #e27a20 0%, #d9650a 58%, #ca5600 100%);
  color: #fff7ec;
  text-align: center;
  padding: 24px 20px 26px;
}

.login-brand-logo-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.95);
  padding: 6px;
  box-shadow: 0 8px 18px rgba(64, 25, 8, 0.26);
}

.login-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.login-brand-title {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.login-brand-subtitle {
  margin: 9px auto 0;
  max-width: 320px;
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  line-height: 1.28;
  color: #ffe9d1;
}

.login-form-panel {
  background: #f8f8f8;
  padding: 28px 24px 24px;
}

.login-form-title {
  margin: 0;
  text-align: center;
  color: #2c140b;
  font-size: clamp(2rem, 2.8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.012em;
}

.login-form-subtitle {
  margin: 8px 0 18px;
  text-align: center;
  color: #5e5248;
  font-size: clamp(0.95rem, 1.15vw, 1.02rem);
}

.login-field {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 24px;
  border: 1px solid #b9b2ab;
  background: #f8f8f8;
  padding: 0 14px;
  margin-bottom: 10px;
}

.login-field i {
  color: #756d66;
  margin-right: 10px;
  font-size: 1.05rem;
}

.login-field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #2f241d;
  font-size: 1.07rem;
}

.login-field input::placeholder {
  color: #8a827a;
}

.login-forgot-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 14px;
}

.login-submit-btn {
  width: 100%;
  border: 0;
  border-radius: 24px;
  height: 46px;
  background: linear-gradient(180deg, #e27a20 0%, #d5640b 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 -1px 0 rgba(61, 22, 5, 0.2);
}

.login-submit-btn:hover,
.login-submit-btn:focus {
  background: linear-gradient(180deg, #cd6d1d 0%, #bf5408 100%);
}

.auth-flow-shell {
  max-width: 520px;
}

.auth-flow-brand-panel {
  padding-top: 22px;
  padding-bottom: 22px;
}

.auth-flow-form-panel {
  padding: 24px 24px 22px;
}

.flow-field {
  margin-bottom: 12px;
}

.flow-field label {
  display: block;
  margin-bottom: 6px;
  color: #3a2319;
  font-weight: 700;
}

.flow-field input,
.flow-field select,
.flow-field textarea {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid #c8c0b7;
  background: #fafafa;
  color: #2d231d;
  font-size: 16px;
  padding: 0 12px;
}

.flow-field textarea {
  min-height: 90px;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}

.flow-field input:focus,
.flow-field select:focus,
.flow-field textarea:focus {
  outline: none;
  border-color: #d07f3f;
  box-shadow: 0 0 0 3px rgba(208, 127, 63, 0.16);
}

.flow-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.flow-actions-single {
  margin-top: 18px;
}

.flow-secondary-btn {
  min-width: 168px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  border: 1px solid #cfb08a;
  background: #fff2e2;
  color: #8f451f;
  font-weight: 700;
  text-decoration: none;
  padding: 0 14px;
}

.flow-secondary-btn:hover,
.flow-secondary-btn:focus {
  color: #793618;
  text-decoration: none;
  background: #fce7ce;
}

.flow-submit-btn {
  min-width: 188px;
}

.flow-submit-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.flow-content {
  color: #4b3c33;
}

.flow-content p {
  margin-bottom: 8px;
}

.auth-page {
  min-height: calc(100vh - 260px);
  display: grid;
  place-items: center;
  padding: 12px 0 26px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
  position: relative;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--auth-highlight) 0%, var(--auth-accent) 55%, var(--auth-accent-dark) 100%);
}

.auth-header {
  padding: 28px 28px 14px;
}

.auth-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fbefdd;
  color: var(--auth-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, sans-serif;
  font-weight: 800;
}

.auth-subtitle {
  margin: 10px 0 0;
  color: var(--auth-muted);
  font-size: clamp(0.9rem, 1.05vw, 0.98rem);
}

.auth-body {
  padding: 10px 28px 30px;
}

.auth-content {
  color: var(--auth-text);
}

.auth-content p:last-child {
  margin-bottom: 0;
}

.auth-error-list,
.auth-field-errors {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--auth-danger-border);
  background: var(--auth-danger-bg);
  color: var(--auth-danger-text);
  list-style: none;
}

.auth-field-errors {
  margin-top: 8px;
  font-size: 0.88rem;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--auth-text);
  font-size: clamp(0.88rem, 1vw, 0.94rem);
  font-weight: 600;
}

.auth-help {
  margin-top: 7px;
  color: var(--auth-muted);
  font-size: clamp(0.8rem, 0.9vw, 0.86rem);
}

.auth-field input[type="text"],
.auth-field input[type="password"],
.auth-field input[type="email"] {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #bed0df;
  background: #ffffff;
  color: var(--auth-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  border-color: #cb9d5d;
  box-shadow: 0 0 0 3px rgba(167, 74, 38, 0.15);
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.auth-link {
  color: #7d3118;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.86rem, 0.95vw, 0.92rem);
}

.auth-link:hover,
.auth-link:focus {
  color: #5f2411;
  text-decoration: underline;
}

.auth-button {
  border: 0;
  border-radius: 10px;
  height: 44px;
  min-width: 124px;
  padding: 0 18px;
  background: linear-gradient(180deg, #ba592d 0%, #9a411f 100%);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.auth-button:hover,
.auth-button:focus {
  background: linear-gradient(180deg, #9f471f 0%, #7d3118 100%);
}

.auth-footer {
  margin-top: 18px;
  color: var(--auth-muted);
  font-size: clamp(0.86rem, 0.95vw, 0.92rem);
}

.auth-note {
  margin: 12px 0 0;
  color: var(--auth-muted);
  font-size: clamp(0.86rem, 0.98vw, 0.93rem);
}

@media (max-width: 560px) {
  .login-stage {
    padding: 0;
    align-items: stretch;
  }

  .login-card-shell {
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  .login-brand-panel {
    padding-top: 34px;
    padding-bottom: 28px;
  }

  .login-brand-logo-wrap {
    width: 92px;
    height: 92px;
  }

  .login-form-panel {
    margin-top: -6px;
    border-radius: 28px 28px 0 0;
    min-height: calc(100vh - 250px);
    padding: 26px 20px 24px;
  }

  .login-form-title {
    font-size: clamp(1.85rem, 8vw, 2.3rem);
  }

  .auth-flow-shell {
    max-width: none;
  }

  .flow-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-secondary-btn,
  .flow-submit-btn {
    width: 100%;
  }

  .auth-card {
    border-radius: 14px;
  }

  .auth-header,
  .auth-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .auth-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .auth-button {
    width: 100%;
  }
}
