/* ==================== MEU PERSONAGEM (DEDICATED MODULE) ==================== */
.char-guest-box {
  max-width: 780px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(24, 12, 15, 0.95) 0%, rgba(10, 10, 14, 0.98) 100%);
  border: 1px solid rgba(230, 0, 18, 0.34);
  border-radius: 22px;
  padding: 42px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.char-guest-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(230, 0, 18, 0.45));
}

.char-guest-box h3 {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.char-guest-features {
  margin: 24px 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: left;
}

.char-guest-feature {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.char-guest-feature strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

/* Header bar when logged in */
.char-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.char-header-bar h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 8px;
}

/* Main 2-column Character Studio Layout */
.char-studio-grid {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 22px;
  align-items: start;
}

/* Left: Visual Custom Stage */
.char-stage-card {
  background: linear-gradient(180deg, rgba(28, 12, 16, 0.94) 0%, rgba(10, 10, 14, 0.99) 100%);
  border: 1px solid rgba(230, 0, 18, 0.36);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.char-stage-top {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.char-stage-mode-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.char-mode-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.char-mode-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.char-stage-viewport {
  position: relative;
  min-height: 360px;
  background:
    radial-gradient(circle at 50% 28%, rgba(230, 0, 18, 0.22), transparent 60%),
    linear-gradient(180deg, #130b0e 0%, #07070a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.char-stage-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.char-photo-frame {
  position: relative;
  z-index: 2;
  width: 264px;
  height: 336px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(230, 0, 18, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  background: #0b0b0f;
}

.char-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.char-rig-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.char-rig-svg {
  width: 175px;
  height: 290px;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.75));
}

.char-stage-badges {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 5, 7, 0.85);
  border: 1px solid var(--border-strong);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.stage-pill.is-approved {
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.stage-pill.is-crimson {
  border-color: rgba(230, 0, 18, 0.55);
  color: #ff6b78;
}

/* Character Nameplate & Appearance Summary under Stage */
.char-stage-footer {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.char-nameplate h3 {
  font-family: 'Anton', sans-serif;
  font-size: 1.75rem;
  text-transform: uppercase;
  line-height: 1.05;
}

.char-nameplate-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
}

.tone-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
}

.tone-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* Vital Bars */
.vitals-box {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.vital-row {
  display: grid;
  gap: 5px;
}

.vital-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-soft);
}

.vital-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.vital-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.vital-fill.hp {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}
.vital-fill.armor {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}
.vital-fill.hunger {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

/* Right Column: KPIs + Structured Sub-tabs */
.char-details-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.char-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.char-kpi-card {
  background: linear-gradient(180deg, rgba(20, 14, 16, 0.92), rgba(11, 11, 15, 0.98));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
}

.char-kpi-card span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.char-kpi-card strong {
  display: block;
  margin-top: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
}

/* Character Sub-Tabs */
.char-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.char-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.char-subtab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.char-subtab-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 18px rgba(230, 0, 18, 0.36);
}

/* Structured Content Panel */
.char-panel-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.char-panel-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.char-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
}

.char-info-row span {
  color: var(--muted);
}

.char-info-row strong {
  color: #fff;
  text-align: right;
}

/* Custom Slots Grid */
.custom-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.custom-slot-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

.custom-slot-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(230, 0, 18, 0.14);
  border: 1px solid rgba(230, 0, 18, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}

.custom-slot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-slot-info span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.custom-slot-info strong {
  display: block;
  font-size: 0.86rem;
  color: #fff;
  margin-top: 2px;
}

.custom-sync-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
  font-size: 0.8rem;
}

/* Tags & Lists */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: #fecdd3;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Orders Table */
.orders-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.orders-table th,
.orders-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}

.orders-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 1024px) {
  .char-studio-grid {
    grid-template-columns: 1fr;
  }
  .char-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .char-guest-features,
  .char-info-grid {
    grid-template-columns: 1fr;
  }
}
