/* ==========================================================================
   GoldStrike Field OS — Tactical Prospector Dark Theme
   ========================================================================== */

:root {
  --bg-primary: #12151a;
  --bg-secondary: #1a1e24;
  --bg-tertiary: #242932;
  --bg-card: #1f242d;
  --border-color: #2e3542;
  --border-focus: #e5a93c;
  
  --gold-primary: #f5b041;
  --gold-glow: rgba(245, 176, 65, 0.35);
  --gold-dark: #b78119;
  
  --text-main: #f0f3f6;
  --text-muted: #9aa5b5;
  --text-dark: #626d7f;
  
  --status-green: #2ecc71;
  --status-yellow: #f1c40f;
  --status-orange: #e67e22;
  --status-red: #e74c3c;
  --status-blue: #3498db;
  
  --header-height: 56px;
  --sidebar-width: 440px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
}

#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Header */
#header {
  height: var(--header-height);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

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

.gold-icon {
  color: var(--gold-primary);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.logo-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  font-size: 0.65rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
  color: #000;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

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

.search-box {
  position: relative;
  width: 280px;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px 6px 32px;
  border-radius: 20px;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
  font-size: 0.8rem;
}

.search-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  max-height: 320px;
  overflow-y: auto;
  z-index: 2000;
}

.search-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.search-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--gold-primary);
}

