/* These styles are generated from project.scss. */

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

table.world {
  width: 100%;
}

table.world tbody tr td,
table.world thead tr th {
  text-align: center;
  vertical-align: middle;
}

/*
 * I8,        8        ,8I                         88           88
 * `8b       d8b       d8'                         88           88
 *  "8,     ,8"8,     ,8"                          88           88
 *   Y8     8P Y8     8P   ,adPPYba,   8b,dPPYba,  88   ,adPPYb,88
 *   `8b   d8' `8b   d8'  a8"     "8a  88P'   "Y8  88  a8"    `Y88
 *    `8a a8'   `8a a8'   8b       d8  88          88  8b       88
 *     `8a8'     `8a8'    "8a,   ,a8"  88          88  "8a,   ,d88
 *      `8'       `8'      `"YbbdP"'   88          88   `"8bbdP"Y8
 *
 * Banner generated from https://manytools.org/hacker-tools/ascii-banner/ with font Universe
 */

ul.worlds_view {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

li.worlds {
  padding-left: 1em;
  text-indent: -1em;
}

li.worlds:before {
  content: "🌍";
  padding-right: 5px;
}

li.worlds.joined:before {
  content: "🏘" !important;
}

/*
 *       db
 *      d88b                      ,d
 *     d8'`8b                     88
 *    d8'  `8b     88       88  MM88MMM  8b,dPPYba,   ,adPPYba,
 *   d8YaaaaY8b    88       88    88     88P'   "Y8  a8P_____88
 *  d8""""""""8b   88       88    88     88          8PP"""""""
 * d8'        `8b  "8a,   ,a88    88,    88          "8b,   ,aa
 *d8'          `8b  `"YbbdP'Y8    "Y888  88           `"Ybbd8"'
 */

/* Couleurs prises sur le logo de l'IIE */
a.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 180px; /* largeur fixe */
  height: 60px; /* hauteur fixe */
  padding: 0 1em;

  /* Couleur principale (bleu ENSIIE foncé) */
  background-color: #0d1a3c;
  color: #c0c0c0;

  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(13, 26, 60, 0.3);
  transition: all 0.25s ease;
  cursor: pointer;

  /* gestion du texte long */
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.2;
}

a.btn:hover {
  /*
   * Dégradé argent vers cuivre
  background: linear-gradient(135deg, #C0C0C0, #B87333);
   */
  background: linear-gradient(135deg, #c0c0c0, #aaaaaa);
  color: #0d1a3c; /* contraste sur fond clair */
  box-shadow: 0 8px 16px rgba(13, 26, 60, 0.4);
}

a.btn:active {
  box-shadow: 0 4px 8px rgba(13, 26, 60, 0.3);
}

/*
 * __   __ _ _ _
 * \ \ / /(_) | |
 *  \ V / | | | | __ _  __ _  ___
 *   \_/  | | | |/ _` |/ _` |/ _ \
 *   | |  | | | | (_| | (_| |  __/
 *   |_|  |_|_|_|\__,_|\__, |\___|
 *                       __/ |
 *                      |___/
 */

/* Village pages are content-dense (resource bar, queues, buildings table, troops)
   and read better using more of the screen on large monitors than Bootstrap's default
   .container cap (1320px). Left as-is on small/mobile screens — only widens from the
   lg breakpoint up, scoped to village pages only via body.village-page. */
@media (min-width: 992px) {
  body.village-page .container {
    max-width: 1400px;
  }
}

@media (min-width: 1400px) {
  body.village-page .container {
    max-width: 1700px;
  }
}

/* Village detail page: single column (stacked) by default, matching mobile — becomes a
   2-column layout on the village-detail page itself from the same lg breakpoint the
   container widens at. Left/main: buildings + construction queue. Right/side: resources,
   troops, recruitment queue. Village name stays outside, full-width, above both. */
.village-columns {
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .village-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: start;
    gap: 1.5rem;
  }
}

.village-column-main,
.village-column-side {
  min-width: 0;
}

