/* Shared chrome: the top bar on every page, the feedback drawer and the sign-in page.
   Self-contained: the sign-in page loads only this file and the fonts. Brand tokens are provisional (DESIGN.md). */
:root {
  --vessco-orange: #f36f21;
  --vessco-blue: #0046ad;
  --vessco-blue-2: #2446aa;
  --ink: #222222;
  --ink-2: #32373c;
  --paper: #ffffff;
  --muted: #5a6068;
  --rule: #dfe2e6;
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4.2vw, 72px);
  --shell-h: 60px;
}

/* Buttons: solid orange, dark text. */
.sh-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 22px;
  border: 2px solid var(--vessco-orange); background: var(--vessco-orange); color: var(--ink);
  font: 700 .95rem var(--display); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.sh-button:hover { background: #ff8238; border-color: #ff8238; }
.sh-button--small { min-height: 36px; padding: 5px 14px; font-size: .85rem; }
/* The quieter action beside a primary one: outlined in blue. */
.sh-button--ghost { background: transparent; border-color: var(--vessco-blue); color: var(--vessco-blue); border-width: 1px; }
.sh-button--ghost:hover { background: var(--vessco-blue); border-color: var(--vessco-blue); color: var(--paper); }
.sh-button:disabled, .sh-button[aria-disabled="true"] { background: #eef0f3; border-color: #d4d8de; color: #69707a; cursor: not-allowed; opacity: 1; }

/* Top bar */
#shell { position: sticky; top: 0; z-index: 30; }
.shell { background: var(--paper); color: var(--ink); border-bottom: 3px solid var(--vessco-orange); font: 400 16px/1.4 var(--text); }
.shell-bar {
  position: relative; height: var(--shell-h); display: flex; align-items: center; gap: 18px;
  padding: 0 var(--gutter); white-space: nowrap;
}
.shell-logo { flex: none; display: flex; align-items: center; gap: 14px; line-height: 0; text-decoration: none; }
.shell-logo > img { width: auto; height: 32px; margin-right: -16px; } /* the wordmark image carries empty margin right of its letters */
/* The co-brand lockup: Vessco leads, Local AI follows "with" across a hairline, at the weight of a guide. */
.shell-logo__rule { flex: none; width: 1px; height: 26px; background: #c9ced5; }
.shell-menu { display: contents; }
.shell-tabs { order: 1; display: flex; align-items: center; gap: 2px; margin-right: auto; padding-left: 18px; }
.shell-tabs a {
  padding: 8px 10px; border-top: 2px solid transparent; border-bottom: 2px solid transparent; color: var(--ink-2);
  font: 700 .85rem/1.2 var(--display); letter-spacing: .01em; text-decoration: none;
}
.shell-tabs a:hover { color: var(--vessco-blue); }
.shell-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--vessco-orange); }
.shell-link {
  padding: 0; background: none; border: 0; cursor: pointer; color: var(--vessco-blue);
  font: 400 .88rem var(--text); text-decoration: underline; text-underline-offset: 5px;
}
.shell-feedback {
  order: 4; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 12px;
  background: transparent; border: 1px solid var(--vessco-blue); color: var(--vessco-blue); cursor: pointer;
  font: 600 .88rem var(--text);
}
.shell-feedback:hover { background: var(--vessco-blue); color: var(--paper); }
.shell-badge {
  min-width: 20px; padding: 0 6px; background: var(--vessco-orange); color: var(--ink);
  font: 700 .75rem/20px var(--display); text-align: center;
}
.shell-with { display: inline-flex; align-items: center; }
/* The logo's letters fill the middle half of the image; the negative margins take up its empty band so the
   letters read at about 19 px without making the bar taller. */
.shell-with img { flex: none; width: 112px; height: 40px; margin: -8px -6px -8px -5px; }
.shell-name { order: 5; color: var(--ink-2); font: 600 .95rem var(--text); }
@media (min-width: 1201px) and (max-width: 1399px) {
  .shell-name { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.shell-signout { order: 6; }
.shell-error, .drawer-error { order: 7; margin: 0; color: #b42318; font-size: .9rem; }
.shell-error[hidden] { display: none; }
.shell-pages { display: none; }
.shell :focus-visible { outline: 2px solid var(--vessco-blue); outline-offset: 3px; }

@media (max-width: 1360px) {
  .shell-bar { gap: 14px; }
  .shell-tabs { padding-left: 4px; }
  .shell-tabs a { padding: 8px 8px; }
}

/* Narrow: everything but the logo folds behind "Pages". */
@media (max-width: 1200px) {
  .shell-bar { gap: 10px; padding: 0 16px; }
  .shell-logo { margin-right: auto; gap: 11px; }
  .shell-logo > img { height: 28px; margin-right: -14px; }
  .shell-logo__rule { height: 22px; }
  .shell-pages {
    order: 7; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px;
    background: transparent; border: 1px solid var(--vessco-blue); color: var(--vessco-blue); cursor: pointer;
    font: 700 .85rem var(--display);
  }
  .shell-pages::after {
    content: ""; width: 7px; height: 7px; margin-top: -3px;
    border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease;
  }
  .shell-pages[aria-expanded="true"] { border-color: var(--vessco-orange); }
  .shell-pages[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
  .shell-menu { display: none; }
  .shell-menu.is-open {
    position: absolute; top: calc(var(--shell-h) - 1px); right: 12px; z-index: 2;
    width: min(300px, calc(100vw - 24px)); display: flex; flex-direction: column; align-items: stretch;
    padding: 6px 16px 14px; background: var(--paper); border-top: 4px solid var(--vessco-orange);
    box-shadow: 0 24px 50px -16px rgba(34, 34, 34, .45); white-space: normal;
  }
  .shell-menu > * { order: 0; }
  .shell-tabs { flex-direction: column; align-items: stretch; margin: 0; padding: 0 0 8px; border-bottom: 1px solid var(--rule); }
  .shell-tabs a { display: flex; align-items: center; min-height: 44px; padding: 0 0 0 12px; border-top: 0; border-bottom: 0; border-left: 3px solid transparent; font-size: .95rem; }
  .shell-tabs a[aria-current="page"] { border-left-color: var(--vessco-orange); }
  .shell-feedback { justify-content: space-between; min-height: 44px; margin-top: 8px; }
  .shell-name { margin-top: 12px; }
  .shell-signout { align-self: flex-start; min-height: 44px; }
}

/* A small phone: the lockup keeps both marks, a little smaller. */
@media (max-width: 400px) {
  .shell-logo { gap: 9px; }
  .shell-logo > img { height: 24px; margin-right: -12px; }
  .shell-with img { width: 98px; height: 35px; margin: -7px -5px -7px -4px; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-button, .shell-pages::after { transition: none; }
}

/* Sign-in page */
body.login {
  margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  box-sizing: border-box; background: var(--vessco-blue); color: var(--ink);
  font: 400 16px/1.6 var(--text); -webkit-font-smoothing: antialiased;
}
.login *, .login *::before, .login *::after { box-sizing: border-box; }
.login__main { width: min(420px, 100%); }
.login__logo { display: block; width: 150px; height: auto; margin: 0 0 20px; }
.login__card {
  display: grid; gap: 6px; padding: clamp(24px, 6vw, 36px); background: var(--paper); color: var(--ink-2);
  border-top: 6px solid var(--vessco-orange); box-shadow: 0 30px 70px -20px rgba(0, 20, 60, .6); color-scheme: light;
}
.login__card[hidden], .login__step[hidden] { display: none; }
.login__step { display: grid; gap: 6px; }
.login__step .sh-button { margin-top: 8px; }
.login__step .sh-button + .sh-button { margin-top: 0; }
.login__back { justify-self: start; margin-top: 4px; padding: 4px 0; border: 0; background: none; color: var(--vessco-blue); font: 600 .92rem var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.login__back:focus-visible { outline: 2px solid var(--vessco-blue); outline-offset: 2px; }
.login__unavailable { margin: 0; color: var(--ink); font-weight: 500; }
.login__card h1 { margin: 0 0 14px; color: var(--ink); font: 700 1.5rem/1.15 var(--display); }
.login__card label { margin-top: 8px; color: var(--ink); font: 600 .95rem var(--text); }
.login__card input {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #b6bbc2; border-radius: 0;
  background: var(--paper); color: var(--ink); font: 400 1rem var(--text);
}
.login__card input:focus-visible, .login__card .sh-button:focus-visible { outline: 2px solid var(--vessco-blue); outline-offset: 2px; }
.login__note { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.login__error { min-height: 1.5em; margin: 6px 0 4px; color: #b42318; font-size: .92rem; font-weight: 500; }
.login__card .sh-button { width: 100%; }

/* Your feedback drawer */
.drawer {
  position: fixed; top: calc(var(--shell-h) + 3px); right: 0; bottom: 0; z-index: 40; width: min(400px, 100vw);
  overflow-y: auto; background: var(--paper); color: var(--ink-2); border-top: 4px solid var(--vessco-orange);
  box-shadow: -24px 0 50px -20px rgba(34, 34, 34, .45); font: 400 .95rem/1.5 var(--text); white-space: normal;
}
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 8px; }
.drawer-head h2 { margin: 0; color: var(--ink); font: 700 1.2rem/1.2 var(--display); }
.drawer-close {
  min-height: 36px; padding: 4px 12px; background: none; border: 1px solid var(--vessco-blue); color: var(--vessco-blue);
  font: 700 .85rem var(--display); cursor: pointer;
}
.drawer-list { padding: 0 18px 24px; }
.drawer-list section { margin-top: 14px; }
.drawer-list h3 { margin: 0 0 6px; color: var(--vessco-blue); font: 700 .85rem var(--display); letter-spacing: .04em; text-transform: uppercase; }
.drawer-list ul { list-style: none; margin: 0; padding: 0; }
.drawer-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.drawer-list li a { color: var(--ink); font: 600 .95rem var(--text); text-decoration-color: var(--vessco-orange); text-underline-offset: 3px; }
.drawer-list li p { margin: 2px 0 0; color: var(--ink-2); font-size: .88rem; }
.drawer-none { margin: 0; color: var(--muted); }
.drawer-export { display: grid; gap: 4px; padding-top: 6px; }
.drawer-export a { color: var(--vessco-blue); font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.drawer :focus-visible { outline: 2px solid var(--vessco-blue); outline-offset: 2px; }
@media (max-width: 520px) { .drawer { width: 100vw; } }
