:root {
  --bg: #ffffff;
  --border: #e5e7eb;
  --text: #000000;
  --accent: #9ca3af;
  --highlight: #eb5e28; /* Safety Orange */
  --grid-thick: 4px;
}

[data-theme='dark'] {
  --bg: #0a0a0a;
  --border: #222222;
  --text: #f4f4f4;
  --accent: #666666;
}

/* GLOBAL RESET - Traditional Mouse Restored */
* {
  box-sizing: border-box;
  cursor: default;
}

a, button, .button, select, .theme-toggle, .pill, input[type="checkbox"], .check-row {
  cursor: pointer;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  transition: background 0.2s ease;
}

/* Technical 4-Column Grid */
.shell {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: var(--grid-thick) solid var(--border);
  border-right: var(--grid-thick) solid var(--border);
  min-height: 100vh;
}

header, section, .card-full {
  grid-column: span 4;
  border-bottom: var(--grid-thick) solid var(--border);
  padding: 40px;
  position: relative;
}

/* Plus (+) Node Markers */
header::after, section::after, .card-full::after {
  content: "+";
  position: absolute;
  bottom: -13px;
  left: -9px;
  color: var(--highlight);
  font-family: monospace;
  font-weight: bold;
  font-size: 22px;
  background: var(--bg);
  padding: 0 4px;
  z-index: 10;
}

/* Typography */
h1, h2 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin: 0 0 10px 0;
}

h1 { font-size: 64px; }
h2 { font-size: 32px; }

.mono, .eyebrow, label, th, .pill {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.eyebrow { color: var(--highlight); margin-bottom: 8px; display: block; }

/* Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-column: span 4;
}

.form-area {
  border-right: var(--grid-thick) solid var(--border);
  padding: 40px;
}

.list-area {
  padding: 40px;
  background: rgba(0,0,0,0.02);
}

/* Interactive Elements */
input, textarea, select {
  width: 100%;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 12px;
  margin-top: 8px;
  font-family: inherit;
  outline: none;
}

input:focus, textarea:focus { border-color: var(--highlight); }

button, .button {
  background: var(--highlight);
  color: white;
  border: none;
  padding: 18px 32px;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-block;
  text-decoration: none;
  clip-path: polygon(5% 0, 100% 0, 100% 70%, 95% 100%, 0 100%, 0% 30%);
}

button.secondary { background: var(--text); color: var(--bg); }
button.danger { background: #ff0000; }
.button.disabled {
  background: var(--border);
  color: var(--accent);
  cursor: not-allowed;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.campaign-summary, .campaign-list-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.campaign-detail-meta, .campaign-list-meta {
  margin-top: 12px;
  color: var(--accent);
}

.status-badge {
  display: inline-block;
  border: 1px solid currentColor;
  padding: 6px 10px;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-created, .status-paused {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #374151;
}

.status-waiting, .status-running {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}

.status-completed {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

.status-error {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}

.zip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.zip-button {
  padding-left: 20px;
  padding-right: 20px;
}

.url-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.pagination-controls, .pagination, .page-size-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.pagination-controls {
  justify-content: space-between;
  margin-top: 20px;
}

.pagination {
  justify-content: space-between;
  margin-top: 24px;
}

.page-size-form label { margin: 0; }
.page-size-form select { min-width: 88px; }

.url-list {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  font-size: 12px;
  line-height: 1.5;
  text-transform: none;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
}

.handle-link {
  color: var(--highlight);
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  font-size: 12px;
  text-transform: none;
}

.status-form {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-top: 20px;
}

.check-row {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  margin: 0;
}

/* Table Styling */
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px; border-bottom: var(--grid-thick) solid var(--border); color: var(--accent); }
td { padding: 16px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }

.pill {
  padding: 4px 8px;
  border: 1px solid var(--border);
  display: inline-block;
  text-decoration: none;
}
.pill.successful { background: #16a34a; color: white; border-color: #16a34a; }
.pill.running { background: #fef3c7; border-color: #d97706; color: #92400e; }
.pill.failed { border-color: #ff0000; color: #ff0000; }
.pill.added { color: var(--accent); }

.theme-toggle {
  position: absolute;
  top: 40px;
  right: 40px;
  background: var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 10px;
  border: none;
}

@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .form-area { border-right: none; border-bottom: var(--grid-thick) solid var(--border); }
  .campaign-summary, .campaign-list-status { align-items: flex-start; }
  h1 { font-size: 44px; }
}
