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

:root {
  --bg-base: #06080b;
  --bg-deep: #0f1522;
  
  --panel-bg: rgba(20, 28, 43, 0.45);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-highlight: rgba(255, 255, 255, 0.15);
  --panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.05);
  
  --mint: #00F2FE;
  --mint-dark: #00B8D4;
  --mint-glow: rgba(0, 242, 254, 0.3);
  --violet: #6b11ff;
  --violet-light: #9a4dff;
  --violet-glow: rgba(107, 17, 255, 0.3);
  
  --red: #e74c3c;
  --green: #2ecc71;

  --text-main: #F8FAFC;
  --text-sub: #94A3B8;
  --text-muted: #475569;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --glass-blur: blur(24px);
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Liquid / Organic Background Blobs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
}

body::before {
  top: -10vw;
  left: -10vw;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--violet) 0%, transparent 70%);
  animation: drift 20s ease-in-out infinite alternate;
}

body::after {
  bottom: -15vw;
  right: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, transparent 60%);
  animation: drift2 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5vw, 10vw) scale(1.1); }
}

@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10vw, -5vw) scale(1.05); }
}

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

.text-sub { color: var(--text-sub); }
.text-muted { color: var(--text-muted); }
.text-mint { color: var(--mint); }
.text-violet { color: var(--violet-light); }
.text-red { color: var(--red); }
.text-main { color: var(--text-main); }
.text-large { font-size: 1.5rem !important; font-family: var(--font-display) !important; font-weight: 600; }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.full-width { width: 100%; justify-content: center; }

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--panel-border);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--mint), var(--violet));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 20px var(--mint-glow), inset 0 2px 4px rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}
.brand-logo::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shine 4s infinite;
}
@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

.brand-title {
  font-size: 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(to bottom right, #ffffff, #8892b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item button {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.nav-item button i { font-size: 1.1rem; width: 20px; text-align: center; }

.nav-item:not(.active) button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  transform: translateX(4px);
}

.nav-item.active button {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid var(--mint-glow);
  color: var(--mint);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.05), inset 0 1px 1px rgba(255,255,255,0.1);
}

.sidebar-footer {
  margin-top: auto;
}

.wallet-conn-status {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.active {
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 3rem 4rem;
}

.section-header {
  margin-bottom: 2.5rem;
}

.viewport-section { display: none; animation: fadeIn 0.4s ease-out; }
.viewport-section.active { display: block; }

/* Liquid Glass Panels (3D look) */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-top: 1px solid var(--panel-highlight);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--panel-shadow);
  position: relative;
  overflow: hidden;
}
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
}

/* Identify Stage */
.identify-container {
  display: flex;
  align-items: stretch;
  gap: 3rem;
}

.nfc-animation-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(0,0,0,0.2);
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.2);
}
.nfc-animation-box i {
  font-size: 4rem;
  color: var(--mint);
  margin-bottom: 1.5rem;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); text-shadow: 0 0 0 var(--mint-glow); }
  50% { transform: scale(1.05); text-shadow: 0 0 20px var(--mint); }
  100% { transform: scale(0.95); text-shadow: 0 0 0 var(--mint-glow); }
}

.divider {
  display: flex;
  align-items: center;
  position: relative;
  width: 40px;
}
.divider::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 50%; width: 1px;
  background: var(--panel-border);
}
.divider span {
  background: var(--bg-deep);
  padding: 0.5rem;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

.manual-entry {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Forms & Inputs */
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
}
.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.form-input:focus {
  border-color: var(--mint);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15), inset 0 2px 4px rgba(0,0,0,0.3);
}
.input-group {
  display: flex;
  gap: 0.5rem;
}
.input-group .form-input { flex: 1; }

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  outline: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  pointer-events: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--mint-dark), var(--mint));
  color: var(--bg-base);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}
.btn-secondary {
  background: linear-gradient(135deg, #2d3748, #1a202c);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #3a475c, #2d3748);
}
.btn-icon {
  background: transparent;
  color: var(--text-sub);
  padding: 0.5rem;
  font-size: 1.25rem;
}
.btn-icon:hover { color: var(--red); background: rgba(231, 76, 60, 0.1); border-radius: 8px;}

/* Transaction Stage */
.customer-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}
.profile-info { display: flex; align-items: center; gap: 1rem; }
.profile-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--text-sub);
}
.profile-info h4 { margin-bottom: 0.25rem; }
.profile-balance {
  text-align: right;
  margin-right: 2rem;
}
.balance-label { display: block; font-size: 0.85rem; color: var(--text-sub); }
.balance-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); }

.transaction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.tx-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}

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

.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-mint { background: rgba(0, 242, 254, 0.1); color: var(--mint); border: 1px solid rgba(0,242,254,0.2); }
.badge-violet { background: rgba(154, 77, 255, 0.1); color: var(--violet-light); border: 1px solid rgba(154,77,255,0.2); }

.fee-breakdown {
  margin-top: 1.5rem;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.95rem;
}
.breakdown-row.total {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Tables */
.table-container { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; text-align: left;
}
.data-table th {
  padding: 1rem; border-bottom: 2px solid var(--panel-border);
  color: var(--text-sub); font-weight: 500; font-size: 0.9rem;
}
.data-table td {
  padding: 1.25rem 1rem; border-bottom: 1px solid var(--panel-border);
  font-size: 0.95rem;
}

/* Overlay / Modals */
.glass-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 8, 11, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease-out;
}
.liquid-modal {
  background: var(--panel-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-top: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  box-shadow: var(--panel-shadow);
  width: 400px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.spinner {
  width: 50px; height: 50px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--mint);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
