/* Historial */

.hist-root {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hist-main {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.hist-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 48px 64px;
}

.hist-head { margin-bottom: 28px; }
.hist-head h1 {
  font-size: 26px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.hist-head p {
  font-size: 13.5px;
  color: var(--fg-tertiary);
  margin: 0;
}

/* Toolbar */
.hist-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.hist-search {
  flex: 1;
  display: flex; align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--fg-tertiary);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.hist-search:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-muted);
}
.hist-search input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  font-size: 13px;
  color: var(--fg-primary);
  font-family: inherit;
}
.hist-search input::placeholder { color: var(--fg-tertiary); }
.hist-filters { display: flex; gap: 8px; }

/* Dropdown */
.hist-dd { position: relative; }
.hist-dd-btn {
  display: inline-flex; align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--fg-primary);
  transition: border-color 120ms ease;
}
.hist-dd-btn:hover { border-color: var(--border-default); }
.hist-dd-lbl { color: var(--fg-tertiary); font-weight: 500; }
.hist-dd-val { color: var(--fg-primary); font-weight: 500; }
.hist-dd-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px;
  display: flex; flex-direction: column; gap: 1px;
  box-shadow: var(--shadow-md);
  z-index: 30;
}
.hist-dd-item {
  display: flex; justify-content: space-between; align-items: center;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--fg-secondary);
  border-radius: 4px;
  text-align: left;
}
.hist-dd-item:hover { background: var(--accent-primary-muted); color: var(--fg-primary); }
.hist-dd-item.selected { color: var(--accent-primary); }
.hist-dd-check { font-size: 11px; }

/* Table */
.hist-table {
  background: var(--bg-medium);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}
.hist-row {
  display: grid;
  grid-template-columns: 110px 1.6fr 110px 110px 130px 120px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.hist-headrow {
  height: 40px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--separator);
  background: rgba(255,255,255,0.015);
}
.hist-th-actions { text-align: right; }
.hist-datarow {
  height: 56px;
  border-bottom: 1px solid var(--separator);
  font-size: 13px;
  transition: background 120ms ease;
  cursor: pointer;
}
.hist-datarow:last-child { border-bottom: 0; }
.hist-datarow:hover { background: rgba(255,255,255,0.025); }
.hist-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-secondary);
  letter-spacing: 0;
}
.hist-client {
  color: var(--fg-primary);
  font-weight: 500;
}
.hist-dur {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-secondary);
  letter-spacing: 0;
}
.hist-qpill {
  display: inline-flex;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-warning);
  background: var(--accent-warning-muted);
  border: 1px solid rgba(245,200,66,0.2);
  padding: 2px 8px;
  border-radius: 10px;
}
.hist-empty { color: var(--fg-disabled); }

.hist-actions {
  display: inline-flex; justify-content: flex-end; gap: 4px;
}
.hist-act {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-tertiary);
  transition: background 120ms ease, color 120ms ease;
}
.hist-act:hover {
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
}

/* Pager */
.hist-pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px;
}
.hist-pager-info {
  font-size: 12px;
  color: var(--fg-tertiary);
}
.hist-pager-info b {
  color: var(--fg-secondary);
  font-family: var(--font-mono);
  font-weight: 500;
}
.hist-pager-ctrls { display: inline-flex; align-items: center; gap: 4px; }
.hist-page-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-secondary);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  transition: border-color 120ms ease, color 120ms ease;
}
.hist-page-btn:hover:not(:disabled) {
  border-color: var(--border-default);
  color: var(--fg-primary);
}
.hist-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.hist-page-num {
  width: 30px; height: 30px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-secondary);
  transition: background 120ms ease, color 120ms ease;
}
.hist-page-num:hover { background: rgba(255,255,255,0.04); color: var(--fg-primary); }
.hist-page-num.active {
  background: var(--accent-primary);
  color: var(--fg-inverse);
  font-weight: 600;
}
.hist-page-dots {
  width: 24px; text-align: center;
  font-size: 12px;
  color: var(--fg-tertiary);
}

/* Help menu */
.hist-help { position: relative; }
.dash-icon-btn.on {
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
}
.hist-help-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 1px;
  box-shadow: var(--shadow-md);
  z-index: 40;
}
.hist-help-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  text-align: left;
  color: var(--fg-secondary);
  transition: background 120ms ease, color 120ms ease;
}
.hist-help-item:hover { background: var(--accent-primary-muted); color: var(--fg-primary); }
.hist-help-item > svg:first-child { color: var(--accent-primary); }
.hist-help-item > div { display: flex; flex-direction: column; gap: 2px; }
.hist-help-name {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary);
}
.hist-help-desc {
  font-size: 11.5px;
  color: var(--fg-tertiary);
}
.hist-help-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-medium);
  border: 1px solid var(--border-default);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--fg-secondary);
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.hist-help-pill {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-primary-muted);
  padding: 1px 5px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}
