body.pipboy-theme {
  background-color: #000;
  color: rgb(0, 95, 0);
  font-family: "Courier New", Courier, monospace;
}

:root{
  --te-green: #00ff00;
  --te-green-dim: rgb(0, 95, 0);
  --te-bg: #000;
  --te-panel: #0f0f0f;
  --te-panel2: #2b2b2b;
  --te-line: #00ff00;
  --te-glow: 0 0 10px rgba(0,255,0,.6);
}

.header, .footer {
  position: sticky;
  background: var(--te-bg);
  border: 2px solid var(--te-line);
  padding: 10px;
  display: flex;
  justify-content: center;
  z-index: 100;
  box-shadow: var(--te-glow);
}

.header { top: 0; text-align: center; }
.footer { bottom: 0; }

.header-compact, .footer-compact{
  padding: 8px 10px;
}

.footer button { width: auto; }

.home-button{
  position:absolute;
  left: 10px;
}
.home-button a {
  color: var(--te-green-dim);
  text-decoration: none;
  font-weight: bold;
  border: 1px solid var(--te-line);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,255,0,.35);
}
.home-button a:hover {
  color: #000;
  background: var(--te-green);
}

.menu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.main-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  border-bottom: 2px solid var(--te-line);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.menu-item {
  padding: 10px 20px;
  color: var(--te-green-dim);
  border: 2px solid var(--te-line);
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,255,0,.25);
}

.menu-item:hover,
.menu-item.active {
  background-color: var(--te-green);
  color: #000;
}

.submenu-container { display: flex; justify-content: center; }
.submenu {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}

.submenu.hidden { display: none; }


.submenu a {
  color: var(--te-green-dim);
  text-decoration: none;
  font-size: 1.1em;
  border: 1px solid var(--te-line);
  padding: 10px;
  transition: background-color 0.3s;
  width: 220px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,255,0,.25);
}

.submenu a:hover {
  background-color: var(--te-green);
  color: #000;
}

.hidden { display: none; }

.rw-container {
  background: var(--te-panel2);
  border: 2px solid var(--te-line);
  padding: 20px;
  max-width: 800px;
  width: 100%;
  box-shadow: var(--te-glow);
  margin: 20px auto;
  border-radius: 10px;
}

.rw-container h1, .rw-container p {
  color: var(--te-green);
  text-align: center;
}

.weapon-section {
  background-color: var(--te-panel);
  border: 1px solid var(--te-line);
  padding: 10px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}

.weapon-section h2 {
  text-align: center;
  color: var(--te-green);
  margin-bottom: 10px;
}

.weapon-section label { color: var(--te-green); margin: 5px 0; }

.rw-container input[type="number"], .weapon-section input[type="number"] {
  width: 100%;
  max-width: 100%;
  background-color: rgba(0, 47, 0, 0.5);
  color: var(--te-green);
  border: 1px solid var(--te-line);
  padding: 6px;
  text-align: center;
  margin-bottom: 8px;
  font-family: "Courier New", Courier, monospace;
  box-sizing: border-box;
  border-radius: 8px;
}

.bunker-bucks-table {
  margin: 20px auto;
  padding: 10px;
  border: 2px solid var(--te-line);
  background-color: var(--te-panel2);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
  border-radius: 10px;
  box-shadow: var(--te-glow);
}

.bunker-bucks-table h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: var(--te-green);
  text-align: center;
}

#bunker-bucks {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

#bunker-bucks th, #bunker-bucks td {
  padding: 8px;
  text-align: center;
  border: 1px solid var(--te-line);
  white-space: nowrap;
}

#bunker-bucks th {
  background-color: rgba(0, 95, 0, 0.5);
  color: var(--te-green);
}

#bunker-bucks tr:nth-child(odd) { background-color: rgba(0, 95, 0, 0.5); }
#bunker-bucks tr:nth-child(even) { background-color: rgba(0, 47, 0, 0.5); }

button, .calculate-button, .top-button, .home-button {
  background: var(--te-panel);
  border: 2px solid var(--te-line);
  color: var(--te-green);
  font-size: 1.1em;
  padding: 10px;
  cursor: pointer;
  width: 100%;
  max-width: 220px;
  margin: 10px auto;
  text-align: center;
  box-shadow: 0 0 8px rgba(0,255,0,.35);
  transition: all 0.2s;
  border-radius: 10px;
}

