/* Colchis Digital — User Dashboard Styles */

/* ── Layout ── */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 70px 1fr;
  min-height: 100vh;
  background: var(--bg-deep);
}

.dash-sidebar {
  grid-row: 1 / 3;
  background: var(--bg-card);
  border-right: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.dash-topbar {
  grid-column: 2;
  background: rgba(13, 21, 38, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.dash-main {
  grid-column: 2;
  padding: 2rem;
  overflow-y: auto;
}

/* ── Sidebar ── */
.dash-brand {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--bg-border);
  text-decoration: none;
}

.dash-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}

.dash-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dash-nav-item.active {
  background: rgba(62, 123, 250, 0.15);
  color: var(--accent-blue);
}

.dash-nav-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.dash-sidebar-footer {
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--bg-border);
}

.dash-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.dash-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.dash-user-info {
  flex: 1;
  min-width: 0;
}

.dash-user-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-user-tier {
  font-size: 0.75rem;
  color: var(--accent-emerald);
}

/* ── Topbar ── */
.dash-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ── Dashboard Cards ── */
.portfolio-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(62, 123, 250, 0.1) 100%);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, transparent 70%);
  transform: translate(30%, -30%);
}

.portfolio-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.portfolio-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.portfolio-actions {
  display: flex;
  gap: 1rem;
}

.asset-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  transition: transform 0.2s;
}

.asset-item:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 123, 250, 0.3);
}

.asset-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.asset-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--bg-card);
}

.asset-name {
  font-weight: 600;
}

.asset-symbol {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.asset-balances {
  text-align: right;
}

.asset-amount {
  font-family: var(--font-mono);
  font-weight: 600;
}

.asset-fiat {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Settings ── */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.settings-header {
  border-bottom: 1px solid var(--bg-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.settings-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.settings-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.settings-val {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.settings-action {
  flex-shrink: 0;
}

/* ── Mobile ── */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media(max-width: 1024px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-topbar, .dash-main {
    grid-column: 1;
  }
  .mobile-nav-toggle {
    display: block;
  }
}