.village-header {
  background: linear-gradient(135deg, #2c1810 0%, #4a2c1a 50%, #3a2214 100%);
  color: #f5deb3;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 2px solid #8b6914;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.village-header h1 {
  color: #f5deb3;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.village-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.village-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.village-coords-badge {
  color: #e8c98a;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(196, 164, 107, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.village-power-badge {
  color: #e8c98a;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(196, 164, 107, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.village-map-link {
  color: #f5deb3;
  font-size: 0.78rem;
  text-decoration: none;
  background: rgba(139, 105, 20, 0.35);
  border: 1px solid #8b6914;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.village-map-link:hover {
  background: rgba(196, 164, 107, 0.5);
  border-color: #c4a46b;
}

.village-map-link-unseen {
  background: rgba(163, 52, 42, 0.55);
  border-color: #c0392b;
}

.village-map-link-unseen:hover {
  background: rgba(163, 52, 42, 0.75);
}

.unseen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  margin-left: 0.3rem;
  background: #c0392b;
  color: #fff8ea;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  vertical-align: middle;
}

/* Resource bar */
.resource-bar {
  background: linear-gradient(180deg, #3b2614 0%, #261809 100%);
  border: 2px solid #6b4c2a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Nested inside .village-header now, which lays out its children (identity block,
   resource bar) in a single row via flex + gap. Pushed to the right edge and kept
   compact so it doesn't stretch to fill the row. */
.village-header .resource-bar {
  margin: 0 0 0 auto;
  flex: 0 1 auto;
  padding: 0.5rem 0.75rem;
  gap: 0.5rem;
}

.village-header .resource-item {
  min-width: 88px;
  padding: 0.4rem 0.55rem;
}

.village-header .resource-label {
  font-size: 0.66rem;
}

.village-header .resource-value {
  font-size: 0.82rem;
}

.village-header .resource-rate {
  font-size: 0.66rem;
  margin-bottom: 0.2rem;
}

.resource-item {
  flex: 1;
  min-width: 110px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 220, 150, 0.12);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  transition: background 0.15s ease;
}

.resource-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.resource-label {
  color: #b8965a;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.25rem;
}

.resource-icon {
  margin-right: 0.25rem;
  font-size: 1rem;
}

