/* Shared Spec CRM shell + theme tokens (EFS red).
   Homepage includes this file. Company boards (/c/<slug>) already get the
   same colour tokens from /style.css and /brand/brand.js; they can also
   include this sheet later for the reusable .shell-* header without
   changing token names (--red, --red-d, --red-l). */

:root {
  --red: #C8102E;
  --red-d: #9E0B23;
  --red-l: #FBE5E8;
  --ink: #14161A;
  --mut: #57606A;
  --line: #E3E6EA;
  --bg: #F6F7F8;
  --surface: #ffffff;
  --shadow: 0 8px 24px rgba(20, 22, 26, 0.08);
  --radius: 12px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: Archivo, Inter, system-ui, sans-serif;
  --header-max: 1120px;
  --focus: 0 0 0 3px var(--red-l), 0 0 0 5px var(--red);
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.shell-header-accent {
  height: 3px;
  background: var(--red);
}

.shell-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  max-width: var(--header-max);
  margin: 0 auto;
}

.shell-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.shell-brand:hover { color: var(--ink); }

.shell-brand:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}

.shell-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  flex: 0 0 auto;
  line-height: 1;
}

.shell-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.shell-brand-name { white-space: nowrap; }

.shell-brand-sub {
  font-family: var(--font);
  font-weight: 500;
  font-size: 11px;
  color: var(--mut);
  letter-spacing: 0;
}

.shell-user {
  margin-left: auto;
  text-align: right;
  min-width: 0;
  max-width: 42vw;
}

.shell-logout { flex: 0 0 auto; }

.shell-user-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-user-email {
  font-size: 12px;
  color: var(--mut);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-main {
  flex: 1 1 auto;
  width: 100%;
}

.shell-footer {
  padding: 20px 16px 28px;
  text-align: center;
  color: var(--mut);
  font-size: 12px;
}

.shell-footer a { color: var(--mut); }
.shell-footer a:hover { color: var(--red); }

@media (max-width: 720px) {
  .shell-header-inner {
    padding: 10px 14px;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .shell-brand-sub { display: none; }
  .shell-brand { flex: 1 1 auto; min-width: 0; }
  .shell-user {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
    max-width: 100%;
    text-align: left;
    padding-left: 42px;
  }
}
