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

:root {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-green: #10b981;
  --accent-red: #f43f5e;
  --accent-yellow: #f59e0b;
  --accent-blue: #3b82f6;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --blur-amount: 16px;
  --border-radius: 16px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
}

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

.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(to right, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-item a:hover, .nav-item.active a {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-item.active a {
  border-left: 3px solid var(--accent-indigo);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.nav-item a svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-item.active a svg {
  color: var(--accent-indigo);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  background: none;
  border: none;
  color: var(--accent-red);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  transition: var(--transition-fast);
}

.logout-btn:hover {
  background-color: rgba(244, 63, 94, 0.1);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

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

.page-title {
  font-size: 1.85rem;
  font-weight: 700;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Cards & Glassmorphism */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Dashboard Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, #e5e7eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-value.revenue {
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Tabs & Content Sections */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* Transactions Table */
.table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
}

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

th {
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-verifying {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-failed {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Forms & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  background-color: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  margin: 0.5rem 0;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: var(--transition-fast);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="checkbox"] {
  display: none;
}

input[type="checkbox"]:checked + .toggle-switch {
  background-color: var(--accent-indigo);
}

input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(20px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-success {
  background-color: var(--accent-green);
  color: white;
}

.btn-danger {
  background-color: var(--accent-red);
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* Copy Field Widget */
.copy-field {
  display: flex;
  gap: 0.5rem;
  background-color: rgba(10, 15, 26, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  align-items: center;
}

.copy-text {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  overflow-x: auto;
  white-space: nowrap;
  flex-grow: 1;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-btn:hover {
  color: white;
}

/* System Logs Section styling */
.logs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.5rem;
}

.log-item {
  border-left: 3px solid var(--accent-indigo);
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.015);
  border-radius: 0 8px 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.log-item.log-error {
  border-left-color: var(--accent-red);
}

.log-item.log-success {
  border-left-color: var(--accent-green);
}

.log-item.log-matching {
  border-left-color: var(--accent-yellow);
}

.log-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.log-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.log-msg {
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* Checkout Page Specific Styling */
.checkout-wrapper {
  max-width: 480px;
  margin: 4rem auto;
  padding: 1.5rem;
}

.checkout-card {
  text-align: center;
}

.merchant-header {
  margin-bottom: 1.5rem;
}

.amount-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 1rem 0;
}

.qr-box {
  background-color: white;
  padding: 1rem;
  border-radius: 12px;
  display: inline-block;
  margin: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.timer-bar {
  font-size: 0.95rem;
  color: var(--accent-yellow);
  font-weight: 600;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.intent-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.utr-form {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  text-align: left;
}

/* Login Page specific styling */
.login-wrapper {
  max-width: 400px;
  margin: 10rem auto;
  padding: 1.5rem;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Code block playground styling */
pre {
  background-color: #0b0f19;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  color: #a7f3d0;
}

/* Notification banner */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-indigo);
  border-radius: 4px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
}
