:root {
  --c: #344e41;
  --cl: #3f6050;
  --cd: #2a3e34;
  --bg: #f6f4f0;
  --sf: #fff;
  --sa: #f0ede8;
  --bd: #ddd8d0;
  --bl: #ebe8e3;
  --t: #1a1a1a;
  --ts: #555550;
  --tm: #8a8880;
  --ok: #2e7d4f;
  --er: #8b0000;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  min-height: 100vh;
  font-family: 'Lato', sans-serif;
  background: var(--c);
  color: var(--t);
  overflow: hidden;
}
.page {
  display: flex;
  min-height: 100vh;
}
.brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #2a3e34 0%, #344e41 40%, #3f6050 100%);
}
.brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.brand-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}
.brand-logo {
  height: 36px;
  margin-bottom: 40px;
  opacity: 0.9;
}
.brand-h1 {
  font-family: 'Lora', serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: #f6f4f0;
  line-height: 1.2;
  margin-bottom: 16px;
}
.brand-p {
  font-size: 0.92rem;
  color: rgba(246, 244, 240, 0.55);
  line-height: 1.7;
  margin-bottom: 40px;
}
.auth {
  width: 480px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
}
.auth-inner {
  max-width: 340px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.auth-title {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--c);
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 0.82rem;
  color: var(--tm);
  margin-bottom: 28px;
}
.fg {
  margin-bottom: 16px;
}
.fg label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--tm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.fi {
  width: 100%;
  padding: 11px 14px;
  background: var(--sf);
  border: 1.5px solid var(--bd);
  border-radius: 9px;
  color: var(--t);
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  outline: 0;
  transition: 0.2s;
}
.fi:focus {
  border-color: var(--c);
  box-shadow: 0 0 0 3px rgba(52, 78, 65, 0.1);
}
.fi::placeholder {
  color: var(--bd);
}
.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2a3e34, #344e41, #3f6050);
  color: #f6f4f0;
  border: none;
  border-radius: 9px;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(52, 78, 65, 0.25);
}
.submit-btn:hover {
  background: var(--cl);
}
.submit-btn:active {
  transform: scale(0.99);
}
.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.submit-btn .spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(246, 244, 240, 0.3);
  border-top-color: #f6f4f0;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
.submit-btn.loading .spin {
  display: block;
}
.submit-btn.loading .btn-text {
  display: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}
.msg.err {
  display: block;
  background: rgba(139, 0, 0, 0.06);
  color: var(--er);
  border: 1px solid rgba(139, 0, 0, 0.12);
}
.msg.ok {
  display: block;
  background: rgba(46, 125, 79, 0.06);
  color: var(--ok);
  border: 1px solid rgba(46, 125, 79, 0.15);
}
.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 0.74rem;
  color: var(--tm);
}
.auth-footer a {
  color: var(--c);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  .page {
    flex-direction: column;
  }
  .brand {
    padding: 32px;
    min-height: auto;
    flex: none;
  }
  .brand-h1 {
    font-size: 1.6rem;
  }
  .auth {
    width: 100%;
    flex: 1;
    padding: 32px;
  }
}
