:root {
  --bg:           #f5f6fb;
  --bg-2:         #eef0f7;
  --surface:      #ffffff;
  --surface-soft: #f7f8fc;
  --border:       #e6e8ef;
  --border-soft:  #eff1f6;
  --text:         #0c1224;
  --text-2:       #4a5169;
  --text-dim:     #8a90a4;
  --accent:       #5b5cf0;
  --accent-dk:    #4a4bd9;
  --accent-soft:  #ecedfe;
  --accent-ring:  rgba(91,92,240,.18);
  --full:         #e1374c;
  --full-soft:    #ffe4e6;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow-lg:    0 24px 60px rgba(16, 24, 40, .08), 0 6px 18px rgba(16, 24, 40, .04);
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
}

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

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-image:
    radial-gradient(900px 500px at 100% 0%, rgba(91,92,240,.10), transparent 55%),
    radial-gradient(700px 400px at 0% 100%, rgba(14,165,233,.08), transparent 55%);
  background-attachment: fixed;
}

.login-shell {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  text-align: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  box-shadow: 0 12px 28px rgba(91, 92, 240, .28), 0 2px 6px rgba(91, 92, 240, .18);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.brand-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg);
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0 14px;
  height: 46px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

input[type="text"]:hover,
input[type="password"]:hover {
  border-color: #d4d8e2;
}

input[type="text"]:focus,
input[type="password"]:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--full-soft);
  border: 1px solid rgba(225,55,76,.2);
  color: var(--full);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.error::before {
  content: '!';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--full);
  color: white;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

button[type="submit"] {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(91, 92, 240, .25), 0 1px 2px rgba(91, 92, 240, .15);
}

button[type="submit"]:hover {
  background: var(--accent-dk);
  box-shadow: 0 6px 16px rgba(91, 92, 240, .3), 0 1px 2px rgba(91, 92, 240, .15);
}
button[type="submit"]:active { transform: scale(0.98); }
button[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-ring), 0 4px 12px rgba(91, 92, 240, .25);
}

.footnote {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

@media (max-width: 420px) {
  .brand-title { font-size: 30px; }
  .card { padding: 24px 22px 20px; }
}
