@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-deep: #030712;
  --bg-navy-dark: #070D1E;
  --bg-navy-light: #111A35;
  --bg-card: rgba(17, 26, 53, 0.45);
  
  --gold: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.3);
  --gold-dark: #8A6F27;
  --gold-light: #F5DF8B;
  
  --wallet-blue: #3b82f6;
  --wallet-blue-glow: rgba(59, 130, 246, 0.25);
  
  --text-pure: #ffffff;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: rgba(212, 175, 55, 0.15);
  --border-hover: rgba(212, 175, 55, 0.35);
  
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --ruby: #ef4444;
  --ruby-glow: rgba(239, 68, 68, 0.25);
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-pure);
  letter-spacing: -0.01em;
}

/* Shared Top Control Bar */
.global-control-bar {
  height: 54px;
  background: linear-gradient(90deg, var(--bg-navy-dark) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 100;
  flex-shrink: 0;
}

.portal-selectors {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-select-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.portal-select-btn.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--bg-deep);
  box-shadow: 0 4px 10px var(--gold-glow);
}

.portal-select-btn.active-admin {
  background: linear-gradient(135deg, var(--wallet-blue) 0%, #1e40af 100%);
  color: #fff;
  box-shadow: 0 4px 10px var(--wallet-blue-glow);
}

.global-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.global-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.global-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.global-stat-val {
  font-size: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--gold);
}

/* Master View Container */
.main-viewport {
  flex: 1;
  display: flex;
  height: calc(100vh - 54px);
  position: relative;
  overflow: hidden;
}

.portal-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: row;
}

.portal-view.active {
  display: flex;
}

/* Sidebars (Customer and Admin) */
.portal-sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--bg-navy-dark) 0%, var(--bg-deep) 100%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
}

.sidebar-menu-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-pure);
}

.sidebar-menu-btn.active {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.15);
  font-weight: 600;
}

.sidebar-menu-btn.active-admin {
  background: rgba(59, 130, 246, 0.1);
  color: var(--wallet-blue);
  border-color: rgba(59, 130, 246, 0.2);
  font-weight: 600;
}

/* Content Area */
.portal-content-body {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  background: radial-gradient(circle at 50% 20%, var(--bg-navy-light) 0%, var(--bg-deep) 100%);
}

.content-screen {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  animation: viewFadeIn 0.35s ease;
}

.content-screen.active {
  display: flex;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.screen-breadcrumbs {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 600;
}

.screen-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 2px;
}

/* Panels (Glassmorphism) */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-hover);
}

/* Grid Layouts */
.grid-2col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Buttons */
.btn-action {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--bg-deep);
  border: 1px solid var(--gold-light);
  font-family: var(--font-body);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px var(--gold-glow);
  filter: brightness(1.1);
}

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-sec {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-pure);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-sec:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: var(--gold);
}

.btn-sec.active {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

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

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

/* Timeline & Stepper */
.stepper-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
  margin-bottom: 1.5rem;
}

.stepper-step {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stepper-step.active {
  color: var(--gold);
}

.stepper-step.completed {
  color: var(--emerald);
}

/* Timelines (Redemption/KYC) */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-row {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 12px;
}

.timeline-row::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.04);
}

.timeline-row:last-child::after {
  display: none;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-navy-dark);
  border: 2px solid var(--border-color);
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline-row.active .timeline-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.timeline-row.completed .timeline-dot {
  background: var(--emerald);
  border-color: var(--emerald);
}

.timeline-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-row.active .timeline-text {
  color: #fff;
  font-weight: 600;
}

.timeline-row.completed .timeline-text {
  color: var(--emerald);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
}

.standard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.standard-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.standard-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.825rem;
}

.standard-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* Badges */
.badge-status {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-status.approved {
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-status.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-status.rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--ruby);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Alert alerts */
.alert-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed var(--ruby);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
}

.alert-title {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modals */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-container {
  background: var(--bg-navy-dark);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 400px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: modalScaleUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

/* Comparison Tables */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.compare-col-header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 6px;
}

.compare-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* Roadmap Grid */
.roadmap-timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.roadmap-bar {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  margin-top: 1rem;
}

.roadmap-bar-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--gold-glow);
  transition: var(--transition-smooth);
}

.roadmap-nodes-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: -15px;
}

.roadmap-node-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.roadmap-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 4px solid var(--border-color);
  transition: var(--transition-smooth);
  margin-bottom: 8px;
  z-index: 5;
}

.roadmap-node-point.active .roadmap-circle {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.roadmap-node-point.completed .roadmap-circle {
  border-color: var(--emerald);
  background: var(--emerald);
}

.roadmap-node-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.roadmap-node-point.active .roadmap-node-title {
  color: var(--gold);
}

/* Vector diagrams */
.flow-diagram-svg {
  width: 100%;
  max-height: 420px;
}

.flow-line {
  stroke-dasharray: 6;
  stroke-dashoffset: 100;
  stroke: rgba(255,255,255,0.12);
  transition: var(--transition-smooth);
}

.flow-line.active {
  stroke: var(--gold);
  stroke-width: 2px;
  animation: dashFlow 4s linear infinite;
  filter: drop-shadow(0 0 3px var(--gold-glow));
}

.flow-node {
  fill: #0c152e;
  stroke: var(--border-color);
  stroke-width: 1.5px;
  transition: var(--transition-smooth);
}

.flow-node.active, .flow-node:hover {
  fill: rgba(212,175,55,0.08);
  stroke: var(--gold);
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.flow-node-text {
  fill: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 10px;
  pointer-events: none;
}

.flow-node.active + .flow-node-text {
  fill: #fff;
  font-weight: 600;
}

@keyframes dashFlow {
  to { stroke-dashoffset: 0; }
}

/* Presentation View (fullscreen slide deck) */
.slide-deck-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #111a35 0%, #030712 100%);
  padding: 2rem;
  position: relative;
}

.slide-deck-card {
  width: 100%;
  max-width: 1100px;
  height: 580px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.slide-deck-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2.5rem;
  display: none;
  flex-direction: column;
}

.slide-deck-content.active {
  display: flex;
}

.slide-bottom-controls {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  display: flex;
  gap: 12px;
}

/* Floating Elements */
.portal-coin-float {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-coin-gfx {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  border: 3px solid var(--gold-light);
  box-shadow: 0 0 25px var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--bg-deep);
  animation: coinFloat 3s ease-in-out infinite;
}

@keyframes coinFloat {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* Live audit status scroll console */
.admin-console-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  height: 140px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-log-row {
  display: flex;
  gap: 8px;
  line-height: 1.4;
}

.console-log-time {
  color: var(--gold);
}

.console-log-text.success { color: var(--emerald); }
.console-log-text.warn { color: var(--ruby); }
.console-log-text.info { color: #60a5fa; }
