:root {
  --page: #292929;
  --panel: #373737;
  --panel-soft: #3f3f3f;
  --sidebar: #1f1f1f;
  --line: #4c4c4c;
  --text: #f4f4f4;
  --muted: #9b9b9b;
  --blue: #3a9ff0;
  --blue-hover: #258add;
  --danger: #ff7777;
  --shadow: 0 28px 80px rgb(0 0 0 / 34%);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  font-family: "Trebuchet MS", "Gill Sans", Verdana, sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgb(58 159 240 / 18%), transparent 24rem),
    radial-gradient(circle at 88% 88%, rgb(255 255 255 / 8%), transparent 26rem),
    linear-gradient(135deg, #222 0%, #303030 55%, #252525 100%);
}

button,
input {
  font: inherit;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 1.5rem;
  width: min(1180px, calc(100% - 2rem));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  align-items: center;
  padding: 2rem 0;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(140deg, rgb(59 59 59 / 92%), rgb(44 44 44 / 86%)),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 4%) 0 1px, transparent 1px 56px);
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 5rem;
  place-items: center;
  border-radius: 16px;
  color: var(--sidebar);
  background: var(--text);
  font-size: 2rem;
  font-weight: 800;
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -120px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(58 159 240 / 22%), transparent 62%);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1;
}

h1 {
  max-width: 760px;
  font-size: clamp(4rem, 10vw, 8.4rem);
}

h2 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
}

.login-title {
  max-width: 360px;
  font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.28;
}

.brand-copy {
  max-width: 480px;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.login-card {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgb(55 55 55 / 92%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

form {
  display: grid;
  gap: 0.85rem;
}

label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 0.95rem 1rem;
  color: var(--text);
  background: var(--panel-soft);
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(58 159 240 / 18%);
}

.message {
  min-height: 1.3rem;
  margin: 0.25rem 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.message.success {
  color: var(--blue);
}

button {
  cursor: pointer;
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  padding: 1rem 1.2rem;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 30px rgb(58 159 240 / 22%);
  font-weight: 700;
}

button:hover {
  background: var(--blue-hover);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 1040px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  }

  .brand-panel {
    min-height: 500px;
  }
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
    width: min(620px, calc(100% - 2rem));
    padding: 1rem 0;
  }

  .brand-panel {
    min-height: 360px;
  }

  .brand-mark {
    margin-bottom: 2rem;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }
}

@media (max-width: 620px) {
  .login-shell {
    width: min(100% - 1rem, 460px);
    gap: 0.75rem;
    align-content: center;
    padding: 0.5rem 0;
  }

  .brand-panel,
  .login-card {
    border-radius: 10px;
  }

  .brand-panel {
    display: flex;
    gap: 1rem;
    align-items: center;
    min-height: auto;
    padding: 1.25rem;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    margin-bottom: 0;
    border-radius: 14px;
    font-size: 1.75rem;
  }

  .brand-panel .eyebrow {
    display: none;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  h2 {
    font-size: clamp(2.1rem, 13vw, 3rem);
  }

  .brand-copy {
    display: none;
    margin-top: 1rem;
    font-size: 1rem;
  }

  .login-card {
    gap: 1.2rem;
    padding: 1.25rem;
  }
}

@media (max-width: 380px) {
  .brand-panel {
    gap: 0.65rem 0.85rem;
    padding: 0.85rem;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 13px;
    font-size: 1.55rem;
  }

  h1 {
    font-size: clamp(2.45rem, 15vw, 3rem);
  }

  h2 {
    font-size: clamp(2.2rem, 14vw, 2.7rem);
  }

  .login-shell {
    min-height: 100dvh;
  }

  .login-card {
    gap: 1rem;
    padding: 1rem;
  }
}
