/* AwakenedAsh Net Worth Dashboard — Dark Trading Terminal */

:root {
  --bg: #0a0a0c;
  --bg-card: #121216;
  --bg-elevated: #1a1a20;
  --bg-hover: #22222a;
  --border: #2a2a32;
  --border-soft: #1e1e26;
  --text: #f0f0f4;
  --text-muted: #8b8b9a;
  --text-dim: #5c5c6e;
  --accent: #ffffff;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a78bfa;
  --orange: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

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

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(80,80,120,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ========== TOPBAR ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #ccc 100%);
  color: #111;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 600; font-size: 0.95rem; letter-spacing: -0.2px; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.3px; }

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

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--green);
  background: var(--green-dim);
  padding: 4px 10px;
  border-radius: 20px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.admin-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}
.admin-link:hover {
  color: var(--text);
  border-color: #444;
  background: var(--bg-elevated);
}

/* ========== DASHBOARD LAYOUT ========== */
.dashboard {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ========== HERO ========== */
.hero-card {
  background: linear-gradient(165deg, #16161c 0%, #0f0f13 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  text-align: center;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.hero-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.currency {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--mono);
}

.hero-value {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -1.5px;
  line-height: 1.1;
  transition: color 0.3s;
}

.hero-value.up { color: var(--green); }
.hero-value.down { color: var(--red); }

.hero-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.dot-sep { margin: 0 0.4rem; opacity: 0.5; }

.breakdown-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.pill-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.pill-val {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ========== CHART ========== */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 0.75rem;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.card-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.chart-controls {
  display: flex;
  gap: 4px;
}

.tf-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.tf-btn:hover { color: var(--text); background: var(--bg-hover); }
.tf-btn.active {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

.chart-container {
  width: 100%;
  height: 280px;
  position: relative;
}

.chart-footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
}

/* ========== PANELS ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.count-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.list-item:hover { border-color: var(--border); }

.list-item .name {
  font-size: 0.88rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item .meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.list-item .value {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ========== INVESTORS ========== */
.investors-section { margin-top: 0; }

.investors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
}

.investor-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.investor-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.investor-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.7rem;
  background: #2a2a32;
  border: 2px solid var(--border);
}

.investor-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-muted);
}

.investor-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.investor-amount {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
}

.investor-notes {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  line-height: 1.3;
}

/* ========== FOOTER ========== */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.site-footer .muted { color: var(--text-dim); margin-top: 0.3rem; }

/* ========== ADMIN STYLES ========== */
.admin-body { background: var(--bg); }

.admin-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}

.admin-gate {
  max-width: 360px;
  margin: 4rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}

.admin-gate h1 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.admin-gate p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.admin-gate input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
  font-family: inherit;
}
.admin-gate input:focus {
  outline: none;
  border-color: #555;
}

.admin-gate button {
  width: 100%;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.admin-gate button:hover { opacity: 0.92; }
.admin-gate .error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  display: none;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-header h1 { font-size: 1.4rem; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-outline:hover {
  color: var(--text);
  border-color: #555;
}

.admin-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
  background: #fff;
  color: #111;
  border-color: #fff;
  font-weight: 600;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-card h3 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.form-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #555;
}

.form-group textarea { min-height: 70px; resize: vertical; }

.btn-primary {
  background: #fff;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger:hover { background: rgba(239,68,68,0.12); }

.btn-small {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-small:hover { color: var(--text); }

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

.admin-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
}

.admin-item .info { flex: 1; min-width: 0; }
.admin-item .title { font-weight: 500; font-size: 0.9rem; }
.admin-item .sub { font-size: 0.75rem; color: var(--text-dim); margin-top: 1px; }
.admin-item .amount {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.admin-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a32;
}

.manual-box {
  background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.manual-box h3 { margin-bottom: 0.5rem; }
.manual-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #fff;
}

.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 0.4rem;
}
.status-badge.manual { background: rgba(245,158,11,0.2); color: var(--orange); }
.status-badge.auto { background: var(--green-dim); color: var(--green); }

.photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a32;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border);
}

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
