/* AVA Conversations (client_logs.py) - the admin's Material 3 look (admin.css),
   only what this read-only page uses, so it ships without the admin app.
   Light and dark follow the Windows setting. */

:root {
  --primary: #0b57d0;            --on-primary: #ffffff;
  --primary-container: #d3e3fd;  --on-primary-container: #041e49;
  --secondary-container: #c2e7ff; --on-secondary-container: #001d35;
  --surface: #ffffff;            --surface-dim: #f8fafd;
  --surface-1: #f0f4f9;          --surface-2: #e9eef6;  --surface-3: #dde3ea;
  --on-surface: #1f1f1f;         --on-surface-variant: #444746;
  --outline: #747775;            --outline-variant: #c4c7c5;
  --error: #b3261e;              --error-container: #f9dedc; --on-error-container: #410e0b;
  --success: #146c2e;            --success-container: #c4eed0;
  --warning: #8f4a00;            --warning-container: #ffdfa6;
  --ice: #0d7fa3;                --navy: #060913;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
  --font: "Google Sans", "Roboto", "Segoe UI", system-ui, Arial, sans-serif;
  --font-text: "Roboto", "Segoe UI", system-ui, Arial, sans-serif;
  color-scheme: light;
}
@media screen and (prefers-color-scheme: dark) {      /* print stays light */
  :root {
    --primary: #a8c7fa;            --on-primary: #062e6f;
    --primary-container: #0842a0;  --on-primary-container: #d3e3fd;
    --secondary-container: #004a77; --on-secondary-container: #c2e7ff;
    --surface: #131314;            --surface-dim: #131314;
    --surface-1: #1b1b1c;          --surface-2: #1e1f20; --surface-3: #282a2c;
    --on-surface: #e3e3e3;         --on-surface-variant: #c4c7c5;
    --outline: #8e918f;            --outline-variant: #444746;
    --error: #f2b8b5;              --error-container: #8c1d18; --on-error-container: #f9dedc;
    --success: #6dd58c;            --success-container: #0f5223;
    --warning: #ffb870;            --warning-container: #5c3c00;
    --ice: #70e2ff;
    --shadow-1: 0 1px 2px rgba(0,0,0,.6), 0 1px 3px 1px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--surface-1); color: var(--on-surface); font: 14px/20px var(--font-text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font: 400 28px/36px var(--font); margin: 0; }
p { margin: 0; }
code { font-family: "Roboto Mono", Consolas, monospace; font-size: 12.5px; background: var(--surface-2);
       padding: 2px 6px; border-radius: 6px; }
.muted { color: var(--on-surface-variant); }
.small { font-size: 12px; line-height: 16px; }
.err { color: var(--error); }

/* icons (Material Symbols; hidden until the font has loaded) */
.ms { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 20px;
      line-height: 1; display: inline-block; width: 1em; height: 1em; overflow: hidden; white-space: nowrap;
      direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased;
      font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; vertical-align: middle;
      flex: none; visibility: hidden; }
.icons-ready .ms { visibility: visible; }

/* top bar with AVA's mark (as on the iPad and its home-screen icon) */
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
          min-height: 64px; padding: 8px 24px; background: var(--surface-1); flex-wrap: wrap; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
        background: var(--navy); color: #70e2ff; border: 2px solid #70e2ff; font: 500 17px/1 var(--font);
        box-shadow: 0 0 10px rgba(112, 226, 255, .45); }
.brand { font: 22px/28px var(--font); }
.brand b { font-weight: 500; }
.spacer { flex: 1; }
.switcher { width: 260px; margin: 0; }

.content { max-width: 1200px; margin: 0 auto; padding: 8px 24px 64px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px;
               flex-wrap: wrap; padding: 16px 4px 20px; }
.page-header p { margin-top: 4px; }

.card { background: var(--surface); border-radius: 16px; padding: 24px; margin: 0 0 16px; }
.card.flush { padding: 0; }
.empty { text-align: center; padding: 48px 16px; color: var(--on-surface-variant); }
.empty .ms { font-size: 48px; display: block; margin: 0 auto 12px; }
.banner { display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; border-radius: 16px;
          margin: 0 0 16px; background: var(--error-container); color: var(--on-error-container); }
