/* ---- ui/pages/logs.py, logs_filters.py, logs_lines.py (accounts area plan
   AA10, AA16): the Logs page. Every class here is `aucra-logs-`; the panels
   are the kit's, so the soft look reaches them. Narrow rules follow each
   card's own width (container queries), never the viewport's: the assistant
   drawer narrows the column while the viewport stays wide (rules.md). ---- */

/* The head takes the column's whole width, so Download CSV sits at its
   right edge, as the Accounts area's head does (.aucra-acct-head). */
.aucra-logs-head {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: 100%;
  gap: 8px;
  min-width: 0;
}
.aucra-logs-head-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.aucra-logs-head-row > .aucra-title {
  flex: 1 1 auto;
  min-width: 0;
}
.aucra-logs-scope {
  font-size: 13.5px;
  color: var(--text);
}

/* The filters card. */
.aucra-logs-filters {
  container: aucra-logs-filters / inline-size;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 16px;
  min-width: 0;
}
.aucra-logs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
a.aucra-logs-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}
a.aucra-logs-chip:hover {
  border-color: var(--line-strong);
  background: var(--mist);
}
a.aucra-logs-chip:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
/* Chosen is a state: the gold wash inside a gold edge, as the kit's chips. */
a.aucra-logs-chip-on,
a.aucra-logs-chip-on:hover {
  background: var(--gold-wash);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 0.5px var(--gold);
  color: var(--text);
  font-weight: 600;
}
.aucra-logs-fold {
  display: none;
  align-self: flex-start;
}
.aucra-logs-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  min-width: 0;
}
.aucra-logs-select {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.aucra-logs-select-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
@container aucra-logs-filters (max-width: 559px) {
  /* The chips scroll inside their row, the selects fold under Filters (E16). */
  .aucra-logs-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .aucra-logs-fold {
    display: inline-flex;
  }
  .aucra-logs-selects {
    display: none;
    grid-template-columns: minmax(0, 1fr);
  }
  .aucra-logs-open .aucra-logs-selects {
    display: grid;
  }
}

/* The lines card. */
.aucra-logs-lines {
  container: aucra-logs-lines / inline-size;
  min-width: 0;
}
.aucra-logs-day + .aucra-logs-day,
.aucra-logs-line {
  border-top: 1px solid var(--soft-line);
}
.aucra-logs-day-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 18px;
  background: var(--wash-head);
}
.aucra-logs-day:first-child .aucra-logs-day-head {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.aucra-logs-day-name {
  font-size: 13px;
  font-weight: 600;
}
.aucra-logs-day-count,
.aucra-logs-count {
  font-size: 12.5px;
  color: var(--muted);
}
.aucra-logs-line {
  display: grid;
  grid-template-columns: 48px 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  font-size: 13.5px;
}
.aucra-logs-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}
.aucra-logs-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.aucra-logs-sentence {
  line-height: 1.45;
  overflow-wrap: anywhere;
}
a.aucra-logs-link {
  justify-self: end;
  font-size: 12.5px;
  color: var(--gold-deep);
  white-space: nowrap;
}
.aucra-logs-empty {
  padding: 28px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.aucra-logs-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--soft-line);
}
@container aucra-logs-lines (max-width: 559px) {
  .aucra-logs-line {
    grid-template-columns: 40px 24px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 10px 14px;
  }
  .aucra-logs-initials {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  a.aucra-logs-link {
    grid-column: 3;
    justify-self: start;
  }
  .aucra-logs-day-head,
  .aucra-logs-foot {
    padding-left: 14px;
    padding-right: 14px;
  }
}
