/* =============================================================
   Deploy Admin — Minimal UI
   ============================================================= */

:root {
  --bg:       #f5f4f0;
  --card:     #ffffff;
  --border:   #e0ddd6;
  --text:     #1a1a1a;
  --muted:    #6b6963;
  --primary:  #185FA5;
  --primary-h:#0C447C;
  --green:    #3B6D11;
  --green-bg: #EAF3DE;
  --green-text: #27500A;
  --red:      #C0392B;
  --red-bg:   #FCEBEB;
  --red-text: #791F1F;
  --warn:     #BA7517;
  --warn-bg:  #FAEEDA;
}

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

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

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { font-size: 28px; }
.brand h1 { font-size: 18px; font-weight: 600; }
.brand small { color: var(--muted); font-size: 11px; }

.user-info {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
}

main {
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 0.75rem; }
.card h3 { font-size: 13px; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; color: var(--muted); }

.btn-primary, .btn-deploy, .btn-ghost {
  padding: 7px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-h); }
.btn-deploy {
  background: var(--green);
  color: #fff;
  font-weight: 500;
  padding: 8px 22px;
}
.btn-deploy:hover:not(:disabled) { background: var(--green-text); }
.btn-deploy:disabled { background: #b0b0b0; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); }

.row-flex { display: flex; align-items: center; gap: 12px; margin-bottom: 0.5rem; }

.muted { color: var(--muted); }
.warn  { color: var(--warn); }
.error { color: var(--red); }

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

.hidden { display: none !important; }

/* ── Projects list ── */
.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all .15s;
}
.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(24, 95, 165, 0.1);
}
.proj-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.proj-desc { font-size: 12px; margin-bottom: 6px; }
.proj-meta { font-size: 11px; }

/* ── Upload zone ── */
.upload-zone {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#file-info { font-family: monospace; }
.upload-zone .btn-deploy { margin-left: auto; }

/* ── Result banner (after deploy / rollback) ── */
.result {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 12px;
}
.result.success { background: var(--green-bg); color: var(--green-text); }
.result.error   { background: var(--red-bg);   color: var(--red-text); }
.result code { font-family: monospace; background: rgba(0,0,0,0.05); padding: 1px 4px; border-radius: 3px; }

/* ── History table ── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 0.5rem;
}
.history-table th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.history-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.history-table code {
  font-family: monospace;
  font-size: 11px;
  background: rgba(0,0,0,0.05);
  padding: 1px 4px;
  border-radius: 3px;
}
.history-table tr:last-child td { border-bottom: none; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 11px;
}
