:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-color: #f7f9fc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #eef2f6;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Mobile container wrapper */
.app-container {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
  padding-bottom: 75px; /* space for bottom nav */
}

/* Header style matching standard header */
header {
  padding: 16px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 18px;
  font-weight: 700;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-id {
  font-size: 12px;
  background-color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 12px;
  color: var(--text-muted);
}

/* Screen wrappers */
.screen {
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.2s ease-out;
}

.screen.active {
  display: flex;
}

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

/* Auth / Login styling */
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
  min-height: 80vh;
  text-align: center;
}

.login-card {
  width: 100%;
  background: var(--card-bg);
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.logo-wrapper {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Card components */
.card {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Balance Card (Blue header style) */
.balance-card {
  background: linear-gradient(135deg, #0052d4, #4364f7, #6fb1fc);
  color: white;
  border: none;
}

.balance-card .card-title {
  color: rgba(255, 255, 255, 0.8);
}

.balance-amount {
  font-size: 28px;
  font-weight: 700;
}

.balance-inr {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

/* Quick Actions Grid */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:active {
  transform: scale(0.98);
  background-color: #f8fafc;
}

.action-btn .icon-bg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.action-btn.deposit .icon-bg { background-color: #eff6ff; color: #3b82f6; }
.action-btn.swap .icon-bg { background-color: #fff7ed; color: #f97316; }
.action-btn.smart-swap .icon-bg { background-color: #f0fdf4; color: #22c55e; }
.action-btn.withdraw .icon-bg { background-color: #faf5ff; color: #a855f7; }

.action-btn span {
  font-size: 14px;
  font-weight: 600;
}

.action-btn small {
  font-size: 12px;
  color: var(--text-muted);
}

/* Exchange Rate Table / Widget */
.rates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rate-box {
  background-color: var(--bg-color);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.rate-val {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0;
}

/* Input elements */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.input-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="file"],
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-size: 16px;
  background-color: #f8fafc;
  outline: none;
  transition: border-color 0.2s;
}

/* Prevent yellow autofill background in browsers */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
  -webkit-text-fill-color: var(--text-color) !important;
}

input:focus {
  border-color: var(--primary-color);
  background-color: var(--card-bg);
}

/* Buttons */
.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--primary-hover);
}

.btn:active {
  transform: scale(0.99);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

/* Quick Select presets (100, 500, MAX) */
.presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.preset-btn {
  flex: 1;
  background-color: #f1f5f9;
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.preset-btn:active {
  background-color: #e2e8f0;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  flex: 1;
  height: 100%;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-icon {
  font-size: 20px;
}

/* Recent Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.activity-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f0fdf4;
  color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.activity-icon-wrapper.pending {
  background-color: #fffbeb;
  color: var(--warning-color);
}

.activity-icon-wrapper.rejected {
  background-color: #fef2f2;
  color: #ef4444;
}

.activity-details {
  display: flex;
  flex-direction: column;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
}

.activity-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--success-color);
}

.activity-amount.pending {
  color: var(--warning-color);
}

.activity-amount.rejected {
  color: #ef4444;
}

/* QR Code deposit block */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  background-color: #f8fafc;
}

.qr-code {
  width: 180px;
  height: 180px;
  background-color: #fff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.wallet-address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  word-break: break-all;
  width: 100%;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
}

/* Toast message style */
.toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { top: -50px; opacity: 0; }
  to { top: 20px; opacity: 1; }
}

/* File upload mock */
.file-upload-wrapper {
  border: 2px dashed var(--border-color);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background-color: #f8fafc;
}

.file-upload-wrapper:hover {
  border-color: var(--primary-color);
}

/* ==========================================================================
   ADMIN LAYOUT & DASHBOARD STYLE (DARK THEME)
   ========================================================================== */

.admin-body {
  background-color: #0f172a;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.admin-wrapper {
  display: flex;
  flex: 1;
  width: 100%;
  position: relative;
}

/* Sidebar Styling */
.admin-sidebar {
  width: 260px;
  background-color: #1e293b;
  border-right: 1px solid #334155;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px;
  font-size: 20px;
  font-weight: 800;
  color: white;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-link:hover, .sidebar-link.active {
  color: white;
  background-color: #334155;
}

.sidebar-link.active {
  border-left: 4px solid var(--primary-color);
  background-color: #334155;
}

/* Admin Main Content */
.admin-main {
  flex: 1;
  padding: 24px;
  overflow-x: hidden;
  background-color: #0f172a;
}

.admin-topbar {
  display: none; /* hidden on desktop */
  background-color: #1e293b;
  padding: 12px 20px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 99;
}

.hamburger-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  padding: 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.stat-title {
  font-size: 13px;
  color: #94a3b8;
}

/* Responsive Rules for Mobile Admin */
@media (max-width: 768px) {
  .admin-topbar {
    display: flex;
  }
  
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 1000;
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-main {
    padding: 16px;
  }
  
  .admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }
  
  .admin-sidebar-overlay.show {
    display: block;
  }
}

.menu-item {
  transition: background-color 0.2s ease;
}
.menu-item:hover {
  background-color: #f8fafc;
}
.menu-item:active {
  background-color: #f1f5f9;
}

