/* assembly queue table */
.assembly-queue-table {
  padding: 16px;
  border: var(--border);
  border-radius: var(--borderRadius);
  margin-bottom: 16px;
}

.assembly-queue-table .assembly-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.assembly-queue-table .assembly-floor-heading {
  margin: 0;
  color: var(--darkgrey);
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.assembly-queue-table .assembly-queue-empty {
  color: var(--darkgrey);
}

.assembly-queue-table .assembly-queue-rows {
  width: 100%;
  border-collapse: collapse;
}

.assembly-queue-table .assembly-queue-rows th {
  padding: 4px;
  text-align: left;
  color: var(--darkgrey);
  text-transform: uppercase;
  font-size: var(--text-xs);
  border-bottom: var(--border);
}

.assembly-queue-table .assembly-queue-rows td {
  padding: 8px 4px;
  border-bottom: var(--border);
}

.assembly-queue-table .assembly-queue-speaker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assembly-queue-table .assembly-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: bold;
  background: rgba(var(--boardPrimaryRGB), 0.12);
  color: var(--boardPrimary);
  white-space: nowrap;
}

.assembly-queue-table .assembly-badge-muted {
  background: var(--lightergrey);
  color: var(--darkgrey);
  font-weight: normal;
}

.assembly-queue-table .assembly-btn-primary {
  background: var(--verydarkgrey) !important;
  border-color: var(--verydarkgrey) !important;
  color: var(--alwaysWhite) !important;
}

.assembly-queue-table .assembly-btn-primary:hover {
  filter: brightness(1.2);
}

.assembly-queue-table .assembly-queue-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.assembly-queue-table .assembly-queue-row-pending {
  opacity: 0.5;
  text-decoration: line-through;
}

.assembly-queue-table .assembly-queue-row-pending button {
  text-decoration: none;
}

.assembly-queue-table .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0 0 0;
}

/* assembly queue entry modal */
.assembly-queue-entry-modal .assembly-queue-entry-group {
  font-weight: bold;
  margin: 8px 0;
}

.assembly-queue-entry-modal .assembly-queue-entry-no-mandate {
  color: var(--darkgrey);
}

.assembly-queue-entry-modal .assembly-queue-entry-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.assembly-queue-entry-modal .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0;
}

/* assembly projector */
.assembly-projector-view {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  font-family: inherit;
}

.assembly-projector-view-light {
  background: #fff;
  color: #000;
}

.assembly-projector-view-light .assembly-projector-floor-open,
.assembly-projector-view-light .assembly-projector-queue-title,
.assembly-projector-view-light .assembly-projector-queue-empty {
  color: #666;
}

.assembly-projector-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10000;
}

.assembly-projector-control {
  background: rgba(128, 128, 128, 0.25);
  border: 1px solid rgba(128, 128, 128, 0.4);
  color: inherit;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.assembly-projector-control:hover {
  background: rgba(128, 128, 128, 0.4);
}

.assembly-projector-control-close {
  padding: 6px 10px;
}

.assembly-projector-phase {
  font-size: 3rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.assembly-projector-floor {
  text-align: center;
}

.assembly-projector-speaker {
  font-size: 2rem;
  margin: 0 0 16px 0;
}

.assembly-projector-chronometer {
  font-size: 4rem;
}

.assembly-projector-floor-open {
  font-size: 1.5rem;
  color: #999;
}

.assembly-projector-queue {
  text-align: center;
  min-width: 320px;
}

.assembly-projector-queue-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
}

.assembly-projector-queue-empty {
  color: #999;
}

.assembly-projector-queue ol {
  font-size: 1.5rem;
}

.assembly-projector-empty {
  width: 100%;
  height: 100%;
}

/* assembly meeting time grid modal */
.assembly-meeting-time-grid-modal {
  min-width: 480px;
  /* The grid is one column per intervention category, so it outgrows the 600px every other pop-up is
     capped at the moment a board configures more than two. */
  max-width: min(960px, 92vw);
  width: max-content;
}

/* Restored: commit 010f95fe removed the grid editor's duplicated block from this file and took the
   live session, the interventions list and the section rail with it - none of which had a second
   copy anywhere. Only the grid editor's own rules are duplicated (admin.css plus the component's
   scoped style), and those are the ones that stay out. */
.assembly-meeting-time-grid-loading {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

.assembly-meeting-time-grid-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
}

.assembly-meeting-time-grid-field textarea {
  resize: vertical;
}

.assembly-meeting-time-grid-modal .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0;
}

