/* Symbio3D admin — style sobre et fonctionnel (P1). */

:root {
  --green: #60B339;
  --green-dark: #4d9a2b;
  --black: #141414;
  --red: #c0392b;
  --orange: #e67e22;
  --border: #e2e2e2;
}

* { box-sizing: border-box; }

body.admin {
  margin: 0;
  font-family: system-ui, sans-serif;
  color: var(--black);
  background: #f6f7f6;
}

.adm-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--black);
  color: #fff;
  padding: .75rem 1.5rem;
}
.adm-header .logo { color: #fff; font-weight: 700; text-decoration: none; }
.adm-header .logo span { color: var(--green); }
.adm-nav { flex: 1; display: flex; gap: 1.25rem; }
.adm-nav a { color: #ddd; text-decoration: none; }
.adm-nav a:hover { color: #fff; }
.adm-logout button {
  background: none; border: 1px solid #555; color: #ccc;
  padding: .35rem .8rem; border-radius: 4px; cursor: pointer;
}

.adm-main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }

/* Auth (login / OTP) */
.adm-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-box {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 2rem; width: 100%; max-width: 380px;
}
.auth-box h1 { margin-top: 0; font-size: 1.3rem; }
.auth-box h1 span { color: var(--green); }

label { display: block; margin: .9rem 0 .3rem; font-weight: 600; font-size: .9rem; }
label.checkbox { font-weight: 400; margin-top: .8rem; }
input[type=text], input[type=email], input[type=password] {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--border);
  border-radius: 4px; font-size: 1rem;
}
input:focus { outline: 2px solid var(--green); outline-offset: 1px; }

.btn {
  display: inline-block; border: 0; border-radius: 4px; cursor: pointer;
  padding: .6rem 1.2rem; font-size: 1rem; background: #e8e8e8;
}
.btn-primary { background: var(--green); color: #fff; font-weight: 600; margin-top: 1.2rem; width: 100%; }
.btn-primary:hover { background: var(--green-dark); }
.btn-small { padding: .3rem .7rem; font-size: .85rem; width: auto; margin: 0; }

.alert { padding: .7rem 1rem; border-radius: 4px; margin: .8rem 0; }
.alert-error { background: #fdecea; color: var(--red); }
.alert-success { background: #eaf7e6; color: var(--green-dark); }

/* Widgets dashboard */
.widget {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.widget-head { display: flex; justify-content: space-between; align-items: center; }
.widget h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.widget-notice { border-left: 4px solid var(--orange); }
.badge {
  display: inline-block; min-width: 1.4em; text-align: center;
  border-radius: 999px; font-size: .8rem; padding: .1em .45em; color: #fff;
}
.badge-alert { background: var(--red); }
.ok { color: var(--green-dark); }

.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--border); }
.table .msg { max-width: 380px; overflow-wrap: anywhere; }
.table tr.is-new { background: #fffbe6; }
.table tr.level-critical td:first-child { color: var(--red); font-weight: 700; }
.table tr.level-error td:first-child { color: var(--red); }
.table tr.level-warning td:first-child { color: var(--orange); }

.totp-steps li { margin-bottom: .8rem; }
.totp-secret {
  display: inline-block; background: #f0f0f0; padding: .4rem .7rem;
  border-radius: 4px; font-size: 1.05rem; letter-spacing: .05em;
}
.totp-confirm input { max-width: 160px; display: inline-block; margin-right: .8rem; }
.totp-confirm .btn { width: auto; margin-top: 0; }

/* --- Module commandes (P5) --- */
.filters { display: flex; gap: .8rem; align-items: center; margin: 1rem 0; flex-wrap: wrap; }
.filters input[type=text] { max-width: 240px; }
.filters select { width: auto; padding: .5rem; border: 1px solid var(--border); border-radius: 4px; }
.two-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .two-cols { grid-template-columns: 1fr; } }
.status {
  display: inline-block; padding: .15em .6em; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: #eee; vertical-align: middle;
}
.status-paid, .status-completed { background: #eaf7e6; color: var(--green-dark); }
.status-processing, .status-shipped { background: #e8f0fe; color: #1a56b0; }
.status-pending { background: #fff3d6; color: #8a6d00; }
.status-cancelled, .status-failed, .status-refunded { background: #fdecea; color: var(--red); }
.pagination { margin: 1rem 0; display: flex; gap: .4rem; }
.pagination a { padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--black); }
.pagination a.active { background: var(--green); color: #fff; border-color: var(--green); }
.widget textarea { width: 100%; border: 1px solid var(--border); border-radius: 4px; padding: .5rem; }
.widget hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.widget img { border-radius: 4px; }

/* --- Langues & stats (P5) --- */
.i18n-row {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 1rem;
  align-items: start; padding: .8rem 0; border-bottom: 1px solid var(--border);
}
.i18n-key { margin: 0; font-size: .82rem; overflow-wrap: anywhere; }
.i18n-values { display: grid; gap: .4rem; }
.i18n-values label { margin: 0; font-size: .82rem; }
.i18n-values textarea { width: 100%; min-height: 2.2em; border: 1px solid var(--border); border-radius: 4px; padding: .35rem .5rem; }
@media (max-width: 800px) { .i18n-row { grid-template-columns: 1fr; } }

.funnel-row { display: grid; grid-template-columns: 180px 1fr 120px; gap: .8rem; align-items: center; margin: .35rem 0; }
.funnel-label { font-size: .88rem; }
.funnel-bar { background: #efefec; border-radius: 4px; height: 14px; overflow: hidden; display: block; }
.funnel-bar span { display: block; height: 100%; background: var(--green); }
.hint { color: #777; font-size: .85rem; }
.msg { overflow-wrap: anywhere; }

/* --- Module catalogue (P5) --- */
.table.mono td, .table.mono th { font-size: .82rem; }
.table input[type=text], .table input[type=number], .table select, .table textarea {
  padding: .3rem .4rem; border: 1px solid var(--border); border-radius: 4px; font-size: .85rem;
}
.table td { vertical-align: middle; }
.color-swatch { border: 1px solid var(--border); }

