/* hive-keeper SPA — custom styles on top of Pico.
   Desktop-oriented; base font a touch smaller than Pico's default. */

:root {
  /* Pico scales rem via the root font-size; 87.5% ≈ 14px base. */
  font-size: 87.5%;
  /* Status colours taken from the logo: navy blue for info/confirmations,
     rose/magenta for errors and warnings. */
  --hk-info: #243d7a;
  --hk-error: #cc1b6b;
}

/* Hide Alpine-controlled markup until Alpine has initialised. */
[x-cloak] {
  display: none !important;
}

main.container {
  max-width: 60rem;
}

/* Login screen: a narrow, vertically centred card. */
.login-view {
  max-width: 24rem;
  margin: 12vh auto 0;
}

/* Logo: large on the login card, compact in the top bar. */
.login-logo {
  display: block;
  height: 4.5rem;
  margin: 0 auto 0.75rem;
}

/* Login head (logo + wordmark + tagline) centred under the logo. */
.login-view hgroup {
  text-align: center;
}

/* Wordmark: "HIVE" bold, "KEEPER" light. */
.wordmark {
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.hive {
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-logo {
  height: 1.7rem;
}

/* Top bar with title left, account actions right. */
.topbar {
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1.5rem;
}

.muted {
  color: var(--pico-muted-color);
}

.error {
  color: var(--hk-error);
  font-weight: 600;
}

.info {
  color: var(--hk-info);
  font-weight: 600;
}

/* Link-style button (e.g. "Forgot password?") — not a boxed button. */
.link-button {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--pico-primary);
  font-size: 0.85em;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--pico-primary-hover);
}

/* Clickable brand → home. */
.brand-home {
  cursor: pointer;
}

/* Toast notifications: stacked top-right, colour-coded, click to dismiss. */
.toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(30rem, calc(100vw - 2.5rem));
}

.toast {
  padding: 1rem 1.25rem;
  border-radius: var(--pico-border-radius);
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--pico-card-box-shadow);
  cursor: pointer;
  animation: toast-in 0.2s ease-out;
}

.toast.info {
  background: var(--hk-info);
}

.toast.error {
  background: var(--hk-error);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Language switcher: two compact outline buttons. */
.langbar {
  display: flex;
  gap: 0.35rem;
}

.langbar.login-view,
.login-view .langbar {
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

button.lang {
  width: auto;
  margin: 0;
  padding: 0.15rem 0.55rem;
}

/* View tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tabs button {
  width: auto;
  margin: 0;
}

.logo-field .logo-preview {
  max-height: 6rem;
  max-width: 16rem;
  display: block;
  margin-bottom: 0.75rem;
}

/* Keep the inline refresh button from stretching to full width in the header. */
.reload {
  width: auto;
  margin: 0;
}

article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

table th[scope="row"] {
  width: 12rem;
  white-space: nowrap;
}
