:root {
  --brand-blue: #1e5bb8;
  --brand-blue-dark: #143d7a;
  --brand-silver: #8a8f96;
  --bg-dark: #0e1524;
  --bg-grad-1: #101a2e;
  --bg-grad-2: #1a2b4d;
  --text: #1a2233;
  --muted: #6b7280;
  --border: #e2e6ee;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(10, 20, 45, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top left, var(--bg-grad-2), var(--bg-grad-1) 55%, var(--bg-dark));
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-brand {
  background: linear-gradient(135deg, #0e1524 0%, #1a2b4d 60%, var(--brand-blue) 140%);
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid var(--brand-blue);
  position: relative;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60px;
  background: linear-gradient(to top, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

.login-brand img {
  max-width: 260px;
  width: 80%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.login-body {
  padding: 32px 32px 28px;
}

.login-body h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #f9fafc;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 91, 184, 0.15);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 60px; }

.toggle-pass {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}
.toggle-pass:hover { background: rgba(30, 91, 184, 0.08); }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 22px;
  flex-wrap: wrap;
  gap: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.check input { accent-color: var(--brand-blue); }

.link {
  color: var(--brand-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.link:hover { text-decoration: underline; }

.btn-primary {
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: transform .1s, box-shadow .2s, filter .2s;
  box-shadow: 0 8px 20px rgba(30, 91, 184, 0.35);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }

.foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.copyright {
  margin-top: 20px;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 480px) {
  .login-body { padding: 24px 20px; }
  .login-brand { padding: 28px 16px; }
  .login-brand img { max-width: 220px; }
  .login-body h1 { font-size: 22px; }
}
