/* 2026 login prototype — top bar (scoped, Bootstrap-safe) */
.login-top-bar {
  background: var(--nl-surface);
  border-bottom: 1px solid var(--nl-border);
  padding: 10px 20px;
  margin-bottom: 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  top: 0;
  z-index: 100;
  font-family: "PingFang SC", "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, sans-serif;
}

.login-top-bar .login-top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.login-top-bar .login-top-logo {
  height: 80px;
  width: auto;
  max-width: max(50px, 5vw);
}

.login-top-bar .login-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.login-top-bar .login-form .field-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.login-top-bar .login-form label {
  font-size: 12px;
  color: var(--nl-text-secondary);
  font-weight: 500;
  margin-bottom: 0;
}

.login-top-bar .login-form input,
.login-top-bar .login-form select {
  padding: 7px 12px;
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius-btn);
  font-size: 14px;
  font-family: inherit;
  width: 150px;
  height: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  box-shadow: none;
}

.login-top-bar .login-form select {
  width: 180px;
  cursor: pointer;
}

.login-top-bar .login-form input:focus,
.login-top-bar .login-form select:focus {
  outline: none;
  border-color: var(--nl-primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-top-bar .faq-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffc107;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s;
  margin-bottom: 0;
}

.login-top-bar .faq-icon:hover {
  transform: scale(1.08);
  color: #fff;
  text-decoration: none;
}

.login-top-bar .faq-link-mobile {
  display: none;
}

.login-top-bar .nl2026-btn {
  padding: 8px 18px;
  border-radius: var(--nl-radius-btn);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease-out;
  border: none;
  line-height: 1.4;
  display: inline-block;
  text-align: center;
}

.login-top-bar .nl2026-btn-login {
  background: var(--nl-primary-blue);
  color: #fff;
  padding: 8px 22px;
}

.login-top-bar .nl2026-btn-login:hover {
  background: #1d4ed8;
  color: #fff;
}

.login-top-bar .nl2026-btn-login:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-top-bar .nl2026-btn-forgot {
  background: #fff;
  border: 1px solid #ff6600;
  color: #ff6600;
  padding: 8px 14px;
  font-size: 13px;
  text-decoration: none;
}

.login-top-bar .nl2026-btn-forgot:hover {
  background: #fff5f0;
  color: #ff6600;
  text-decoration: none;
}

.login-top-bar .gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image: none;
  border: 1px solid #747775;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: "Roboto", arial, sans-serif;
  font-size: 14px;
  height: 36px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
  flex-shrink: 0;
}

.login-top-bar .gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 10px;
  min-width: 20px;
  width: 20px;
}

.login-top-bar .gsi-material-button .gsi-material-button-content-wrapper {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.login-top-bar .gsi-material-button .gsi-material-button-contents {
  flex-grow: 1;
  font-family: "Roboto", arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.login-top-bar .gsi-material-button .gsi-material-button-state {
  transition: opacity 0.218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.login-top-bar .gsi-material-button:not(:disabled):active .gsi-material-button-state,
.login-top-bar .gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.login-top-bar .gsi-material-button:not(:disabled):hover {
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.login-top-bar .gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}

.login-top-bar .gsi-material-button:focus-visible {
  outline: 2px solid var(--nl-primary-blue);
  outline-offset: 2px;
}

.login-top-bar .login-error {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
  display: none;
  width: 100%;
  text-align: center;
}

.login-top-bar .login-error.show {
  display: block;
}

.login-top-bar .logged-in-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.login-top-bar .user-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-top-bar .user-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--nl-primary-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.login-top-bar .user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--nl-deep-blue);
}

.login-top-bar .user-info-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.login-top-bar .google-status-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-top-bar .nl2026-btn-disconnect {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--nl-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}

.login-top-bar .nl2026-btn-disconnect:hover {
  background: var(--nl-tint-green);
  color: var(--nl-accent-green);
}

.login-top-bar .nl2026-btn-disconnect svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.6;
  fill: none;
  stroke-linecap: round;
}

