:root {
  --shell-primary: #1a1a2e;
  --shell-border: #e2e4ec;
  --shell-hover: #f0f2ff;
  --shell-text-soft: #aab4e4;
  --shell-text-muted: #ccd0ef;
  --shell-danger: #e63946;
}

/* Shared top shell */
.top-shell {
  background: var(--shell-primary);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.top-shell__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-shell__center {
  text-align: center;
}

.top-shell__right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.top-shell__link {
  color: var(--shell-text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.top-shell__link:hover {
  color: #fff;
}

.top-shell__link.is-active,
.top-shell__current {
  color: var(--shell-text-muted);
  font-weight: 600;
}

.top-shell__sep {
  color: #444;
}

.top-shell__brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top-shell__user {
  font-size: 0.8rem;
  color: var(--shell-text-soft);
}

.shell-btn {
  border: 1.5px solid rgba(204, 208, 239, 0.45);
  border-radius: 6px;
  background: transparent;
  color: #eef2ff;
  padding: 6px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.shell-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

.shell-btn--danger {
  color: #ffb6be;
  border-color: rgba(230, 57, 70, 0.5);
}

.shell-btn--danger:hover:not(:disabled) {
  background: rgba(230, 57, 70, 0.16);
  border-color: rgba(255, 165, 174, 0.9);
}

/* Shared login overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 360px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.login-logo {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.login-logo img {
  max-height: 52px;
  max-width: 160px;
  object-fit: contain;
}

.login-card h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--shell-primary);
}

.login-sub {
  font-size: 0.85rem;
  color: #666780;
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #666780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-form input {
  padding: 10px 12px;
  border: 1.5px solid var(--shell-border);
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.18s ease;
}

.login-form input:focus {
  border-color: #4361ee;
}

.login-error {
  color: var(--shell-danger);
  font-size: 0.82rem;
  min-height: 16px;
  text-align: center;
}

@media (max-width: 760px) {
  .top-shell {
    grid-template-columns: 1fr;
    height: auto;
    gap: 8px;
    padding: 10px 14px;
  }

  .top-shell__left,
  .top-shell__center,
  .top-shell__right {
    justify-content: center;
  }
}
