/* ============================================================
   Partnerid (#page-partners): companies we worked with and how
   it went. Built from Minu konto's material (acc-* components,
   --adm-* tokens), so light and dark both work.
   ============================================================ */
#page-partners .dashboard-container { max-width: 1320px; }
#page-partners .topbar .back-link { left: 0; }
#page-partners .user-icon-btn { right: 0; }
#page-partners h2, #page-partners h3 { text-transform: none; letter-spacing: -0.01em; }

/* The site-wide label rule (small caps, margins) is for form headings; the
   labels here are controls and wrap their own text */
#page-partners .pt-toolbar label, #page-partners .pt-rate label {
  display: inline-flex; margin: 0; letter-spacing: normal; text-transform: none; opacity: 1;
}
#page-partners .acc-field { margin: 0; letter-spacing: normal; text-transform: none; }

.pt { margin-top: 12px; padding-bottom: 48px; }
.pt-intro { margin: 0 auto 18px; max-width: 720px; color: var(--muted); font-size: 14.5px; line-height: 1.5; text-align: center; }

/* Traffic-light dots */
.pt-dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.pt-dot.is-green { background: #30d158; }
.pt-dot.is-yellow { background: #ffcc00; }
.pt-dot.is-red { background: #ff453a; }

/* --- Toolbar --- */
.pt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pt-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--adm-fill); border: 1px solid var(--adm-card-line); }
.pt-seg button {
  height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font: 600 13.5px var(--font-sans); cursor: pointer;
}
.pt-seg button[aria-selected="true"] { background: var(--adm-card); color: var(--text); box-shadow: 0 1px 4px var(--adm-shadow); }
.pt-seg button:focus-visible, .pt-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pt-filter select, .pt-search input {
  height: 36px; border-radius: 10px; border: 1px solid var(--adm-card-line);
  background: var(--adm-fill); color: var(--text); font: 14px var(--font-sans);
}
/* Year: the siseveeb's themed dropdown (utils.enhanceSelect), sized to the toolbar */
.pt-filter { min-width: 140px; }
.pt-filter .ui-select { height: 36px; border-color: var(--adm-card-line); border-radius: 10px; background: var(--adm-fill); }
.pt-filter .ui-select:hover { background: var(--adm-fill-hover); }

.pt-lights { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pt-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--adm-card-line); background: transparent;
  color: var(--muted); font: 600 13px var(--font-sans); cursor: pointer;
}
.pt-chip:hover { background: var(--adm-fill); }
.pt-chip.is-on { background: var(--adm-fill-hover); color: var(--text); border-color: var(--adm-ring); }

.pt-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.pt-check input { accent-color: var(--accent); }

.pt-search { position: relative; flex: 1 1 240px; min-width: 200px; display: flex; align-items: center; }
.pt-search > .material-icons-outlined { position: absolute; left: 10px; font-size: 18px; color: var(--muted); pointer-events: none; }
.pt-search input { width: 100%; padding: 0 12px 0 34px; }
.pt-search input:focus, .pt-filter select:focus { outline: none; border-color: var(--adm-ring); }

.pt-stats { margin: 14px 2px 16px; color: var(--muted); font-size: 13px; }

/* --- Company cards --- */
/* Cards flow down columns (masonry), so a long card doesn't leave a gap
   under its shorter neighbours */
