/* ═══════════════════════════════════════════════
   ROUND DIRECTIVES — Diretoria Page & Dashboard Card
   ═══════════════════════════════════════════════ */

/* ── Active Order Banner ── */

.directive-active-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.directive-active-shoot {
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.08) 0%, rgba(82, 183, 136, 0.04) 100%);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

.directive-active-dry {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.06) 0%, rgba(220, 38, 38, 0.02) 100%);
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.directive-active-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.directive-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: status-pulse 2s ease-in-out infinite;
}

.directive-active-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.directive-active-summary {
  flex: 1;
  color: var(--text-primary);
}

.directive-active-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
}

/* ── Directive Type Selector ── */

.directive-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.directive-type-option input[type="radio"] {
  display: none;
}

.directive-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.directive-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  transition: all 0.2s ease;
}

.directive-type-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.directive-type-card:hover .directive-type-icon {
  background: var(--bg-card-hover);
}

/* Shoot selected */
.directive-type-option input:checked + .directive-type-shoot {
  border-color: var(--green-primary);
  background: rgba(45, 106, 79, 0.04);
}

.directive-type-option input:checked + .directive-type-shoot .directive-type-icon {
  background: rgba(45, 106, 79, 0.12);
  color: var(--green-primary);
}

/* Dry selected */
.directive-type-option input:checked + .directive-type-dry {
  border-color: var(--red-warning);
  background: rgba(220, 38, 38, 0.03);
}

.directive-type-option input:checked + .directive-type-dry .directive-type-icon {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red-warning);
}

.directive-type-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.directive-type-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Note Field ── */

.directive-note-wrap {
  position: relative;
}

.directive-note-input {
  min-height: 70px;
  resize: vertical;
  padding-bottom: 1.5rem;
  font-style: italic;
}

.directive-note-counter {
  position: absolute;
  bottom: 0.4rem;
  right: 0.6rem;
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* ── Submit Button ── */

.directive-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Recent Form Badges ── */

.directive-form-badges {
  display: flex;
  gap: 0.4rem;
}

.directive-form-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.directive-form-badge {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.directive-form-win {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.directive-form-draw {
  background: rgba(138, 155, 143, 0.15);
  color: var(--text-muted);
}

.directive-form-loss {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red-warning);
}

.directive-form-opponent {
  font-size: 0.55rem;
  color: var(--text-muted);
  max-width: 50px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Online Players List ── */

.directive-online-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
}

.directive-online-player {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.directive-online-player:hover {
  color: var(--green-primary);
}

/* ── Dries Stat ── */

.directive-dries-stat {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.25rem 0;
}

.directive-dries-count {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red-warning);
  line-height: 1;
}

.directive-dries-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Match Scorers (Diretoria — extends match-scorers from matches.css) ── */

/* Wrap each scorer + pct in a relative container */
.match-scorers-card .match-scorers-list > div {
  position: relative;
}

.directive-scorer-pct {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--green-primary);
  padding: 0.1rem 0.3rem;
  background: transparent;
  border-radius: 4px;
}

/* Make room for the pct badge */
.match-scorers-card .match-scorer-row {
  padding-right: 2rem;
}

.directive-scorer-hidden {
  display: none;
}

.directive-scorers-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  cursor: pointer;
}

.directive-scorers-link:hover {
  text-decoration: underline;
}

/* ── Match Timeline Chart ── */

.directive-timeline-card {
  margin-top: 1rem;
}

.timeline-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.timeline-legend-item strong {
  font-weight: 700;
  margin-left: 0.15rem;
}

.timeline-legend-my strong {
  color: var(--green-primary);
}

.timeline-legend-opp strong {
  color: var(--red-warning);
}

.timeline-chart-wrap {
  width: 100%;
  aspect-ratio: 400 / 120;
}

.timeline-svg {
  width: 100%;
  height: 100%;
}

.timeline-line-my {
  fill: none;
  stroke: var(--green-primary);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.timeline-line-opp {
  fill: none;
  stroke: var(--red-warning);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.timeline-area-my {
  fill: var(--green-primary);
  opacity: 0.08;
}

.timeline-area-opp {
  fill: var(--red-warning);
  opacity: 0.06;
}

.timeline-dot-my {
  fill: var(--green-primary);
}

.timeline-dot-opp {
  fill: var(--red-warning);
}

.timeline-axis-label {
  font-size: 8px;
  fill: var(--text-muted);
  font-family: var(--font-body);
}

/* ── Dashboard Directive Card ── */

.dashboard-directive-order {
  margin-bottom: 0.5rem;
}

.dashboard-directive-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 8px;
}

.dashboard-directive-dry {
  background: rgba(220, 38, 38, 0.06);
}

.dashboard-directive-shoot {
  background: rgba(45, 106, 79, 0.06);
}

.dashboard-directive-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  padding: 0 0.5rem;
  margin-bottom: 0.4rem;
}

.dashboard-directive-author {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

.dashboard-directive-edit {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 500;
}

.dashboard-directive-edit:hover {
  text-decoration: underline;
}

/* ── Online Player Row + Gift Button ── */

.dashboard-online-player-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dashboard-online-player-row .dashboard-online-player {
  flex: 1;
  min-width: 0;
}

.directive-gift-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--role-member);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.directive-gift-btn:hover {
  background: var(--role-member);
  color: #fff;
}

/* ── League Position (inside match card — public) ── */

