:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e6e8f0;
  --primary: #fabc05;
  --primary-soft: #fff8e1;
  --danger-soft: #fef2f2;
  --danger-text: #b91c1c;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-mark {
  width: 10rem;
  height: 10rem;
  border-radius: 13px;
  /* background: var(--primary); */
  display: flex;
  /* place-items: center; */
  flex-direction: row;
  /* border: 1px solid red; */
  /* box-shadow: 0 8px 20px rgba(250, 188, 5, .4); */
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  stroke: #000;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

.field label {
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(250, 188, 5, 0.25);
}

.login-error {
  display: none;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger-text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.login-error.show {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  width: 100%;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 8px 20px rgba(250, 188, 5, 0.32);
}

.btn-primary:hover {
  background: #f5b100;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 16px;
}

.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10rem;
  padding: 9px 16px;
  box-shadow: var(--shadow);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}

.back-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}

.back-link:hover {
  background: var(--primary-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.back-link:hover svg {
  transform: translateX(-2px);
}

.busy-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
