/* DigitalCar Access Gateway — thème sombre professionnel */
* { box-sizing: border-box; margin: 0; }
:root {
  --bg: #0f1722; --surface: #16222f; --surface2: #1c2a3a;
  --border: #2c4257; --text: #e8eef4; --muted: #8fa3b5;
  --accent: #4a90c2; --accent2: #3a7aa8; --ok: #3da56b; --err: #c75454; --warn: #c79b3c;
}
body {
  background: linear-gradient(160deg, #0f1722 0%, #16222f 55%, #1a2a3a 100%);
  color: var(--text); font-family: "Segoe UI", system-ui, Arial, sans-serif;
  min-height: 100vh; font-size: 15px;
}
.center-page { display: flex; align-items: center; justify-content: center; padding: 2em 1em; }
.card {
  background: rgba(22,32,45,.92); border: 1px solid rgba(90,160,208,.25);
  border-radius: 14px; padding: 2.2em; max-width: 480px; width: 100%;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.brand { display: flex; align-items: center; gap: .8em; margin-bottom: 1em; }
.brand h1 { font-size: 1.25em; letter-spacing: .03em; }
.brand.small { padding: 1.2em 1em; }
.brand.small small { color: var(--muted); }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  font-weight: 700; font-size: 1.1em; color: #fff;
}
.logo.ok-bg { background: linear-gradient(135deg, #2c7a4f, var(--ok)); }
label { display: block; margin: 1em 0 .35em; color: var(--muted); font-size: .92em; }
label.check { display: flex; gap: .6em; align-items: center; color: var(--text); }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: .7em .9em; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1em;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(90,160,208,.18);
}
button, .button-link {
  display: inline-block; margin-top: 1.2em; padding: .75em 1.4em; border: none;
  border-radius: 8px; background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff; font-weight: 600; cursor: pointer; font-size: 1em; text-decoration: none;
}
button:hover, .button-link:hover { filter: brightness(1.12); }
button.secondary, .button-link.secondary { background: var(--surface2); border: 1px solid var(--border); }
button.ok-btn { background: linear-gradient(135deg, #2c7a4f, var(--ok)); }
button.err-btn { background: linear-gradient(135deg, #8f3a3a, var(--err)); }
.alert { padding: .8em 1em; border-radius: 8px; margin: 1em 0; font-size: .95em; }
.alert.ok { background: rgba(61,165,107,.15); border: 1px solid rgba(61,165,107,.4); }
.alert.err { background: rgba(199,84,84,.15); border: 1px solid rgba(199,84,84,.4); }
.muted { color: var(--muted); }
.foot { margin-top: 1.4em; color: var(--muted); font-size: .85em; }
.hp { position: absolute; left: -9999px; }
.linkbox { margin-top: 1.6em; border-top: 1px solid var(--border); padding-top: 1em; }
.linkbox summary { cursor: pointer; color: var(--accent); }

/* ---- Admin layout ---- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: #131d29; border-right: 1px solid rgba(90,160,208,.12);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar nav { display: flex; flex-direction: column; padding: .5em; gap: 2px; flex: 1; }
.sidebar nav a {
  color: var(--text); text-decoration: none; padding: .65em .9em; border-radius: 8px; font-size: .95em;
}
.sidebar nav a:hover { background: rgba(90,160,208,.12); }
.sidebar nav a.active { background: rgba(74,144,194,.25); }
.sidebar .logout { margin: 1em; color: var(--muted); font-size: .9em; }
.content { flex: 1; padding: 2em 2.5em; max-width: 1200px; }
h1 { font-size: 1.5em; margin-bottom: .8em; }
h2 { font-size: 1.1em; margin: 1.6em 0 .6em; color: var(--accent); }
.stat-grid { display: flex; flex-wrap: wrap; gap: 1em; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1em 1.4em; min-width: 150px; color: var(--muted); text-decoration: none; font-size: .9em;
}
.stat .num { display: block; font-size: 2em; font-weight: 700; color: var(--text); }
.stat.warn { border-color: var(--warn); } .stat.ok { border-color: var(--ok); }
.stat.err { border-color: var(--err); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: .65em .8em; text-align: left; border-bottom: 1px solid rgba(44,66,87,.5); font-size: .92em; }
.table th { background: var(--surface2); color: var(--muted); font-weight: 600; }
.badge { padding: .25em .7em; border-radius: 20px; font-size: .82em; background: var(--surface2); }
.badge.ok { background: rgba(61,165,107,.2); color: #7fd0a3; }
.badge.err { background: rgba(199,84,84,.2); color: #e09a9a; }
.badge.warn { background: rgba(199,155,60,.2); color: #e0c382; }
.filters { display: flex; gap: .5em; margin-bottom: 1em; flex-wrap: wrap; }
.filters a {
  padding: .4em .9em; border-radius: 20px; background: var(--surface2);
  color: var(--text); text-decoration: none; font-size: .88em; border: 1px solid var(--border);
}
.filters a.active { background: var(--accent2); border-color: var(--accent); }
.actions form { display: flex; gap: .4em; flex-wrap: wrap; align-items: center; }
.actions button { margin-top: 0; padding: .4em .8em; font-size: .85em; }
.actions input[type=text] { width: 110px; padding: .4em .6em; font-size: .85em; }
.notes { max-width: 130px; font-size: .85em; color: var(--muted); }
.settings-form { max-width: 640px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2em; }
.inline-form { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.inline-form button { margin-top: 0; }
code { background: var(--bg); padding: .15em .45em; border-radius: 5px; font-size: .9em; }
@media (max-width: 800px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .content { padding: 1.2em; }
}
