/* Layout 2 columnas — cuenta (izq) + coach (der). WEB-1 */

body.orb-layout-v2 {
  display: block;
  overflow: hidden;
}

#orb-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

#orb-app > header {
  flex-shrink: 0;
}

.orb-mobile-tabs {
  display: none;
  flex-shrink: 0;
  gap: 0;
  background: var(--bg-panel, #11111c);
  border-bottom: 1px solid var(--border, #1e1e34);
  padding: 0 8px;
}

.orb-mobile-tabs .orb-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim, #68688a);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
}

.orb-mobile-tabs .orb-tab.active {
  border-bottom-color: var(--accent, #9b7fff);
  color: var(--text, #e8e8f2);
}

.orb-main {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

#orb-account-panel,
#orb-dashboard {
  background: var(--bg-panel, #12121c);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.orb-left-column #orb-account-panel {
  border-right: none;
  flex: 1 1 auto;
}

#orb-coach-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.orb-coach-settings {
  align-items: center;
  background: var(--bg-panel, #11111c);
  border-bottom: 1px solid var(--border, #1e1e34);
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 6px 12px;
}

.orb-coach-settings label {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 0.72rem;
  gap: 6px;
  user-select: none;
}

.orb-coach-settings .btn-refresh {
  margin-left: 0;
}

#orb-coach-summary {
  flex-shrink: 0;
  padding: 8px 12px 0;
}

.orb-coach-summary {
  background: #172236;
  border: 1px solid #25406a;
  border-radius: 8px;
  color: #d7e7ff;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 8px 10px;
}

.orb-coach-summary.loading,
.orb-coach-summary.empty {
  background: #131d2d;
  color: #9db3d8;
}

.orb-coach-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.orb-coach-scroll #messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto;
}

.orb-coach-scroll .suggestions,
.orb-coach-scroll .suggestions-b {
  flex-shrink: 0;
  max-height: 28vh;
  overflow-y: auto;
}

#orb-coach-panel > #input-area {
  flex-shrink: 0;
}

header .orb-help-btn {
  background: var(--bg-card, #17172b);
  border: 1px solid var(--border, #1e1e34);
  border-radius: 6px;
  color: var(--text-dim, #68688a);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  margin-left: auto;
  padding: 4px 10px;
}

header .orb-help-btn:hover {
  border-color: var(--accent, #9b7fff);
  color: var(--text, #e8e8f2);
}

header #btn-refresh,
header #btn-close-session,
header #library-note,
header #toggle-web,
header #toggle-update {
  display: none !important;
}

@media (max-width: 767px) {
  .orb-mobile-tabs {
    display: flex;
  }

  .orb-main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .orb-main.orb-tab-account #orb-coach-panel {
    display: none;
  }

  .orb-main.orb-tab-coach #orb-account-panel {
    display: none;
  }
}

/* Hito 5 — prioridad del día (compacta; no empuja Mi cuenta fuera de pantalla) */
body.orb-layout-v2 #orb-account-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#orb-summary-bar {
  display: none !important;
}

body.orb-layout-v2 #orb-daily-priority,
body.orb-layout-v2 #orb-coach-summary {
  display: none !important;
}

body.orb-layout-v2 #orb-today-unified {
  flex: 0 1 auto;
  max-height: min(36vh, 240px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 8px 0;
}

.orb-today {
  background: linear-gradient(135deg, #152238 0%, #1a2840 100%);
  border: 1px solid #2a5080;
  border-radius: 10px;
  color: #e0ecff;
  font-size: 0.82rem;
  line-height: 1.4;
  padding: 10px 12px;
}

.orb-today.loading,
.orb-today.empty {
  background: #131d2d;
  border-color: #253550;
  color: #9db3d8;
}

.orb-today__label {
  color: #7eb8ff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.orb-today__headline {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.orb-today__sub {
  color: #a8c4e8;
  font-size: 0.75rem;
  margin: 0 0 6px;
}

.orb-today__event {
  color: #ffd48a;
}

.orb-today__stamina {
  color: #8fd4a0;
}

.orb-today__level,
.orb-today__detail,
.orb-today__farm,
.orb-today__gaps,
.orb-today__stop {
  font-size: 0.74rem;
  margin: 4px 0;
}

.orb-today__more {
  font-size: 0.72rem;
  margin: 6px 0;
}

.orb-today__more summary {
  color: #8ab4e8;
  cursor: pointer;
}

.orb-today .orb-epi-badge {
  display: inline-block;
  font-size: 0.65rem;
  margin-top: 6px;
}

body.orb-layout-v2 #orb-daily-priority {
  flex: 0 1 auto;
  max-height: min(32vh, 220px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 8px 0;
}

body.orb-layout-v2 #orb-account-panel .orb-dash-toggle {
  flex-shrink: 0;
  margin: 6px 8px;
  position: sticky;
  bottom: 0;
  z-index: 5;
  width: calc(100% - 16px);
  background: #1a1a28;
}

body.orb-layout-v2 #orb-account-panel .orb-dash-header {
  flex-shrink: 0;
}

body.orb-layout-v2 #orb-account-panel .orb-dash-panel {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
}

