/* ==========================================================================
   Clockwork Echo — Progression & Workshop Steampunk Styling
   ========================================================================== */

/* Fullscreen Workshop View */
#view-workshop {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: calc(100vh - 54px);
  overflow-y: auto;
  background: radial-gradient(circle at 50% 20%, #1a1e27 0%, #0d0f14 100%);
  padding: 24px;
  box-sizing: border-box;
}

#view-workshop.active {
  display: flex;
}

.workshop-wrapper {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Workshop Header Bar */
.workshop-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(180deg, #232733 0%, #151821 100%);
  border: 2px solid #846313;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 207, 72, 0.2);
  border-radius: 4px;
  position: relative;
}

.workshop-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rank-cog-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe685 0%, #c59b27 70%, #684f0e 100%);
  border: 3px solid #161920;
  box-shadow: 0 0 12px rgba(255, 207, 72, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', serif;
  font-size: 22px;
  font-weight: bold;
  color: #1a1303;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.workshop-profile-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workshop-rank-title {
  font-size: 18px;
  font-weight: bold;
  color: #ffcf48;
  letter-spacing: 0.5px;
}

.xp-progress-bar-wrap {
  width: 240px;
  height: 10px;
  background: #0f1117;
  border: 1px solid #5a4413;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.xp-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffaa2b 0%, #ffcf48 100%);
  box-shadow: 0 0 8px #ffcf48;
  transition: width 0.3s ease;
}

.xp-text {
  font-size: 11px;
  color: #a4abb8;
  margin-left: 6px;
}

.workshop-currencies {
  display: flex;
  align-items: center;
  gap: 16px;
}

.currency-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #11141b;
  border: 1px solid #755512;
  border-radius: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
}

.currency-icon {
  font-size: 18px;
}

.currency-amount {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: bold;
  color: #f1f3f7;
}

.currency-amount.scrap {
  color: #ffcf48;
}

.currency-amount.cores {
  color: #48c9b0;
}

/* Guest Notice Banner */
.workshop-guest-notice {
  background: linear-gradient(90deg, rgba(230, 115, 0, 0.18) 0%, rgba(197, 155, 39, 0.12) 100%);
  border: 1px solid #d49a2a;
  border-radius: 6px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.3s ease-out;
}

.workshop-guest-notice .notice-icon {
  font-size: 24px;
}

.workshop-guest-notice .notice-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workshop-guest-notice .notice-text strong {
  font-size: 13px;
  color: #ffcf48;
}

.workshop-guest-notice .notice-text small {
  font-size: 11px;
  color: #a4abb8;
  line-height: 1.4;
}

/* Tab Navigation */
.workshop-tab-bar {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid #5a4413;
  padding-bottom: 12px;
}

.workshop-tab-btn {
  background: #181c25;
  border: 1px solid #6b5011;
  color: #cfd5e2;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.workshop-tab-btn:hover {
  background: #242937;
  color: #ffcf48;
  border-color: #ffcf48;
}

.workshop-tab-btn.active {
  background: linear-gradient(180deg, #362a0a 0%, #201a08 100%);
  color: #ffcf48;
  border-color: #ffcf48;
  box-shadow: 0 0 10px rgba(255, 207, 72, 0.3);
}

/* Tab Content Areas */
.workshop-tab-content {
  display: none;
  width: 100%;
}

.workshop-tab-content.active {
  display: block;
}

/* Character Foundry Dials Grid */
.foundry-dials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dial-card {
  background: linear-gradient(180deg, #20242f 0%, #141720 100%);
  border: 2px solid #6b5011;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  position: relative;
}

.dial-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px dashed rgba(255, 207, 72, 0.15);
  pointer-events: none;
}

.dial-header {
  font-size: 16px;
  font-weight: bold;
  color: #ffcf48;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dial-canvas-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 14px;
}

.dial-canvas-wrap canvas {
  width: 120px;
  height: 120px;
}

.dial-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  width: 100%;
}

.tier-badge {
  font-size: 12px;
  font-weight: bold;
  color: #48c9b0;
  background: rgba(72, 201, 176, 0.1);
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid rgba(72, 201, 176, 0.3);
}

.dial-val-now {
  font-size: 20px;
  font-weight: bold;
  color: #f1f3f7;
  font-family: 'Courier New', monospace;
}

.dial-val-next {
  font-size: 12px;
  color: #8c95a6;
}

.dial-cost {
  font-size: 12px;
  color: #ffcf48;
  font-weight: bold;
  margin-bottom: 12px;
}

