.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 20px;
  background: var(--color-surface, #fff);
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
  overflow: visible;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar__logo-link {
  display: flex;
  align-items: center;
  height: 44px;
  text-decoration: none;
}

.topbar__logo-img {
  display: block;
  height: 30px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  border: none;
  background: transparent;
}

.topbar__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--color-primary, #1677ff);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.28);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.topbar__login:hover {
  background: #4096ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.35);
}

.topbar__login:active {
  transform: translateY(0);
}

.topbar__login strong {
  font-weight: 700;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topbar__lookup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 2px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-secondary, #4e5969);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.topbar__lookup-btn:hover {
  background: transparent;
  color: var(--color-primary, #1677ff);
}

.license-lookup-modal .modal {
  width: min(100%, 420px);
  padding: 0;
}

.license-lookup-modal .modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
}

.license-lookup-modal .modal__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text, #1d2129);
}

.license-lookup-modal .modal__close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted, #86909c);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.license-lookup-modal .modal__close:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text, #1d2129);
}

.license-lookup-modal .modal__body {
  padding: 16px 20px 20px;
}

.license-lookup-modal .modal__desc {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary, #4e5969);
}

.license-lookup-modal .license-lookup__field {
  display: flex;
  gap: 8px;
}

.license-lookup-modal .license-lookup__input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text, #1d2129);
  background: #fff;
}

.license-lookup-modal .license-lookup__input:focus {
  outline: none;
  border-color: var(--color-primary, #1677ff);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.license-lookup-modal .license-lookup__input.is-invalid {
  border-color: #ff4d4f;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.12);
}

.license-lookup-modal .license-lookup__input.is-invalid:focus {
  border-color: #ff4d4f;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.12);
}

.license-lookup-modal .license-lookup__submit {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--color-primary, #1677ff);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.license-lookup-modal .license-lookup__submit:hover:not(:disabled) {
  background: #4096ff;
}

.license-lookup-modal .license-lookup__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.license-lookup-modal .license-lookup__hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-text-muted, #86909c);
}

.license-lookup-modal .license-lookup__result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.license-lookup-modal .license-lookup__result[hidden] {
  display: none !important;
}

.license-lookup-modal .license-lookup__result--ok {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
}

.license-lookup-modal .license-lookup__result--warn {
  background: #fffbe6;
  border: 1px solid #ffe58f;
}

.license-lookup-modal .license-lookup__result--error {
  background: #fff1f0;
  border: 1px solid #ffccc7;
}

.license-lookup-modal .license-lookup__result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.license-lookup-modal .license-lookup__badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.license-lookup-modal .license-lookup__badge--ok {
  background: #d9f7be;
  color: #389e0d;
}

.license-lookup-modal .license-lookup__badge--bad {
  background: #ffe7ba;
  color: #d46b08;
}

.license-lookup-modal .license-lookup__domain {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #1d2129);
  word-break: break-all;
}

.license-lookup-modal .license-lookup__meta {
  display: grid;
  gap: 8px;
}

.license-lookup-modal .license-lookup__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.license-lookup-modal .license-lookup__meta dt {
  color: var(--color-text-muted, #86909c);
}

.license-lookup-modal .license-lookup__meta dd {
  margin: 0;
  font-weight: 500;
  color: var(--color-text, #1d2129);
  text-align: right;
}

@media (max-width: 640px) {
  .topbar__lookup-btn {
    font-size: 12px;
  }

  .license-lookup-modal .license-lookup__field {
    flex-direction: column;
  }

  .license-lookup-modal .license-lookup__submit {
    width: 100%;
  }
}

.user-menu { position: relative; }

.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 10px;
  margin: 0 -6px 0 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s ease;
}

.user-menu__trigger:hover,
.user-menu:hover .user-menu__trigger,
.user-menu:focus-within .user-menu__trigger {
  background: rgba(0, 0, 0, 0.04);
}

.user-menu__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  max-width: 200px;
  line-height: 1.35;
  text-align: right;
}

.user-menu__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #1d2129);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.user-menu__email {
  font-size: 12px;
  color: var(--color-text-muted, #86909c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.user-menu__avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: none;
  background: #dce8f8;
  color: var(--color-primary, #1677ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.user-menu__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-menu__caret {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--color-text-muted, #86909c);
  transition: transform 0.2s ease;
}

.user-menu:hover .user-menu__caret,
.user-menu:focus-within .user-menu__caret {
  transform: rotate(180deg);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown, 0 6px 16px rgba(24, 24, 27, 0.08));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}

.user-menu__dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.user-menu:hover .user-menu__dropdown,
.user-menu:focus-within .user-menu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.user-menu__panel-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
  margin-bottom: 4px;
}

.user-menu__panel-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #1d2129);
  line-height: 1.4;
  word-break: break-all;
}

.user-menu__panel-email {
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted, #86909c);
  line-height: 1.4;
  word-break: break-all;
}

.user-menu__action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 22px;
  color: var(--color-text-secondary, #4e5969);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-menu__action:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text, #1d2129);
}

.user-menu__action--danger:hover {
  background: #fff1f0;
  color: #f53f3f;
}

.user-menu__action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
