/* TechMazet Platform - Complete Stylesheet */
/* ==== Design Tokens ==== */
:root {
  --bg-primary: #08080d;
  --bg-secondary: #0f0f18;
  --bg-card: #151524;
  --bg-card-hover: #1a1a30;
  --bg-input: #111122;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #6060788;
  --accent: #00d4ff;
  --accent-dim: #00d4ff33;
  --accent-2: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --border: #222238;
  --border-light: #2e2e48;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --sidebar-w: 250px;
  --topbar-h: 60px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --glow: 0 0 20px rgba(0,212,255,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea {
  font-family: var(--font);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-fluid { padding: 0 20px; }

/* ==== Grid Background ==== */
.grid-bg {
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ==== Buttons ==== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; border: none;
  transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--accent-gradient); color: #000; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #000; }
.btn-warning { background: var(--warning); color: #000; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==== Cards ==== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-light); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; }

/* ==== Stat Cards ==== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.6;
}
.stat-card .stat-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 12px;
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ==== Tables ==== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:hover td { background: var(--bg-card-hover); }

/* ==== Badges ==== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info { background: rgba(0,212,255,0.15); color: var(--accent); }
.badge-gray { background: rgba(96,96,120,0.2); color: var(--text-secondary); }

/* ==== Forms ==== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ==== Flash Messages ==== */
.flash { padding: 12px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.flash-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.flash-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
.flash-info { background: rgba(0,212,255,0.15); border: 1px solid rgba(0,212,255,0.3); color: var(--accent); }

/* ==== Modal ==== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  padding: 32px;
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-size: 20px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 24px; cursor: pointer; }

/* ==== Pagination ==== */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 14px;
  color: var(--text-primary);
}
.pagination a:hover { background: var(--bg-card-hover); }
.pagination .current { background: var(--accent-gradient); color: #000; border-color: transparent; }

/* ==== Sidebar (Admin/Client) ==== */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s;
}
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo { font-size: 18px; font-weight: 700; }
.sidebar-logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-nav { padding: 12px 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-left-color: var(--accent);
}
.sidebar-nav .nav-icon { width: 20px; text-align: center; }

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}
.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 20px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.wallet-display {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--accent);
}

/* ==== Charts ==== */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 20px; }
.bar-chart .bar {
  flex: 1; background: var(--accent-gradient);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
  position: relative;
}
.bar-chart .bar:hover { opacity: 1; }
.bar-chart .bar-label {
  position: absolute; bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px; color: var(--text-secondary);
  white-space: nowrap;
}

.progress-bar {
  height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.progress-bar .fill {
  height: 100%; background: var(--accent-gradient);
  border-radius: 4px; transition: width 0.5s;
}

/* ==== Animations ==== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.4s ease-out; }

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0,212,255,0.1); }
  50% { box-shadow: 0 0 25px rgba(0,212,255,0.3); }
}
.glow-pulse { animation: glow-pulse 3s infinite; }

/* ==== Copy Button ==== */
.copy-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary);
}
.copy-btn {
  background: var(--accent); color: #000; border: none;
  padding: 4px 10px; border-radius: 4px;
  font-size: 12px; cursor: pointer;
}

/* ==== Search & Filters ==== */
.search-bar {
  display: flex; gap: 12px; align-items: center; margin-bottom: 20px;
}
.search-bar input { flex: 1; }
.search-bar select { min-width: 150px; }

/* ==== Responsive ==== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stat-cards { grid-template-columns: 1fr 1fr !important; }
  .card { padding: 16px; }
  .container { padding: 0 12px; }
  th, td { padding: 8px; font-size: 13px; }
}

/* ==== Utility ==== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 24px; }
