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

:root {
  --bg:           #fff8ee;
  --bg-card:      #fff4e4;
  --bg-input:     #fff0d8;
  --border:       #f0cc88;
  --border-focus: #b06a00;
  --text:         #2a1400;
  --text-muted:   #7a4a10;
  --accent:       #b06a00;
  --accent-hover: #884e00;
  --error:        #c0392b;
  --radius:       10px;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.login-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 36px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 8px 48px rgba(120, 60, 0, .12);
  animation: cardIn 0.3s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(176, 106, 0, .35);
}

.login-card h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: center;
}

.login-card form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.field input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, .15);
}

.field input::placeholder { color: var(--text-muted); opacity: .6; }

.error-msg {
  font-size: 13px;
  color: var(--error);
  background: rgba(255, 85, 85, .1);
  border: 1px solid rgba(255, 85, 85, .25);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}

#btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
  margin-top: 4px;
}

#btn-submit:hover:not(:disabled) { background: var(--accent-hover); }
#btn-submit:active:not(:disabled) { transform: scale(.98); }
#btn-submit:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 420px) {
  .login-card { padding: 32px 24px 28px; border-radius: 14px; }
}
