:root {
  --bg: #1a1a1a;
  --bg-elevated: #232323;
  --bg-hover: #2a2a2a;
  --border: #333;
  --text: #e8e8e8;
  --text-muted: #888;
  --text-dim: #666;
  --accent: #4a9eff;
  --accent-hover: #6db1ff;
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --tag-bg: #2d3748;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.brand .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  background: transparent; border: none; color: var(--text-muted);
  padding: 6px 12px; border-radius: 6px; font-size: 14px; transition: all 0.1s;
}
.tab:hover { background: var(--bg-hover); color: var(--text); }
.tab.active { background: var(--bg-hover); color: var(--text); font-weight: 500; }
.topbar-right { color: var(--text-muted); font-size: 13px; }
main { max-width: 1400px; margin: 0 auto; padding: 24px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toolbar h2 { margin: 0; font-size: 22px; font-weight: 600; }
.filters { display: flex; gap: 8px; margin-bottom: 16px; }
.btn-primary, .btn-secondary, .btn-danger, .btn-mini {
  border: none; padding: 8px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; transition: all 0.1s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-hover); color: var(--text); }
.btn-secondary:hover { background: #353535; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-mini { background: transparent; color: var(--text-muted); font-size: 12px; padding: 4px 8px; margin-left: 8px; }
.btn-mini:hover { background: var(--bg-hover); color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.card.span-2 { grid-column: span 2; }
.card h3 {
  margin: 0 0 12px 0; font-size: 14px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  display: flex; align-items: center; justify-content: space-between;
}
.metric-row { display: flex; gap: 24px; }
.metric { flex: 1; }
.metric-value { font-size: 24px; font-weight: 600; color: var(--text); }
.metric-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-compact { display: flex; flex-direction: column; gap: 6px; }
.list-item {
  padding: 8px 10px; border-radius: 6px; background: var(--bg);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  cursor: pointer; transition: background 0.1s;
}
.list-item:hover { background: var(--bg-hover); }
.list-item .li-title { flex: 1; }
.list-item .li-meta { color: var(--text-muted); font-size: 12px; }
.empty-state { color: var(--text-dim); font-size: 13px; font-style: italic; padding: 12px 4px; }
table { width: 100%; border-collapse: collapse; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
th {
  text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr.row-clickable { cursor: pointer; transition: background 0.1s; }
tr.row-clickable:hover td { background: var(--bg-hover); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500;
  background: var(--tag-bg); color: var(--text); text-transform: capitalize;
}
.tag-todo { background: #424242; }
.tag-in_progress, .tag-negotiating, .tag-active { background: #2c5282; }
.tag-done, .tag-paid, .tag-client, .tag-top_donor { background: #276749; }
.tag-skipped, .tag-dead, .tag-cancelled, .tag-parked { background: #4a5568; }
.tag-pending, .tag-sent { background: #744210; }
.tag-replied { background: #553c9a; }
.tag-block-guestposts { background: #276749; }
.tag-block-upwork { background: #2c5282; }
.tag-block-sites { background: #744210; }
.tag-block-new_sites { background: #553c9a; }
.tag-block-other { background: #4a5568; }
.tag-block-general { background: #4a5568; }
input[type=text], input[type=number], input[type=date], input[type=email], select, textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 6px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 60px; }
.modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px;
  width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 24px; line-height: 1; }
.modal-close:hover { color: var(--text); }
#modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; color: var(--text-muted);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.muted { color: var(--text-muted); }
.hidden { display: none !important; }
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .card.span-2 { grid-column: auto; }
  .topbar { flex-wrap: wrap; }
  .tabs { width: 100%; overflow-x: auto; }
}
