/* ==========================================================================
   MONZ AI STUDIO DESIGN SYSTEM
   Minimalist, Apple/Linear aesthetic. Crisp, clean, eye-friendly muted slate.
   ========================================================================== */

:root {
  --bg-canvas: #0B0F17;
  --bg-card: #141C2B;
  --bg-card-hover: #1A2438;
  --bg-card-active: #222E45;
  --border-subtle: #222E45;
  --border-focus: #3B82F6;
  
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-sub: #64748B;
  
  --accent-emerald: #10B981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-blue: #3B82F6;
  --accent-blue-subtle: rgba(59, 130, 246, 0.12);
  --accent-amber: #F59E0B;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);
  --accent-rose: #EF4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --bottom-nav-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pane-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px 80px 16px;
}

.pane-container.narrow {
  max-width: 800px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background-color: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 18px;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background-color: var(--border-subtle);
  color: var(--text-muted);
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* User Capsule */
.user-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.user-capsule:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--bg-card-active);
  color: var(--text-muted);
  font-size: 14px;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

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

.user-id {
  font-size: 10px;
  color: var(--text-sub);
}

.balance-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.balance-badge:hover {
  background-color: var(--accent-emerald);
  color: #0B0F17;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.desktop-nav {
  display: flex;
  justify-content: center;
  padding: 12px 16px 0 16px;
}

.nav-container {
  display: inline-flex;
  gap: 4px;
  background-color: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab i {
  font-size: 16px;
}

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

.nav-tab.active {
  color: var(--text-main);
  background-color: var(--bg-card-active);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: rgba(20, 28, 43, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 60;
  padding: 4px 8px;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  padding: 6px 0;
  transition: var(--transition);
}

.bottom-nav-item i {
  font-size: 20px;
}

.bottom-nav-item.active {
  color: var(--accent-emerald);
}

/* Tabs Pane */
.tab-pane {
  display: none;
}

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

/* ==========================================================================
   PROMO BANNER
   ========================================================================== */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  color: #FCD34D;
  font-size: 13px;
  font-weight: 600;
}

.promo-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-content i {
  font-size: 18px;
}

.btn-promo-claim {
  padding: 4px 12px;
  background-color: var(--accent-amber);
  color: #0B0F17;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   STUDIO GENERATOR (TAB 1)
   ========================================================================== */
.media-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.type-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.type-btn i {
  font-size: 28px;
}

.type-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-sub);
}

.type-btn.active {
  background-color: var(--bg-card);
  border-color: var(--accent-emerald);
  color: var(--text-main);
  box-shadow: 0 0 0 1px var(--accent-emerald);
}

.type-btn.active i {
  color: var(--accent-emerald);
}

.type-btn-info {
  display: flex;
  flex-direction: column;
}

.type-btn-title {
  font-weight: 700;
  font-size: 14px;
}

.type-btn-meta {
  font-size: 11px;
  color: var(--text-sub);
}

/* Studio Grid Layout */
.studio-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.studio-col-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.studio-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}