.btn-dial-upgrade {
  width: 100%;
  padding: 10px;
  background: linear-gradient(180deg, #b08516 0%, #684e0b 100%);
  border: 1px solid #ffe685;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.btn-dial-upgrade:hover:not(:disabled) {
  background: linear-gradient(180deg, #d4a222 0%, #8c6a10 100%);
  box-shadow: 0 0 12px rgba(255, 207, 72, 0.5);
}

.btn-dial-upgrade:disabled {
  background: #252831;
  border-color: #3b404d;
  color: #656b78;
  cursor: not-allowed;
  box-shadow: none;
}

/* Weapon Armory Layout */
.armory-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.weapon-roster-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weapon-roster-card {
  background: #191c25;
  border: 1px solid #4a3810;
  border-radius: 4px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weapon-roster-card:hover {
  background: #232733;
  border-color: #ffcf48;
}

.weapon-roster-card.selected {
  background: linear-gradient(90deg, #2c2512 0%, #1f1c16 100%);
  border-color: #ffcf48;
  box-shadow: inset 3px 0 0 #ffcf48;
}

.roster-weapon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weapon-name {
  font-size: 14px;
  font-weight: bold;
  color: #f1f3f7;
}

.equipped-badge {
  font-size: 10px;
  font-weight: bold;
  background: #2ec4b6;
  color: #0c1a18;
  padding: 2px 6px;
  border-radius: 3px;
}

.locked-badge {
  font-size: 12px;
}

/* Workbench Panel */
.workbench-panel {
  background: linear-gradient(180deg, #20242f 0%, #141720 100%);
  border: 2px solid #6b5011;
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.workbench-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #4a3810;
  padding-bottom: 16px;
}

.workbench-name {
  font-size: 22px;
  font-weight: bold;
  color: #ffcf48;
  margin-bottom: 4px;
}

.workbench-desc {
  font-size: 13px;
  color: #9aa1b0;
  max-width: 480px;
}

.workbench-actions {
  display: flex;
  gap: 10px;
}

.btn-equip-weapon {
  padding: 8px 18px;
  background: linear-gradient(180deg, #2ec4b6 0%, #1b736b 100%);
  border: 1px solid #6ee7dc;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-equip-weapon:hover:not(:disabled) {
  box-shadow: 0 0 10px rgba(46, 196, 182, 0.5);
}

.btn-equip-weapon:disabled {
  background: #1b2f2d;
  border-color: #2e5954;
  color: #558781;
  cursor: default;
}

.btn-unlock-weapon {
  padding: 8px 18px;
  background: linear-gradient(180deg, #ff9f1c 0%, #b86704 100%);
  border: 1px solid #ffd166;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unlock-weapon:disabled {
  background: #332616;
  border-color: #594121;
  color: #8c7150;
  cursor: not-allowed;
}

/* Upgrade Tracks */
.tracks-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upgrade-track {
  display: grid;
  grid-template-columns: 140px 140px 1fr 100px 100px;
  align-items: center;
  background: #181b24;
  border: 1px solid #3c3012;
  border-radius: 4px;
  padding: 12px 16px;
  gap: 12px;
}

.track-name {
  font-size: 13px;
  font-weight: bold;
  color: #d8deeb;
}

.track-val {
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #ffcf48;
}

.track-pips {
  display: flex;
  gap: 6px;
}

.track-pip {
  width: 22px;
  height: 10px;
  background: #252935;
  border: 1px solid #484f60;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.track-pip.active {
  background: #ffaa2b;
  border-color: #ffe685;
  box-shadow: 0 0 6px rgba(255, 170, 43, 0.6);
}

.track-cost {
  font-size: 12px;
  color: #ffcf48;
  font-weight: bold;
  text-align: right;
}

.btn-track-upgrade {
  padding: 6px 12px;
  background: linear-gradient(180deg, #8c6a10 0%, #523e08 100%);
  border: 1px solid #c59b27;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-track-upgrade:hover:not(:disabled) {
  background: #b08516;
  box-shadow: 0 0 8px rgba(255, 207, 72, 0.4);
}

.btn-track-upgrade:disabled {
  background: #232630;
  border-color: #383c48;
  color: #555b6a;
  cursor: not-allowed;
}

/* Authentication Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 14, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.auth-modal-panel {
  width: 480px;
  background: linear-gradient(180deg, #202430 0%, #12141c 100%);
  border: 2px solid #846313;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 207, 72, 0.2);
  border-radius: 6px;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #5a4413;
  padding-bottom: 12px;
}

.auth-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #ffcf48;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #8c95a6;
  font-size: 20px;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: #ff4d4d;
}

.auth-identity-card {
  background: #171a23;
  border: 1px solid #4d3b11;
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-type-pill {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
}

.auth-type-pill.guest {
  background: rgba(255, 207, 72, 0.15);
  color: #ffcf48;
  border: 1px solid rgba(255, 207, 72, 0.3);
}

.auth-type-pill.linked {
  background: rgba(72, 201, 176, 0.15);
  color: #48c9b0;
  border: 1px solid rgba(72, 201, 176, 0.3);
}

.auth-callsign {
  font-size: 18px;
  font-weight: bold;
  color: #f1f3f7;
}

.auth-email {
  font-size: 12px;
  color: #8c95a6;
}

.auth-notice {
  font-size: 12px;
  color: #9aa1b0;
  line-height: 1.5;
  background: #14161f;
  padding: 10px;
  border-radius: 4px;
  border-left: 3px solid #ffcf48;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn-mock-google {
  width: 100%;
  padding: 12px;
  background: #131720;
  border: 1px solid #4285f4;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-mock-google:hover {
  background: #1a2233;
  box-shadow: 0 0 10px rgba(66, 133, 244, 0.4);
}

.link-confirm-box {
  background: #1c1810;
  border: 1px solid #ffaa2b;
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-confirm-msg {
  font-size: 12px;
  color: #f1f3f7;
  line-height: 1.4;
}

.link-confirm-buttons {
  display: flex;
  gap: 8px;
}

.btn-confirm-merge {
  flex: 1;
  padding: 8px;
  background: #2ec4b6;
  border: 1px solid #6ee7dc;
  color: #0c1a18;
  font-weight: bold;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-confirm-cloud {
  flex: 1;
  padding: 8px;
  background: #394050;
  border: 1px solid #5a6378;
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-signout {
  background: transparent;
  border: 1px solid #ff4d4d;
  color: #ff4d4d;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  align-self: center;
}

.btn-signout:hover {
  background: rgba(255, 77, 77, 0.15);
}
