/* Dashboard styles */
.dash-container {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.dash-header {
  margin-bottom: 36px;
  text-align: center;
}

.dash-header h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 32px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(0, 245, 255, 0.03);
  border: 1px solid rgba(0, 245, 255, 0.12);
  border-radius: 8px;
  display: inline-block;
}

.dash-url a {
  color: var(--cyan);
  text-decoration: none;
}

.dash-url a:hover { text-decoration: underline; }

/* Live preview banner */
.dash-preview-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(0,245,255,0.05), rgba(168,85,247,0.05));
  border: 1px solid rgba(0,245,255,0.15);
  border-radius: 14px;
  margin-bottom: 28px;
}

.dash-preview-banner i {
  color: var(--cyan);
  font-size: 16px;
}

.dash-preview-banner p {
  font-family: var(--font-heading);
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.dash-preview-banner a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.dash-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-section:hover {
  border-color: rgba(0, 245, 255, 0.25);
  box-shadow: 0 8px 30px rgba(0, 245, 255, 0.04);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: 0.3px;
}

.section-title i {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.2);
  color: var(--cyan);
  font-size: 12px;
}

.section-desc {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: -6px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="url"],
.form-section input[type="number"] {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-section input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.06);
}

.form-section input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-section input[readonly] {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.01);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.field-row-with-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.field-hint {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.6;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 6px;
  border-left: 2px solid rgba(0, 245, 255, 0.15);
}

.field-hint a {
  color: var(--cyan);
  text-decoration: none;
}

.field-hint a:hover { text-decoration: underline; }

/* Social inputs */
.socials-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px 4px 4px 14px;
  transition: border-color 0.2s;
}

.social-input-row:focus-within {
  border-color: rgba(0, 245, 255, 0.3);
}

.social-input-row i {
  width: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
  flex-shrink: 0;
}

.social-input-row input {
  flex: 1;
  border: none !important;
  background: none !important;
  padding: 12px 12px 12px 0 !important;
  border-radius: 0 !important;
  font-size: 12px !important;
}

.social-input-row input:focus {
  box-shadow: none !important;
}

/* Color picker */
.color-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.color-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.color-row input[type="color"] {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: none;
  cursor: pointer;
  padding: 3px;
  transition: border-color 0.2s, transform 0.2s;
}

.color-row input[type="color"]:hover {
  border-color: var(--cyan);
  transform: scale(1.05);
}

/* Track rows */
.track-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  position: relative;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.track-row:hover {
  border-color: rgba(168, 85, 247, 0.25);
}

.track-row input:nth-child(3),
.track-row input:nth-child(4) {
  grid-column: span 2;
}

.btn-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(242, 63, 67, 0.06);
  border: 1px solid rgba(242, 63, 67, 0.15);
  color: rgba(242, 63, 67, 0.6);
  cursor: pointer;
  font-size: 11px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: rgba(242, 63, 67, 0.12);
  color: #f23f43;
  border-color: rgba(242, 63, 67, 0.4);
}

/* File input */
input[type="file"] {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* Save button area */
.form-actions {
  padding-top: 8px;
}

.form-actions .btn-primary {
  font-size: 16px;
  padding: 18px 32px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 245, 255, 0.2);
}

.save-status {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .dash-container { padding: 90px 16px 60px; }
  .field-row { grid-template-columns: 1fr; }
  .socials-inputs { grid-template-columns: 1fr; }
  .color-row { justify-content: center; }
  .track-row { grid-template-columns: 1fr; }
  .track-row input:nth-child(3),
  .track-row input:nth-child(4) { grid-column: span 1; }
}

/* Username edit button */
.btn-edit-username {
  background: rgba(240, 178, 50, 0.08) !important;
  border-color: rgba(240, 178, 50, 0.3) !important;
  color: #f0b232 !important;
}

.btn-edit-username:hover {
  background: rgba(240, 178, 50, 0.15) !important;
  border-color: #f0b232 !important;
}

.field-row-with-btn {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field-row-with-btn input { flex: 1; }

/* Client Stats Overview */
.client-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.client-stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.3s, transform 0.2s;
}

.client-stat-card:hover {
  border-color: rgba(0, 245, 255, 0.3);
  transform: translateY(-2px);
}

.client-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 15px;
  flex-shrink: 0;
}

.client-stat-icon.purple {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.2);
  color: var(--purple);
}

.client-stat-icon.pink {
  background: rgba(244, 114, 182, 0.08);
  border-color: rgba(244, 114, 182, 0.2);
  color: var(--pink);
}

.client-stat-icon.green {
  background: rgba(35, 165, 89, 0.08);
  border-color: rgba(35, 165, 89, 0.2);
  color: #23a559;
}

.client-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-stat-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}

.client-stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dashboard Tabs */
.dash-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
}

.dash-tab {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-tab:hover { color: rgba(255, 255, 255, 0.7); }

.dash-tab.active {
  background: rgba(0, 245, 255, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(0, 245, 255, 0.2);
}

.dash-tab i { font-size: 11px; }

/* Analytics Panel */
.analytics-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.analytics-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analytics-card:last-child {
  grid-column: span 2;
}

.analytics-header h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-header h3 i {
  color: var(--cyan);
  font-size: 12px;
}

.analytics-big-num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 48px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.analytics-desc {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
}

.analytics-url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.analytics-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy {
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.2);
  color: var(--cyan);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: rgba(0, 245, 255, 0.15);
  border-color: var(--cyan);
}

/* Summary table */
.analytics-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-row:last-child { border-bottom: none; }

.summary-row span:first-child {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.summary-row span:last-child {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  .client-stats { grid-template-columns: repeat(2, 1fr); }
  .analytics-panel { grid-template-columns: 1fr; }
  .analytics-card:last-child { grid-column: span 1; }
}

@media (max-width: 480px) {
  .client-stats { grid-template-columns: 1fr; }
}

/* Textarea */
.form-section textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-section textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.06);
}

