@font-face {
  font-family: "Inter";
  src: url("/admin/static/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/admin/static/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --auth-bg: #f5f7fb;
  --auth-panel: #ffffff;
  --auth-text: #171923;
  --auth-muted: #a7b3c7;
  --auth-line: #e6ecf4;
  --auth-blue: #3864ff;
  --auth-blue-dark: #244ff0;
  --auth-danger: #dc2626;
  --auth-ok: #047857;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--auth-text);
  background: var(--auth-bg);
}

.auth-shell,
.auth-shell input,
.auth-shell button,
.auth-shell a {
  font-family: inherit;
}

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

.auth-frame {
  width: min(100%, 366px);
}

.auth-card {
  width: 100%;
  padding: 30px 24px 26px;
  border: 1px solid rgba(230, 236, 244, 0.86);
  border-radius: 18px;
  background: var(--auth-panel);
  box-shadow: 0 20px 46px rgba(18, 31, 56, 0.11);
}

.auth-head {
  margin: 0 0 24px;
  text-align: center;
}

.auth-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 600;
}

.auth-head p {
  margin: 10px auto 0;
  max-width: 340px;
  color: #7c899d;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 15px;
  width: 100%;
  margin: 0 auto;
}

.auth-field {
  position: relative;
  display: block;
}

.auth-field span {
  position: absolute;
  top: -9px;
  left: 22px;
  z-index: 1;
  padding: 0 7px;
  color: var(--auth-muted);
  background: var(--auth-panel);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.auth-field span::after {
  content: " *";
  color: #ef4444;
}

.auth-field input {
  width: 100%;
  height: 52px;
  border: 2px solid #9eb2ff;
  border-radius: 12px;
  padding: 0 15px;
  color: #4a4f59;
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-field input:hover,
.auth-field input:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 4px rgba(56, 100, 255, 0.12);
}

.auth-submit {
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--auth-blue);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.auth-submit:hover {
  background: var(--auth-blue-dark);
  box-shadow: 0 14px 34px rgba(56, 100, 255, 0.22);
  transform: translateY(-1px);
}

.auth-forgot {
  justify-self: center;
  margin-top: -4px;
  color: var(--auth-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot:hover,
.auth-forgot:focus-visible {
  color: var(--auth-blue-dark);
  outline: none;
}

.auth-divider {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 26px auto 20px;
  color: #b0bbcd;
  font-size: 18px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--auth-blue);
}

.auth-google {
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: #fff;
  color: #4b5563;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.auth-google:hover {
  border-color: #ccd6e6;
  box-shadow: 0 12px 30px rgba(18, 31, 56, 0.08);
  transform: translateY(-1px);
}

button.auth-google:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.auth-google-icon {
  width: 22px;
  height: 22px;
}

.auth-alt {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.auth-alt:hover {
  color: var(--auth-blue-dark);
}

.auth-notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  width: min(350px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.13);
}

.auth-notice.danger {
  color: var(--auth-danger);
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.auth-notice.ok {
  color: var(--auth-ok);
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 30px 20px 26px;
    border-radius: 18px;
  }

  .auth-head {
    margin-bottom: 24px;
  }

  .auth-head h1 {
    font-size: 24px;
  }

  .auth-head p {
    font-size: 13px;
  }

  .auth-field span {
    left: 20px;
    font-size: 13px;
  }

  .auth-field input,
  .auth-submit {
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
  }

  .auth-submit {
    font-size: 17px;
  }

  .auth-divider {
    margin: 24px auto 18px;
    gap: 14px;
    font-size: 17px;
  }

  .auth-google {
    width: 100%;
    height: 48px;
    min-height: 0;
    border-radius: 12px;
    font-size: 14px;
  }

  .auth-google-icon {
    width: 22px;
    height: 22px;
  }
}