/* assembly live session */
.assembly-live-session-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assembly-live-session .assembly-skeleton-block {
  height: 64px;
  border-radius: var(--borderRadius);
  background: var(--lightestgrey);
  animation: assembly-skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes assembly-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.assembly-live-session-error,
.assembly-live-session .assembly-stale-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: var(--border);
  border-radius: var(--borderRadius);
  margin-bottom: 16px;
}

/* The floor band spans the content, the two work columns sit under it. */
.assembly-live-session-content {
  min-width: 0;
}

.assembly-live-session-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}

/* A grid item's default `min-width: auto` is its content's, so one long bench name or a wide table
   pushes the column past its track instead of scrolling inside it. */
.assembly-live-session-column {
  min-width: 0;
}

@media (max-width: 1250px) {
  .assembly-live-session-grid {
    grid-template-columns: 1fr;
  }
}

/* assembly interventions list */
.assembly-interventions-list {
  padding: 16px;
  border: var(--border);
  border-radius: var(--borderRadius);
  margin-bottom: 16px;
}

.assembly-interventions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.assembly-interventions-list .assembly-floor-heading {
  margin: 0;
  color: var(--darkgrey);
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.assembly-interventions-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.assembly-interventions-rows li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: var(--border);
  font-size: var(--text-s);
}

.assembly-interventions-speaker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
}

.assembly-interventions-speaker :deep(img.user) {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.assembly-interventions-list .assembly-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: bold;
  background: rgba(var(--boardPrimaryRGB), 0.12);
  color: var(--boardPrimary);
  white-space: nowrap;
}

.assembly-interventions-category {
  color: var(--darkgrey);
}

.assembly-interventions-duration,
.assembly-interventions-time {
  margin-left: auto;
  color: var(--darkgrey);
  white-space: nowrap;
}

.assembly-interventions-see-all {
  margin-top: 8px;
}

.assembly-interventions-list .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0 0 0;
}

/* assembly section rail
   One list for "what am I timing right now", replacing the phase strip and the agenda-item dropdown. */
.assembly-live-session-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .assembly-live-session-body {
    grid-template-columns: 1fr;
  }
}

/* Height is stated because this is a `div` standing in for a `nav`: the rail was a real `<nav>` until
   it turned out styles.css sizes every one of them at the site header's 80px, which cut the rail off
   mid-list and left its last button hanging outside the border. */
.assembly-section-rail {
  display: flex;
  flex-direction: column;
  height: auto;
  min-width: 0;
  gap: 2px;
  padding: 12px;
  border: var(--border);
  border-radius: var(--borderRadius);
  position: sticky;
  top: 12px;
}

.assembly-section-rail-help {
  margin: 0 0 10px 10px;
  font-size: var(--text-xs);
  color: var(--grey);
  line-height: 1.3;
}

.assembly-section-rail-title {
  margin: 0 0 10px 10px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--darkgrey);
  font-weight: bold;
}

/* The selected entry is marked with a left accent, not with a dot: the dot exists only on the active
   entry, so the labels shifted sideways depending on which one it was - and the dot it reused is the
   red "speaking now" one, which on a list of sections says something that is not true. The border is
   always there and only changes colour, so nothing moves. */
.assembly-section-rail-entry {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 8px 10px;
  border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
  font-size: var(--text-s);
  color: var(--darkgrey);
  cursor: pointer;
}

.assembly-section-rail-entry:hover:not(:disabled) {
  background: var(--lightestgrey);
}

.assembly-section-rail-entry:disabled {
  cursor: default;
  opacity: 0.6;
}

.assembly-section-rail-entry-active {
  background: rgba(var(--boardPrimaryRGB), 0.12);
  border-left-color: var(--boardPrimary);
  color: var(--boardPrimary);
  font-weight: bold;
}

/* The agenda item's number sits in its own column so the names start at the same place all the way
   down, and a long one truncates without pushing the number out of the rail. */
.assembly-section-rail-order {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: var(--grey);
}

.assembly-section-rail-entry-active .assembly-section-rail-order {
  color: inherit;
}

/* Two lines rather than one: a point of the agenda is a sentence, and cutting it at the first ten
   characters leaves a rail of identical-looking entries. */
.assembly-section-rail-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

/* Separated from the list by a rule as well as by space: it is the only entry here that is not a
   place to go. */
.assembly-section-rail-end {
  margin-top: 14px;
  padding: 14px 10px 7px 10px;
  width: 100%;
  border: none;
  border-top: var(--border);
  background: transparent;
  color: var(--red);
  font-size: var(--text-xs);
  text-align: left;
  cursor: pointer;
}

