/* reports.css
   ===========
   Zakladka Raporty: przelacznik zakresu (range-switch, wspoldzielony z
   raportem online paliwa), kreator raportu Excel typu drag&drop oraz
   tabela "raportu online" (wykryte tankowania/ubytki paliwa).
*/

  .range-switch {
    display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; gap: 2px; align-self: flex-start;
  }
  .range-switch button {
    border: none; background: none; color: var(--text-dim); font-family: inherit; font-size: 12px;
    font-weight: 600; padding: 6px 12px; border-radius: 6px; cursor: pointer;
  }
  .range-switch button.active { background: var(--accent-brand); color: #14181D; }

  .report-online-fuel-controls.show { display: flex !important; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
  .report-online-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
  .report-online-table th, .report-online-table td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--border); }
  .report-online-table th { color: var(--text-dim); font-weight: 600; font-size: 11px; }
  .report-online-table td.mono, .report-online-table th.mono { font-family: 'IBM Plex Mono', monospace; }
  .report-online-diff-pos { color: var(--accent-red); }
  .report-online-diff-neg { color: var(--accent-brand); }
  .report-online-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; }
  .report-online-badge.tankowanie { background: rgba(107, 158, 104, 0.18); color: var(--accent-brand); }
  .report-online-badge.ubytek { background: rgba(242, 84, 91, 0.15); color: var(--accent-red); }
  /* --- Kreator raportu (drag&drop) --- */
  .report-builder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
  }

  .report-dnd-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .report-dnd-col-title { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; font-weight: 600; }
  .report-dnd-zone {
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 8px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .report-dnd-zone-target.drag-over { border-color: var(--accent-brand); background: rgba(107, 158, 104, 0.08); }
  .report-dnd-empty { font-size: 11px; color: var(--text-dim); text-align: center; padding: 20px 4px; }

  .report-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: grab;
  }
  .report-chip:active { cursor: grabbing; opacity: 0.7; }
  .report-chip.dragging { opacity: 0.4; }
  .report-chip .report-chip-remove { color: var(--accent-red); font-weight: 700; cursor: pointer; flex-shrink: 0; }

  .report-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
  }

  .report-status { font-size: 12.5px; color: var(--text-dim); margin-top: 10px; min-height: 18px; }
  .report-status.error { color: var(--accent-red); }
  .report-status.success { color: var(--accent-green); }

  /* Asystent (agent AI) - nowy modul 25.07.2026 */
  .assistant-panel { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 400px; }
  .assistant-conv-tabs {
    display: flex; gap: 6px; margin-bottom: 8px; overflow-x: auto; flex-shrink: 0; padding-bottom: 2px;
  }
  .assistant-conv-tab {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px;
    background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-dim);
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
  }
  .assistant-conv-tab.active { background: var(--accent-brand); color: #fff; border-color: var(--accent-brand); }
  .assistant-conv-tab .conv-tab-close { opacity: 0.6; font-size: 13px; line-height: 1; }
  .assistant-conv-tab .conv-tab-close:hover { opacity: 1; }
  .assistant-conv-tab-new {
    flex-shrink: 0; padding: 6px 12px; border-radius: 8px; background: transparent;
    border: 1px dashed var(--border); color: var(--text-dim); font-size: 12px; cursor: pointer;
  }
  .assistant-conv-tab-new:hover { border-color: var(--accent-brand); color: var(--accent-brand); }
  .assistant-messages {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
    padding: 4px 2px; margin-bottom: 10px;
  }
  .assistant-msg {
    max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
    white-space: pre-wrap;
  }
  .assistant-msg.user { align-self: flex-end; background: var(--accent-brand); color: #fff; border-bottom-right-radius: 3px; }
  .assistant-msg.assistant { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 3px; }
  .assistant-msg.assistant.loading { color: var(--text-dim); font-style: italic; }
  .assistant-msg.assistant.error { background: rgba(242, 84, 91, 0.12); color: var(--accent-red); }
  .assistant-input-row { display: flex; gap: 8px; align-items: stretch; }
  .assistant-input-row input {
    flex: 1 1 auto; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-family: inherit; font-size: 15px; outline: none;
  }
  .assistant-input-row input:focus { border-color: var(--accent-brand); }
  .assistant-input-row #assistant-send-btn {
    width: auto; flex: 0 0 auto; padding: 8px 16px; font-size: 13px; margin-top: 0; align-self: center;
  }
