:root {
  --bg: #0a0a0a;
  --bg2: #141414;
  --bg3: #1e1e1e;
  --border: #2a2a2a;
  --text: #eee;
  --text2: #999;
  --accent: #e44;
  --accent2: #c33;
  --success: #4a4;
  --warning: #ca3;
  --danger: #e44;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 480px; margin: 0 auto; padding: 16px; }
.container.wide { max-width: 768px; }

/* Cards */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { background: #333; }
.btn.primary { background: var(--accent); border-color: var(--accent2); color: #fff; }
.btn.primary:active { background: var(--accent2); }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Inputs */
.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.input:focus { border-color: var(--accent); }
.input-group { margin-bottom: 14px; }
.input-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text2); font-weight: 500; }

/* Grid */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text2); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* Status badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge.success { background: #1a3a1a; color: #4a4; }
.badge.warning { background: #3a3a1a; color: #ca3; }
.badge.danger { background: #3a1a1a; color: #e44; }
.badge.info { background: #1a2a3a; color: #68f; }

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0;
  font-size: 11px;
  color: var(--text2);
  text-decoration: none;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a .icon { font-size: 20px; }

/* Page body padding for bottom nav */
.page-body { padding-bottom: 80px; }

/* Header */
.page-header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { font-size: 14px; color: var(--text2); margin-top: 4px; }

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}
.toast.visible { opacity: 1; }
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.success { border-color: var(--success); color: var(--success); }
