:root {
  --bg: #12141a;
  --card: #1b1e27;
  --border: #2a2e3a;
  --text: #e8e9ee;
  --muted: #9aa0ac;
  --accent: #6c8cff;
  --green: #3ecf8e;
  --red: #ef5b5b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}

.container {
  width: 100%;
  max-width: 640px;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

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

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  margin-top: 14px;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #10121a;
  color: var(--text);
  font-size: 0.95rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s;
  margin-top: 14px;
}

.dropzone.drag { border-color: var(--accent); color: var(--text); }

button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 18px;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--red); }
button.success { background: var(--green); }

.progress-bar {
  height: 8px;
  background: #10121a;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}
.progress-bar > div {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.item:last-child { border-bottom: none; }

.item .meta { flex: 1; }
.item .name { font-weight: 600; }
.item .details { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

.item-actions { display: flex; gap: 8px; align-items: center; }
.item-actions select { width: auto; }

.status-msg { font-size: 0.85rem; margin-top: 10px; }
.status-msg.error { color: var(--red); }
.status-msg.success { color: var(--green); }

.empty { color: var(--muted); text-align: center; padding: 24px 0; }

/* ===== Nouvelle interface avec onglets ===== */

body { align-items: stretch; padding: 0; }

.container.wide { max-width: 760px; }

.brand { text-align: center; margin-top: 40px; margin-bottom: 8px; }
.brand-icon { font-size: 2.5rem; margin-bottom: 8px; }
.brand-icon.small { font-size: 1.3rem; margin-bottom: 0; }
.brand h1 { margin-bottom: 4px; }

#loginScreen { max-width: 420px; margin: 0 auto; padding: 40px 16px; }

.app { min-height: 100vh; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.topbar-left { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.whoami { color: var(--muted); font-size: 0.85rem; }

button.small { padding: 6px 12px; font-size: 0.85rem; margin-top: 0; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.tab-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 14px;
  margin-top: 0;
  font-size: 0.9rem;
  cursor: pointer;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-btn:hover { color: var(--text); }

main.container.wide { margin: 0 auto; padding: 32px 16px 60px; }

.section-title { font-size: 1.05rem; margin: 28px 0 10px; }

.badge {
  background: #10121a;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.duplicate-warning {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #e0a030;
  background: rgba(224, 160, 48, 0.12);
  border: 1px solid rgba(224, 160, 48, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
}
