/* console.css — the signed-in surface, kept apart from the marketing sheet.
 *
 * SEPARATE FILE ON PURPOSE. style.css changes when a sentence on the home page
 * changes, which is often and by whoever is writing copy. The console is the
 * only page where a broken layout costs somebody the ability to rotate a leaked
 * key, so it does not share a file with the one that gets edited casually. */

.console { padding: 48px 24px 80px; }
.console h1 { font-size: 2rem; }
.console h2 { font-size: 1.05rem; letter-spacing: .01em; margin-bottom: 14px; }

.card {
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 20px;
}
.card.narrow { max-width: 460px; }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }

input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.row input { flex: 1 1 240px; margin-bottom: 0; }

button.btn { font: inherit; cursor: pointer; }
button.btn[disabled] { opacity: .5; cursor: progress; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { filter: brightness(1.1); }

.linkish {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--blue); cursor: pointer; text-decoration: underline;
}
.linkish[disabled] { color: var(--muted); cursor: progress; }

.hint { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.said {
  background: var(--paper-2); border-left: 3px solid var(--ok);
  padding: 12px 16px; max-width: 460px; margin-top: 18px;
}
.err {
  background: var(--paper-2); border-left: 3px solid var(--danger);
  padding: 12px 16px; color: var(--ink); margin-top: 24px;
}
.muted { color: var(--muted); }

dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 0; color: var(--ink); }

/* The meter. A bar rather than a number alone, because "412 of 500" is a fact
 * and a nearly-full bar is a feeling, and the feeling is what makes somebody
 * upgrade before they are stopped mid-integration. */
.meter {
  height: 10px; background: var(--paper-3);
  border-radius: 999px; overflow: hidden; margin-bottom: 10px;
}
.meter-fill {
  height: 100%; width: 0; background: var(--blue);
  transition: width .4s ease;
}
.meter-fill.full { background: var(--warn); }
.meter-label { font-size: .9rem; color: var(--body); margin: 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: .9rem; }
td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--paper-3); vertical-align: top; }
tr.gone td { opacity: .55; }
code {
  font-family: var(--mono); font-size: .85em;
  background: var(--paper); padding: 2px 6px; border-radius: 3px;
}

.newkey {
  margin-top: 16px; padding: 16px;
  background: var(--paper); border: 1px dashed var(--blue); border-radius: var(--radius);
}
.newkey code {
  display: block; margin: 10px 0 12px; padding: 12px;
  word-break: break-all; background: var(--paper-2);
}

/* Last on the page and visually cooler than everything above it. A destructive
 * control that looks like the others is one somebody reaches by habit. */
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }

/* The Steckbrief. Long, so grouped; two columns where the fields are short. */
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 600; color: var(--ink); margin: 6px 0 10px; }
select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--paper-3);
  border-radius: var(--radius); margin-bottom: 14px;
}
select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.two { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.three { display: grid; gap: 0 16px; grid-template-columns: 1fr 2fr 6rem; }
@media (max-width: 720px) { .two, .three { grid-template-columns: 1fr; } }
.invalid { border-color: var(--danger); }
.sbstate { margin: 0 0 8px; }
.sbstate.missing { border-left: 3px solid var(--warn); padding: 8px 12px; background: var(--paper); }

/* ------------------------------------------------------------- the way in
 * The profile's and the CRM's sign-in shell (AuthLayout): a flat accent panel
 * on the left, the form on the right at 448, the panel gone below 900. No
 * header or footer while signed out — the panel carries the name and the
 * company, as it does in both apps. */
body.out > header, body.out > footer { display: none; }
body.out main.console { max-width: none; padding: 0; margin: 0; }

.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; padding: 0; }
/* `hidden` must still win: display:grid above overrides the attribute, and the
 * sign-in sat over the signed-in console (19.10.2026). */
.auth[hidden], .step[hidden] { display: none; }
.auth-panel {
  background: var(--blue); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px;
}
.auth-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 1.25rem; color: inherit; text-decoration: none;
}
.auth-logo:hover { text-decoration: none; color: inherit; }
.auth-logo .mark { width: 30px; height: 30px; }
.auth-panel .auth-logo { color: #fff; }
.auth-hero h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.12;
  font-weight: 500; letter-spacing: -0.02em; margin: 0 0 18px; max-width: 14em; }
.auth-hero p { color: rgb(255 255 255 / 0.8); font-size: 1.1rem; max-width: 30em; margin: 0; }
.auth-foot { color: rgb(255 255 255 / 0.7); font-size: .85rem; margin: 0; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 448px; }
.auth-logo.mobile { display: none; color: var(--ink); margin-bottom: 32px; }
.auth-logo.mobile .mark { color: var(--blue); }
.auth-box h2 { font-size: 1.75rem; font-weight: 500; margin: 0 0 6px; }
.auth-box .sub { color: var(--muted); margin: 0 0 24px; }
.auth-box .btn.wide { width: 100%; justify-content: center; margin-top: 4px; }
.auth-box .switch { margin: 16px 0 0; font-size: .95rem; color: var(--muted); text-align: center; }
.auth-box .said, .auth-box .err { max-width: none; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-main { align-items: flex-start; padding: 40px 16px; }
  .auth-logo.mobile { display: inline-flex; }
}

/* The signed-in page starts at the company, not a section's worth of air below
 * the header (the site's `section` padding is for the marketing pages). */
#app { padding-top: 0; }
#sbsummary { margin-top: 8px; }
#sbcancel { margin-left: 12px; }

/* Messages (051). */
.threads { list-style: none; padding: 0; margin: 0 0 12px; }
.threads li button {
  width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--paper-3);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 6px; font: inherit;
  color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.threads li button.on { outline: 2px solid var(--blue); }
.threads .unread { background: var(--blue); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.msgs { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; max-height: 360px; overflow-y: auto; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: var(--radius); background: var(--paper); white-space: pre-wrap; }
.msg.ours { align-self: flex-end; background: rgb(59 81 238 / 0.10); }
.msg small { display: block; color: var(--muted); margin-top: 4px; }
#thread h3 { font-size: 1rem; margin: 6px 0 0; }
