/* ============================================================
   Extranet JDB-Info — Thème "Dark Rouge"
   ============================================================ */

:root {
  --bg:          #0c0c0e;
  --bg-soft:     #111114;
  --card:        #18181b;
  --card-alt:    #1f1f23;
  --border:      #2a2a30;
  --border-soft: #232328;

  --text:        #e9e8ea;
  --text-muted:  #9a989f;

  --red:         #e0303f;
  --red-dark:    #b8242f;
  --red-soft:    rgba(224, 48, 63, 0.12);
  --red-glow:    rgba(224, 48, 63, 0.25);

  --green:       #3ddc84;
  --green-soft:  rgba(61, 220, 132, 0.12);

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(224, 48, 63, 0.10), transparent 35%),
    radial-gradient(circle at 85% 100%, rgba(224, 48, 63, 0.06), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */
.topbar {
  background: linear-gradient(180deg, #161618 0%, #0f0f11 100%);
  color: var(--text);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(224, 48, 63, 0.35);
  position: relative;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--red) 0%, transparent 60%);
  opacity: 0.7;
}

.topbar strong {
  letter-spacing: 0.02em;
}

.topbar strong::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
  margin-right: 9px;
  vertical-align: middle;
}

.topbar a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.15s ease;
}

.topbar a:hover {
  color: var(--red);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px 48px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  margin: 18px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Actions / Buttons ---------- */
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.btn,
button,
input[type="submit"] {
  display: inline-block;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--red-dark);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
  box-shadow: 0 4px 14px var(--red-soft);
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  filter: brightness(1.08);
}

.btn:active,
button:active,
input[type="submit"]:active {
  transform: translateY(1px);
}

/* ---------- Table ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  vertical-align: top;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  background: var(--bg-soft);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

th.date, td.date {
  white-space: nowrap;
  width: 110px;
}

a.link {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a.link:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }

/* ---------- Forms ---------- */
label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  margin: 0 0 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder, textarea::placeholder {
  color: #5f5d63;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--border-soft);
}

/* ---------- Messages ---------- */
.msg {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
}

.msg.err, .err {
  background: var(--red-soft);
  color: #ff8a93;
  border-color: rgba(224, 48, 63, 0.35);
}

.msg.ok, .ok {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(61, 220, 132, 0.3);
}

/* ---------- Login page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  max-width: 420px;
  width: 100%;
  margin: 0 16px;
  padding: 32px;
}

.login-card .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.login-card .brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
}

.login-card .brand span {
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .card { padding: 18px; }
  .wrap { margin: 18px auto; }
}