.resource-value {
  color: #f0e8d5;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.resource-rate {
  color: #7cb87f;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.resource-bar-wood  .progress-bar { background-color: #7d4012; }
.resource-bar-clay  .progress-bar { background-color: #b5762a; }
.resource-bar-iron  .progress-bar { background-color: #5e7080; }
.resource-bar-pop   .progress-bar { background-color: #3a7a44; }

/* Buildings table */
.buildings-section h2 {
  color: #2c1810;
  border-bottom: 2px solid #8b6914;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}

.table.buildings-table thead tr,
.table.recruit-table thead tr,
.table.units-table thead tr,
.table.send-troops-table thead tr {
  background: linear-gradient(135deg, #2c1810, #4a2c1a);
}

.table.buildings-table thead th,
.table.recruit-table thead th,
.table.units-table thead th,
.table.send-troops-table thead th {
  color: #f5deb3;
  border-color: #6b4c2a;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 0.75rem;
}

.table.buildings-table tbody tr {
  transition: background-color 0.1s ease;
}

.table.buildings-table tbody tr:nth-child(odd) {
  background-color: rgba(139, 69, 19, 0.04);
}

.table.buildings-table tbody tr:hover {
  background-color: rgba(139, 69, 19, 0.1);
}

.table.buildings-table tbody td {
  vertical-align: middle;
  border-color: rgba(139, 105, 20, 0.15);
  padding: 0.55rem 0.75rem;
  color: #2c1810;
}

/* Resource cost cells — insufficient resources */
.table.buildings-table tbody td.cost-insufficient {
  color: #b22222;
  font-weight: 700;
}

/* Upgrade button — disabled state */
.upgrade-disabled {
  color: #6c757d;
  opacity: 0.6;
  cursor: not-allowed;
  font-style: italic;
}

/* Table action forms (e.g. Upgrade) — a <form>+<button> made to look like a plain link */
.table-action-form {
  display: inline;
  margin: 0;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #0d6efd;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: #0a58ca;
}

/* Construction queue */
.construction-queue {
  background: linear-gradient(135deg, #1a1208, #2e1f0a);
  border: 1px solid #c4a46b;
  border-radius: 8px;
  padding: 0.85rem 1.1rem 0.6rem;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.construction-queue h2 {
  color: #f5deb3;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid #6b4c2a;
  padding-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.construction-queue h2 span {
  color: #c4a46b;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.85rem;
}

.construction-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.construction-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 164, 107, 0.18);
  transition: background 0.15s ease, opacity 0.15s ease;
}

.construction-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.construction-position {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(196, 164, 107, 0.18);
  color: #c4a46b;
  font-size: 0.72rem;
  font-weight: 700;
}

.construction-item-active {
  background: rgba(212, 160, 23, 0.1);
  border-color: rgba(212, 160, 23, 0.45);
}

.construction-item-active .construction-position {
  background: linear-gradient(135deg, #8b6914, #d4a017);
  color: #1a1208;
}

.construction-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 200px;
}

.construction-name {
  color: #f5deb3;
  font-weight: 600;
  font-size: 0.9rem;
}

.construction-levels {
  color: #c4a46b;
  font-size: 0.78rem;
}

.construction-progress-wrapper {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  height: 8px;
  overflow: hidden;
}

.construction-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b6914, #d4a017);
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s linear;
}

.construction-timer {
  flex-shrink: 0;
  color: #f5deb3;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: right;
}

.construction-item-pending {
  opacity: 0.55;
}

.construction-item-pending .construction-progress-wrapper {
  display: none;
}

.construction-item-pending .construction-timer {
  flex: 1;
  color: #c4a46b;
  font-style: italic;
  text-align: right;
}

.construction-cancel {
  flex-shrink: 0;
  color: #d98c8c;
  font-size: 0.78rem;
  text-decoration: none;
  border: 1px solid rgba(217, 140, 140, 0.4);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.construction-cancel:hover {
  background: rgba(217, 140, 140, 0.15);
  color: #f5b8b8;
}

/* Rename section */
.rename-section h3 {
  color: #2c1810;
  font-size: 1rem;
  border-bottom: 1px solid #c4a46b;
  padding-bottom: 0.3rem;
  margin-bottom: 0.75rem;
}

/* Building detail page */
.building-back-link {
  display: inline-block;
  color: #8b6914;
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 0.4rem;
}

.building-back-link:hover {
  color: #2c1810;
  text-decoration: underline;
}

.building-title {
  margin-bottom: 1.25rem;
}

.building-title h1 {
  color: #2c1810;
  margin: 0 0 0.15rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.building-title .village-coords {
  color: #6b4c2a;
}

.building-description {
  background: #fff8ea;
  border: 1px solid #c4a46b;
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  color: #2c1810;
}

.building-information {
  margin-bottom: 1.25rem;
}

.building-information p {
  color: #4a3020;
}

.building-requirements {
  margin-bottom: 1.25rem;
}

.building-information h2,
.building-requirements h2,
.building-misc-section h2 {
  color: #2c1810;
  border-bottom: 2px solid #8b6914;
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.building-misc-section {
  margin-bottom: 1.25rem;
}

.building-misc-scroll {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #c4a46b;
  border-radius: 6px;
}

.building-misc-scroll table {
  margin-bottom: 0;
}

.building-misc-scroll thead th {
  position: sticky;
  top: 0;
  background: #fff8ea;
  z-index: 1;
}

.building-requirements ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.building-requirements li {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.building-requirements li.requirement-met {
  color: #2c6e2f;
  background: rgba(58, 122, 68, 0.1);
}

.building-requirements li.requirement-unmet {
  color: #b22222;
  background: rgba(178, 34, 34, 0.08);
}

.building-misc-table tbody tr.current-level-row {
  background-color: rgba(139, 105, 20, 0.15);
  font-weight: 600;
}

/* Generic horizontal-scroll wrapper for wide tables (recruit form, units overview) */
.table-scroll {
  overflow-x: auto;
  border: 1px solid #c4a46b;
  border-radius: 6px;
}

.table-scroll table {
  margin-bottom: 0;
}

/* Unit icons — used anywhere a unit name is displayed (recruit form, units overview,
   troops panel, training queue). Units without fixture art simply render without one. */
.unit-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.unit-name-cell {
  white-space: nowrap;
  vertical-align: middle;
}

/* Recruit troops form */
.recruit-section {
  margin-bottom: 1.25rem;
}

.recruit-section h2 {
  color: #2c1810;
  border-bottom: 2px solid #8b6914;
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.recruit-table th,
.recruit-table td {
  white-space: nowrap;
}

/* Send troops form */
.send-troops-section {
  margin-bottom: 1.25rem;
}

.send-troops-target {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.send-troops-target label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #6b4c2a;
}



.send-troops-target input[type="number"] {
  width: 6rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #c4a46b;
  border-radius: 4px;
}

.send-troops-target-name {
  color: #2c1810;
  font-size: 0.85rem;
  align-self: center;
}

.send-troops-quantity-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.send-troops-quantity-input {
  width: 5.5rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid #c4a46b;
  border-radius: 4px;
}

.send-troops-max-button {
  background: none;
  border: 1px solid #8b6914;
  border-radius: 4px;
  color: #8b6914;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.send-troops-max-button:hover {
  background: rgba(139, 105, 20, 0.12);
}

.send-troops-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-send-attack,
.btn-send-defense {
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff8ea;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: filter 0.15s ease;
}

.btn-send-attack:hover,
.btn-send-defense:hover {
  filter: brightness(1.1);
}

.btn-send-attack {
  background: #a3342a;
}

.btn-send-defense {
  background: #3a7a44;
}

.send-troops-resources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1rem 0;
}

.send-troops-resources label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #6b4c2a;
}

.send-troops-resources input[type="number"] {
  width: 6rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #c4a46b;
  border-radius: 4px;
}

.send-troops-capacity {
  color: #2c1810;
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0;
}

.send-troops-hint {
  color: #8b6914;
  font-size: 0.75rem;
  font-style: italic;
  margin: 0;
  flex-basis: 100%;
}

.send-troops-table th,
.send-troops-table td {
  white-space: nowrap;
}

.send-troops-table tbody td {
  vertical-align: middle;
}

/* Combat reports */
.reports-section {
  margin-bottom: 1.25rem;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.report-item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid #c4a46b;
  border-left: 4px solid #8b6914;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.report-item-attack {
  border-left-color: #a3342a;
}

.report-item-support {
  border-left-color: #3a7a44;
}

.report-item-unseen {
  background: rgba(255, 220, 150, 0.28);
  box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.35);
}

.unseen-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #c0392b;
  flex-shrink: 0;
}

.report-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.report-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  color: #fff8ea;
}

.report-badge-attack {
  background: #a3342a;
}

.report-badge-support {
  background: #3a7a44;
}

.report-badge-sent {
  background: #6b4c2a;
}

.report-badge-received {
  background: #2471a3;
}

.report-badge-victory {
  background: #3a7a44;
}

.report-badge-defeat {
  background: #6b1f1f;
}

.report-badge-scouted {
  background: #2c5a7a;
}

.report-route {
  color: #2c1810;
  font-weight: 600;
}

.report-details-link {
  display: inline-block;
  color: #8b6914;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.report-details-link:hover {
  color: #2c1810;
  text-decoration: underline;
}

.report-time {
  margin-left: auto;
  color: #6b4c2a;
  font-size: 0.8rem;
}

.report-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.report-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(139, 105, 20, 0.2);
}

.report-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.report-army h3 {
  color: #6b4c2a;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.report-unit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Shared "chip" look for .report-unit/.troop-item (see .troop-item below) — same
   background/border/radius, each keeps its own padding/gap/font-size. */
.report-unit,
.troop-item {
  display: flex;
  align-items: center;
  background: rgba(139, 105, 20, 0.08);
  border: 1px solid #c4a46b;
  border-radius: 6px;
}

.report-unit {
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
}

.report-unit-empty {
  color: #999;
  font-size: 0.82rem;
  font-style: italic;
}

.report-wall-bonus {
  color: #6b4c2a;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0.4rem 0 0;
}

.report-spy-indicator {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b4c2a;
}

.recruit-table tbody td {
  vertical-align: middle;
}

.recruit-quantity-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.recruit-quantity-input {
  width: 5.5rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid #c4a46b;
  border-radius: 4px;
}

.recruit-max-button {
  background: none;
  border: 1px solid #8b6914;
  border-radius: 4px;
  color: #8b6914;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.recruit-max-button:hover {
  background: rgba(139, 105, 20, 0.1);
}

.recruit-max-hint {
  color: #6c757d;
  font-size: 0.78rem;
}

.recruit-hint {
  color: #b22222;
  background: rgba(178, 34, 34, 0.08);
  border: 1px solid rgba(178, 34, 34, 0.3);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.recruit-quantity-input:disabled,
.recruit-max-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.recruit-row-locked {
  opacity: 0.55;
}

.recruit-locked-hint {
  font-style: italic;
  font-size: 0.85rem;
  color: #6c757d;
}

.research-building-group {
  margin-bottom: 1.5rem;
}

.research-building-group h3 {
  margin-bottom: 0.5rem;
}

.research-building-link {
  color: inherit;
  text-decoration: underline;
}

.research-table td.requirement-met {
  color: #2c6e2f;
  background: rgba(58, 122, 68, 0.1);
}

.research-table td.requirement-unmet {
  color: #b22222;
  background: rgba(178, 34, 34, 0.08);
}

/* Troops panel (current stock + training queue) */
.troops-section {
  margin-bottom: 1.25rem;
}

.troops-section h2,
.training-queue h2,
.research-queue h2,
.movements-section h2,
.stationed-section h2 {
  color: #2c1810;
  border-bottom: 2px solid #8b6914;
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.troops-section h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.send-troops-link {
  font-size: 0.78rem;
  font-weight: 400;
  color: #8b6914;
  text-decoration: none;
  border-bottom: 1px dotted #8b6914;
}

.send-troops-link:hover {
  color: #2c1810;
  border-bottom-style: solid;
}

.troops-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.troop-item {
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
}

.troop-name {
  color: #2c1810;
  font-weight: 600;
  font-size: 0.85rem;
}

.troop-count {
  color: #8b6914;
  font-weight: 700;
}

.training-queue,
.movements-section,
.stationed-section {
  margin-bottom: 1.25rem;
}

.stationed-group {
  justify-content: space-between;
  gap: 0.75rem;
}

.training-building-name {
  color: #8b6914;
  font-size: 0.78rem;
  font-weight: 400;
}

/*
 * __  __
 * |  \/  | __ _ _ __
 * | |\/| |/ _` | '_ \
 * | |  | | (_| | |_) |
 * |_|  |_|\__,_| .__/
 *              |_|
 */

.map-wrapper {
  position: relative;
  border: 2px solid #6b4c2a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  background: #d6cba7;
}

#map-canvas {
  display: block;
  cursor: grab;
}

#map-canvas:active {
  cursor: grabbing;
}

#map-tooltip {
  position: fixed;
  display: none;
  background: rgba(20, 12, 5, 0.88);
  color: #f5deb3;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.78rem;
  line-height: 1.45;
  pointer-events: none;
  border: 1px solid rgba(255, 200, 100, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 9999;
}

#map-village-picker {
  position: fixed;
  display: none;
  background: rgba(20, 12, 5, 0.92);
  color: #f5deb3;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 200, 100, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  align-items: center;
  gap: 0.5rem;
}

#map-village-picker-select {
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #8b6914;
  background: #fff8ea;
  color: #2c1810;
  font-size: 0.8rem;
}

#map-village-picker-go {
  background: rgba(139, 105, 20, 0.5);
  border: 1px solid #8b6914;
  border-radius: 4px;
  color: #f5deb3;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

#map-village-picker-go:hover {
  background: rgba(196, 164, 107, 0.6);
}

#map-coords {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(20, 12, 5, 0.6);
  color: #c4a46b;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: monospace;
  pointer-events: none;
  min-width: 48px;
  text-align: center;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: #4a3020;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
