:root {
  color-scheme: light;
  --ink: #080808;
  --muted: #8c8d92;
  --line: rgba(18, 23, 30, 0.1);
  --wash: rgba(244, 251, 249, 0.86);
  --accent: #2f78c4;
  --glow: rgba(241, 246, 226, 0.82);
  --panel-illustration: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.88)), url("square-bg.png");
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f5fbfa 0%, #fffdf8 52%, #eef8f9 100%);
}

.login-page {
  position: relative;
  min-height: 100vh;
  padding: 0 clamp(22px, 4vw, 52px) clamp(22px, 4vw, 52px);
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: min(38vh, 300px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.78)), url("header-bg.png");
  background-position: center 42%;
  background-size: cover;
  border-bottom: 1px solid rgba(41, 132, 161, 0.28);
  z-index: -2;
}

.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 14%, var(--glow), transparent 26%),
    radial-gradient(circle at 72% 76%, rgba(213, 240, 244, 0.62), transparent 34%);
  z-index: -1;
  pointer-events: none;
}

.login-shell {
  width: min(100%, 390px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  padding-top: calc(min(38vh, 300px) - 58px);
}

.login-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.06);
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 40px);
}

.login-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 250px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  filter: blur(6px);
  transform: translateX(-50%);
  z-index: 0;
}

.login-card > * { position: relative; }

.brand-lockup {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  text-align: center;
}

.brand-mark {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.16));
}

.brand-name {
  font-size: clamp(2rem, 7vw, 2.55rem);
  line-height: 0.9;
  font-weight: 900;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.login-card {
  width: 100%;
  min-height: auto;
  background: rgba(255, 255, 255, 0.9);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 18px;
  font-size: 1.8rem;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.55rem, 6vw, 4.8rem); line-height: 0.92; letter-spacing: 0; }
h2 { font-size: 1.8rem; line-height: 1.05; letter-spacing: 0; }
h3 { margin: 0; font-size: 1rem; line-height: 1.05; letter-spacing: 0; }

form { display: grid; gap: 10px; margin-top: 20px; }
label { font-size: 0.86rem; font-weight: 800; }
input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
}
input:focus {
  outline: none;
  border-color: rgba(47, 120, 196, 0.65);
  box-shadow: 0 0 0 4px rgba(47, 120, 196, 0.12);
}
button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  font-size: 0.95rem;
  color: #fff;
  background: #050505;
  cursor: pointer;
}
button.secondary { background: rgba(255, 255, 255, 0.86); color: var(--ink); border: 1px solid var(--line); }
.form-error { padding: 12px 14px; border-radius: 12px; background: #fff1f1; color: #8f1d1d; font-weight: 700; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(24px, 6vw, 84px);
}
.topbar form { margin: 0; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 24px;
  padding: 0 clamp(24px, 6vw, 84px) 64px;
}
.workspace.single { display: block; max-width: 900px; margin: 0 auto; }
.panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--panel-illustration);
  background-position: center;
  background-size: cover;
}
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.card-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-top: 22px;
}
.work-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7c72db;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}
.title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.title-line span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}
.work-card p { margin: 4px 0 0; color: var(--muted); line-height: 1.35; }
.check-list { display: grid; gap: 12px; padding-left: 20px; color: #4f5359; font-weight: 700; }

@media (max-width: 820px) {
  .login-shell { width: min(100%, 390px); }
  .workspace { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .login-page { padding: 0 16px 16px; }
  .login-shell { padding-top: calc(min(38vh, 300px) - 46px); }
  .login-card { border-radius: 20px; padding: 22px; }
  .brand-mark { width: 48px; height: 48px; }
  .brand-name { font-size: 2rem; }
}