.assembly-section-rail-end:hover {
  background: rgba(var(--redRGB, 210, 45, 45), 0.08);
}

.assembly-section-rail-ended {
  margin: 10px 0 0 0;
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--grey);
}

/* The number the room is watching, so it carries the weight the elapsed clock used to. */
.assembly-floor-time-primary .assembly-chronometer {
  font-size: var(--text-xxl);
}

.assembly-time-control-remaining-value {
  font-variant-numeric: tabular-nums;
  font-weight: bold;
}

.assembly-time-control-special {
  padding: 4px 10px;
  font-size: var(--text-xs);
  white-space: nowrap;
}

.assembly-projector-section {
  text-align: center;
  font-size: var(--text-xl);
  margin: 0 0 8px 0;
  opacity: 0.85;
}

/* assembly speaking-time control table
   Replaces the old read-only group-balances strip: the bench rows are what the chair acts from, so
   the row that holds the floor is marked and the rest carry the button that starts a turn. */
.assembly-time-control {
  padding: 16px;
  border: var(--border);
  border-radius: var(--borderRadius);
  margin-bottom: 16px;
}

.assembly-time-control-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.assembly-section-title {
  margin: 0;
  color: var(--darkgrey);
  text-transform: uppercase;
  font-size: var(--text-xs);
  font-weight: bold;
}

/* The one-line explanation under each section heading. This screen's problem was never density, it
   was that nothing said what any of it was for. */
.assembly-section-help {
  display: block;
  margin: 2px 0 0 0;
  font-size: var(--text-xs);
  font-weight: normal;
  color: var(--grey);
  text-transform: none;
}

.assembly-time-control-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.assembly-time-control-category {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--darkgrey);
}

.assembly-time-control-category select {
  text-transform: none;
  font-size: var(--text-s);
}

/* The screen has nothing to show. Deliberately prose plus at most one action, rather than an empty
   table: the two states it covers send the reader to different places, and one of them has no button
   at all because the reader could not save what it opens. */
.assembly-time-control-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0;
  font-size: var(--text-s);
  color: var(--darkgrey);
}

.assembly-time-control-empty p {
  margin: 0;
}

table.assembly-time-control-table {
  width: 100%;
  border-collapse: collapse;
}

table.assembly-time-control-table th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--darkgrey);
  padding: 0 8px 8px 0;
  border-bottom: var(--border);
  /* Measured on DEV: "TEMPO ATRIBUÍDO" and "TEMPO RESTANTE" were wrapping onto three lines inside 65px
     while the actions column took 591 of the table's 787. The numbers are what the room reads; they get
     the width they need and the buttons take what is left. */
  white-space: nowrap;
}

table.assembly-time-control-table th:nth-child(1),
table.assembly-time-control-table td:nth-child(1) {
  width: 22%;
}

table.assembly-time-control-table th:nth-child(2),
table.assembly-time-control-table td:nth-child(2),
table.assembly-time-control-table th:nth-child(3),
table.assembly-time-control-table td:nth-child(3) {
  width: 14%;
  white-space: nowrap;
}

table.assembly-time-control-table td {
  padding: 10px 8px 10px 0;
  border-bottom: var(--border);
  font-size: var(--text-s);
  vertical-align: middle;
}

table.assembly-time-control-table tr:last-child td {
  border-bottom: none;
}

.assembly-row-speaking td {
  background: rgba(var(--boardPrimaryRGB), 0.06);
}

.assembly-time-control-bench {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assembly-time-control .assembly-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: bold;
  background: rgba(var(--boardPrimaryRGB), 0.12);
  color: var(--boardPrimary);
}

.assembly-time-control .assembly-badge-muted {
  background: var(--lightestgrey);
  color: var(--darkgrey);
}

/* A bench with no entry in the grid. Deliberately grey and wordy rather than a red "0s / 0s": a grid
   nobody has written yet is a thing to go and do, not a bench that has run out of time. */
.assembly-time-control-unset {
  color: var(--grey);
  font-style: italic;
}

.assembly-time-control-exhausted {
  color: var(--red);
  font-weight: bold;
}

.assembly-time-control-onfloor {
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--boardPrimary);
  font-weight: bold;
}

/* Wraps rather than overflows: the row carries the give-the-floor button, three special interventions
   and the cession button, which do not fit one line inside this column at any usable width - and an
   unwrapped row painted them straight over the queue card beside the table. */
.assembly-time-control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.assembly-time-control-actions button {
  padding: 6px 14px;
  font-size: var(--text-s);
  white-space: nowrap;
}

