.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem max(1rem, calc((100vw - var(--content-width)) / 2));
  border-bottom: 1px solid var(--color-border);
  background: rgba(4, 12, 24, 0.94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.brand::before {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.22rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-success));
  box-shadow: 0 0 16px rgba(125, 227, 172, 0.35);
  content: "";
}

.header-project {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.header-actions button,
.header-actions .button {
  min-height: 2.4rem;
  padding: 0.45rem 0.75rem;
  border-color: var(--color-border);
  border-radius: var(--radius-pill);
  background: rgba(23, 45, 72, 0.72);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.header-actions button:hover,
.header-actions .button:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-raised);
  color: var(--color-text);
}

.header-actions input[type="file"] {
  display: none;
}

@media (max-width: 680px) {
  .app-header {
    position: relative;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
  }

  .header-project {
    flex: 1 1 auto;
    text-align: right;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .header-actions button,
  .header-actions .button {
    min-height: 2.25rem;
    padding-inline: 0.65rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 380px) {
  .app-header {
    padding-inline: 0.75rem;
  }

  .header-actions {
    flex-wrap: wrap;
  }
}
