/* Admin surfaces reuse the modern palette with a wider, denser layout. */
.admin { max-width: 1060px; margin: 0 auto; padding: 24px 22px 90px; }
.admin h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 4px; }
.admin .lede { color: var(--muted); margin: 0 0 22px; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.stat:hover { border-color: var(--faint); }
.stat b { display: block; font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

.adtable { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.adtable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); background: var(--rail); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.adtable td { padding: 10px 14px; border-bottom: 1px solid var(--rowline); font-size: 14px; vertical-align: middle; }
.adtable tr:last-child td { border-bottom: 0; }
.adtable td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.adtable .rowacts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adtable form { margin: 0; display: inline; }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.formgrid .span2 { grid-column: 1 / -1; }
.admin .field span { font-size: 12px; }
.admin select, .admin input[type="date"] {
  width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px;
}
.checkrow { display: flex; flex-wrap: wrap; gap: 8px; }
.checkrow label {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: var(--panel); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; cursor: pointer;
}
.checkrow label:has(input:checked) { border-color: var(--ink); background: var(--chip); font-weight: 600; }

.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; border-top: 1px solid var(--line); margin-top: 18px; display: flex; gap: 10px; align-items: center; }

.warn { background: var(--v-super-bg); color: var(--v-super); border-radius: 9px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; font-weight: 500; }
.ok { background: var(--v-rec-bg); color: var(--v-rec); border-radius: 9px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; font-weight: 500; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 26px; text-align: center; background: var(--panel); margin-bottom: 20px; }
.dropzone input[type="file"] { font: inherit; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

@media (max-width: 700px) { .formgrid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- autofill */
.autofill {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--rail);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.autofill input[type="text"] {
  flex: 1 1 240px;
  min-width: 180px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 7px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13.5px;
}
#autofill-report { margin: -4px 0 16px; }
#autofill-report a { color: inherit; }

/* Values Claude suggested, so they stand out from what you typed. */
.admin .filled,
.admin input.filled,
.admin select.filled {
  background: var(--v-want-bg);
  border-color: var(--v-want);
}
.checkrow label.filled { border-color: var(--v-want); background: var(--v-want-bg); }

@media (max-width: 640px) {
  .admin { padding: 18px 14px 80px; }
  .admin h1 { font-size: 22px; }

  /* The admin nav is a lot of pills - let it wrap instead of overflowing. */
  .chrome__actions { flex-wrap: wrap; gap: 6px; }

  .autofill { flex-direction: column; align-items: stretch; }
  .autofill .btn { width: 100%; }
  .autofill input[type="text"] { width: 100%; }

  /* Wide admin tables scroll rather than squashing the page. */
  .adtable { display: block; overflow-x: auto; white-space: nowrap; }
  .adtable td, .adtable th { white-space: normal; }
  .adtable .rowacts { justify-content: flex-start; }

  .sticky { flex-wrap: wrap; }
  .sticky .btn { flex: 1 1 auto; text-align: center; }

  /* 16px stops iOS zooming the page when a field takes focus. */
  .admin input[type="text"],
  .admin input[type="password"],
  .admin input[type="date"],
  .admin select,
  .admin textarea { font-size: 16px; }
}

/* ---------------------------------------------------------------- dictate */

.dictabox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 720px;
}
.dictabox textarea {
  width: 100%;
  min-height: 190px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 16px;
  font: inherit;
  font-size: 16px;          /* 16px keeps iOS from zooming on focus */
  line-height: 1.55;
  resize: vertical;
}
.dictabox textarea:focus { outline: 0; }

.dictabar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--rail);
}
.dictabar__mic span { color: var(--v-super); }
.dictabar__mic.is-live {
  border-color: var(--v-super);
  background: var(--v-super-bg);
  color: var(--v-super);
  font-weight: 600;
}
.dictabar__mic.is-live span { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.transcript {
  max-width: 720px;
  background: var(--rail);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.transcript summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.transcript p { margin: 10px 0 2px; line-height: 1.55; color: var(--text2); white-space: pre-wrap; }

.actioncard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 17px;
  margin-bottom: 14px;
  max-width: 720px;
}
.actioncard.is-done { opacity: .55; }
.actioncard__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.actioncard__acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.actioncard__acts form { margin: 0; }

.kindtag {
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.kind-update  { background: var(--v-want-bg);  color: var(--v-want); }
.kind-create  { background: var(--v-rec-bg);   color: var(--v-rec); }
.kind-unclear { background: var(--v-super-bg); color: var(--v-super); }

.notewarn {
  background: var(--v-super-bg);
  color: var(--v-super);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
  margin: 0 0 10px;
}

.difftable { width: 100%; border-collapse: collapse; font-size: 14px; }
.difftable td { padding: 5px 0; vertical-align: top; border-bottom: 1px solid var(--rowline); }
.difftable tr:last-child td { border-bottom: 0; }
.difftable__f { color: var(--muted); width: 120px; }
.difftable__from { color: var(--faint); text-decoration: line-through; }
.difftable__arrow { color: var(--faint); width: 22px; text-align: center; }
.difftable__to { font-weight: 600; }

.difflabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
  margin: 14px 0 4px;
}
.reviewtext {
  margin: 0;
  line-height: 1.6;
  color: var(--text2);
  white-space: pre-wrap;
  border-left: 3px solid var(--v-rec);
  padding-left: 12px;
}

@media (max-width: 640px) {
  .difftable__f { width: 88px; font-size: 12.5px; }
  .difftable { font-size: 13.5px; }
  .actioncard__acts .btn { flex: 1 1 auto; text-align: center; }
  .dictabox textarea { min-height: 220px; }
  .dictabar__mic { flex: 1 1 100%; text-align: center; }
}

/* ---------------------------------------------------------------- guide */

.guide { max-width: 660px; }

.guidesec {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.guidesec:first-child { border-top: 0; padding-top: 8px; }

.guidesec h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  margin: 0 0 14px;
}
.guidesec p {
  margin: 0 0 14px;
  line-height: 1.7;
  color: var(--text2);
  font-size: 16px;
  font-weight: 300;
}
.guidesec p:last-child { margin-bottom: 0; }
.guidesec b { font-weight: 500; color: var(--ink); }
.guidesec i { color: var(--muted); }
.guidesec a { text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.guidesec a:hover { border-bottom-color: var(--accent); }

.guidekv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 20px;
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 300;
}
.guidekv dt {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 5px;
}
.guidekv dd { margin: 0; color: var(--text2); line-height: 1.6; }

@media (max-width: 640px) {
  .guidesec h2 { font-size: 23px; }
  .guidekv { grid-template-columns: 1fr; gap: 3px 0; }
  .guidekv dt { margin-top: 14px; }
  .guidekv dt:first-child { margin-top: 0; }
}
