/*
 * File:          css/panels.css
 * Version:       1.0.1
 * Last Modified: 2026-09-04 06:55 PM ET
 * Changes:       1.0.1 — critic fixes: forecast fires threats, golden-age surge lands, hull-0 reachable, bay touch targets — cards, bars, ship SVG, sheets, tech tree.
 */

/* ---------- cards & gauges ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.card-kicker { font-size: 0.62rem; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 6px; }
.big-num { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.bar { height: 8px; background: rgba(10, 14, 24, 0.9); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; border-radius: 99px; transition: width 0.4s ease; }
.bar i.good { background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); }
.bar i.bad { background: linear-gradient(90deg, #a13040, var(--red)); }
.bar i.amber { background: linear-gradient(90deg, #b57a2a, var(--amber)); }
.bar.slim { height: 5px; flex: 1; margin: 0 8px; }
.bar-sub { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov-goal-label { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.gauge .big-num { font-size: 1.5rem; }
.loc-line { font-size: 0.78rem; color: var(--muted); padding: 2px 4px; }
.cur-res { cursor: pointer; }
.cur-res-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: 2px; }

.active-ev {
  border-radius: 10px; padding: 9px 12px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.08);
}
.active-ev.bad { border-color: rgba(255, 93, 106, 0.5); background: rgba(255, 93, 106, 0.08); }
.active-ev.info { border-color: rgba(79, 216, 235, 0.4); background: rgba(79, 216, 235, 0.07); }

/* ---------- log feed ---------- */
.logfeed { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.logline { font-size: 0.8rem; padding: 6px 8px; border-radius: 8px; background: rgba(20, 27, 44, 0.55); }
.logline .lc { color: var(--muted); font-size: 0.66rem; margin-right: 6px; font-variant-numeric: tabular-nums; }
.logline.good { color: var(--green); }
.logline.bad { color: var(--red); }
.logline.warn { color: var(--amber); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; font-weight: 700;
  background: rgba(34, 45, 70, 0.9); border: 1px solid var(--line);
  white-space: nowrap; flex-shrink: 0;
}
.btn.primary { background: linear-gradient(180deg, #56e0f2, #2fb4ca); color: #04121a; border-color: transparent; }
.btn.primary:disabled { opacity: 0.4; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.danger { background: rgba(255, 93, 106, 0.14); color: var(--red); border-color: rgba(255, 93, 106, 0.4); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 0.8rem; }
.btn-row { display: flex; gap: 8px; align-items: center; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-col { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.btn-col.wide { margin: 18px auto 0; width: min(320px, 80%); }

/* ---------- ship svg ---------- */
.power-line { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.power-line.bad { color: var(--red); font-weight: 700; }
.ship-wrap { background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(40, 60, 100, 0.18), transparent), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.ship { width: 100%; height: auto; display: block; }
.hull { fill: url(#hullg); stroke: rgba(140, 180, 240, 0.25); stroke-width: 1.5; }
.hull-line { stroke: rgba(140, 180, 240, 0.2); stroke-width: 1; stroke-dasharray: 3 5; }
.ship-name { fill: rgba(140, 160, 200, 0.4); font-size: 13px; letter-spacing: 0.3em; text-anchor: middle; }
.engine ellipse { fill: rgba(79, 216, 235, 0.22); animation: engPulse 2.2s ease-in-out infinite; }
.engine .engine-core { fill: rgba(160, 240, 255, 0.55); }
@keyframes engPulse { 50% { opacity: 0.55; } }

.bay { cursor: pointer; }
.bay-bg { fill: rgba(12, 17, 30, 0.92); stroke: rgba(110, 140, 190, 0.35); stroke-width: 1.2; transition: all 0.2s; }
.bay.empty .bay-bg { stroke-dasharray: 4 4; stroke: rgba(110, 140, 190, 0.3); }
.bay.empty:hover .bay-bg, .bay:focus-visible .bay-bg { stroke: var(--cyan); fill: rgba(79, 216, 235, 0.08); }
.bay-glyph { text-anchor: middle; font-size: 17px; }
.bay-plus { text-anchor: middle; fill: var(--muted); font-size: 18px; }
.bay-name { text-anchor: middle; fill: rgba(160, 190, 230, 0.55); font-size: 7.5px; letter-spacing: 0.2em; }
.bay-prog { fill: var(--amber); }
.bay.building .bay-bg { stroke: var(--amber); fill: rgba(255, 180, 84, 0.09); animation: bayPulse 1.4s ease-in-out infinite; }
@keyframes bayPulse { 50% { fill: rgba(255, 180, 84, 0.02); } }
.bay.online .bay-bg { stroke: var(--cyan); fill: rgba(79, 216, 235, 0.1); filter: drop-shadow(0 0 6px rgba(79, 216, 235, 0.35)); }
.bay.damaged .bay-bg { stroke: var(--red); fill: rgba(255, 93, 106, 0.12); }
.bay.offline .bay-bg { stroke: var(--muted); fill: rgba(20, 26, 40, 0.9); }
.bay-flag { text-anchor: middle; font-size: 10px; }

.legend { text-align: center; font-size: 0.72rem; color: var(--muted); }

.qrow { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; padding: 4px 0; }
.qrow span { flex-shrink: 0; min-width: 150px; }
.qrow b { font-variant-numeric: tabular-nums; width: 34px; text-align: right; }

/* ---------- module picker ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.mod-card {
  text-align: left; display: flex; flex-direction: column; gap: 3px;
  background: rgba(26, 34, 54, 0.9); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.mod-card:not(.dim):active { border-color: var(--cyan); }
.mod-card.dim { opacity: 0.55; }
.mod-card:disabled { opacity: 0.45; }
.mod-glyph { font-size: 1.3rem; }
.mod-glyph.big { font-size: 1.8rem; }
.mod-name { font-weight: 700; }
.mod-desc { font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.mod-cost { font-size: 0.74rem; color: var(--amber); margin-top: 2px; }
.detail-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.statline { font-size: 0.82rem; padding: 4px 0; font-variant-numeric: tabular-nums; }

/* ---------- research ---------- */
.rp-line { font-size: 0.82rem; color: var(--muted); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.tech-col { display: flex; flex-direction: column; gap: 8px; }
.col-head { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; color: var(--cyan); padding: 2px 4px; }
.tech-card {
  display: flex; gap: 10px; align-items: center; text-align: left;
  background: rgba(24, 31, 50, 0.9); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; min-height: 60px;
}
.tech-card:disabled { opacity: 0.5; }
.tech-card.done { border-color: rgba(92, 230, 168, 0.4); }
.tech-card.current { border-color: var(--amber); box-shadow: 0 0 12px rgba(255, 180, 84, 0.2); }
.tech-card.avail:active { border-color: var(--cyan); }
.tech-glyph { font-size: 1.4rem; }
.tech-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tech-main b { font-size: 0.86rem; }
.tech-main i { font-style: normal; font-size: 0.7rem; color: var(--muted); line-height: 1.3; }
.tech-side { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.tech-side b { font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.tech-side i { font-size: 0.6rem; color: var(--muted); font-style: normal; }
.tech-side em { font-style: normal; font-size: 0.66rem; color: var(--amber); }
.cur-card { margin-bottom: 4px; }

/* ---------- crew ---------- */
.role-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; align-items: center; padding: 8px 0; font-size: 0.88rem; }
.role-row b { font-variant-numeric: tabular-nums; }
.role-row i { grid-column: 1 / -1; grid-row: 2; font-size: 0.68rem; font-style: normal; }
.role-row input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--cyan); height: 30px; }
.role-row input[type="range"][disabled] { opacity: 0.6; }
.save-box {
  width: 100%; margin-top: 8px; min-height: 74px; resize: vertical;
  background: rgba(10, 14, 24, 0.9); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 0.68rem;
}

/* ---------- nav ---------- */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.loc-card { background: rgba(24, 31, 50, 0.9); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.loc-card.here { border-color: var(--cyan); box-shadow: 0 0 12px rgba(79, 216, 235, 0.15); }
.loc-head { display: flex; align-items: center; gap: 8px; }
.loc-glyph { font-size: 1.4rem; }
.here-tag { margin-left: auto; font-style: normal; font-size: 0.6rem; letter-spacing: 0.12em; color: var(--cyan); border: 1px solid var(--cyan-dim); padding: 2px 7px; border-radius: 99px; }
.transit-tag { margin-left: auto; font-style: normal; font-size: 0.66rem; color: var(--amber); }
.dest-grid { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.dest-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; text-align: left;
  background: rgba(24, 31, 50, 0.9); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; align-items: center;
}
.dest-card:active { border-color: var(--cyan); }
.dest-glyph { grid-row: span 3; font-size: 1.6rem; }
.dest-card b { font-size: 0.95rem; }
.dest-card i { font-style: normal; color: var(--amber); font-size: 0.78rem; }

/* ---------- sheets & toasts ---------- */
#sheet .sheet-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(3, 5, 10, 0.6);
  opacity: 0; transition: opacity 0.25s;
}
#sheet .sheet-backdrop.in { opacity: 1; }
.sheet-panel {
  position: fixed; z-index: 41; left: 50%; transform: translate(-50%, 30%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 20px)); max-height: 78vh;
  display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; opacity: 0; transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.25s;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  align-items: stretch; padding: 14px 16px 18px;
}
.sheet-panel.in { transform: translate(-50%, 0); opacity: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { font-size: 1.02rem; }
.sheet-body { overflow-y: auto; max-height: 62vh; -webkit-overflow-scrolling: touch; }
.sheet-body .btn-col { margin-bottom: 6px; }

#toasts {
  position: fixed; top: calc(60px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center;
  width: min(480px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
  background: rgba(20, 27, 44, 0.97); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 16px; font-size: 0.84rem; font-weight: 600;
  opacity: 0; transform: translateY(-8px); transition: all 0.3s; text-align: center; max-width: 100%;
}
.toast.in { opacity: 1; transform: translateY(0); }
.toast.good { border-color: rgba(92, 230, 168, 0.5); color: var(--green); }
.toast.warn { border-color: rgba(255, 180, 84, 0.5); color: var(--amber); }
.toast.bad { border-color: rgba(255, 93, 106, 0.55); color: var(--red); }
.toast.info { color: var(--text); }

/* bay access list (touch-friendly alternative to the SVG bays) */
.bay-list { display: flex; flex-direction: column; gap: 6px; }
.bay-btn { min-height: 44px; justify-content: flex-start; }
.bay-btn.warn { border-color: rgba(255, 180, 84, 0.5); color: var(--amber); }

/* === END OF FILE (FILENAME: /var/www/vhosts/pokepapi.com/colony/css/panels.css) === */