/* The one action a chair takes constantly has to look unlike the four beside it. Measured on DEV, the
   primary button rendered white with a grey border - identical to the specials - because the
   `assembly-btn-primary` rule is scoped to the queue table and never reached here. */
.assembly-time-control-actions .assembly-btn-primary:not(:disabled) {
  background: var(--boardPrimary);
  border-color: var(--boardPrimary);
  color: var(--white);
  font-weight: bold;
}

.assembly-time-control-actions .assembly-btn-primary:not(:disabled):hover {
  filter: brightness(1.1);
}

/* The extra interventions are a group of their own: each opens a separate allowance rather than
   continuing the bench's own time, so they read as a set and never as four more primary actions. */
.assembly-time-control-specials {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 6px;
  border: var(--border);
  border-radius: 999px;
  background: var(--lightestgrey);
}

.assembly-time-control-specials button {
  padding: 3px 10px;
  font-size: var(--text-xs);
  border: none;
  background: transparent;
  color: var(--darkgrey);
  border-radius: 999px;
  cursor: pointer;
}

.assembly-time-control-specials button:hover:not(:disabled) {
  background: var(--white);
  color: var(--boardPrimary);
}

.assembly-time-control-specials-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--grey);
  padding-left: 4px;
}

/* The table's ticker is a clock nobody reads directly - it only drives the countdowns in the rows. */
.assembly-time-control-ticker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.assembly-time-control .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0 0 0;
}

/* assembly floor card */
.assembly-floor-card {
  padding: 16px 20px;
  border: var(--border);
  border-radius: var(--borderRadius);
  margin-bottom: 16px;
  background: var(--white);
}

.assembly-floor-speaker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.assembly-floor-heading {
  margin: 0 0 4px 0;
  color: var(--darkgrey);
  text-transform: uppercase;
  font-size: var(--text-xs);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}

.assembly-floor-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
}

.assembly-floor-meta {
  margin: 0;
  color: var(--darkgrey);
  font-size: var(--text-xs);
}

.assembly-floor-speaker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px 0;
}

.assembly-floor-speaker-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: var(--text-l);
}

.assembly-floor-speaker-identity img.user {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.assembly-floor-card .assembly-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: bold;
  background: rgba(var(--boardPrimaryRGB), 0.12);
  color: var(--boardPrimary);
}

.assembly-floor-card .assembly-badge-muted {
  background: var(--lightergrey);
  color: var(--darkgrey);
  font-weight: normal;
}

.assembly-floor-time-row {
  display: flex;
  gap: 32px;
  margin-bottom: 8px;
}

.assembly-floor-time-block .assembly-chronometer {
  font-size: 2rem;
}

.assembly-floor-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--lightgrey);
  overflow: hidden;
  margin-bottom: 8px;
}

.assembly-floor-progress-fill {
  height: 100%;
  background: var(--yellow);
  transition: width 1s linear;
}

.assembly-floor-progress-fill-over {
  background: var(--red);
}

.assembly-floor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.assembly-floor-actions button {
  padding: 10px 16px;
  font-size: var(--text-s);
}

.assembly-floor-card .assembly-btn-danger {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: var(--alwaysWhite) !important;
}

.assembly-floor-card .assembly-btn-danger:hover {
  filter: brightness(1.1);
}

.assembly-floor-card .assembly-btn-primary {
  background: var(--verydarkgrey) !important;
  border-color: var(--verydarkgrey) !important;
  color: var(--alwaysWhite) !important;
}

.assembly-floor-card .assembly-btn-primary:hover {
  filter: brightness(1.2);
}

.assembly-floor-card .assembly-btn-primary:disabled {
  opacity: 0.4;
}

.assembly-floor-card .assembly-floor-category-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.assembly-floor-card .assembly-floor-open {
  color: var(--darkgrey);
}

.assembly-floor-card .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0 0 0;
}

/* assembly chronometer */
.assembly-chronometer {
  font-variant-numeric: tabular-nums;
  font-weight: bold;
}

.assembly-chronometer-overrun {
  color: var(--red);
}

/* assembly cession modal */
.assembly-cession-modal .assembly-cession-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.assembly-cession-modal .assembly-cession-preview {
  border: var(--border);
  border-radius: var(--borderRadius);
  padding: 8px 12px;
  margin: 12px 0;
  color: var(--darkgrey);
}

.assembly-cession-modal .assembly-cession-preview p {
  margin: 2px 0;
}

.assembly-cession-modal .assembly-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  margin: 8px 0;
}