button:hover, .calculate-button:hover, .top-button:hover, .home-button:hover {
  background: var(--te-green);
  color: #0f0f0f;
  box-shadow: 0 0 15px rgba(0,255,0,.6);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.item-box {
  background: var(--te-panel);
  border: 1px solid var(--te-line);
  padding: 8px;
  text-align: center;
  box-shadow: 0 0 8px rgba(0,255,0,.35);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item-box img { max-width: 60px; height: auto; margin-bottom: 5px; }

.item-box span {
  font-size: 0.9em;
  color: var(--te-green);
  margin-bottom: 5px;
}

.item-box input {
  width: 100%;
  max-width: 90%;
  font-size: 0.9em;
  padding: 6px;
  text-align: center;
  color: var(--te-green);
  background: rgba(0, 47, 0, 0.5);
  border: 1px solid var(--te-line);
  border-radius: 8px;
  box-sizing: border-box;
}

input[readonly] { background-color: rgba(0, 47, 0, 0.5); }
input:not([readonly]) { background-color: rgba(0, 95, 0, 0.5); }

.banner {
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  border-radius: 10px;
}

.banner-framed{
  border: 1px solid var(--te-line);
  box-shadow: 0 0 10px rgba(0,255,0,.25);
}

form { display: flex; flex-direction: column; gap: 12px; }

.input-field {
  padding: 10px;
  font-size: 1em;
  color: var(--te-green);
  background: var(--te-panel);
  border: 1px solid var(--te-line);
  font-family: "Courier New", Courier, monospace;
  border-radius: 10px;
  outline: none;
  box-shadow: 0 0 8px rgba(0,255,0,.18);
}

.input-field:focus{
  box-shadow: 0 0 14px rgba(0,255,0,.35);
}

.error-message {
  color: #ff4d4d;
  font-size: 0.95em;
  text-align: center;
  border: 1px solid rgba(255,77,77,.6);
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,77,77,.06);
}

.muted{ color: rgba(0,255,0,.7); }
.small{ font-size: .9em; }

.login-shell{
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 12px;
  box-sizing: border-box;
}

.login-topbar{
  width: 100%;
  max-width: 520px;
  margin: 0 auto 14px auto;
  border: 2px solid var(--te-line);
  background: rgba(0,0,0,.85);
  box-shadow: var(--te-glow);
  border-radius: 14px;
  padding: 12px;
}

.brand{
  display:flex;
  gap: 12px;
  align-items:center;
}

.brand-mark{
  width: 44px;
  height: 44px;
  border: 2px solid var(--te-line);
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  color: var(--te-green);
  box-shadow: 0 0 10px rgba(0,255,0,.25);
}

.brand-title{
  font-size: 1.2em;
  font-weight: 800;
  color: var(--te-green);
}

.brand-subtitle{
  font-size: .95em;
  color: rgba(0,255,0,.65);
}

.login-container {
  background: rgba(15,15,15,.9);
  border: 2px solid var(--te-line);
  padding: 18px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--te-glow);
  margin: 0 auto;
  text-align: center;
  border-radius: 14px;
}