.login-top-bar .login-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-top-bar .nl2026-btn-ghost {
  background: transparent;
  border: 1px solid var(--nl-border);
  color: var(--nl-text-secondary);
  padding: 6px 14px;
  border-radius: var(--nl-radius-btn);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease-out;
}

.login-top-bar .nl2026-btn-ghost:hover {
  border-color: var(--nl-primary-blue);
  color: var(--nl-primary-blue);
  background: var(--nl-tint-blue);
}

.login-top-bar .nl2026-btn-platform-select {
  background: var(--nl-primary-blue);
  color: #fff;
  border: none;
  padding: 7px 18px;
  border-radius: var(--nl-radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease-out;
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-top-bar .nl2026-btn-platform-select:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  color: #fff;
}

.login-top-bar .nl2026-btn-logout-link {
  font-size: 13px;
  color: var(--nl-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.login-top-bar .nl2026-btn-logout-link:hover {
  color: #dc3545;
  background: #fef2f2;
}

.login-top-bar .g-check {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--nl-accent-green);
  stroke-width: 2.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 680px) {
  .login-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 14px 14px;
  }

  .login-top-bar #loginTopContent {
    width: 100%;
    min-width: 0;
  }

  .login-top-bar .login-top-brand {
    display: none;
  }

  .login-top-bar .login-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .login-top-bar .login-form .field-group {
    width: 100%;
  }

  .login-top-bar .login-form label {
    font-size: 14px;
    font-weight: 600;
    color: var(--nl-text-primary);
  }

  .login-top-bar .login-form input,
  .login-top-bar .login-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
  }

  .login-top-bar .faq-icon-desktop {
    display: none;
  }

  .login-top-bar .faq-link-mobile {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--nl-text-secondary);
    text-decoration: none;
    padding: 4px 0 0;
  }

  .login-top-bar .faq-link-mobile:hover {
    color: var(--nl-primary-blue);
    text-decoration: underline;
  }

  .login-top-bar .nl2026-btn-login {
    width: 100%;
    min-height: 44px;
    padding: 11px 18px;
    box-sizing: border-box;
  }

  .login-top-bar .gsi-material-button {
    width: 100%;
    max-width: none;
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    box-sizing: border-box;
  }

  .login-top-bar .gsi-material-button .gsi-material-button-content-wrapper {
    justify-content: center;
  }

  .login-top-bar .nl2026-btn-forgot {
    width: 100%;
    background: #fff5f0;
    border: 1px solid #ffb380;
    color: #ff6600;
    border-radius: var(--nl-radius-btn);
    padding: 10px 14px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-top-bar .nl2026-btn-forgot:hover {
    background: #ffece3;
    color: #e65c00;
    border-color: #ff6600;
    text-decoration: none;
  }

  .login-top-bar .login-error {
    margin-top: 2px;
    text-align: left;
  }

  .login-top-bar .logged-in-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .login-top-bar .user-info-left {
    width: 100%;
  }

  .login-top-bar .user-name {
    font-size: 15px;
  }

  .login-top-bar .user-info-right {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .login-top-bar .login-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .login-top-bar .nl2026-btn-platform-select {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    box-sizing: border-box;
  }

  .login-top-bar .nl2026-btn-platform-select:hover {
    transform: none;
  }

  .login-top-bar .nl2026-btn-logout-link {
    width: 100%;
    text-align: center;
    padding: 8px 4px;
    min-height: 36px;
  }

  .login-top-bar .google-status-line {
    width: 100%;
    justify-content: center;
  }

  .login-top-bar .google-status-line .gsi-material-button {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
}

.login-top-bar .nl2026-btn:focus-visible,
.login-top-bar .nl2026-btn-disconnect:focus-visible {
  outline: 2px solid var(--nl-primary-blue);
  outline-offset: 2px;
}
