/* ════════════════════════════════════════════════════
   MAPO — Login view
   ════════════════════════════════════════════════════ */

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Login topbar */
.login-topbar {
  height: 66px;
  background: var(--white);
  border-bottom: 2px solid var(--red);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.login-topbar .brand-wide { height: 50px; }
.login-topbar .brand-sub {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 14px;
  margin-left: 4px;
}
.login-topbar .right {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-topbar .right i { font-size: 14px; color: var(--green); }

/* Body */
.login-body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

/* Card */
.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.login-card-head {
  padding: 14px 24px;
  background: var(--dkgray);
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-card-head i { color: rgba(255, 255, 255, 0.7); font-size: 15px; }
.login-card-head-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
}

.login-form-body { padding: 28px 28px 24px; }

.welcome-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--black);
  line-height: 1;
  margin-bottom: 4px;
}
.welcome-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* Form fields */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: border-color 0.15s, background 0.15s;
}
.input-wrap:focus-within {
  border-color: var(--red-border);
  background: var(--white);
}
.input-wrap > i {
  color: var(--text-muted);
  font-size: 15px;
  padding-left: 11px;
}
.input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 11px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
}
.input-wrap input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.pw-toggle {
  background: transparent;
  border: none;
  padding: 0 11px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.pw-toggle:hover { color: var(--red); }
.pw-toggle i { font-size: 15px; }

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--red);
  border: none;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: background 0.15s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--red-hover); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error banner */
.error-msg {
  margin-top: 14px;
  padding: 9px 12px;
  background: var(--red-light);
  border: 1px solid var(--red-border);
  border-left: 3px solid var(--red);
  border-radius: 4px;
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  display: none;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}
.error-msg.show { display: flex; }
.error-msg i {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Card footer */
.login-card-foot {
  padding: 12px 24px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.login-card-foot a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}
.login-card-foot a:hover { color: var(--red); }

/* Responsive */
@media (max-width: 560px) {
  .login-topbar .brand-sub { display: none; }
}
