/* WebKeeper CRM — one stylesheet, no framework, no external requests.
   Same palette as webkeeper.net so it doesn't feel like a different product. */

:root {
  --ink: #16202e;
  --ink-soft: #55617a;
  --line: #dfe4ec;
  --bg: #f6f8fb;
  --card: #ffffff;
  --navy: #14243d;
  --teal: #0e8f8a;
  --teal-dark: #0a6f6b;
  --red: #b4342a;
  --amber: #9a6510;
  --green: #1d6f3f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--teal-dark); }

/* ---- top bar ---- */
.bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  background: var(--navy); color: #fff; padding: .7rem 1.25rem;
}
.bar .brand {
  color: #fff; text-decoration: none; font-weight: 700; letter-spacing: -.01em;
}
.bar .brand em { font-style: normal; color: #6fd6cf; }
.bar .brand span {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  opacity: .7; margin-left: .35rem;
}
.bar nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }
.bar nav a { color: #d6e0ee; text-decoration: none; font-size: .93rem; }
.bar nav a:hover { color: #fff; text-decoration: underline; }
.bar .out button {
  background: none; border: 1px solid rgba(255,255,255,.28); color: #d6e0ee;
  border-radius: 999px; padding: .28rem .8rem; font-size: .82rem; cursor: pointer;
}
.bar .out button:hover { border-color: #fff; color: #fff; }
.badge {
  background: var(--teal); color: #fff; border-radius: 999px;
  padding: 0 .42em; font-size: .75rem; font-weight: 700;
}

main { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

h1 { font-size: 1.45rem; margin: .2rem 0 1rem; letter-spacing: -.015em; }
h2 { font-size: 1.08rem; margin: 1.8rem 0 .7rem; }
h3 { font-size: .95rem; margin: 1.2rem 0 .4rem; }

.flash {
  background: #e6f5f2; border: 1px solid #a8ddd6; border-left: 4px solid var(--teal);
  padding: .7rem 1rem; border-radius: var(--radius); margin: 0 0 1.2rem;
}
.err {
  background: #fdeceb; border: 1px solid #f0b9b4; border-left: 4px solid var(--red);
  padding: .7rem 1rem; border-radius: var(--radius); margin: 0 0 1.2rem;
}
.note { color: var(--ink-soft); font-size: .9rem; }

/* ---- cards & grid ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.1rem;
}
.grid { display: grid; gap: 1.1rem; }
.grid.k3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid.k2 { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem,1fr)); gap: .7rem; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; text-decoration: none; color: inherit; display: block;
}
.tile:hover { border-color: var(--teal); }
.tile b { display: block; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.02em; }
.tile span { font-size: .82rem; color: var(--ink-soft); }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
tbody tr:hover { background: #f9fbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.wrap { overflow-x: auto; }

/* ---- pills ---- */
.pill {
  display: inline-block; padding: .1rem .55rem; border-radius: 999px;
  font-size: .76rem; font-weight: 600; white-space: nowrap;
  background: #eef1f6; color: var(--ink-soft);
}
.pill.won { background: #e2f3e9; color: var(--green); }
.pill.lost, .pill.dnc { background: #f1eeee; color: #6a6a6a; }
.pill.interested, .pill.demo_sent, .pill.agreement_sent { background: #e6f5f2; color: var(--teal-dark); }
.pill.new, .pill.scanned { background: #eaf0fa; color: #3a5a8c; }
.pill.crit { background: #fdeceb; color: var(--red); }
.pill.high { background: #fdf1e0; color: var(--amber); }
.pill.due  { background: #fdeceb; color: var(--red); }

/* ---- forms ---- */
label { display: block; font-size: .85rem; font-weight: 600; margin: .8rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=url], select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--line);
  border-radius: 7px; font: inherit; background: #fff; color: inherit;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus, a:focus {
  outline: 3px solid #8fd8d2; outline-offset: 1px;
}
.row { display: flex; flex-wrap: wrap; gap: .8rem; }
.row > * { flex: 1 1 12rem; }

button, .btn {
  display: inline-block; background: var(--teal); color: #fff; border: 0;
  border-radius: 7px; padding: .55rem 1.05rem; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { background: var(--teal-dark); }
button.ghost, .btn.ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 500;
}
button.ghost:hover, .btn.ghost:hover { border-color: var(--teal); background: #fff; }
button.danger { background: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; align-items: center; }

pre.mono {
  background: #f4f6f9; border: 1px solid var(--line); border-radius: 8px;
  padding: .8rem .9rem; overflow-x: auto; font-size: .84rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 2px solid var(--line); padding: .1rem 0 .9rem 1rem; margin-left: .3rem; }
.timeline li b { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.timeline li time { font-size: .78rem; color: var(--ink-soft); }

.foot { text-align: center; color: var(--ink-soft); font-size: .8rem; padding: 1.5rem 1rem 2.5rem; }

.login-wrap { max-width: 23rem; margin: 10vh auto; }
.login-wrap .card { padding: 1.6rem; }

@media (max-width: 640px) {
  .bar { padding: .6rem .9rem; }
  .bar nav { width: 100%; margin-left: 0; gap: .8rem; }
  main { padding: 1rem .9rem 3rem; }
}

/* ------------------------------------------------------------------
   Call mode — one column, big targets, readable at arm's length while
   you are holding a phone in the other hand.
   ------------------------------------------------------------------ */

.callmode { max-width: 40rem; margin: 0 auto; }
.callmode h1 { font-size: 1.55rem; }
.callmode .card { padding: 1rem 1.1rem; }
.callmode h2 { font-size: 1rem; margin: 0 0 .6rem; }

.bigcall {
  display: block; text-align: center; background: var(--teal); color: #fff;
  font-size: 1.25rem; font-weight: 700; text-decoration: none;
  padding: .95rem 1rem; border-radius: 12px; margin: 0 0 1.1rem;
  letter-spacing: .01em;
}
.bigcall:hover { background: var(--teal-dark); }

blockquote {
  margin: .55rem 0; padding: .6rem .9rem; background: #f4f7fa;
  border-left: 4px solid var(--teal); border-radius: 0 8px 8px 0;
  font-size: 1.02rem;
}

.card.warn { border-color: #eec9a8; background: #fffaf3; }
.card.warn h2 { color: var(--amber); }
.card.sit { border-left: 4px solid var(--teal); }

ul.tight { margin: .3rem 0; padding-left: 1.15rem; }
ul.tight li { margin-bottom: .55rem; }

details > summary {
  cursor: pointer; font-weight: 600; padding: .35rem 0;
  list-style-position: outside;
}
details > summary:hover { color: var(--teal-dark); }

.ans { border-top: 1px solid var(--line); }
.ans:first-child { border-top: 0; }
.ans > summary { font-weight: 500; padding: .6rem 0; }
.ansbody { padding: 0 0 .8rem .2rem; }
.ansbody p { margin: .5rem 0; }
.ansbody .bullet { margin: .2rem 0 .2rem .6rem; }

.kind {
  display: inline-block; font-size: .66rem; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 700; padding: .1rem .42rem;
  border-radius: 4px; margin-right: .45rem; vertical-align: .08em;
}
.k-fact      { background: #eaf0fa; color: #3a5a8c; }
.k-objection { background: #fdf1e0; color: var(--amber); }
.k-policy    { background: #fdeceb; color: var(--red); }
.k-howto     { background: #e6f5f2; color: var(--teal-dark); }

.stagerow { display: flex; flex-wrap: wrap; gap: .45rem; }
.stagerow form { margin: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* The printable sheet, previewed on screen before you print it.
   Scoped to @media screen ON PURPOSE: without that, these rules beat
   print.css on specificity and the PDF comes out with rounded card borders
   and no space to write on. */
@media screen {
  body.sheet { background: var(--bg); }
  body.sheet .page {
    max-width: 52rem; margin: 1rem auto; background: #fff; padding: 2rem 2.2rem;
    border: 1px solid var(--line); border-radius: var(--radius);
  }
  body.sheet .ph { display: flex; justify-content: space-between; gap: 1rem;
    border-bottom: 2px solid var(--ink); padding-bottom: .6rem; }
  body.sheet .phone { font-size: 1.3rem; font-weight: 700; white-space: nowrap; }
  body.sheet .sub { color: var(--ink-soft); font-size: .85rem; }
  body.sheet .cols { display: flex; gap: 1.6rem; flex-wrap: wrap; }
  body.sheet .cols > div { flex: 1 1 16rem; }
  body.sheet h2.danger { color: var(--red); }
  body.sheet .lines { display: none; }
  body.sheet .pf { display: flex; justify-content: space-between; gap: 1rem;
    border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .5rem;
    font-size: .85rem; color: var(--ink-soft); }
}

@media (max-width: 640px) {
  .callmode h1 { font-size: 1.35rem; }
  .bigcall { font-size: 1.15rem; padding: 1.05rem 1rem; }
  blockquote { font-size: 1rem; }
}