.login-links{
  margin-top: 14px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-links a{
  color: rgba(0,255,0,.85);
  text-decoration:none;
  border-bottom: 1px dashed rgba(0,255,0,.45);
  padding-bottom: 2px;
}

.login-links a:hover{
  color: var(--te-green);
  border-bottom-color: rgba(0,255,0,.9);
}

.dot{ color: rgba(0,255,0,.45); }

.login-footer{
  width: 100%;
  max-width: 520px;
  margin: 14px auto 0 auto;
  text-align:center;
}

.page{
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 12px 28px 12px;
  box-sizing: border-box;
}

.panel{
  background: rgba(15,15,15,.9);
  border: 2px solid var(--te-line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 0 10px rgba(0,255,0,.18);
}

.panel h2, .panel h3{
  color: var(--te-green);
  margin: 0 0 10px 0;
}

.list{
  margin: 0;
  padding-left: 18px;
  color: rgba(0,255,0,.85);
}

.table-wrap{
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(0,255,0,.35);
}

.tos-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(0,0,0,.55);
}

.tos-table th,
.tos-table td{
  border: 1px solid rgba(0,255,0,.25);
  padding: 10px;
  vertical-align: top;
  color: rgba(0,255,0,.9);
}

.tos-table th{
  background: rgba(0,95,0,.45);
  color: var(--te-green);
  text-align: left;
}

.footer-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a{
  color: rgba(0,255,0,.85);
  text-decoration:none;
  border-bottom: 1px dashed rgba(0,255,0,.45);
  padding-bottom: 2px;
}

.footer-links a:hover{
  color: var(--te-green);
  border-bottom-color: rgba(0,255,0,.9);
}

@media (max-width: 600px) {
  .login-shell{ padding: 18px 10px; }
  .login-container{ padding: 14px; }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .rw-container, .bunker-bucks-table { padding: 15px; margin: 20px auto; }
  #bunker-bucks th, #bunker-bucks td { padding: 6px; font-size: 0.85em; }
}
.approved-stamp {
    width: 120px;
    margin: 10px auto 0;
    display: block;
    opacity: 0.85;
}
.btn-link{
  background: transparent;
  border: 0;
  color: rgb(0, 238, 0);
  font-family: inherit;
  font-size: 1em;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-link:hover{
  color:#000;
  background: rgb(0, 238, 0);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
}

.te-header{
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 2px solid rgb(0,95,0);
  box-shadow: 0 0 10px rgb(0,95,0);
  background: #000;
}

.te-header-left{display:flex; gap:18px; align-items:center; flex-wrap:wrap}
.te-header-right{display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:flex-end}

.brand{display:flex; gap:12px; align-items:center}
.brand-mark{
  width:44px; height:44px; display:grid; place-items:center;
  border:2px solid rgb(0,238,0);
  color:rgb(0,238,0);
  box-shadow:0 0 12px rgba(0,238,0,.4);
  font-weight:700;
}
.brand-title{font-size:18px; font-weight:700; color:rgb(0,238,0)}
.brand-subtitle{font-size:12px; color:rgba(0,238,0,.7)}

.te-nav{display:flex; gap:10px; flex-wrap:wrap}
.te-pill{
  display:inline-block;
  padding:10px 14px;
  border:2px solid rgb(0,238,0);
  color:rgb(0,238,0);
  background:#0f0f0f;
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 0 8px rgb(0,95,0);
  border-radius:8px;
  font-weight:700;
}
.te-pill:hover{background:rgb(0,238,0); color:#000; box-shadow:0 0 15px rgb(0,238,0)}
.te-pill-wide{min-width:160px; text-align:center}
.te-pill-accent{border-color:rgb(0,238,0);}

.te-status{color:rgb(0,95,0); text-align:right; min-width:200px}
.te-footer{
  margin-top: 40px;
  border-top: 2px solid rgba(0,238,0,.35);
  padding: 18px 16px;
}
.footer-inner{display:flex; gap:12px; justify-content:space-between; align-items:center; flex-wrap:wrap}
.footer-line{margin:0; color:rgba(0,238,0,.75)}
.footer-links{display:flex; gap:12px; flex-wrap:wrap}
.footer-links a{color:rgb(0,238,0); text-decoration:none; border-bottom:1px dashed rgba(0,238,0,.6)}
.footer-links a:hover{background:rgb(0,238,0); color:#000; border-bottom:none; padding:2px 6px; border-radius:4px}

.key-box{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.key-box input{flex:1; min-width:240px}

.result-box{
  margin-top: 12px;
  padding: 12px;
  border: 2px solid rgb(0,238,0);
  background: rgba(0,47,0,.35);
  color: rgb(0,238,0);
  border-radius: 8px;
}
.result-box.bad{
  border-color: #ff5a5a;
  color: #ff5a5a;
  background: rgba(80,0,0,.35);
}
.result-box.ok{
  border-color: rgb(0,238,0);
}

@media (max-width: 800px){
  .te-status{min-width:auto; text-align:left}
}


/* =========================
   Prices page (new layout)
   ========================= */

.header-actions{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
}

.controls-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.control{
  position: relative; /* needed for autocomplete positioning */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control label{
  color: rgba(0,255,0,.85);
  font-weight: 700;
}

#item-type-select{
  padding: 10px;
  font-size: 1em;
  color: var(--te-green);
  background: var(--te-panel);
  border: 1px solid var(--te-line);
  font-family: "Courier New", Courier, monospace;
  border-radius: 10px;
  outline: none;
  box-shadow: 0 0 8px rgba(0,255,0,.18);
}

#item-type-select:focus{
  box-shadow: 0 0 14px rgba(0,255,0,.35);
}

/* autocomplete dropdown */
.autocomplete-items{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(0,0,0,.95);
  border: 1px solid rgba(0,255,0,.35);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,255,0,.18);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete-items div{
  padding: 10px 12px;
  cursor: pointer;
  color: rgba(0,255,0,.9);
  border-bottom: 1px solid rgba(0,255,0,.15);
}

.autocomplete-items div:hover{
  background: rgba(0,255,0,.15);
}

.status-bar{
  margin-top: 12px;
  border: 1px solid rgba(0,255,0,.35);
  background: rgba(0,47,0,.25);
  padding: 10px 12px;
  border-radius: 10px;
}

.empty-state{
  padding: 18px 12px;
  text-align: center;
  border: 1px dashed rgba(0,255,0,.25);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.mini-label{
  display: block;
  width: 100%;
  text-align: left;
  font-size: .85em;
  margin: 6px 0 4px 0;
  color: rgba(0,255,0,.75);
}

.check-row{
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  color: rgba(0,255,0,.85);
}

.check-row input[type="checkbox"]{
  width: auto;
  max-width: none;
  margin: 0;
}

/* Mobile */
@media (max-width: 700px){
  .header-actions{
    position: static;
    transform: none;
    margin-left: auto;
  }

  .header.header-compact{
    justify-content: space-between;
  }

  .controls-row{
    grid-template-columns: 1fr;
  }
}
/* TE modal popup */
.te-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 16px;
}

.te-modal.hidden{ display:none; }

.te-modal-card{
  width: 100%;
  max-width: 520px;
  border: 2px solid rgb(0,238,0);
  background: rgba(15,15,15,.96);
  box-shadow: 0 0 18px rgba(0,238,0,.35);
  border-radius: 14px;
  padding: 16px;
}

.te-modal-card.ok{
  border-color: rgb(0,238,0);
  box-shadow: 0 0 18px rgba(0,238,0,.35);
}

.te-modal-card.bad{
  border-color: #ff5a5a;
  box-shadow: 0 0 18px rgba(255,90,90,.25);
}

.te-modal-title{
  font-size: 18px;
  font-weight: 800;
  color: rgb(0,238,0);
  margin-bottom: 10px;
}

.te-modal-card.bad .te-modal-title{
  color: #ff5a5a;
}

.te-modal-body{
  color: rgba(0,238,0,.85);
  line-height: 1.4;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.te-modal-card.bad .te-modal-body{
  color: rgba(255,90,90,.9);
}

.te-modal-actions{
  display:flex;
  justify-content:flex-end;
}


/* =========================
   Bazaar % Paid controls
   ========================= */

.market-rate-block{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.market-rate-row{
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

/* Make sure the input fills the row */
.market-rate-row input.market-rate{
  width: 100%;
  max-width: 100%;
}

/* Stop arrow buttons inheriting global button sizing */
.market-rate-stepper{
  display: grid;
  gap: 8px;
}

/* Smaller arrows */
.market-rate-stepper .te-pill{
  width: 36px;
  height: 32px;
  padding: 0;
  margin: 0;
  max-width: none;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 10px;
  line-height: 1;
}
/* Quick buttons: desktop = 2x2, mobile = 4 across */
.quick-rate-row{
  width: 100%;
  display: grid;
  gap: 10px;
}

/* Default (desktop): 2 columns = 2 rows */
@media (min-width: 601px){
  .quick-rate-row{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 4 in one row */
@media (max-width: 600px){
  .quick-rate-row{
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

/* Ensure pills don’t inherit global button sizing/margins */
.quick-rate-row .te-pill{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 0;
  font-size: 0.95em;
  border-radius: 999px;
}

@media (max-width: 600px){
  .quick-rate-row .te-pill{
    font-size: 0.9em;
    padding: 8px 0;
  }
}
/* ADD THIS TO THE END OF wh-style.css (mobile improvements for all pages) */

/* Make header buttons easier to tap + stop weird overlap on small screens */
@media (max-width: 600px){
  .header.header-compact{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 10px;
  }

  .home-button{
    position: static;
    left: auto;
  }

  .header h1{
    width: 100%;
    text-align: center;
    margin: 4px 0 0 0;
    font-size: 1.2em;
  }

  .header-actions{
    position: static;
    transform: none;
    right: auto;
    top: auto;
    width: 100%;
    justify-content: center;
  }

  .header-actions button{
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .footer.footer-compact{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 12px 10px;
  }

  .footer-links{
    width: 100%;
    justify-content: center;
  }
}

/* Terms table: make it readable on mobile */
@media (max-width: 700px){
  .table-wrap{
    border-radius: 12px;
  }

  .tos-table{
    min-width: 900px; /* forces horizontal scroll inside wrapper */
  }

  .tos-table th,
  .tos-table td{
    padding: 8px;
    font-size: 0.9em;
  }
}

/* Home topbar: stack cleanly on small screens */
@media (max-width: 720px){
  .te-topbar-inner{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .te-nav{
    justify-content: flex-start;
  }

  .te-nav a,
  .te-nav button{
    flex: 1 1 auto;
    text-align: center;
  }

  .te-status{
    align-items: flex-start;
    text-align: left;
  }
}

/* Login banner + stamp sizing on small screens */
@media (max-width: 600px){
  .banner{
    border-radius: 12px;
  }
  .approved-stamp{
    width: 110px;
  }
}
