/* =========================================================
   Quartel modular — interface de recrutamento
   ========================================================= */
.barracks-modal {
  width:min(1120px,96vw);
  max-height:94vh;
  border:2px solid #755637;
  background:#d2b78c;
  color:#402e1e;
}
.barracks-modal .modal-head {
  padding:10px 16px;
  background:linear-gradient(#b6cc45,#90a92d);
  border-color:#6e7f24;
}
.barracks-modal .modal-head h3 { color:#30280d;font-family:Georgia,serif;font-size:24px; }
.barracks-modal .modal-close { color:#fff;text-shadow:0 2px 2px #6e1f17; }
.barracks-modal .modal-body { padding:0;background:#d2b78c; }
.barracks-modal .modal-actions { background:#ae875d;border-top:2px solid #765132; }
.barracks-shell {
  min-height:670px;
  padding:18px;
  background:
    linear-gradient(#0000000b,#0000000b),
    repeating-linear-gradient(0deg,#d9bf95 0 30px,#d2b58a 30px 60px);
}
.barracks-banner {
  display:grid;
  grid-template-columns:82px 1fr 145px;
  align-items:center;
  gap:15px;
  padding:14px 17px;
  border:2px solid #6e4e32;
  border-radius:9px;
  background:linear-gradient(135deg,#8e6747,#594437);
  color:#fff2d2;
  box-shadow:inset 0 1px #ffffff44,0 5px 12px #53381755;
}
.barracks-crest {
  width:70px;height:70px;display:grid;place-items:center;
  clip-path:polygon(50% 0,94% 15%,88% 78%,50% 100%,12% 78%,6% 15%);
  border:3px solid #ffd477;background:#b51721;color:white;font-size:36px;
  text-shadow:0 2px #711;box-shadow:0 5px 10px #0007;
}
.barracks-banner small,.barracks-section-heading small { text-transform:uppercase;letter-spacing:.08em;font-weight:900;opacity:.78; }
.barracks-banner h2 { margin:1px 0 3px;font-family:Georgia,serif;font-size:30px; }
.barracks-banner p { margin:0;color:#ecd9b7; }
.barracks-level { padding:10px;border:1px solid #cfb27e;border-radius:7px;background:#402f24bb;text-align:center; }
.barracks-level span { display:block;font-size:11px;text-transform:uppercase; }
.barracks-level strong { display:block;margin-top:3px;font-size:18px;color:#ffe381; }
.barracks-queue-section,.barracks-catalog-section { margin-top:16px; }
.barracks-section-heading { display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:8px; }
.barracks-section-heading h3 { margin:0;font-family:Georgia,serif;font-size:21px; }
.barracks-section-heading > span { font-size:12px;color:#654a31;font-weight:800; }
.barracks-food-consumption { padding:6px 9px;border:1px solid #92734d;border-radius:5px;background:#f0d9aa; }
.barracks-food-consumption b { color:#a0442f; }
.barracks-queue-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px; }
.barracks-queue-slot {
  min-height:86px;display:flex;align-items:center;gap:9px;padding:8px;
  border:2px solid #8c7656;border-radius:6px;background:#c8b390;box-shadow:inset 0 0 0 2px #ebdab9;
}
.barracks-queue-slot.is-empty { justify-content:center;flex-direction:column;color:#7f6e56;background:#b4a98f;opacity:.8; }
.barracks-queue-slot.is-empty span { width:30px;height:30px;display:grid;place-items:center;border:2px dashed #83745d;border-radius:4px;font-weight:900; }
.barracks-queue-slot.is-active { border-color:#3c88b7;box-shadow:inset 0 0 0 2px #c6edff,0 0 0 2px #326c91; }
.barracks-queue-icon { flex:0 0 50px;height:58px;display:grid;place-items:center;border:1px solid #746955;border-radius:5px;background:#8d826d;font-size:31px; }
.barracks-queue-data { min-width:0;display:flex;flex-direction:column;gap:2px; }
.barracks-queue-data b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.barracks-queue-data small { color:#725940; }
.barracks-queue-data span { font-weight:900;color:#3d2a16; }
.barracks-extra-queue { grid-column:1/-1;padding:7px 10px;border:1px solid #92744d;border-radius:5px;background:#ead0a1;text-align:center;font-size:12px;font-weight:800; }
.barracks-troop-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.barracks-troop-card {
  position:relative;min-height:195px;padding:9px;border:2px solid #8d7857;border-radius:7px;
  background:linear-gradient(#ead8b5,#cdb58b);color:#3d2d20;text-align:left;
  box-shadow:inset 0 1px #fff9;transition:transform .14s,border-color .14s,filter .14s;
}
.barracks-troop-card:hover:not(:disabled) { transform:translateY(-2px);border-color:#4f7fa4; }
.barracks-troop-card.is-selected { border-color:#2f78a9;box-shadow:inset 0 0 0 2px #c5e7ff,0 4px 10px #35627c66; }
.barracks-troop-card.is-locked { filter:grayscale(.8);opacity:.56;cursor:not-allowed; }
.barracks-card-level { position:absolute;left:7px;top:7px;z-index:2;padding:3px 6px;border-radius:10px;background:#eef4ff;border:1px solid #7190b1;color:#29435e;font-size:11px;font-weight:900; }
.barracks-card-portrait { height:91px;display:grid;place-items:center;margin-bottom:7px;border:1px solid #9c8766;border-radius:5px;background:linear-gradient(#a59a86,#857a66); }
.barracks-card-portrait span { font-size:60px;filter:drop-shadow(0 4px 3px #0005); }
.barracks-troop-card strong { display:block;font-family:Georgia,serif;font-size:18px; }
.barracks-troop-card small { display:block;margin-top:2px;color:#684f36; }
.barracks-card-stats { display:flex;justify-content:space-between;gap:4px;margin-top:8px;padding-top:7px;border-top:1px solid #ad9672;font-size:12px;font-weight:900; }
.barracks-selected-panel {
  display:grid;grid-template-columns:260px 1fr;gap:18px;margin-top:16px;padding:14px;
  border:2px solid #7b5a38;border-radius:9px;background:linear-gradient(135deg,#c6a777,#e4c898);
  box-shadow:inset 0 1px #fff7;
}
.barracks-selected-portrait { min-height:250px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;border:1px solid #8b7352;border-radius:7px;background:linear-gradient(#958a76,#756c5c);color:#fff3d5;text-align:center; }
.barracks-selected-portrait > span { font-size:118px;filter:drop-shadow(0 6px 4px #0006); }
.barracks-selected-portrait b { font-family:Georgia,serif;font-size:21px; }
.barracks-selected-portrait small { color:#e9d8b5; }
.barracks-selected-info h3 { margin:0 0 8px;font-family:Georgia,serif;font-size:27px; }
.barracks-selected-stats { display:grid;grid-template-columns:repeat(4,1fr);gap:7px; }
.barracks-selected-stats > div,.barracks-recruit-summary > div { padding:8px 9px;border:1px solid #98774f;border-radius:5px;background:#efd4a4; }
.barracks-selected-stats span,.barracks-recruit-summary span { display:block;font-size:10px;text-transform:uppercase;font-weight:900;color:#715338; }
.barracks-selected-stats strong,.barracks-recruit-summary strong { display:block;margin-top:3px;font-size:16px; }
.barracks-quantity-row { display:flex;align-items:end;gap:8px;margin:12px 0; }
.barracks-quantity-row > button { width:43px;height:43px;border:2px solid #74542f;border-radius:5px;background:#c89842;color:#3c260f;font-size:25px;font-weight:900; }
.barracks-quantity-row label { flex:1; }
.barracks-quantity-row label span { display:block;margin-bottom:4px;font-size:12px;font-weight:900; }
.barracks-quantity-row input { width:100%;height:43px;padding:7px 10px;border:2px solid #82623f;border-radius:5px;background:#fff1d1;color:#3c2b1b;font-size:18px;font-weight:900;text-align:center; }
.barracks-recruit-summary { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px; }
.barracks-recruit-btn { width:100%;padding:12px;border:2px solid #4f801b;border-radius:6px;background:linear-gradient(#8bc82f,#58a215);color:#fff;font-weight:900;font-size:17px;text-shadow:0 1px #315a0c;box-shadow:inset 0 1px #dfff8c; }
@media (max-width:900px) {
  .barracks-queue-grid { grid-template-columns:repeat(3,1fr); }
  .barracks-troop-grid { grid-template-columns:repeat(2,1fr); }
  .barracks-selected-panel { grid-template-columns:1fr; }
  .barracks-selected-stats { grid-template-columns:repeat(2,1fr); }
}
