/* PayQora - Dark crypto dashboard theme */
:root {
  --bg: #071b14;
  --card: #0f2c22;
  --primary: #1eea7a;
  --primary-dim: rgba(30, 234, 122, 0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(30, 234, 122, 0.2);
  --glow: 0 0 20px rgba(30, 234, 122, 0.4);
  --radius: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Glassmorphism cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

/* Glow buttons */
.btn-primary {
  background: var(--primary);
  color: #071b14;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 0 20px rgba(30, 234, 122, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 0 28px rgba(30, 234, 122, 0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-ghost:hover {
  background: var(--primary-dim);
  box-shadow: 0 0 16px rgba(30, 234, 122, 0.25);
}

/* Form inputs */
.input-dark {
  width: 100%;
  background: rgba(15, 44, 34, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 1rem;
}
.input-dark::placeholder { color: var(--text-muted); }
.input-dark:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

/* Sidebar */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}
.sidebar a:hover { color: var(--primary); background: var(--primary-dim); }
.sidebar a.active { color: var(--primary); background: var(--primary-dim); border-left-color: var(--primary); }

/* Dashboard mobile: off-canvas sidebar + top bar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dashboard-mobile-header {
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}
.sidebar-toggle:hover { color: var(--primary); border-color: var(--primary); }
.dashboard-mobile-title {
  font-weight: 600;
  color: var(--text);
  font-size: 1.125rem;
}

@media (max-width: 767px) {
  .dashboard-mobile-header { display: flex; }
  .dashboard-layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1001;
    min-height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }
  .dashboard-body.sidebar-open .sidebar { transform: translateX(0); }
  .dashboard-body.sidebar-open { overflow: hidden; }
  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }
  .dashboard-body.sidebar-open .sidebar-overlay {
    pointer-events: auto;
    opacity: 1;
  }
  .dashboard-main-wrap { min-height: 100vh; }
  main.card + .card,
  main .mb-6 + .card { margin-top: 1rem; }
  .card { padding: 1rem; }
  .dashboard-page-header { align-items: flex-start; }
}

@media (min-width: 768px) {
  .sidebar-mobile-head { display: none !important; }
}

/* Status badges */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; }
.badge-completed { background: rgba(30, 234, 122, 0.2); color: var(--primary); }
.badge-pending { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.badge-failed { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.badge-expired { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); }

/* Table in card */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 480px; }
.table-wrap th, .table-wrap td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.table-wrap th { color: var(--text-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:hover { background: var(--primary-dim); }
@media (min-width: 768px) {
  .table-wrap th, .table-wrap td { padding: 0.75rem 1rem; }
}

/* Pagination */
.pagination { display: flex; align-items: center; gap: 0.5rem; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; border-radius: var(--radius);
  color: var(--text-muted); text-decoration: none; font-size: 0.875rem;
  background: var(--card); border: 1px solid var(--border);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.pagination a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-dim); }
.pagination .current { color: var(--primary); background: var(--primary-dim); border-color: var(--primary); }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(7, 27, 20, 0.85); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; max-width: 480px; width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

/* Utility */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none !important; }