.card-step-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-card-active);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.card-header-clean {
  margin-bottom: 16px;
  padding-right: 30px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card-desc {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: rgba(11, 15, 23, 0.4);
}

.upload-dropzone:hover {
  border-color: var(--accent-emerald);
  background-color: rgba(16, 185, 129, 0.03);
}

.upload-dropzone.small {
  padding: 14px;
}

.drop-icon {
  font-size: 32px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.drop-text {
  font-size: 13px;
  color: var(--text-muted);
}

.drop-text strong {
  color: var(--accent-emerald);
}

.drop-hint {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

.drop-text-small {
  font-size: 12px;
  color: var(--text-muted);
}

/* Dropzone Preview */
.dropzone-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dropzone-preview img {
  max-height: 180px;
  max-width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background-color: #000;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-name-chip {
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-card-active);
  padding: 2px 8px;
  border-radius: 4px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-remove-file {
  background: var(--bg-card-active);
  border: none;
  color: var(--accent-rose);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.detect-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  background-color: var(--accent-blue-subtle);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93C5FD;
  border-radius: var(--radius-full);
  font-size: 12px;
}

/* Segmented Control */
.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background-color: rgba(11, 15, 23, 0.5);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.segmented-control.small {
  grid-template-columns: auto auto;
}

.segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.segment-btn:hover {
  color: var(--text-main);
}

.segment-btn.active {
  background-color: var(--bg-card-active);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.model-upload-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
}

.model-note {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Preset Cards Grid (Latar) */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preset-card {
  padding: 10px 10px;
  background-color: rgba(11, 15, 23, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.preset-card:hover {
  border-color: var(--text-sub);
  background-color: var(--bg-card-hover);
}

.preset-card.active {
  background-color: var(--bg-card-active);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 1px var(--accent-emerald);
}

.preset-icon {
  font-size: 20px;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.preset-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.preset-desc {
  display: block;
  font-size: 10px;
  color: var(--text-sub);
  line-height: 1.2;
  margin-top: 2px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  background-color: rgba(11, 15, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.ratio-switcher, .count-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ratio-btn, .count-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background-color: rgba(11, 15, 23, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ratio-btn.active, .count-btn.active {
  border-color: var(--accent-emerald);
  background-color: var(--bg-card-active);
  color: var(--text-main);
}

/* ==========================================================================
   RIGHT COLUMN: ACTION & SUMMARY
   ========================================================================== */
.studio-col-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.action-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.action-card.sticky {
  position: sticky;
  top: 76px;
}

.action-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

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

.summary-label {
  color: var(--text-sub);
}

.summary-value {
  color: var(--text-main);
  font-weight: 600;
}

.summary-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 8px 0;
}

.summary-row.highlight {
  font-size: 14px;
}

.summary-cost {
  color: var(--accent-emerald);
  font-weight: 800;
  font-size: 16px;
}

.summary-balance {
  color: var(--text-muted);
  font-weight: 600;
}

.balance-warning {
  margin-top: 12px;
  padding: 8px 12px;
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  border-radius: var(--radius-sm);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Buttons */
.btn-primary-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-primary-action:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
}

.btn-primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary-action.small {
  width: auto;
  padding: 8px 16px;
  font-size: 12px;
  margin-top: 0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  background-color: var(--bg-card-active);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-sub);
}

.terms-hint {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 12px;
  line-height: 1.4;
  display: flex;
  gap: 6px;
}

/* Real-time Progress Card */
.progress-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}

.progress-spinner {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.spinner-ring {
  width: 42px;
  height: 42px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.progress-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.progress-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background-color: rgba(11, 15, 23, 0.4);
}

.step-item.active {
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-subtle);
  font-weight: 600;
}

/* Results Showcase */
.results-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.results-title {
  font-size: 15px;
  font-weight: 700;
}

.badge-gen-id {
  font-size: 11px;
  color: var(--text-sub);
  background-color: var(--bg-card-active);
  padding: 2px 8px;
  border-radius: 4px;
}

.results-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.result-item-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background-color: #000;
  aspect-ratio: 1/1;
  cursor: pointer;
}

.result-item-card img, .result-item-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-download-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.result-item-card:hover .result-download-overlay {
  opacity: 1;
}

.btn-icon-overlay {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  color: #0B0F17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
}

.results-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   TAB 2: TOP UP & PAYMENT
   ========================================================================== */
.balance-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  background: linear-gradient(135deg, #141C2B, #1A2438);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}

.hero-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 6px 0;
}

.hero-number span:first-child {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.hero-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.hero-sub {
  font-size: 11px;
  color: var(--text-sub);
}

.hero-right {
  text-align: right;
}

.hero-user-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.hero-user-id {
  font-size: 11px;
  color: var(--text-sub);
}

.section-heading {
  margin-bottom: 18px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px 20px;
  transition: var(--transition);
}

.package-card:hover {
  border-color: var(--text-sub);
  transform: translateY(-2px);
}

.package-card.popular {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 1px var(--accent-emerald);
}

.package-badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 2px 10px;
  background: var(--accent-emerald);
  color: #0B0F17;
  font-size: 10px;
  font-weight: 800;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.package-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.package-tokens {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 8px 0 4px 0;
}

.token-big {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.token-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.package-bonus-chip {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--accent-amber-subtle);
  color: #FCD34D;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 14px;
}

.package-price {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.btn-package {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-card-active);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.package-card.popular .btn-package {
  background: var(--accent-emerald);
  color: #0B0F17;
  border: none;
}

.btn-package:hover {
  opacity: 0.9;
}

/* Custom Package Card */
.custom-package-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.custom-header {
  margin-bottom: 14px;
}

.custom-title {
  font-size: 14px;
  font-weight: 700;
}

.custom-sub {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
}

.custom-body {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr;
  gap: 12px;
  align-items: center;
}

.custom-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-input {
  padding-right: 50px;
}

.input-suffix {
  position: absolute;
  right: 12px;
  font-size: 12px;
  color: var(--text-sub);
  pointer-events: none;
}

.custom-price-display {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 11px;
  color: var(--text-sub);
}

.price-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-emerald);
}

/* Trust Banner */
.trust-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background-color: rgba(20, 28, 43, 0.4);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.trust-item i {
  font-size: 20px;
  color: var(--accent-emerald);
}

/* ==========================================================================
   TAB 3: HISTORY & GALLERY
   ========================================================================== */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-sub);
}

.gallery-card-media {
  position: relative;
  aspect-ratio: 1/1;
  background-color: #000;
  cursor: pointer;
}

.gallery-card-media img, .gallery-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card-body {
  padding: 12px;
}

.gallery-prompt {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.gallery-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-sub);
}

/* Transactions List */
.trx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trx-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.trx-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trx-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.trx-info {
  display: flex;
  flex-direction: column;
}

.trx-code {
  font-size: 13px;
  font-weight: 700;
}

.trx-date {
  font-size: 11px;
  color: var(--text-sub);
}

.trx-right {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
}

.trx-amount {
  font-size: 14px;
  font-weight: 700;
}

.trx-tokens {
  font-size: 11px;
  color: var(--accent-emerald);
}

.trx-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.trx-status-badge.selesai {
  background-color: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
}

.trx-status-badge.menunggu {
  background-color: var(--accent-amber-subtle);
  color: #FCD34D;
}

.trx-status-badge.batal {
  background-color: rgba(239, 68, 68, 0.12);
  color: #FCA5A5;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  display: inline-block;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 13px;
  max-width: 320px;
  margin: 0 auto 16px auto;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.modal-header-title i {
  color: var(--accent-emerald);
  font-size: 18px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
}

/* Checkout SumoPod Modal Details */
.checkout-summary-box {
  background-color: rgba(11, 15, 23, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.checkout-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.checkout-meta-row.big {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 14px;
}

.cm-label {
  color: var(--text-sub);
}

.cm-val.highlight {
  color: var(--accent-emerald);
}

.cm-val.total {
  font-size: 18px;
  color: var(--accent-emerald);
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.qr-wrapper {
  padding: 12px;
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrapper img {
  display: block;
}

.qr-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #FCD34D;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-amber);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.qr-timer {
  font-size: 11px;
  color: var(--text-sub);
}

.qr-instructions {
  font-size: 11px;
  color: var(--text-sub);
  text-align: center;
  line-height: 1.4;
}

.checkout-success-box {
  text-align: center;
  padding: 24px 10px;
}

.success-icon-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px auto;
}

.success-title {
  font-size: 18px;
  font-weight: 800;
}

.success-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 20px 0;
}

/* User Switcher Modal */
.modal-intro {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.user-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: rgba(11, 15, 23, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.user-item-row:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-sub);
}

.user-item-row.active {
  border-color: var(--accent-emerald);
  background-color: var(--accent-emerald-subtle);
}

.user-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-item-name {
  font-size: 13px;
  font-weight: 700;
}

.user-item-id {
  font-size: 10px;
  color: var(--text-sub);
}

.user-item-tokens {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* Lightbox Modal */
.lightbox-card {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-card img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.btn-close-lightbox {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 28px;
  cursor: pointer;
}

.lightbox-actions {
  margin-top: 14px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
}

.toast-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.toast-card i {
  color: var(--accent-emerald);
  font-size: 16px;
}

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

.flex-1 {
  flex: 1;
}

.mt-3 {
  margin-top: 14px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 900px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .action-card.sticky {
    position: static;
  }

  .packages-grid {
    grid-template-columns: 1fr;
  }

  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .desktop-nav {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .pane-container {
    padding-bottom: calc(var(--bottom-nav-height) + 30px);
  }

  .app-header {
    padding: 10px 14px;
  }

  .user-name {
    max-width: 65px;
  }

  .custom-body {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .trust-banner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .trust-item {
    flex-direction: row;
    gap: 8px;
  }
}

/* ==========================================================================
   AUTHENTICATION & PROFILE MODAL SYSTEM
   ========================================================================== */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background-color: #FFFFFF;
  color: #1F2937;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-google:hover {
  background-color: #F9FAFB;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-separator:not(:empty)::before {
  margin-right: 12px;
}

.auth-separator:not(:empty)::after {
  margin-left: 12px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--border-subtle);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.auth-sub-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-sub-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.auth-sub-link strong {
  color: var(--accent-blue);
}

/* Telegram 6-Digit Pairing Input */
.pairing-input {
  font-family: monospace;
  font-size: 26px;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 800;
  padding: 14px;
  background: var(--bg-canvas);
  color: var(--accent-emerald);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-transform: uppercase;
  width: 100%;
}

.pairing-input:focus {
  border-color: var(--accent-emerald);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-emerald-subtle);
}

/* User Profile Sheet Modal */
.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.profile-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3B82F6, #10B981);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-email {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

.badge-google {
  background: rgba(234, 67, 53, 0.15);
  color: #F87171;
}

.badge-telegram {
  background: rgba(36, 161, 222, 0.15);
  color: #38BDF8;
}

.badge-email {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}

.profile-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
}

.profile-row-label {
  color: var(--text-muted);
}

.profile-row-value {
  font-weight: 600;
  color: var(--text-main);
}

.profile-row-value.highlight {
  color: var(--accent-emerald);
  font-size: 15px;
}

.btn-link-telegram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(36, 161, 222, 0.12);
  color: #38BDF8;
  border: 1px solid rgba(36, 161, 222, 0.3);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 12px;
}

.btn-link-telegram:hover {
  background: rgba(36, 161, 222, 0.2);
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ── HEADER LOGIN BUTTON & GUEST BANNER ────────────────────────────────── */
.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #FFFFFF;
  color: #111827;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-header-login:hover {
  background-color: #F9FAFB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.guest-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  font-size: 20px;
  flex-shrink: 0;
}

.guest-text {
  display: flex;
  flex-direction: column;
}

.guest-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}

.guest-desc {
  font-size: 12.5px;
  color: var(--text-sub);
}

.btn-guest-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background-color: #FFFFFF;
  color: #111827;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-guest-login:hover {
  background-color: #F3F4F6;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .guest-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .btn-guest-login {
    justify-content: center;
  }
}
