/* Home base sheet — a compact, phone-safe colony plate. It draws the server payload; it never edits
   the base locally. All colours use the existing HUD variables where possible. */

.base-overlay { z-index: 48; }
.base-shell {
  width: min(1060px, 96vw);
  height: min(720px, 90vh);
  background: linear-gradient(180deg, #0b141c 0%, #071016 100%);
  border: 1px solid #2a4652;
  box-shadow: 0 24px 80px #000c, inset 0 0 0 1px #ffffff08;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.base-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #213844;
  background: radial-gradient(120% 100% at 15% 0%, #13303a 0%, #0a151c 70%);
}
.base-head .eyebrow { color: #78e3d0; letter-spacing: .16em; font-size: 12px; }
.base-head h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: .08em; color: #e8f6f4; }
.base-status { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.base-pill { border: 1px solid #2c4a54; color: #9fc6c8; padding: 4px 8px; font-size: 12px; letter-spacing: .09em; background: #0b1a20; }
.base-pill b { color: #e6fffb; }
.base-pill.good { border-color: #2d7b61; color: #8ff0c5; }
.base-pill.warn { border-color: #8a6a2d; color: #ffd88c; }
.base-pill.bad { border-color: #7c3c3c; color: #ff9a9a; }
.base-close { margin-left: 8px; }
.base-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid #1d333d; background: #071116; }
.base-tab { background: #0a171e; color: #7699a1; border: 1px solid #1c333d; border-bottom: 0; padding: 8px 13px; font: inherit; font-size: 13px; letter-spacing: .12em; cursor: pointer; }
.base-tab.on { color: #dffcf4; border-color: #2d6b6a; background: #10252b; }
.base-body { flex: 1; overflow: auto; padding: 16px; }
.base-loading, .base-empty { color: #7e9ba1; padding: 24px; text-align: center; letter-spacing: .08em; }
.base-grid { display: grid; grid-template-columns: minmax(280px, 1.1fr) minmax(240px, .9fr); gap: 14px; }
.base-card { background: #0a171e; border: 1px solid #203b46; padding: 12px; }
.base-card h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: .14em; color: #8bd8d0; font-weight: 600; }
.base-card h2 small { float: right; color: #6b8a91; font-weight: 400; }
.base-moon {
  position: relative; aspect-ratio: 1 / 1; max-height: 430px; margin: 0 auto;
  background:
    radial-gradient(circle at 50% 50%, #20343c 0%, #14242c 46%, #0a151c 72%),
    repeating-radial-gradient(circle at 50% 50%, #ffffff06 0 2px, transparent 2px 11px);
  border: 1px solid #284853; border-radius: 50%; overflow: hidden;
}
.base-moon::before { content: ''; position: absolute; inset: 8%; border: 1px dashed #3a626b66; border-radius: 50%; }
.base-port { position: absolute; transform: translate(-50%, -50%); width: 84px; text-align: center; color: #8eabb0; font-size: 12px; letter-spacing: .06em; }
.base-port .socket { width: 15px; height: 15px; margin: 0 auto 4px; border: 2px solid #46616a; background: #10222a; transform: rotate(45deg); }
.base-port.open .socket { border-color: #ffd36e; background: #3b2d12; box-shadow: 0 0 14px #ffd36e77; }
.base-port.claimed .socket { border-color: #6cf0c2; background: #0e3328; box-shadow: 0 0 14px #6cf0c255; }
.base-port b { display: block; color: #d5e8e9; font-weight: 500; line-height: 1.2; }
.base-port em { font-style: normal; color: #69848a; }
.base-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.base-btn { border: 1px solid #2e5660; background: #10232b; color: #c8f1eb; padding: 7px 10px; font: inherit; font-size: 12px; letter-spacing: .09em; cursor: pointer; }
.base-btn:hover:not(:disabled) { border-color: #58b7ac; background: #16363b; }
.base-btn:disabled { opacity: .38; cursor: default; }
.base-btn.primary { border-color: #2f9f8d; background: #123b36; color: #dcfff7; }
.base-btn.warn { border-color: #9a6237; background: #2e2114; color: #ffd3a4; }
.base-rows { display: flex; flex-direction: column; gap: 6px; }
.base-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #162b34; padding: 7px 0; font-size: 13px; color: #a8c3c6; }
.base-row b { color: #e2f5f2; font-weight: 500; }
.base-row em { font-style: normal; color: #68868b; font-size: 12px; }
.base-row .grow { flex: 1; min-width: 0; }
.base-row .base-btn { padding: 5px 8px; }
.base-meter { height: 5px; background: #0e1d23; border: 1px solid #243e47; flex: 1; min-width: 48px; }
.base-meter i { display: block; height: 100%; background: linear-gradient(90deg, #2f9f8d, #79e2c8); }
.base-meter.warn i { background: linear-gradient(90deg, #b8852c, #ffd36e); }
.base-meter.bad i { background: linear-gradient(90deg, #9a3a3a, #ff8c8c); }
.base-node { position: relative; padding: 8px; text-align: left; cursor: pointer; border: 1px solid #213d47; background: #0b1a21; color: #a9c6c8; font: inherit; font-size: 12px; }
.base-node b { display: block; color: #d9efec; font-size: 13px; font-weight: 500; }
.base-node em { color: #66848a; font-style: normal; }
.base-node.on { border-color: #2f6e65; }
.base-node.locked { opacity: .42; }
.base-node.starved, .base-node.idle { border-color: #8f6a2f; }
.base-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.base-silo { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; color: #9dbabd; }
.base-silo span:first-child { width: 62px; text-transform: uppercase; color: #7f9fa3; }
.base-silo b { width: 66px; text-align: right; color: #dff8f1; font-weight: 500; }
.base-hint { color: #68868c; font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.base-error { color: #ff9d9d; background: #2a1214; border: 1px solid #6f3138; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.base-gate { border: 1px solid #27444c; background: #0b1a20; padding: 14px; text-align: center; }
.base-gate h2 { font-size: 16px; margin: 0 0 8px; color: #dcf9f1; letter-spacing: .1em; }
.base-gate p { color: #86a4a8; font-size: 14px; line-height: 1.55; max-width: 520px; margin: 0 auto 14px; }
.base-seal { margin: 8px auto 14px; width: 74px; height: 74px; border: 2px solid #3e5c64; border-radius: 50%; display: grid; place-items: center; color: #69878d; font-size: 12px; letter-spacing: .12em; }
.base-seal::after { content: ''; position: absolute; width: 94px; height: 2px; background: #7a3d3d; transform: rotate(-25deg); }
.base-ship { border: 1px solid #2b4851; padding: 10px; margin-bottom: 8px; background: #09171d; }
.base-ship b { color: #e0f6f2; }
.base-receipt { font-size: 12px; color: #6f8d92; border-left: 2px solid #2e5e5e; padding: 4px 8px; margin-top: 4px; }

@media (max-width: 760px) {
  .base-shell { width: 100vw; height: 100dvh; border: 0; }
  .base-head { padding: 10px 12px; flex-wrap: wrap; }
  .base-head h1 { font-size: 18px; }
  .base-status { margin-left: 0; width: 100%; justify-content: flex-start; }
  .base-tabs { overflow-x: auto; padding: 8px 10px 0; }
  .base-body { padding: 10px; }
  .base-grid { grid-template-columns: 1fr; }
  .base-moon { max-height: 330px; }
}
