/* Today: the Morning Report and the reply box.
 *
 * Built from the dashboard's own variables (dashboard.css). The report is for
 * reading on a phone, half awake, so it gets one calm column, 16px text at a
 * 1.6 line height, and gold for only three things: the flags, the Top 3
 * heading, and the one-thing rule.
 */

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

.header-wordmark h1.name { font-size: 13px; }

/* A styled button or box with display set would otherwise ignore hidden. */
[hidden] { display: none !important; }

/* The tab bar scrolls sideways on a narrow phone rather than wrapping. */
.tab-bar { overflow-x: auto; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; }

.tab-btn:focus-visible,
.today button:focus-visible,
.today textarea:focus-visible,
.today input:focus-visible,
.timeout button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.today {
  max-width: 760px;
  margin: 0 auto;
}

.today .section-title { color: var(--teal); }

.today-note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.today-signin p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 16px; }
.today-status { font-size: 14px; color: var(--text-secondary); margin-top: 10px; min-height: 1.4em; overflow-wrap: anywhere; }

.today-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius-sm);
  background: var(--teal-glow);
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.today-btn:hover { background: #2dcea833; }
.today-btn[disabled] { opacity: 0.5; cursor: default; }
.today-btn.quiet {
  border-color: var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ------------------------------- the report ------------------------------- */

.report-date {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.report-built {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 24px;
}

.report-group { margin: 0 0 24px; }
.report-group h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.report-group ul { list-style: none; }
.report-group li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  padding: 3px 0;
  overflow-wrap: anywhere;
}
.report-group li + li { border-top: 1px solid #1e233080; }

.report-top3 {
  background: var(--bg-card);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.report-top3 h3 { color: var(--gold); }
.report-top3 li + li { border-top: none; }

.report-one {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 16px;
}

.flag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-left: 6px;
}
.flag.lead { margin: 0 6px 0 0; }

/* -------------------------------- the reply -------------------------------- */

.chat { margin-top: 8px; padding-bottom: 8px; }
.chat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.chat-log { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg {
  font-size: 15px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.you { border-color: var(--teal-dim); }
.msg.sys { color: var(--text-secondary); background: transparent; }
.msg .who {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.composer {
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}
.composer textarea {
  flex: 1;
  min-height: 44px;
  resize: vertical;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  padding: 8px;
}
.composer textarea::placeholder { color: var(--text-secondary); }

/* On a phone the reply box stays one thumb away. */
@media (max-width: 699px) {
  .composer {
    position: sticky;
    bottom: 8px;
    box-shadow: 0 -8px 24px #08090dcc;
  }
}

/* Dabir's confirmation card, the same behavior as on Dabir's own page. */
.card {
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card h3 { font-size: 16px; color: var(--gold); margin-bottom: 8px; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; }
.card dt { color: var(--text-secondary); }
.card dd.amount { color: var(--gold); font-weight: 600; }
.card .flagline { color: var(--gold); font-size: 14px; margin-top: 8px; }
.card .asks label { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin-top: 8px; }
.card .asks input { width: 20px; height: 20px; margin-top: 2px; }
.card .cardlabel { display: block; font-size: 14px; color: var(--text-secondary); margin-top: 12px; }
.card .yesrow { display: flex; gap: 8px; margin-top: 6px; }
.card .yesrow input {
  flex: 1; min-height: 44px;
  background: var(--bg-panel); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 16px; padding: 8px 10px;
}
.card .err { color: #ff8a8a; font-size: 14px; margin-top: 8px; }
.card .done { color: var(--green); font-size: 15px; margin-top: 10px; }
.card .cardnote { color: var(--text-secondary); font-size: 13px; margin-top: 8px; }

/* --------------------------------- setup --------------------------------- */

.setup { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 24px; }
.setup-row { margin-bottom: 24px; }
.setup-row h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.setup-row p { font-size: 15px; line-height: 1.6; color: var(--text-primary); margin-bottom: 10px; }
.setup-row label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.setup-row textarea {
  width: 100%;
  min-height: 96px;
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px;
  margin-bottom: 10px;
}
.setup-row .row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------ signed out ------------------------------ */

.timeout {
  position: fixed; inset: 0;
  background: #08090de6;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 50;
}
.timeout[hidden] { display: none; }
.timeoutbox {
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.timeoutbox h2 { font-size: 18px; margin-bottom: 8px; }
.timeoutbox p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  * { transition: none !important; }
}