.banner .ms { font-size: 24px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px;
       padding: 0 24px; border-radius: 20px; border: 0; font: 500 14px/20px var(--font-text);
       cursor: pointer; text-decoration: none; white-space: nowrap; position: relative; overflow: hidden; }
.btn:hover { text-decoration: none; }
.btn .ms { font-size: 18px; margin-left: -8px; }
.btn::after { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity .15s; }
.btn:hover::after { opacity: .08; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.text { background: transparent; color: var(--primary); padding: 0 12px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
            color: var(--on-surface-variant); }
.icon-btn:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); text-decoration: none; }
.icon-btn .ms { font-size: 24px; }

/* outlined fields (label on the border) */
.tf { position: relative; display: block; margin: 6px 0 0; }
.tf input, .tf select { display: block; width: 100%; min-height: 40px; padding: 8px 12px;
  font: 14px/24px var(--font-text); color: var(--on-surface); background: transparent;
  border: 1px solid var(--outline); border-radius: 4px; outline: none; }
.tf select { appearance: none; padding-right: 40px; cursor: pointer;
  background: linear-gradient(45deg, transparent 50%, var(--on-surface-variant) 50%) right 22px center / 6px 6px no-repeat,
              linear-gradient(-45deg, transparent 50%, var(--on-surface-variant) 50%) right 16px center / 6px 6px no-repeat; }
.tf select option { background: var(--surface); color: var(--on-surface); }
.tf input:focus, .tf select:focus { border: 2px solid var(--primary); padding: 7px 11px; }
.tf-label { position: absolute; left: 12px; top: -8px; padding: 0 4px; background: var(--surface);
            font: 12px/16px var(--font-text); color: var(--on-surface-variant); pointer-events: none; }
.appbar .tf-label { background: var(--surface-1); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer;
         color: var(--on-surface-variant); }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }

/* filters and numbers */
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 12px; align-items: center; }
.filters .grow { grid-column: span 2; }
.filter-actions { display: flex; gap: 4px; justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px;
        border: 1px solid var(--outline-variant); border-radius: 8px; font: 500 13px/18px var(--font-text);
        color: var(--on-surface-variant); white-space: nowrap; }
.chip .ms { font-size: 18px; }
.chip.live { border-color: transparent; background: var(--success-container); color: var(--success); }
.conv-head { display: flex; align-items: center; gap: 12px; }
.conv-head .ms { font-size: 24px; color: var(--primary); }
.conv-head .btn { margin-left: auto; }

/* the log table */
.table-wrap { overflow-x: auto; }
table.log { width: 100%; min-width: 1000px; border-collapse: collapse; font: 14px/20px var(--font-text); }
table.log th { text-align: left; padding: 14px 12px; font: 500 12px/16px var(--font-text); color: var(--on-surface-variant);
               border-bottom: 1px solid var(--outline-variant); white-space: nowrap; }