.match-header-team-pos {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Force Inline (inside match card) ── */

.directive-force-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.directive-force-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Momentum Panel (inside match card) ── */

.momentum-panel {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
}

.momentum-grid {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.momentum-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.momentum-cell-label {
  font-family: var(--font-display);
  font-size: 0.54rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.momentum-cell-score {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.momentum-cell-sep {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0.15rem;
}

.momentum-val-lead {
  color: var(--green-primary);
  font-weight: 800;
}

/* ── Chart Hover Points ── */

.chart-hover-point {
  cursor: crosshair;
}

.chart-hover-point:hover {
  opacity: 0.6;
}

/* ── Chart Cards (Margin + Pace) ── */

.directive-chart-card {
  background: var(--bg-surface);
}

.directive-chart-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.directive-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}

.directive-chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.directive-chart-current {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.directive-chart-current-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.directive-chart-win {
  color: var(--green-primary);
}

.directive-chart-draw {
  color: var(--red-warning);
}

.directive-chart-current-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Secômetro ── */

.directive-secometro-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: -0.2rem 0 0.6rem;
  line-height: 1.4;
}

.directive-secometro {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.directive-secometro-item {
  display: grid;
  grid-template-columns: 20px 1fr 50px 28px;
  align-items: center;
  gap: 0.35rem;
}

.directive-secometro-rank {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.directive-secometro-team {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
}

.directive-secometro-team:hover {
  color: var(--green-primary);
}

.directive-secometro-team span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directive-secometro-bar-wrap {
  height: 5px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.directive-secometro-bar {
  height: 100%;
  background: var(--red-warning);
  border-radius: 3px;
  min-width: 3px;
}

.directive-secometro-count {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--red-warning);
  text-align: right;
}

/* ── Compact Directive Form (sidebar) ── */

.directive-compact-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.directive-compact-form .directive-type-selector {
  gap: 0.5rem;
}

.directive-compact-form .directive-type-card {
  padding: 0.5rem 0.6rem;
}

.directive-compact-form .directive-type-icon svg {
  width: 18px;
  height: 18px;
}

.directive-compact-form .directive-type-desc {
  display: none;
}

.directive-compact-form .directive-note-input {
  font-size: 0.72rem;
  padding: 0.45rem 0.65rem;
  resize: none;
}

.directive-compact-form .directive-submit-btn {
  margin-top: 0;
}

/* ── Team Members List ── */

.directive-members-count {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--role-member);
}

.directive-members-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.directive-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.directive-member-player {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}

.directive-member-name {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directive-member-expiry {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.directive-member-expiry-warn {
  color: var(--red-warning);
}

/* ── Sidebar Order Card ── */

.directive-side-order {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.directive-side-order-type {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.directive-side-order-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

.directive-side-order-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.directive-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding: 0.4rem 0.7rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  justify-content: center;
}

.directive-edit-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ── Mobile card reorder ── */

@media (max-width: 768px) {
  .directive-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .directive-grid .profile-col-main,
  .directive-grid .profile-col-side {
    display: contents;
  }

  .directive-grid [class*="dir-mobile-"] {
    width: 100%;
  }

  .dir-mobile-1 { order: 1; }
  .dir-mobile-2 { order: 2; }
  .dir-mobile-3 { order: 3; }
  .dir-mobile-4 { order: 4; }
  .dir-mobile-5 { order: 5; }
  .dir-mobile-6 { order: 6; }
  .dir-mobile-7 { order: 7; }
  .dir-mobile-8 { order: 8; }
}

/* ── Game Bar Board Link ── */

.game-bar-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex: 1;
}

.game-bar-icons .game-bar-settings {
  flex: 0;
}

.game-bar-board {
  color: var(--role-president);
}

.game-bar-board:hover {
  color: var(--role-president) !important;
}

.game-bar-board:hover svg {
  background: rgba(212, 160, 23, 0.12) !important;
}

/* ── Mobile ── */

@media (max-width: 640px) {
  .directive-active-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .directive-active-meta {
    text-align: left;
  }
}

/* ── Compliance Rate ── */
.directive-compliance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  background: var(--bg-card);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.directive-compliance-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.directive-compliance-bar {
  width: 60px;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}

.directive-compliance-fill {
  height: 100%;
  background: var(--green-primary);
  border-radius: 3px;
}

.directive-compliance-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Forecast ── */
.directive-forecast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(var(--green-primary-rgb), 0.05);
  border: 1px dashed rgba(var(--green-primary-rgb), 0.2);
  border-radius: 8px;
}

.directive-forecast-icon {
  color: var(--green-primary);
}

.directive-forecast-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.directive-forecast-score {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.directive-forecast-margin {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  font-family: var(--font-body);
}

/* ── Radar ── */
.directive-radar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.directive-radar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.directive-radar-me {
  background: var(--bg-hover);
  font-weight: 600;
}

.directive-radar-pos {
  color: var(--text-muted);
  font-size: 0.7rem;
  width: 20px;
}

.directive-radar-team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  color: var(--text-primary);
}

.directive-radar-pts {
  font-weight: 700;
}

/* ── MVPs ── */
/* ── History ── */
.directive-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.directive-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.directive-history-item:last-child {
  border-bottom: none;
}

.directive-history-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 40px;
}

.directive-history-action {
  flex: 1;
}

.directive-history-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.directive-history-shoot {
  background: rgba(45, 106, 79, 0.1);
  color: var(--green-primary);
}

.directive-history-dry {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red-warning);
}
