/* Lynceus custom styles */

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  float: right;
  margin-top: -0.5rem;
  padding: 0 0.25rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--pico-muted-border-color);
  margin-bottom: 1.5rem;
}
.tabs button {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--pico-muted-color);
  transition: all 0.2s;
}
.tabs button:hover {
  color: var(--pico-primary);
}
.tabs button.active {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

/* Financial tables */
.fin-table {
  width: 100%;
}
.fin-table th {
  text-align: left;
  font-weight: 600;
}
.fin-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fin-table tr.subtotal td,
.fin-table tr.subtotal th {
  font-weight: 700;
  border-top: 2px solid var(--pico-muted-border-color);
}
.fin-table tr.total td,
.fin-table tr.total th {
  font-weight: 700;
  border-top: 3px double var(--pico-primary);
}
.fin-table tr.section-header td,
.fin-table tr.section-header th {
  font-weight: 700;
  padding-top: 1.2rem;
  font-size: 1.05em;
}

/* Two-column balance sheet */
.balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .balance-grid {
    grid-template-columns: 1fr;
  }
}

/* Search autocomplete */
.autocomplete-results {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--pico-muted-border-color);
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  max-height: 300px;
  overflow-y: auto;
}
.autocomplete-results li a {
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.autocomplete-results li a:hover {
  background: var(--pico-primary-focus);
}
.autocomplete-results li small {
  color: var(--pico-muted-color);
}

/* Import results */
.import-results {
  margin-top: 1rem;
}
.import-results .created {
  color: var(--pico-ins-color);
}
.import-results .skipped {
  color: var(--pico-muted-color);
}
.import-results .error {
  color: var(--pico-del-color);
}

/* Company header */
.company-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.company-header h1 {
  margin-bottom: 0;
}
.company-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.company-meta dt {
  font-weight: 600;
  font-size: 0.85em;
  color: var(--pico-muted-color);
}
.company-meta dd {
  margin: 0;
}

/* Refresh status */
.refresh-log {
  max-height: 400px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 1rem;
  background: var(--pico-card-background-color);
  border-radius: 0.25rem;
  border: 1px solid var(--pico-muted-border-color);
}
.refresh-log .ok { color: var(--pico-ins-color); }
.refresh-log .err { color: var(--pico-del-color); }
.refresh-log .pending { color: var(--pico-muted-color); }

/* Spinner */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}
