/* Revision: 2026-03-27 – Initial styles for QBOReports tool page */
/* Revision: 2026-03-28 – Add qbo-diff column styling for two-column P&L view */

.tool-page { background-color: #0a0a0a; }

.reports-hero {
  background: linear-gradient(135deg, #071a12 0%, #0a0a0a 60%, #0a0f1a 100%);
  border-bottom: 1px solid #0d2d1a;
  padding: 64px 0 56px;
}

.tool-icon { font-size: 48px; margin-bottom: 16px; display: block; }

.tool-title {
  font-family: var(--font-display);
  font-size: 42px; font-weight: 700;
  color: #ffffff; margin-bottom: 16px; line-height: 1.2;
}
@media (min-width: 768px)  { .tool-title { font-size: 52px; } }
@media (min-width: 1280px) { .tool-title { font-size: 60px; } }

.tool-value-prop {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 400;
  color: #e2e8f0; max-width: 560px; margin: 0 auto 12px; line-height: 1.5;
}
@media (min-width: 768px) { .tool-value-prop { font-size: 22px; } }

.tool-subtitle {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 300;
  color: #9ca3af; max-width: 620px; margin: 0 auto; line-height: 1.7;
}
@media (min-width: 768px) { .tool-subtitle { font-size: 18px; } }

.tool-safety-line {
  font-family: var(--font-logo);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: #10b981; margin-top: 20px;
}

.tool-hero-inner { text-align: center; }
.tool-main { padding: 64px 0; }

/* ===== ACTION PANEL ===== */
.action-panel {
  background: #111827; border: 1px solid #1f2937;
  border-radius: 12px; padding: 32px;
  max-width: 860px; margin: 0 auto;
}

/* ===== DROP ZONE ===== */
.drop-zone {
  border: 2px dashed #374151; border-radius: 8px;
  padding: 40px 24px; text-align: center;
  cursor: pointer; transition: border-color 0.2s;
  background: #0f172a;
}
.drop-zone:hover { border-color: #10b981; }
.drop-zone-icon { font-size: 36px; margin-bottom: 8px; }
.drop-zone-label { color: #9ca3af; font-size: 14px; line-height: 1.6; }
.drop-zone-label strong { color: #10b981; }

/* ===== REPORT CONTROLS ===== */
.report-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 24px;
}
@media (max-width: 600px) { .report-controls { grid-template-columns: 1fr; } }

.control-group { display: flex; flex-direction: column; gap: 6px; }
.control-group label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: #6b7280;
}
.control-group select,
.control-group input[type=date] {
  background: #1f2937; border: 1px solid #374151;
  border-radius: 6px; color: #f9fafb;
  padding: 10px 12px; font-size: 14px;
  font-family: var(--font-body);
  appearance: none; -webkit-appearance: none;
}
.control-group select:focus,
.control-group input[type=date]:focus {
  outline: none; border-color: #10b981;
}

.date-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .date-row { grid-template-columns: 1fr; } }

.run-btn {
  grid-column: 1 / -1;
  background: #10b981; color: #000;
  border: none; border-radius: 6px;
  padding: 14px 28px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  font-family: var(--font-logo);
}
.run-btn:hover { background: #059669; color: #fff; }
.run-btn:disabled { background: #374151; color: #6b7280; cursor: not-allowed; }

/* ===== FILE INFO ===== */
.file-info {
  font-size: 13px; color: #10b981;
  padding: 8px 0; min-height: 24px;
}

/* ===== REPORT OUTPUT ===== */
.report-output {
  max-width: 860px; margin: 32px auto 0;
}

.report-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 12px 16px;
  background: #111827; border: 1px solid #1f2937;
  border-radius: 8px 8px 0 0;
}

.report-title-bar {
  font-family: var(--font-display);
  font-size: 16px; color: #f9fafb; font-weight: 600;
}

.export-btns { display: flex; gap: 8px; }
.export-btn {
  background: #1f2937; border: 1px solid #374151;
  border-radius: 5px; color: #d1d5db;
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  font-family: var(--font-logo); letter-spacing: 0.5px;
}
.export-btn:hover { background: #374151; color: #fff; border-color: #4b5563; }

/* ===== REPORT TABLE ===== */
.report-table-wrap {
  background: #0f172a; border: 1px solid #1f2937;
  border-top: none; border-radius: 0 0 8px 8px;
  overflow-x: auto;
}

.report-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; font-family: var(--font-body);
}

.report-table th {
  background: #1f2937; color: #9ca3af;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 16px; text-align: left;
  border-bottom: 1px solid #374151;
  position: sticky; top: 0;
}
.report-table th.num { text-align: right; }

.report-table td {
  padding: 8px 16px; color: #d1d5db;
  border-bottom: 1px solid #1a2332;
}
.report-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table td.name { color: #f9fafb; }
.report-table td.indent { padding-left: 32px; }
.report-table td.indent2 { padding-left: 48px; }

.report-table tr.section-header td {
  background: #1a2535; color: #6b7280;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 6px 16px; border-bottom: 1px solid #1f2937;
}

.report-table tr.subtotal td {
  border-top: 1px solid #374151;
  color: #9ca3af; font-weight: 600; padding: 6px 16px;
  background: #111827;
}
.report-table tr.total td {
  border-top: 2px solid #10b981;
  color: #10b981; font-weight: 700; padding: 10px 16px;
  font-size: 14px; background: #0f2318;
}
.report-table tr.grand-total td {
  border-top: 2px solid #10b981; border-bottom: 2px solid #10b981;
  color: #10b981; font-weight: 700; padding: 12px 16px;
  font-size: 15px; background: #0f2318;
}
.report-table tr.neg td { color: #f87171; }
.report-table td.qbo-diff {
  color: #6b7280; font-style: italic;
  border-left: 1px solid #1f2937;
}
.report-table tr.subtotal td.qbo-diff,
.report-table tr.total td.qbo-diff,
.report-table tr.grand-total td.qbo-diff {
  color: #6b7280; font-style: italic;
}
.report-table tr:hover:not(.section-header):not(.subtotal):not(.total):not(.grand-total) td {
  background: #152030;
}

/* Aging buckets */
.bucket-current { color: #4ade80; }
.bucket-30 { color: #facc15; }
.bucket-60 { color: #fb923c; }
.bucket-90 { color: #f87171; }
.bucket-over { color: #dc2626; font-weight: 700; }

/* ===== SPINNER ===== */
.spinner {
  border: 3px solid #1f2937;
  border-top-color: #10b981;
  border-radius: 50%; width: 28px; height: 28px;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ===== STATES ===== */
.state-section { display: none; }
.state-section.active { display: block; }