/* Untapped's accent: gold. The app sets only these two ui-kit values (Rule 6). */
:root { --ui-accent: #c9a84c; --ui-accent-text: #111; }

/* The company list: one line per company, the role beside its name; each opens the company. */
.app-companies { list-style: none; margin: 0; padding: 0; }
.app-company {
  display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: baseline;
  min-height: 48px; padding: 12px 16px; box-sizing: border-box;
  color: inherit; text-decoration: none; border-radius: var(--ui-radius-sm, 8px);
}

/* Sign in. */
.app-sign-in { display: grid; gap: 12px; max-width: 24rem; }
.app-sign-in__btn { justify-content: center; }
.app-company:hover { background: var(--ui-hover, transparent); }

/* Heading with its main action beside it. */
.app-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Simple stacked forms and read-only details. */
.app-form { display: grid; gap: 8px; max-width: 40rem; }
.app-form label { font-weight: 600; margin-top: 8px; }
.app-form button { justify-self: start; margin-top: 12px; }
.app-saved { color: var(--ui-muted, inherit); margin: 0; }
.app-details { display: grid; gap: 4px 0; }
.app-details dt { font-weight: 600; margin-top: 12px; }
.app-details dd { margin: 0; white-space: pre-line; }
.app-status { display: grid; gap: 12px; justify-items: start; }

/* Import screens. */
.app-muted { color: var(--ui-muted); margin: 0; }
.app-file { font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.app-check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 400 !important; }
.app-check input { width: 22px; height: 22px; }
.app-table-wrap { overflow-x: auto; max-width: 100%; }
.app-table { border-collapse: collapse; font-size: 0.9em; min-width: 100%; }
.app-table th, .app-table td { text-align: left; padding: 6px 10px; white-space: nowrap; border-bottom: 1px solid var(--ui-faint); }
.app-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.app-problem-list { margin: 0; padding-left: 1.2em; color: var(--ui-muted); }
.app-imports { list-style: none; margin: 0; padding: 0; }
.app-import { display: grid; gap: 4px; padding: 12px 16px; justify-items: start; }
.app-import__line { display: grid; }
.app-problems summary { cursor: pointer; min-height: 32px; }
.app-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }

/* Dashboard. */
.app-periods { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.app-period { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--ui-muted); text-decoration: none; background: var(--ui-hover, transparent); }
.app-period[aria-current="page"] { color: var(--ui-accent-text); background: var(--ui-accent); font-weight: 600; }
.app-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 12px; }
.app-tile { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--ui-radius, 12px); background: var(--ui-hover, transparent); }
.app-tile__label { color: var(--ui-muted); font-size: 0.9em; }
.app-tile__value { font-family: var(--ui-font-display, inherit); font-size: 1.5em; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-negative { color: var(--ui-danger, #c0392b); }
.app-chart { margin: 16px 0 0; }
.app-more { margin-top: 16px; }
.app-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 10px; font-weight: 600; list-style: none; }
.app-more summary::-webkit-details-marker { display: none; }
/* A chevron after the heading shows it opens: pointing down when closed, up when open. */
.app-more summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.app-more[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .app-more summary::after { transition: none; } }
.app-ranked { list-style: none; margin: 0; padding: 0 16px; }
.app-ranked li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }

/* Partners. */
.app-people { list-style: none; margin: 0 0 16px; padding: 0 16px; }
.app-people li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 48px; overflow-wrap: anywhere; }
.app-people__waiting { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-people__waiting .ui-btn { flex-shrink: 0; white-space: nowrap; }
.app-invite-link { display: grid; gap: 8px; margin: 0 0 16px; justify-items: start; }
.app-invite-link .ui-input { width: 100%; }

/* AI summary. */
.app-summary { margin: 16px 0; }
.app-summary__headline { font-weight: 600; margin: 0 0 8px; }
.app-summary__points { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 4px; }
.app-summary__note { font-size: 0.85em; }
.app-summary .htmx-request.ui-btn::after, .app-summary .ui-btn.htmx-request::after { content: " …"; }