table.log td { padding: 12px; border-bottom: 1px solid var(--outline-variant); vertical-align: top; }
table.log th:first-child, table.log td:first-child { padding-left: 20px; }
table.log tbody tr:last-child td { border-bottom: 0; }
table.log tbody tr:hover td { background: color-mix(in srgb, var(--on-surface) 4%, transparent); }
table.log tr.greeting td { background: var(--surface-dim); }
table.log td:nth-child(4) { width: 22%; }
table.log td:nth-child(5) { width: 30%; }
table.log .num { text-align: right; white-space: nowrap; padding-right: 20px; }
table.log .nowrap { white-space: nowrap; }
table.log .conv { font: 12px/16px "Roboto Mono", Consolas, monospace; }
.ref { width: 25%; font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.ref div { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px; }
.ref .ms { font-size: 16px; color: var(--primary); margin-top: 1px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px 0 6px; border-radius: 12px;
        font: 500 12px/16px var(--font-text); white-space: nowrap; margin-top: 4px; }
.pill .ms { font-size: 16px; }
.pill.guest, .pill.ready { background: var(--success-container); color: var(--success); }
.pill.test { background: var(--surface-3); color: var(--on-surface-variant); }
.pill.warn { background: var(--warning-container); color: var(--warning); padding-left: 10px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 8px 16px;
         border-top: 1px solid var(--outline-variant); }

.signout { display: flex; align-items: center; gap: 4px; margin: 0; }
.update-actions { margin-top: 16px; }
.steps { margin: 4px 0 12px; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 22px; }
.earlier { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.earlier li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.login { max-width: 420px; margin: 48px auto; }
.login .tf { margin-top: 20px; }
.login .tf-label { background: var(--surface); }
.login-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.login .banner { margin: 16px 0 0; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled::after { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-actions .picker { width: 260px; margin: 0; }
.banner.info { background: var(--primary-container); color: var(--on-primary-container); }
.warn { color: var(--warning); }

/* "Analyze conversations with AI": the confirm dialog (as AVA Admin's) */
dialog { border: 0; padding: 24px; border-radius: 28px; background: var(--surface-2); color: var(--on-surface);
         width: min(560px, calc(100vw - 32px)); box-shadow: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
dialog h2 { font-size: 24px; line-height: 32px; margin: 8px 0 16px; text-align: center; }
dialog p { margin: 0 0 12px; }
dialog .dlg-icon { display: block; text-align: center; color: var(--primary); }
dialog .dlg-icon .ms { font-size: 24px; }
dialog .facts { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 8px; }
dialog .facts li { display: flex; gap: 10px; align-items: flex-start; color: var(--on-surface-variant); }
dialog .facts li.warn { color: var(--warning); }
dialog .facts .ms { font-size: 20px; margin-top: 0; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* the analysis: progress, then the report */
.job { display: flex; gap: 16px; align-items: flex-start; background: var(--primary-container);
       color: var(--on-primary-container); }
.job .ms { font-size: 24px; }
.job-lines { flex: 1; display: grid; gap: 4px; }
.progress { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--primary) 25%, transparent);
            overflow: hidden; margin-top: 8px; position: relative; }
.progress::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--primary);
                   border-radius: 2px; animation: indet 1.4s infinite cubic-bezier(.4,0,.2,1); }
@keyframes indet { from { left: -35%; } to { left: 100%; } }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sec-head .ms { font-size: 24px; color: var(--primary); }
h2 { font: 400 22px/28px var(--font); margin: 0; }
.overview > p { font-size: 15px; line-height: 24px; }
.insights { list-style: none; padding: 0; margin: 0; }
.insight p { margin: 12px 0 0; font-size: 15px; line-height: 23px; }
.ins-head { display: flex; align-items: flex-start; gap: 14px; }
.ins-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
           background: var(--primary); color: var(--on-primary); font: 500 16px/1 var(--font); }
.ins-title { flex: 1; min-width: 0; }
.ins-title .small { margin-top: 2px; }
.pill.impact { margin-top: 4px; padding: 0 10px; }
.pill.impact.high { background: var(--primary-container); color: var(--on-primary-container); }
.pill.impact.medium { background: var(--secondary-container); color: var(--on-secondary-container); }
.pill.impact.low { background: var(--surface-3); color: var(--on-surface-variant); }
.insight .evidence { display: flex; gap: 10px; color: var(--on-surface-variant); font-size: 14px; line-height: 21px; }
.insight .evidence .ms { font-size: 20px; color: var(--on-surface-variant); }
.todo { display: flex; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: 12px;
        background: var(--success-container); color: var(--on-surface); }
.todo .ms { font-size: 22px; color: var(--success); }
.todo p { margin: 2px 0 0; }
.notes { display: flex; gap: 14px; }
.notes .ms { font-size: 24px; color: var(--on-surface-variant); }
.notes p { margin: 4px 0 0; }

@media (max-width: 900px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .content, .appbar { padding-left: 16px; padding-right: 16px; }
  .switcher, .header-actions .picker { width: 100%; }
}

/* Print or save as PDF: the report only, on white */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; }
  .appbar, .no-print { display: none !important; }
  .content { max-width: none; padding: 0; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; padding: 16px; }
  .ms { visibility: visible !important; }
}