.search-item-type {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.quick-stats {
  display: flex;
  gap: 8px;
}

.stat-pill {
  font-size: 0.75rem;
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 14px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.stat-pill.status-open {
  color: var(--status-green);
  border-color: rgba(46, 204, 113, 0.4);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #e5a93c, #f5b041);
  color: #12151a;
  border: none;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 12px var(--gold-glow);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
}

.btn-pill.btn-danger {
  color: var(--status-red);
}

.btn-pill:hover {
  background: var(--border-color);
}

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

/* Workspace Layout */
#workspace {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map-container {
  flex: 1;
  position: relative;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  background: #111;
}

/* Floating Map Controls */
.floating-controls {
  position: absolute;
  top: 14px;
  left: 54px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.map-mode-selector, .legend-card {
  pointer-events: auto;
}

.map-mode-selector {
  display: flex;
  gap: 6px;
  background: rgba(18, 21, 26, 0.88);
  backdrop-filter: blur(8px);
  padding: 5px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.layer-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.layer-pill.active {
  background: var(--gold-primary);
  color: #12151a;
  box-shadow: 0 0 8px var(--gold-glow);
}

.legend-card {
  background: rgba(18, 21, 26, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  width: 250px;
  font-size: 0.74rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

.legend-card h4 {
  font-size: 0.78rem;
  margin-bottom: 8px;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--text-main);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.gold-producer {
  background: #f1c40f;
  box-shadow: 0 0 6px #f1c40f;
  border: 1px solid #fff;
}

.dot.gold-placer {
  background: #3498db;
  box-shadow: 0 0 6px #3498db;
}

.dot.gold-vein {
  background: #e67e22;
  box-shadow: 0 0 6px #e67e22;
}

.line.fault-line {
  width: 14px;
  height: 3px;
  background: #ffcc00;
  border-radius: 2px;
  box-shadow: 0 0 5px #ffcc00;
}

.box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.box.usfs-box { background: rgba(39, 174, 96, 0.4); border: 1px solid #27ae60; }
.box.blm-box { background: rgba(243, 156, 18, 0.4); border: 1px solid #f39c12; }
.box.statepark-box { background: rgba(231, 76, 60, 0.5); border: 1px solid #e74c3c; }

/* Scanner Instruction Overlay */
.scanner-instruction {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(243, 156, 18, 0.95);
  color: #12151a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.btn-text {
  background: transparent;
  border: 1px solid #12151a;
  color: #12151a;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: margin-right 0.3s ease;
  z-index: 950;
}

#sidebar.collapsed {
  margin-right: calc(-1 * var(--sidebar-width));
}

.tabs-nav {
  display: flex;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-tertiary);
}

.tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  background: var(--bg-secondary);
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.empty-state h3 {
  color: var(--text-main);
  margin-bottom: 8px;
}

/* Details Card */
.detail-header {
  margin-bottom: 14px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: inline-block;
  margin-right: 6px;
  text-transform: uppercase;
}

.badge-producer {
  background: rgba(241, 196, 15, 0.2);
  color: var(--gold-primary);
  border: 1px solid rgba(241, 196, 15, 0.4);
}

.detail-header h2 {
  font-size: 1.35rem;
  color: var(--text-main);
  margin: 6px 0 2px 0;
}

.detail-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Land Clearance Banner */
.land-clearance-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--status-green);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.clearance-icon {
  font-size: 1.2rem;
  color: var(--status-green);
  margin-top: 2px;
}

.clearance-body strong {
  font-size: 0.88rem;
  display: block;
  color: var(--text-main);
}

.clearance-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 2px 0;
}

.clearance-body small {
  font-size: 0.72rem;
  color: var(--text-dark);
  display: block;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.info-cell {
  background: var(--bg-card);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.info-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.info-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.highlight-gold {
  color: var(--gold-primary);
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section h3 {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rock-tag, .mineral-tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-main);
}

.mineral-tag.gold {
  background: rgba(245, 176, 65, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  font-weight: 700;
}

.detail-desc {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
}

.notes-quote {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid var(--gold-primary);
  font-style: italic;
}

.action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* AI Prospectivity Panel */
.ai-header {
  margin-bottom: 16px;
}

.ai-header h3 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-header p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.scanner-action-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.coord-inputs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.coord-inputs input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 4px;
}

.ai-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
}

.score-display {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.score-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--gold-primary);
  background: rgba(245, 176, 65, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px var(--gold-glow);
}

#ai-score-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1;
}

.score-circle small {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.score-text h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.score-text p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.prospectivity-breakdown {
  margin-bottom: 16px;
}

.factor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.78rem;
}

.factor-name {
  width: 140px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.factor-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  margin: 0 10px;
  overflow: hidden;
}

.factor-bar .fill {
  height: 100%;
  background: var(--gold-primary);
}

.factor-bar .fill-green {
  background: var(--status-green);
}

.factor-val {
  font-weight: 700;
  color: var(--text-main);
}

.factor-val.status-green {
  color: var(--status-green);
}

.field-tips-box {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 10px 12px;
}

.field-tips-box h4 {
  font-size: 0.8rem;
  color: var(--gold-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-tips-box ul {
  padding-left: 18px;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Field Log Form */
.fieldlog-header {
  margin-bottom: 14px;
}

.fieldlog-header h3 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fieldlog-header p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.log-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gold-primary);
  outline: none;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-group.half {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.entries-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.entries-header h4 {
  font-size: 0.82rem;
  color: var(--text-main);
}

.export-actions {
  display: flex;
  gap: 6px;
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--gold-primary);
  border-radius: 6px;
  padding: 10px 12px;
}

.log-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.log-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.log-weight-badge {
  background: rgba(245, 176, 65, 0.2);
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.log-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.log-notes {
  font-size: 0.76rem;
  color: var(--text-main);
  line-height: 1.35;
}

/* Legal Cards */
.legal-guide-container h3 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.legal-disclaimer {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.legal-card.usfs-card { border-left: 4px solid var(--status-green); }
.legal-card.blm-card { border-left: 4px solid var(--status-yellow); }
.legal-card.danger-card { border-left: 4px solid var(--status-red); }

.card-icon {
  font-size: 1.3rem;
  margin-top: 2px;
}

.legal-card.usfs-card .card-icon { color: var(--status-green); }
.legal-card.blm-card .card-icon { color: var(--status-yellow); }
.legal-card.danger-card .card-icon { color: var(--status-red); }

.card-text h4 {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.card-text p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.plss-checker-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
}

.plss-checker-box h4 {
  font-size: 0.84rem;
  color: var(--gold-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plss-checker-box p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.plss-checker-box ol {
  padding-left: 18px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.plss-checker-box code {
  background: var(--bg-primary);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--gold-primary);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Custom Marker Styling */
.gold-custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.gold-custom-marker:hover {
  transform: scale(1.3);
  z-index: 1000 !important;
}

/* ==============================================================================
   User Authentication & Tier Quota Controls
   ============================================================================== */
.user-auth-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(241, 196, 15, 0.12);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auth:hover {
  background: rgba(241, 196, 15, 0.25);
  border-color: #f1c40f;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-free {
  background: #4a5568;
  color: #e2e8f0;
}

.tier-pro {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: #12151a;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.5);
}

.quota-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.1);
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid rgba(241, 196, 15, 0.25);
}

.btn-upgrade {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: #12151a;
  border: none;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(241, 196, 15, 0.4);
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  transition: color 0.15s;
}

.btn-icon-subtle:hover {
  color: #e74c3c;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-card {
  background: #181c24;
  border: 1px solid rgba(241, 196, 15, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  animation: modalFadeIn 0.2s ease-out;
}

.upgrade-card-modal {
  max-width: 520px;
  border-color: #f1c40f;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-group h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  color: #f1c40f;
  border-bottom-color: #f1c40f;
}

.auth-form .form-group {
  margin-bottom: 14px;
}

.auth-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-form input {
  width: 100%;
  background: #11141a;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9rem;
}

.auth-form input:focus {
  outline: none;
  border-color: #f1c40f;
}

.auth-alert {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 14px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
  color: #ff8578;
}

.auth-alert.success {
  background: rgba(46, 204, 113, 0.15);
  border-color: #2ecc71;
  color: #2ecc71;
}

.auth-plan-perks {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  justify-content: center;
}

/* Upgrade Modal Details */
.pricing-banner {
  text-align: center;
  background: linear-gradient(180deg, rgba(241, 196, 15, 0.1), transparent);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.pricing-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: #f1c40f;
}

.pricing-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.pro-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.pro-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #d1d5db;
  background: #11141a;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.btn-upgrade-large {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: #12151a;
  font-weight: 800;
  border: none;
}

.cancel-notice {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
}
