/* Excel Cleaner — Dark Theme matching techguysai.com aesthetic */

:root {
  --bg:           #0d0f14;
  --surface:      #161b22;
  --surface2:     #1e2430;
  --border:       #2a3140;
  --accent:       #5865f2;
  --accent-hover: #4752c4;
  --success:      #3fb950;
  --warning:      #d29922;
  --danger:       #f85149;
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --ai-fill:      #1e3a5f;
  --ai-fill-text: #58a6ff;
  --radius:       8px;
  --shadow:       0 4px 24px rgba(0,0,0,.45);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ── */
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
header .logo { font-size: 28px; }
header h1 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
header p  { color: var(--text-muted); font-size: 12px; }
.badge {
  margin-left: auto;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-num {
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

/* ── Drop Zone ── */
#drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
#drop-zone:hover, #drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(88,101,242,.06);
}
#drop-zone .icon { font-size: 36px; margin-bottom: 8px; }
#drop-zone p { color: var(--text-muted); }
#drop-zone strong { color: var(--accent); }
#file-input { display: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-success  { background: var(--success); color: #000; }
.btn-success:hover:not(:disabled) { filter: brightness(1.1); }
.btn-warning  { background: var(--warning); color: #000; }
.btn-warning:hover:not(:disabled) { filter: brightness(1.1); }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ── Stats row ── */
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.stat-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
}
.stat-chip span { color: var(--text-muted); }
.stat-chip strong { color: var(--text); }

/* ── Table ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
thead th {
  background: var(--surface2);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
tbody tr:hover { background: rgba(255,255,255,.02); }
tbody td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }

/* Cell states */
.cell-empty { background: rgba(248,81,73,.12) !important; color: var(--danger); font-style: italic; }
.cell-empty::after { content: "empty"; font-size: 10px; }
.cell-ai-filled { background: var(--ai-fill) !important; color: var(--ai-fill-text); }

/* ── Progress ── */
.progress-bar-wrap {
  background: var(--surface2);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c86f7);
  border-radius: 20px;
  transition: width .3s;
  width: 0%;
}
#progress-label { font-size: 12px; color: var(--text-muted); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-info    { background: rgba(88,101,242,.15); border: 1px solid var(--accent); }
.alert-success { background: rgba(63,185,80,.15);  border: 1px solid var(--success); }
.alert-warning { background: rgba(210,153,34,.15); border: 1px solid var(--warning); }
.alert-danger  { background: rgba(248,81,73,.15);  border: 1px solid var(--danger); }

/* ── Download section ── */
.download-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.download-group label { color: var(--text-muted); font-size: 12px; }

/* ── Hidden helper ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 600px) {
  header { flex-wrap: wrap; }
  .badge { margin-left: 0; }
}
