/**
 * SCOP — üst app bar
 */

.app-main-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.app-topbar {
  flex-shrink: 0;
  height: var(--header-height);
  background: var(--color-workspace);
  border-bottom: 1px solid var(--color-border-light);
}

.app-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  padding: 0 1.75rem;
}

.app-topbar-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 42rem;
}

.app-topbar-search {
  width: 100%;
  height: 42px;
  padding: 0 3.25rem 0 2.75rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  box-shadow: none;
}

.app-topbar-search::placeholder {
  color: var(--color-text-muted);
}

.app-topbar-search:disabled {
  cursor: not-allowed;
  opacity: 0.92;
}

.app-topbar-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.app-topbar-search-icon svg {
  width: 100%;
  height: 100%;
}

.app-topbar-search-kbd {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: var(--color-surface-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  line-height: 1.2;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.app-topbar-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.app-topbar-icon-btn:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.05);
  color: #334155;
}

.app-topbar-icon-btn:disabled {
  cursor: default;
}

.app-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.app-topbar-icon svg {
  width: 100%;
  height: 100%;
}

.app-topbar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: #fff;
  pointer-events: none;
}

.app-topbar-badge--red {
  background: #ef4444;
}

.app-topbar-badge--blue {
  background: #3b82f6;
}