#orb-daily-priority {
  flex-shrink: 0;
  margin: 0 0 8px;
  padding: 0 8px;
}

.orb-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.orb-char-card.orb-char-card--editing {
  position: relative;
  z-index: 30;
}

.orb-char-extras[hidden] {
  display: none !important;
}

.orb-char-extra-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  width: 100%;
}

.orb-char-extra-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: #9b9bb8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.orb-char-extra-wrap select,
.orb-char-extra-wrap input.orb-char-extra {
  width: 100%;
  font-size: 0.72rem;
}

.orb-char-build-hint {
  font-size: 0.58rem;
  color: #7dd3a0;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.2;
}

.orb-daily-priority__card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 10px;
  padding: 8px 10px;
}

.orb-daily-priority__card.loading,
.orb-daily-priority__card.empty {
  color: var(--text-dim, #8888aa);
  font-size: 0.88rem;
}

.orb-daily-priority__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3a0;
  margin: 0 0 8px;
}

.orb-daily-priority__action {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: #e8e8f0;
}

.orb-daily-priority__reason,
.orb-daily-priority__stop {
  font-size: 0.82rem;
  margin: 0 0 4px;
  color: #b0b0c8;
  line-height: 1.4;
}

.orb-daily-priority__roi {
  color: #c8b4ff;
  font-size: 0.78rem;
}

.orb-daily-priority__account-obj,
.orb-daily-priority__level {
  font-size: 0.82rem;
  margin: 0 0 6px;
  color: #d4d4e8;
  line-height: 1.45;
}

.orb-daily-priority__roi-truth {
  font-size: 0.78rem;
  margin: 0 0 6px;
  color: #9ca3af;
  line-height: 1.4;
}

.orb-daily-priority__level-compact {
  font-size: 0.8rem;
  margin: 0 0 6px;
  color: #b8b8d0;
  line-height: 1.35;
}

.orb-daily-priority__more {
  margin: 4px 0 6px;
  font-size: 0.78rem;
}

.orb-daily-priority__more summary {
  cursor: pointer;
  color: #a78bfa;
  list-style: none;
}

.orb-daily-priority__more summary::-webkit-details-marker {
  display: none;
}

.orb-daily-priority__more-body {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #2a2a40;
}

.orb-daily-priority__plan {
  margin: 8px 0 4px;
  font-size: 0.8rem;
}

.orb-daily-priority__plan summary {
  cursor: pointer;
  color: #a78bfa;
}

.orb-daily-priority__plan-body {
  white-space: pre-wrap;
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #12121a;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #c8c8d8;
  max-height: 220px;
  overflow-y: auto;
}

.orb-daily-priority__gaps {
  font-size: 0.75rem;
  color: #f0a060;
  margin: 6px 0 0;
}

.orb-epi-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 4px;
}

.orb-epi-confirmed {
  background: #14532d;
  color: #86efac;
}

.orb-epi-estimated {
  background: #422006;
  color: #fcd34d;
}

.orb-epi-unknown {
  background: #450a0a;
  color: #fca5a5;
}

.orb-inventory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.orb-inv-chip {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #252538;
  color: #c8c8e0;
}

.orb-inv-stamina {
  border: 1px solid #4a4a6a;
}