.form-section textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Upload rows */
.upload-row, .track-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.upload-row input[type="file"],
.track-upload-row input[type="file"] {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.upload-status {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.track-upload-row {
  grid-column: span 2;
}

/* Template selector */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.template-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.3s;
}

.template-option:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.template-option.active {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.04);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.1);
}

.template-preview {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.tp-bar {
  height: 4px;
  border-radius: 2px;
  width: 60%;
}

.tp-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tp-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tp-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tp-lines div {
  height: 3px;
  border-radius: 2px;
}

.tp-lines div:first-child { width: 80%; }
.tp-lines div:last-child { width: 50%; }

.tp-cards {
  display: flex;
  gap: 4px;
  flex: 1;
}

.tp-cards div {
  flex: 1;
  border-radius: 4px;
}

/* Template color schemes */
.tp-cyberpunk { background: #020208; }
.tp-midnight { background: #0a0e1a; }
.tp-sunset { background: #1a0a0a; }
.tp-matrix { background: #000a00; }
.tp-arctic { background: #0f172a; }

/* Template mock layouts */
.tp-mock-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 100%;
  height: 100%;
}
.tp-m { border-radius: 3px; min-height: 14px; }
.tp-m-wide { grid-column: span 2; }
.tp-m-tall { grid-row: span 2; }
.tp-m-full { grid-column: span 2; }
.tp-m-center { width: 24px; height: 24px; border-radius: 50%; margin: 0 auto; }
.tp-m-line { height: 4px; border-radius: 2px; width: 70%; margin: 0 auto; }
.tp-m-line.short { width: 45%; }
.tp-m-row { display: flex; gap: 3px; justify-content: center; }
.tp-m-row div { width: 18px; height: 18px; border-radius: 4px; }

.tp-cyberpunk .tp-m { background: rgba(0,245,255,0.12); border: 1px solid rgba(0,245,255,0.25); }
.tp-cyberpunk .tp-m-center { background: rgba(0,245,255,0.3); border: 1px solid #00f5ff; }

.tp-mock-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  height: 100%;
  justify-content: center;
}

.tp-minimal { background: #0a0a0a; }
.tp-minimal .tp-m { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.tp-minimal .tp-m-center { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); }
.tp-minimal .tp-m-line { background: rgba(255,255,255,0.1); border: none; }
.tp-minimal .tp-m-row div { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }

.tp-mock-term {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  height: 100%;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 4px;
}
.tp-term-bar { display: flex; gap: 3px; padding-bottom: 4px; border-bottom: 1px solid rgba(34,197,94,0.2); }
.tp-term-bar span { width: 5px; height: 5px; border-radius: 50%; background: rgba(34,197,94,0.5); }

.tp-terminal { background: #000a00; }
.tp-terminal .tp-m-line { background: rgba(34,197,94,0.25); border: none; width: 85%; margin: 0; }
.tp-terminal .tp-m-line.short { width: 60%; }

.tp-mock-glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px;
  height: 100%;
  justify-content: center;
}

.tp-glass { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.tp-glass .tp-m { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(4px); }
.tp-glass .tp-m-center { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); }
.tp-glass .tp-m-full { width: 100%; height: 16px; }
.tp-glass .tp-m-row div { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }

.tp-neon { background: #050505; }
.tp-neon .tp-m { background: rgba(255,0,128,0.05); border: 2px solid rgba(255,0,128,0.4); box-shadow: 0 0 4px rgba(255,0,128,0.2); }

.template-name {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.template-desc {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  line-height: 1.4;
}

/* New template previews */
.tp-mock-split {
  display: flex;
  gap: 4px;
  height: 100%;
}
.tp-split-left {
  width: 35%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-right: 1px solid rgba(168,85,247,0.3);
  padding-right: 4px;
}
.tp-split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tp-split { background: #0a0514; }
.tp-split .tp-m { background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.25); border-radius: 3px; min-height: 16px; }
.tp-split .tp-m-center { width: 20px; height: 20px; border-radius: 50%; background: rgba(168,85,247,0.2); border: 1px solid rgba(168,85,247,0.4); }
.tp-split .tp-m-line { height: 3px; width: 70%; background: rgba(168,85,247,0.2); border: none; border-radius: 2px; }

.tp-mock-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  perspective: 100px;
}
.tp-cards3d { background: #08080f; }
.tp-cards3d .tp-m-tilt {
  width: 24px;
  height: 50px;
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 4px;
  transform: rotateY(-8deg);
}
.tp-cards3d .tp-m-tilt:nth-child(2) { transform: rotateY(0deg); height: 56px; border-color: rgba(96,165,250,0.5); }
.tp-cards3d .tp-m-tilt:nth-child(3) { transform: rotateY(8deg); }

.tp-mock-orbit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
}
.tp-orbit { background: #050510; }
.tp-orbit .tp-m-center { width: 22px; height: 22px; border-radius: 50%; background: rgba(244,114,182,0.2); border: 1px solid rgba(244,114,182,0.4); z-index: 1; }
.tp-orbit-ring {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px dashed rgba(244,114,182,0.25);
}
