.button {
  border: 1px solid var(--crr-primary);
  border-radius: var(--crr-radius-control);
  background: var(--crr-primary);
  color: #fff;
  text-decoration: none;
}

.primary { background: var(--crr-primary); color: #fff; }
.button:where(:not(.danger)):hover:not(:disabled), .primary:hover:not(:disabled) {
  border-color: var(--crr-primary-hover);
  background: var(--crr-primary-hover);
}

.button--quiet, .secondary {
  border-color: var(--crr-control-border);
  background: transparent;
  color: var(--crr-quiet-text);
}

.button--quiet:hover:not(:disabled), .secondary:hover:not(:disabled) {
  border-color: var(--crr-quiet-hover-border);
  background: var(--crr-quiet-hover);
  color: var(--crr-text);
}

.panel {
  border: 1px solid var(--crr-border);
  border-radius: var(--crr-radius-panel);
  background: var(--crr-surface);
}

.notice--error, .flash.error {
  border-color: var(--crr-danger-border);
  background: var(--crr-danger-soft);
  color: var(--crr-danger-dark);
}

/* Shared application header. Keep app-specific navigation/content outside this block. */
.crr-topbar {
  border-top: 4px solid var(--crr-primary);
  border-bottom: 1px solid var(--crr-border);
  background: var(--crr-surface);
  color: var(--crr-text);
  font-family: var(--crr-font-family);
}

.crr-topbar__inner {
  width: min(1100px, calc(100% - 28px));
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
}

.crr-topbar__brand {
  min-width: 0;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--crr-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.crr-topbar__logo {
  width: 46px;
  height: 41px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.crr-topbar__name { white-space: nowrap; }

.crr-topbar__nav {
  min-width: 0;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.crr-topbar__nav a,
.crr-topbar__action {
  border: 0;
  background: none;
  color: var(--crr-muted);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}

.crr-topbar__nav a:hover,
.crr-topbar__nav a[aria-current="page"],
.crr-topbar__action:hover:not(:disabled) {
  color: var(--crr-primary-dark);
}

.crr-topbar__account {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: .9rem;
  line-height: 1.15;
}

@media (max-width: 700px) {
  .crr-topbar__inner {
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
  }

  .crr-topbar__logo {
    width: 40px;
    height: 36px;
  }

  .crr-topbar__nav {
    width: 100%;
    order: 3;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}
