/* ============================================================
   VERTICAL MANAGER — HTML CLIENT
   Dark terminal theme / Material-inspired
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:   #00E676;
  --cyan:    #00E5FF;
  --yellow:  #FFD740;
  --orange:  #FF9800;
  --blue:    #2196F3;
  --red:     #FF5252;
  --purple:  #CE93D8;
  --bg:      #0D1117;
  --surface: #161B22;
  --surface2:#1C2128;
  --border:  #30363D;
  --text:    #E6EDF3;
  --muted:   #7D8590;
  --radius:  8px;
  --font:    'Courier New', Courier, monospace;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

html {
  height: -webkit-fill-available;
}

body {
  min-height: -webkit-fill-available;
  position: fixed;
  width: 100%;
  overflow: hidden;
}

#app { height: 100%; display: flex; flex-direction: column; }
#page-root { flex: 1; overflow-y: auto; }

/* ============================================================
   TYPOGRAPHY & COMMON
   ============================================================ */

h2 { font-size: 1.2rem; letter-spacing: 1px; }
h3 { font-size: 1rem; letter-spacing: 1px; }
p  { line-height: 1.6; }

.empty-msg {
  grid-column: 1/-1;
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

button { cursor: pointer; font-family: var(--font); border: none; }

.btn-primary {
  background: var(--green);
  color: #000;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 10px 16px;
  border-radius: var(--radius);
  min-height: 44px;
  transition: opacity .2s;
}
.btn-primary:disabled, .btn--disabled { opacity: .4; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { opacity: .85; }
.btn--full { width: 100%; }

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  min-height: 44px;
  letter-spacing: 1px;
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }

.btn-link {
  background: none;
  color: var(--green);
  font-weight: bold;
  text-decoration: underline;
  padding: 8px 10px;
  font-size: 13px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.btn-icon {
  background: none;
  color: var(--text);
  font-size: 18px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background .15s;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--surface2); }
.btn-icon--danger { color: var(--red); }

.btn-back {
  background: none;
  color: var(--green);
  font-size: 22px;
  padding: 4px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.btn-skip {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  z-index: 10;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.btn-sm {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.btn-sm:hover { color: var(--text); }

.btn-eye {
  background: none;
  color: var(--muted);
  padding: 0 8px;
  font-size: 16px;
}

.btn-buy {
  background: var(--green);
  color: #000;
  font-weight: bold;
  font-size: 11px;
  letter-spacing: .8px;
  padding: 6px 12px;
  border-radius: 4px;
  flex: 1;
  min-height: 44px;
}
.btn-sell {
  background: var(--orange);
  color: #000;
  font-weight: bold;
  font-size: 11px;
  letter-spacing: .8px;
  padding: 6px 12px;
  border-radius: 4px;
  flex: 1;
  min-height: 44px;
}
.btn-faction {
  width: 100%;
  color: #000;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 12px 10px;
  border-radius: 6px;
  min-height: 44px;
  margin-top: auto;
}

/* ============================================================
   APPBAR
   ============================================================ */

.appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  padding-top: env(safe-area-inset-top, 0px);
  z-index: 100;
}
.appbar__title {
  flex: 1;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--green);
  font-size: 11px;
}
.appbar__actions { display: flex; gap: 4px; }
.ws-badge {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid currentColor;
  transition: color 0.3s, border-color 0.3s;
}
.ws-badge--disconnected { color: #666; border-color: #444; }
.ws-badge--connecting   { color: #FFD700; border-color: #FFD700; }
.ws-badge--connected    { color: #69F0AE; border-color: #69F0AE; }

/* ============================================================
   TABS
   ============================================================ */

.tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  flex: 1;
  min-width: max-content;
  padding: 12px 16px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab--active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ============================================================
   DOTS & CHIPS
   ============================================================ */

.dots { display: flex; gap: 6px; align-items: center; }
.dot {
  width: 8px; height: 8px;
  background: var(--muted);
  border-radius: 50%;
  transition: all .2s;
}
.dot--active { width: 12px; background: var(--green); border-radius: 6px; }

.filter-chips { display: flex; gap: 8px; padding: 12px; overflow-x: auto; }
.chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: .8px;
  white-space: nowrap;
  transition: all .2s;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.chip--active { background: var(--green); color: #000; border-color: var(--green); font-weight: bold; }

/* ============================================================
   FORMS / AUTH
   ============================================================ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.auth-logo {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 28px;
}
.lang-selector {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.lang-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s;
}
.lang-btn:hover {
  border-color: var(--green);
  color: var(--text);
}
.lang-btn--active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}
.lang-btn--active:hover {
  opacity: .85;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.auth-legal {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.auth-legal a { color: var(--cyan); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.field input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 10px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  min-height: 44px;
  transition: border-color .2s;
}
.field input:focus { border-color: var(--green); }
.field--password { display: flex; align-items: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.field--password input { border: none; background: transparent; flex: 1; }
.field--password:focus-within { border-color: var(--green); }

.optional { font-size: 11px; color: var(--muted); font-style: italic; }

/* ============================================================
   ONBOARDING
   ============================================================ */

.onboarding {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 16px;
}
.onboarding__content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.onboarding__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.story-card {
  text-align: center;
  max-width: 380px;
}
.story-card__icon { font-size: 56px; margin-bottom: 20px; }
.story-card__title {
  color: var(--green);
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}
.story-card__text { color: var(--muted); line-height: 1.7; font-size: 13px; }

/* Loan Selection */
.loan-page { width: 100%; }
.loan-page__title {
  text-align: center;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 2px;
  padding: 12px 0 16px;
  font-family: monospace;
}
.loan-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.loan-card {
  background: #0D1B2A;
  border: 1.5px solid;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.loan-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
}
.loan-card__name { flex: 1; }
.loan-card__body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.loan-info { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.loan-info__label { font-weight: bold; color: var(--text); }

.debt-rule {
  background: #1A1A1A;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--yellow);
  font-style: italic;
  line-height: 1.5;
  border-radius: 4px;
  margin-bottom: 8px;
}
.loan-login-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard { display: flex; flex-direction: column; min-height: 100vh; }

.crisis-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #2D0A0A;
  border-bottom: 1px solid var(--red);
  color: var(--red);
  font-weight: bold;
  font-size: 13px;
}
.crisis-banner__close {
  margin-left: auto;
  background: none;
  color: var(--red);
  font-size: 16px;
}

.scrap-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.scrap-bar__value { color: var(--yellow); font-weight: bold; }

.dash-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  flex: 1;
}

.dash-actions {
  margin-bottom: 4px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.panel__title {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* Reputation */
.rep-tension { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.rep-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rep-row__label { width: 90px; font-size: 12px; font-weight: bold; flex-shrink: 0; }
.rep-row__score { width: 40px; text-align: right; font-size: 12px; font-weight: bold; flex-shrink: 0; }

.progress-bar { flex: 1; background: var(--surface2); border-radius: 4px; height: 8px; overflow: hidden; }
.progress-bar__fill { height: 100%; border-radius: 4px; transition: width .5s; }
.progress-bar__fill--red { background: var(--red); }

/* Chart */
.chart-wrap { height: 120px; position: relative; }

/* Event log */
.event-log {
  font-size: 11px;
  color: var(--cyan);
  background: var(--surface2);
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}

/* ============================================================
   SHOP
   ============================================================ */

.page { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 56px; }

@media (min-width: 768px) {
  .page { padding-bottom: 0; }
}

.scrap-badge {
  background: var(--surface2);
  color: var(--yellow);
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--yellow)44;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}
.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shop-card__icon { font-size: 24px; text-align: center; }
.shop-card__name { color: var(--green); font-weight: bold; font-size: 11px; letter-spacing: .5px; }
.shop-card__desc { color: var(--muted); font-size: 10px; line-height: 1.4; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card__price { color: var(--yellow); font-size: 12px; font-weight: bold; }
.shop-card__owned { color: var(--blue); font-size: 11px; }
.shop-card__actions { display: flex; gap: 6px; margin-top: 4px; }

/* ============================================================
   INVENTORY
   ============================================================ */

.inv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 10px;
}
.inv-tile {
  background: var(--surface);
  border: 1px solid;
  border-radius: var(--radius);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: background .15s;
  min-height: 80px;
}
.inv-tile:hover { background: var(--surface2); }
.inv-tile__icon { font-size: 24px; margin-bottom: 6px; }
.inv-tile__name { font-size: 9px; letter-spacing: .5px; color: var(--text); word-break: break-all; }
.inv-tile__qty { font-size: 12px; font-weight: bold; margin-top: 4px; }

.bottom-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 200;
  align-items: flex-end;
  justify-content: stretch;
}
.bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: #00000088;
}
.bottom-sheet__panel {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 24px 20px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: slideUp .25s ease;
}
.bottom-sheet__icon { font-size: 56px; }
.bottom-sheet__name { font-size: 1.1rem; font-weight: bold; }
.bottom-sheet__cat { font-size: 12px; letter-spacing: 1px; }
.bottom-sheet__qty { color: var(--muted); font-size: 13px; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ============================================================
   TECH TREE
   ============================================================ */

.tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}
.tech-card {
  background: var(--surface);
  border: 1.5px solid;
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .15s;
}
.tech-card:hover { background: var(--surface2); }
.tech-card__header { display: flex; align-items: center; gap: 8px; }
.tech-card__icon { font-size: 16px; }
.tech-card__name { font-size: 10px; font-weight: bold; letter-spacing: .5px; line-height: 1.3; }
.tech-card__desc { color: var(--muted); font-size: 10px; line-height: 1.4; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tech-card__costs { display: flex; gap: 12px; }
.tech-cost { font-size: 11px; color: var(--muted); }
.tech-card__prereq { font-size: 10px; color: var(--orange); font-style: italic; }
.tech-card__status { font-size: 11px; font-weight: bold; text-align: right; letter-spacing: .5px; }

/* ============================================================
   TUTORIAL
   ============================================================ */

.tutorial { display: flex; flex-direction: column; min-height: 100vh; }

.tutorial-ring {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ring-icon {
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.ring-icon--active {
  background: var(--green)22;
  border-color: var(--green);
  transform: scale(1.15);
}

.tutorial-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px;
  gap: 10px;
}
.tutorial-step-num { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.tutorial-icon { font-size: 48px; margin: 8px 0; }
.tutorial-title { color: var(--green); font-size: 1.1rem; letter-spacing: 1.5px; }
.tutorial-subtitle { color: var(--yellow); font-size: 12px; letter-spacing: 1px; }
.tutorial-desc { color: var(--muted); line-height: 1.7; max-width: 340px; }

.tutorial-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.modal__costs { display: flex; justify-content: center; gap: 20px; color: var(--muted); font-size: 13px; }
.modal__note { color: var(--muted); font-size: 12px; text-align: center; }

/* ============================================================
   SNACKBAR
   ============================================================ */

#snackbar-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 400;
  pointer-events: none;
  width: calc(100% - 24px);
  max-width: 400px;
  padding-top: env(safe-area-inset-top, 0px);
}

@media (min-width: 768px) {
  #snackbar-container {
    top: auto;
    bottom: 20px;
    padding-top: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
.snackbar {
  background: var(--surface);
  border-left: 4px solid var(--green);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 4px 20px #00000066;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
  width: 100%;
}
.snackbar--visible { opacity: 1; transform: translateY(0); }
.snackbar--success { border-color: var(--green); }
.snackbar--error   { border-color: var(--red); }
.snackbar--info    { border-color: var(--blue); }

/* ============================================================
   SPINNER
   ============================================================ */

.spinner {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============================================================
    MOBILE-FIRST PROGRESSIVE ENHANCEMENT
    ============================================================ */

@media (min-width: 480px) {
  html, body { font-size: 14px; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

  .auth-card {
    padding: 32px 24px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    border-radius: 12px;
  }
  .auth-logo { font-size: 22px; }
  .auth-subtitle { font-size: 12px; }

  .field input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .appbar { padding: 10px 12px; }
  .appbar__title { font-size: 13px; letter-spacing: 1.5px; }

  .dash-content { padding: 12px; gap: 12px; }
  .panel { padding: 14px; }

  .inv-grid { grid-template-columns: repeat(3, 1fr); }
  .inv-tile { padding: 12px 8px; }
  .inv-tile__icon { font-size: 28px; }
  .inv-tile__name { font-size: 10px; }
  .inv-tile__qty { font-size: 13px; }

  .tech-grid { grid-template-columns: 1fr 1fr; }
  .tech-card { padding: 12px; }
  .tech-card__desc { -webkit-line-clamp: unset; }

  .loan-cards { grid-template-columns: 1fr 1fr; }
  .loan-card__header { padding: 8px 10px; font-size: 12px; }
  .loan-card__body { padding: 10px; }

  .onboarding { padding: 20px; }
  .story-card__icon { font-size: 72px; margin-bottom: 28px; }
  .story-card__title { font-size: 1.3rem; }
  .story-card__text { font-size: 14px; }

  .modal { padding: 32px 24px; padding-bottom: max(32px, env(safe-area-inset-bottom, 0px)); max-width: 420px; }
  .modal__title { font-size: 1.4rem; }
  .modal__msg { font-size: 0.95rem; }

  .snackbar { font-size: 13px; padding: 12px 16px; }
  #snackbar-container { max-width: 420px; }

  .tutorial-ring { padding: 16px; gap: 12px; }
  .ring-icon { width: 48px; height: 48px; font-size: 22px; }
  .tutorial-detail { padding: 28px 24px; }
  .tutorial-icon { font-size: 64px; }
  .tutorial-title { font-size: 1.3rem; }
}

@media (min-width: 600px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }

  .silo-dashboard { padding: 16px; }
  .silo-capacity { padding: 16px; }
  .silo-items { padding: 16px; }
  .silo-item-card { padding: 14px; }

  .list-container { gap: 12px; padding: 12px; }
  .request-card { padding: 16px; }
  .request-card__title { font-size: 1.1rem; }
  .request-card__description { font-size: 0.85rem; }

  .splash-logo { font-size: 80px; }
  .splash-title { font-size: 24px; }
  .splash-subtitle { font-size: 12px; }
}

@media (min-width: 768px) {
  .silo-items-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */

.splash-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 40px;
  text-align: center;
}
.splash-logo {
  font-size: 60px;
  color: var(--green);
  margin-bottom: 24px;
  text-shadow: 0 0 30px var(--green)44;
  animation: splashPulse 2s infinite ease-in-out;
}
.splash-title {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  color: var(--text);
  margin-bottom: 8px;
}
.splash-subtitle {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 40px;
}
.splash-loader {
  width: 100%;
  max-width: 240px;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.splash-loader__progress {
  width: 0%;
  height: 100%;
  background: var(--green);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--green)88;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* ============================================================
   ADDITIONAL AUTH STYLES
   ============================================================ */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   MODAL SYSTEM
   ============================================================ */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  animation: fadeIn 0.3s ease;
}

.modal {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 340px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  text-align: center;
  transform: translateY(0);
  animation: slideUp 0.3s ease;
  margin: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}

.modal__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal__title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.modal__msg {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal__quantity {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.modal__quantity label {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--muted);
  letter-spacing: 1px;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.qty-control button {
  background: none;
  border: none;
  color: var(--green);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-control input {
  background: none;
  border: none;
  color: var(--text);
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  width: 40px;
}

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

.modal__actions button {
  width: 100%;
  padding: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   SILO MANAGEMENT PAGE
   ============================================================ */

.silo-dashboard {
  padding: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.silo-capacity {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 20px;
}

.silo-capacity__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: bold;
}

.silo-level-badge {
  background: var(--green);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
}

.silo-capacity__stats {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Progress bar large */
.progress-bar--large {
  height: 24px;
  border-radius: 12px;
  background: var(--surface2);
  overflow: hidden;
}

.progress-bar--large .progress-bar__fill {
  height: 100%;
  transition: width 0.5s ease-out;
}

/* Silo Stack Visualization */
.silo-stack-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.silo-section-title {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 16px;
  color: var(--text);
}

.silo-stack {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.silo-stack-layer {
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.silo-stack-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 0.8rem;
}

.silo-stack-icon {
  font-size: 1.2rem;
}

.silo-stack-name {
  flex: 1;
  font-weight: bold;
}

.silo-stack-qty {
  background: var(--green);
  color: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: bold;
}

@keyframes stackSlideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Silo Items Grid */
.silo-items {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 20px;
}

.silo-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.silo-item-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  transition: all 0.2s ease;
}

.silo-item-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.2);
}

.silo-item-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.silo-item-card__icon {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  border: 2px solid var(--border);
}

.silo-item-card__info {
  flex: 1;
}

.silo-item-card__name {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.silo-item-card__quantity {
  font-size: 0.8rem;
  color: var(--muted);
}

.silo-item-card__price {
  text-align: right;
}

.silo-item-card__unit-price {
  font-size: 0.75rem;
  color: var(--yellow);
  margin-bottom: 4px;
}

.silo-item-card__total {
  font-size: 1rem;
  font-weight: bold;
  color: var(--green);
}

.silo-item-card__actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.btn-silo-sell {
  width: 100%;
  padding: 10px;
  background: var(--green);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-silo-sell:hover {
  background: var(--yellow);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 230, 118, 0.3);
}

.btn-silo-sell:active {
  transform: translateY(0);
}

.btn-silo-sell:disabled {
  background: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.silo-item-card__hint {
  text-align: center;
  font-size: 0.65rem;
  color: var(--muted);
  font-style: italic;
}

/* Silo Total Section */
.silo-total {
  background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
  color: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.silo-total__label {
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.silo-total__value {
  font-size: 1.6rem;
  font-weight: bold;
}

/* ============================================================
   SILO QUICK PANEL (in-game overlay)
   ============================================================ */

.silo-mini-capacity {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
}

.silo-mini-capacity__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.progress-bar--small {
  height: 16px;
  border-radius: 8px;
  background: var(--surface2);
  overflow: hidden;
}

.progress-bar--small .progress-bar__fill {
  height: 100%;
  transition: width 0.4s ease-out;
}

.silo-quick-items {
  max-height: 350px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}

.silo-quick-loader {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-size: 0.8rem;
}

.silo-quick-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.silo-quick-item-row:hover {
  border-color: var(--green);
}

.silo-quick-item__icon {
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  border: 2px solid var(--border);
}

.silo-quick-item__info {
  flex: 1;
}

.silo-quick-item__name {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 2px;
}

.silo-quick-item__qty {
  font-size: 0.7rem;
  color: var(--muted);
}

.silo-quick-item__price {
  text-align: right;
}

.silo-quick-item__unit {
  font-size: 0.65rem;
  color: var(--yellow);
}

.silo-quick-item__total {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--green);
}

.silo-quick-item__sell {
  padding: 8px 14px;
  background: var(--green);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.silo-quick-item__sell:hover {
  background: var(--yellow);
  transform: scale(1.05);
}

.silo-quick-item__sell:active {
  transform: scale(0.98);
}

.silo-quick-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 0.8rem;
}

.silo-quick-footer {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.silo-quick-total {
  padding: 12px;
  background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
  color: var(--bg);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.silo-quick-total span:first-child {
  font-size: 0.85rem;
}

.silo-quick-total span:last-child {
  font-size: 1.2rem;
}

.btn-sell-all {
  width: 100%;
  padding: 12px;
  background: var(--yellow);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.btn-sell-all:hover {
  background: var(--green);
  transform: translateY(-1px);
}

.btn-sell-all:active {
  transform: translateY(0);
}

.silo-inline-sell {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Silo summary hover effect in game HUD */
#silo-summary:hover {
  background: rgba(0, 230, 118, 0.08);
  border-radius: 4px;
}

/* Faction Requests */
.faction-requests__intro {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), rgba(0, 229, 255, 0.04));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.faction-requests__intro h1 {
    color: var(--green);
    font-size: 0.95rem;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
}

.faction-requests__intro p {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.faction-requests__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    list-style: none;
    margin-top: 14px;
}

.faction-requests__steps li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.faction-requests__steps li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green);
    color: #000;
    font-weight: bold;
    font-size: 0.75rem;
}

.faction-requests__steps strong {
    font-size: 0.75rem;
    color: var(--text);
}

.faction-requests__steps small {
    color: var(--muted);
    font-size: 0.67rem;
    line-height: 1.35;
}

.requests-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--cyan);
    background: var(--surface2);
    color: var(--muted);
    font-size: 0.75rem;
}

.requests-overview__title {
    color: var(--text);
    font-weight: bold;
    letter-spacing: 0.7px;
    white-space: nowrap;
}

.faction-requests__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
}

.faction-requests__action p {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.4;
    margin: 6px 4px 0;
    text-align: center;
}

.request-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 30px 18px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.request-empty strong {
    color: var(--text);
    font-size: 0.85rem;
}

.request-empty p {
    max-width: 34rem;
    font-size: 0.75rem;
    line-height: 1.5;
}

.request-empty__icon {
    font-size: 1.8rem;
}

/* Faction Request Cards */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.request-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.request-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.request-card__faction {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--green);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.request-card__status {
    font-size: 0.7rem;
    color: var(--muted);
    background: var(--surface2);
    padding: 4px 8px;
    border-radius: 4px;
}

.request-card.status-completed {
    border-color: var(--green);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.request-card.status-completed .request-card__status {
    background: var(--green);
    color: #000;
}

.request-card.status-failed {
    border-color: var(--red);
    opacity: 0.8;
}

.request-card.status-failed .request-card__status {
    background: var(--red);
    color: #fff;
}

.request-card__title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text);
    margin: 4px 0;
}

.request-card__description {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

.request-card__guide {
    padding: 10px;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.04);
}

.request-card__guide-title,
.request-card__next-step > span {
    color: var(--cyan);
    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 0.8px;
}

.request-card__guide ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin-top: 7px;
}

.request-card__guide-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text);
    font-size: 0.76rem;
    line-height: 1.45;
}

.request-card__guide-type {
    flex: 0 0 auto;
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--yellow);
    font-size: 0.61rem;
    font-weight: bold;
    letter-spacing: 0.4px;
}

.request-card__next-step {
    padding: 9px 10px;
    border-left: 2px solid var(--yellow);
    background: rgba(255, 215, 64, 0.05);
}

.request-card__next-step p {
    color: var(--text);
    font-size: 0.75rem;
    line-height: 1.45;
    margin-top: 3px;
}

.request-card__progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text);
}

.request-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 5px;
}

.request-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.request-card__actions .btn-primary,
.request-card__actions .btn-secondary {
    flex: 1 1 150px;
    font-size: 0.7rem;
    min-height: 44px;
}

.request-card__actions .btn-secondary {
    background: var(--green);
    border-color: var(--green);
    color: #000;
}

.request-card__rewards {
    color: var(--yellow);
    font-weight: bold;
}

/* Progress bar specific for requests */
.request-card__progress .progress-bar {
    height: 6px;
    background: var(--surface2);
    border-radius: 3px;
    overflow: hidden;
}

.request-card__progress .progress-bar__fill {
    height: 100%;
    background: var(--green);
    transition: width 0.3s ease-in-out;
}

.empty-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-style: italic;
}

/* ============================================================
   DESKTOP — max-width centralizado
   ============================================================ */
@media (min-width: 1024px) {
  #app {
    max-width: 1200px;
    margin: 0 auto;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ============================================================
   BOTTOM NAVIGATION (mobile)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4px 0;
  padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 4px;
  min-height: 44px;
  justify-content: center;
  transition: color .15s;
  touch-action: manipulation;
}

.bottom-nav__item:active {
  color: var(--green);
}

.bottom-nav__item--active {
  color: var(--green);
}

.bottom-nav__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.bottom-nav__label {
  font-size: 0.55rem;
  letter-spacing: .5px;
  font-weight: bold;
  line-height: 1;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none !important;
  }
}

/* ============================================================
   HAMBURGER / DRAWER
   ============================================================ */
.hamburger {
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: none;
}

.drawer-overlay.visible {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 80vw);
  z-index: 310;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .25s ease;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.drawer.visible {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.drawer__logo {
  font-size: 1.5rem;
}

.drawer__title {
  font-weight: bold;
  color: var(--green);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.drawer__scrap {
  margin-left: auto;
}

.drawer__nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.drawer__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 12px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  min-height: 48px;
  touch-action: manipulation;
}

.drawer__item:active {
  background: var(--surface2);
}

.drawer__item-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.drawer__item-label {
  flex: 1;
  font-weight: bold;
  letter-spacing: .5px;
}

.drawer__footer {
  border-top: 1px solid var(--border);
  padding: 8px;
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
  .desktop-icons {
    display: flex !important;
    gap: 6px;
  }
  .desktop-icons .btn-icon {
    font-size: 22px;
    min-width: 52px;
    min-height: 52px;
    padding: 8px 10px;
  }
}

@media (max-width: 767px) {
  .desktop-icons {
    display: none !important;
  }
}

/* ============================================================
   TABS — scroll horizontal suave
   ============================================================ */
.tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1;
  min-width: max-content;
  padding: 12px 16px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

/* ============================================================
   PROFILE EDIT SECTION
   ============================================================ */
.profile-edit {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-form {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.avatar-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
  overflow: hidden;
  transition: all 0.2s ease;
}

.avatar-hint {
  font-size: 11px;
  color: var(--muted);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: bold;
  color: var(--muted);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.form-group input, 
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color .2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.form-group input:focus, 
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.25);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.loading-indicator,
.error-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  width: 100%;
}

.loading-indicator {
  flex-direction: row;
}

.loading-indicator .spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  padding: 0;
  margin-right: 8px;
  animation: profileSpin 0.8s linear infinite;
  display: inline-block;
}

@keyframes profileSpin {
  to { transform: rotate(360deg); }
}


/* MISSION SUMMARY FINANCE STYLES */
.mission-summary__finance {
  margin-top: 10px;
  margin-bottom: 15px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}
.mission-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.mission-summary__row:last-child {
  margin-bottom: 0;
}
.mission-summary__row--ok {
  color: var(--green);
}
.mission-summary__row--debt {
  color: var(--red);
}
.mission-summary__row--warning {
  color: var(--yellow);
}
.mission-summary__rewards {
  color: var(--cyan);
  font-weight: bold;
  margin-bottom: 10px;
}
