/* Warchest site admin console (portal.html#/admin) and the site banner. Uses the modern layout's colours. */
.sbanner { margin: 0; padding: 10px clamp(16px, 3vw, 40px); font: 500 14.5px/1.45 var(--f-body); border-bottom: 1px solid #2a3a52; background: #142030; color: #cfe5ff; text-align: center; }
.sbanner.warn { border-color: #5a4520; background: #241c0e; color: #f4d79a; }
.sbanner.good { border-color: #24503a; background: #10241a; color: #b5ecc9; }
.sbanner a { color: inherit; font-weight: 700; }

.aconsole { max-width: 1400px; }
.aconsole .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ahead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ahead h1 { margin: 2px 0 0; font: 700 clamp(26px, 3vw, 34px)/1.15 var(--f-body) !important; letter-spacing: -.02em; color: var(--head) !important; }
.atabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.atabs a { padding: 10px 13px; margin-bottom: -1px; color: var(--muted); text-decoration: none; font: 500 14.5px var(--f-body); border-bottom: 2px solid transparent; }
.atabs a:hover { color: var(--text); }
.atabs a.on { color: var(--head); font-weight: 600; border-bottom-color: var(--gold); }

.apanel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.apanel h2 { margin: 0 0 12px; font: 600 16px var(--f-body) !important; color: var(--head) !important; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.apanel h2 + h2, .apanel .alist + h2, .apanel .amsgs + h2, .apanel p + h2 { margin-top: 18px; }
.ah2 { margin: 0; font: 600 18px var(--f-body) !important; color: var(--head) !important; }
.agrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0 16px; }
.agrid2.wide { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); }
@media (max-width: 900px) { .agrid2.wide { grid-template-columns: 1fr; } }

.aalerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.aalert { display: block; padding: 11px 14px; border-radius: 11px; border: 1px solid #2a3a52; background: #142030; color: #cfe5ff; text-decoration: none; font-size: 14.5px; }
.aalert.warn { border-color: #5a4520; background: #241c0e; color: #f4d79a; }
.aalert.bad { border-color: #6a2f2a; background: #2a1715; color: #ffb4a8; }
.aalert:hover { filter: brightness(1.12); }
.aok { padding: 12px 14px; border-radius: 11px; border: 1px solid #24503a; background: #10241a; color: #b5ecc9; margin: 0 0 18px; }

.atiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.atile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
a.atile:hover { border-color: var(--line-2); }
.atile span { font-size: 12.5px; color: var(--muted); }
.atile b { font: 700 26px/1.15 var(--f-body); color: var(--head); letter-spacing: -.02em; }
.atile em { font-style: normal; font-size: 12.5px; color: var(--dim); }
.atiles.small .atile b { font-size: 22px; }
.abars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; }
.abars span { flex: 1; background: linear-gradient(180deg, var(--gold), #9a7a3a); border-radius: 3px 3px 0 0; min-width: 4px; }

.abar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.abar select { height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 10px; font: 500 13.5px var(--f-body); }
.asearch { flex: 1 1 280px; display: flex; }
.asearch input, .apanel input:not([type=checkbox]), .apanel select, .adlg input, .adlg select { height: 38px; width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 12px; font: 400 14px var(--f-body); }
.apanel .prow > input, .apanel .prow > select { width: auto; flex: 1 1 160px; }
.afield input, .afield select { flex: none !important; }
.achips { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbtn { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font: 500 13px var(--f-body); cursor: pointer; }
.chipbtn:hover { color: var(--text); }
.chipbtn.on { border-color: #6b5a35; background: #2a2214; color: #f0c97a; font-weight: 600; }
.achip { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 600 11.5px/1.5 var(--f-body); border: 1px solid #343842; color: #c9c5bd; background: #1b1e25; vertical-align: middle; white-space: nowrap; }
.achip.gold { border-color: #6b5a35; background: #2a2214; color: #f0c97a; }
.achip.ok { border-color: #24503a; background: #10241a; color: #8fe0b0; }
.achip.warn { border-color: #5a4520; background: #241c0e; color: #f4d79a; }
.achip.bad { border-color: #6a2f2a; background: #2a1715; color: #ffb4a8; }

.ascroll { overflow-x: auto; }
.atable { width: 100%; }
.atable td, .atable th { vertical-align: top; }
.arow { display: flex; flex-direction: column; text-decoration: none; }
.arow b { color: var(--head); }
.arow span { font-size: 12.5px; color: var(--muted); }
.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aid h2 { font-size: 22px !important; }
.aactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.astats { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.astats b { color: var(--head); }
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid #1f2229; font-size: 14px; }
.alist li:first-child { border-top: 0; padding-top: 0; }
.aright { margin-left: auto; }
.prow.tight { gap: 6px; margin: 0; flex-wrap: wrap; }
.alog { list-style: none; margin: 0 0 10px; padding: 0; }
.alog li { padding: 8px 0; border-top: 1px solid #1f2229; font-size: 14px; line-height: 1.5; }
.alog li:first-child { border-top: 0; }
.alog .at { display: inline-block; min-width: 92px; color: var(--dim); font-size: 12.5px; margin-right: 6px; }

.acards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.acard-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acard-h b { color: var(--head); font-size: 15.5px; }
.acard p { margin: 8px 0 0; font-size: 14px; }
.acard .prow { margin-top: 10px; }
.anote { color: #d6d2c8; }

.awords { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.aword { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 8px; background: #1b1e25; border: 1px solid #2a2e37; font-size: 13px; }
.aword.any { border-color: #6b5a35; }
.aword button { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 15px; padding: 0 4px; }
.aword button:hover { color: #ffb4a8; }
.blur { filter: blur(4px); transition: filter .15s; }
.blur:hover, .aword:hover .blur, li:hover .blur { filter: none; }
.awords .fine { width: 100%; }

.arooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 18px; }
.aroom { text-align: left; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-family: var(--f-body); }
.aroom:hover { border-color: var(--line-2); }
.aroom.on { border-color: var(--gold); background: #1d1a12; }
.aroom b { display: block; font-size: 13.5px; color: var(--head); }
.aroom span { font-size: 12px; color: var(--muted); }
.amsgs { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; }
.amsgs li { display: flex; gap: 10px; align-items: baseline; padding: 7px 4px; border-top: 1px solid #1f2229; font-size: 14px; }
.amsgs li:first-child { border-top: 0; }
.amsgs li.hid { opacity: .55; }
.amsgs .at { flex: none; width: 64px; color: var(--dim); font-size: 12px; }
.amsgs .mb { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.adlg form { margin: 0; }
.adlg h3 { margin: 0 0 12px; }
.adlg p { color: #d6d2c8; }
.afield { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; font: 600 13px var(--f-body); color: var(--text); flex: 1 1 200px; }
.afield.grow { flex: 2 1 260px; }
.afield .muted { font-weight: 400; }
.adlg .prow.end { margin-top: 18px; }

.aswitches { list-style: none; margin: 0; padding: 0; }
.aswitches li { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid #1f2229; }
.aswitches li:first-child { border-top: 0; padding-top: 0; }
.aswitches p { margin: 4px 0 0; font-size: 13.5px; }

.abars span.z { background: #2a2e37; }
.abars-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: 6px; }
/* buttons in the console look like buttons */
.aconsole .btn, .adlg .btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 13px !important; border-radius: 9px !important;
  border: 1px solid var(--line-2) !important; background: var(--surface-2) !important; color: var(--text) !important; font: 600 13px/1 var(--f-body) !important; text-decoration: none !important; cursor: pointer; }
.aconsole .btn:hover, .adlg .btn:hover { border-color: #4a4f5a !important; color: var(--head) !important; }
.aconsole .btn.primary, .adlg .btn.primary { background: var(--gold) !important; border-color: var(--gold) !important; color: #1a1408 !important; }
.aconsole .btn.war, .adlg .btn.war { background: #3a1a17 !important; border-color: #7a3229 !important; color: #ffb4a8 !important; }
.aconsole .btn.war:hover, .adlg .btn.war:hover { background: #4a201c !important; }
.aconsole select { height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 8px; font: 500 13px var(--f-body); }

/* the item editor */
.adlg.aitem { width: min(880px, calc(100vw - 32px)); max-width: none; }
.aitem-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .aitem-grid { grid-template-columns: 1fr; } }
.aitem textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 10px 12px; font: 400 13px/1.55 "JetBrains Mono", ui-monospace, monospace; resize: vertical; }
.aitem .prow.tight > .afield { flex: 1 1 120px; }
.aicon-row { display: flex; align-items: flex-end; gap: 10px; }
.aicon-prev { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #5b6478; background: #1b1e25; flex: none; margin-bottom: 0; }
.aupload { margin-bottom: 2px; }
.aicon-note:empty { display: none; }
.acoins { align-items: center; flex-wrap: nowrap !important; }
.acoins input { width: 64px !important; flex: none !important; }
.acoins span::after { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 8px 0 3px; }
.acoins .wi-g::after { background: #d4a72c; } .acoins .wi-s::after { background: #b8b8b8; } .acoins .wi-c::after { background: #b0642e; }
.aitem-prev { position: sticky; top: 0; }

/* guild admin tools: section header with a button, settings, account picker */
.aph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.aph h2 { margin: 0; }
.acols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 18px; margin: 12px 0; }
.acheck { display: flex; gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.4; padding: 3px 0; cursor: pointer; }
.acheck input { flex: none; }
.aperms { border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 8px; padding: 8px 12px 10px; margin: 0; }
.aperms legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.apick { display: grid; gap: 4px; max-height: 260px; overflow: auto; margin: 6px 0 12px; }
.apick-row { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line, rgba(127,127,127,.25)); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.apick-row:hover { border-color: var(--accent, #5b8def); }
.apick-row.on { border-color: var(--accent, #5b8def); box-shadow: inset 0 0 0 1px var(--accent, #5b8def); }
.atable select[data-mrole] { width: auto; max-width: 180px; }

/* Groups & crafting: a card per board, rankings, and the requests on a post */
.asub { margin: 6px 0 12px; }
.akinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }
.akind dl { margin: 0; display: grid; gap: 5px; }
.akind dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; border-bottom: 1px dashed rgba(127, 127, 127, .25); padding-bottom: 4px; }
.akind dt { color: var(--muted); }
.akind dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.akind .tlink { margin-top: 10px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.agrid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.arank { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.arank li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.arank li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arank li b { font-variant-numeric: tabular-nums; }
.areqs { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(127, 127, 127, .25); }