.pt-grid { list-style: none; margin: 0; padding: 0; columns: 340px; column-gap: 14px; }
.pt-grid > .pt-card { break-inside: avoid; margin: 0 0 14px; }
.pt-skeleton { height: 140px; margin-bottom: 14px; }
.pt-card {
  min-width: 0; padding: 14px 14px 10px; border-radius: 16px;
  background: var(--adm-card); border: 1px solid var(--adm-card-line);
  box-shadow: 0 8px 24px var(--adm-shadow);
}
.pt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--adm-sep); }
.pt-card-name { margin: 0; min-width: 0; color: var(--text); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.pt-counts { display: inline-flex; gap: 10px; flex: none; }
.pt-count { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.pt-entries { list-style: none; margin: 0; padding: 0; }
.pt-entry { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.pt-entry + .pt-entry { border-top: 1px solid var(--adm-sep); }
.pt-entry > .pt-dot { margin-top: 4px; }
.pt-entry-body { flex: 1; min-width: 0; }
.pt-entry-line { margin: 0; color: var(--text); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.pt-entry-line strong { font-weight: 600; }
.pt-proj { color: var(--accent); }
.pt-muted { color: var(--muted); }
.pt-meta { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.pt-edit { flex: none; width: 30px; height: 30px; }
.pt-edit .material-icons-outlined { font-size: 17px; }

/* --- Table --- */
.pt-table-wrap { overflow-x: auto; border-radius: 14px; background: var(--adm-card); border: 1px solid var(--adm-card-line); box-shadow: 0 8px 24px var(--adm-shadow); }
#page-partners .pt-table { margin: 0; border: 0; border-radius: 0; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--text); }
/* The site-wide table rule right-aligns cells; this table reads left to right */
#page-partners .pt-table th, #page-partners .pt-table td { text-align: left; border-right: 0; }
.pt-table th { position: sticky; top: 0; padding: 10px 12px; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; background: var(--adm-th); border-bottom: 1px solid var(--adm-line); white-space: nowrap; }
.pt-table td { padding: 9px 12px; vertical-align: top; border-bottom: 1px solid var(--adm-sep); }
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table tbody tr:hover td { background: var(--adm-fill); }
#page-partners .pt-table .pt-td-dot, #page-partners .pt-table .pt-th-dot { width: 44px; padding-left: 0 !important; padding-right: 0 !important; text-align: center; }
.pt-td-dot .pt-dot { display: block; margin: 3px auto 0; }
.pt-td-name { font-weight: 600; }
.pt-td-rating { white-space: nowrap; color: var(--muted); }
.pt-td-date { white-space: nowrap; color: var(--muted); }
.pt-td-act { width: 36px; padding: 4px 8px !important; }

.pt-empty { justify-content: center; padding: 40px 16px; }

/* --- Dialog --- */
.pt-dialog { width: min(560px, calc(100vw - 32px)); }
.pt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-row .pt-year-field { max-width: 120px; justify-self: end; width: 100%; }
.pt-row:has(.pt-year-field) { grid-template-columns: 1fr 120px; }
.pt-dialog input:disabled { opacity: 0.6; }
.pt-hint { margin: -6px 2px 0; color: var(--muted); font-size: 12.5px; }

.pt-rate { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; border: 0; }
.pt-rate legend { margin-bottom: 6px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.pt-rate-opt {
  position: relative; flex: 1 1 120px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--adm-fill);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
}
.pt-rate-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pt-rate-opt .pt-dot { width: 16px; height: 16px; }
.pt-rate-opt:hover { background: var(--adm-fill-hover); }
.pt-rate-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-rate-opt.is-green:has(input:checked) { border-color: #30d158; background: color-mix(in srgb, #30d158 18%, transparent); }
.pt-rate-opt.is-yellow:has(input:checked) { border-color: #ffcc00; background: color-mix(in srgb, #ffcc00 20%, transparent); }
.pt-rate-opt.is-red:has(input:checked) { border-color: #ff453a; background: color-mix(in srgb, #ff453a 18%, transparent); }

.pt-error { margin: 0; color: var(--adm-red-text); font-size: 13px; }
.pt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.pt-actions-gap { flex: 1; }

@media (max-width: 640px) {
  .pt-grid { columns: 1; }
  .pt-row, .pt-row:has(.pt-year-field) { grid-template-columns: 1fr; }
  .pt-row .pt-year-field { max-width: none; justify-self: stretch; }
  .pt-toolbar > .acc-btn.is-primary { flex: 1 1 100%; }
}

/* acc-btn sets display, which would otherwise override [hidden] */
#page-partners .acc-btn[hidden] { display: none; }

/* Name suggestions under the form fields (same list as the dropdowns) */
.pt-suggest .ui-select-option { padding: 0 12px; overflow-wrap: anywhere; }

/* --- One row per person + project: everyone's lights, and mine --- */
.pt-entry { align-items: center; }
.pt-votes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pt-vote { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.pt-vote .pt-dot { width: 10px; height: 10px; }
.pt-vote.is-me { color: var(--text); font-weight: 600; }
.pt-vote .pt-edit { width: 22px; height: 22px; margin-left: -2px; }
.pt-vote .pt-edit .material-icons-outlined { font-size: 14px; }

.pt-mine { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 8px; border-radius: 999px; background: var(--adm-fill); }
.pt-mine-label { margin-right: 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pt-mine-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.pt-mine-btn .pt-dot { width: 12px; height: 12px; opacity: 0.3; transition: opacity 120ms ease, transform 120ms ease; }
.pt-mine-btn:hover .pt-dot { opacity: 0.75; }
.pt-mine-btn[aria-pressed="true"] .pt-dot { opacity: 1; transform: scale(1.25); }
.pt-mine-btn[aria-pressed="true"] { background: var(--adm-fill-hover); }
.pt-mine-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pt-mine-btn:disabled { cursor: default; }
.pt-mine .pt-edit { width: 26px; height: 26px; }

.pt-card-add {
  display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 4px; padding: 8px 4px 4px;
  border: 0; border-top: 1px solid var(--adm-sep); background: transparent;
  color: var(--accent); font: 600 13px var(--font-sans); cursor: pointer; text-align: left;
}
.pt-card-add .material-icons-outlined { font-size: 17px; }
.pt-card-add:hover { text-decoration: underline; }
.pt-card-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
