:root { --panel2: var(--panel-2); --muted: var(--text-muted); font-family: "DM Sans", "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--bg); }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
a {
  color: var(--cyan);
}
button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 650;
  transition: 0.15s;
}
button:hover {
  border-color: var(--cyan);
  background: var(--panel2);
}
button.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #001821;
}
button.primary:hover {
  background: #63deff;
}
button.danger {
  color: var(--danger);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.shell {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #0c0e1b;
  border-right: 1px solid var(--line);
  padding: 30px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 28px;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -1px;
}
.brand i {
  font-style: normal;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  font-weight: 600;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #737f9f;
  padding: 18px 14px 10px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav button {
  text-align: left;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.nav button.active {
  background: #12303f;
  color: var(--cyan);
}
.nav button:hover {
  background: var(--panel2);
  color: white;
}
.nav b {
  width: 20px;
  font-size: 18px;
  font-weight: 400;
}
.profile {
  margin-top: auto;
  padding: 20px 10px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  width: 36px;
  height: 36px;
  background: #362264;
  color: #d6baff;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}
.profile strong {
  font-size: 12px;
  display: block;
}
.profile small {
  font-size: 11px;
  color: var(--muted);
}
.main {
  min-width: 0;
}
.topbar {
  height: 78px;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.topbar span {
  font-size: 12px;
  color: var(--muted);
}
.topbar .tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.topbar button {
  font-size: 12px;
  padding: 8px 12px;
}
.env {
  font-size: 10px !important;
  letter-spacing: 1px;
  border: 1px solid #685233;
  color: #ffc66d !important;
  padding: 6px 9px;
  border-radius: 6px;
}
.content {
  padding: 34px 38px 70px;
  max-width: 1560px;
  margin: auto;
}
.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 10px 0 30px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 0 0 9px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.6;
}
.muted,
.pagehead p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card {
  padding: 23px;
}
.card .label {
  font-size: 12px;
  color: var(--muted);
}
.card .value {
  font-size: 33px;
  font-weight: 750;
  letter-spacing: -1px;
  margin: 15px 0 5px;
}
.card small {
  font-size: 11px;
  color: var(--muted);
}
.card .value.cyan {
  color: var(--cyan);
}
.card .value.lime {
  color: var(--lime);
}
.panel {
  overflow: hidden;
  margin-bottom: 22px;
}
.panelhead {
  padding: 21px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.panelbody {
  padding: 24px;
}
.split {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 22px;
}
.empty {
  padding: 42px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty b {
  display: block;
  font-size: 25px;
  margin-bottom: 12px;
  color: var(--cyan);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  background: var(--panel2);
  font-weight: 600;
}
th,
td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
td small {
  color: var(--muted);
}
td button {
  font-size: 11px;
  padding: 7px 11px;
}
.badge {
  border-radius: 6px;
  background: #202a40;
  color: #becce9;
  display: inline-block;
  padding: 5px 8px;
  font-size: 10px;
  white-space: nowrap;
}
.badge.submitted,
.badge.processing {
  background: #123646;
  color: #66dcff;
}
.badge.signed,
.badge.active,
.badge.done {
  background: #253a2c;
  color: var(--lime);
}
.badge.needs_correction {
  background: #453424;
  color: #ffd38f;
}
.badge.cancelled {
  background: #402631;
  color: #ff9eb0;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}
.toolbar input {
  max-width: 360px;
}
.toolbar select {
  max-width: 210px;
}
.toolbar button:last-child {
  margin-left: auto;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--ink-soft);
  color: var(--text);
  border-radius: 9px;
  padding: 11px 12px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 84px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
}
label {
  font-size: 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.actions.left {
  justify-content: flex-start;
}
.check {
  flex-direction: row;
  align-items: center;
}
.check input {
  width: auto;
  accent-color: var(--cyan);
}
dialog {
  width: min(880px, calc(100vw - 30px));
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  color: var(--text);
  padding: 28px;
  box-shadow: 0 30px 100px #0008;
}
dialog::backdrop {
  background: #030612bb;
  backdrop-filter: blur(5px);
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.modalhead h2 {
  font-size: 23px;
}
.modalhead button {
  background: none;
  font-size: 20px;
  border: 0;
}
.notice {
  font-size: 12px;
  padding: 13px 16px;
  border: 1px solid #28445a;
  background: #102535;
  color: #a9d9ed;
  border-radius: 10px;
  line-height: 1.6;
  margin: 16px 0;
}
.notice.warn {
  border-color: #574626;
  background: #292217;
  color: #e8cca0;
}
.error {
  color: #ff9eb0;
  font-size: 13px;
  white-space: pre-wrap;
}
.lineform {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 15px 0;
}
.linehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.linehead button {
  font-size: 11px;
  padding: 6px 9px;
}
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 16px;
  overflow: auto;
}
.column {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 300px;
  padding: 14px;
}
.colhead {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 2px 15px;
}
.casecard {
  display: block;
  width: 100%;
  background: var(--panel2);
  padding: 18px;
  text-align: left;
  margin-bottom: 10px;
}
.casecard strong {
  font-size: 13px;
  display: block;
  margin-bottom: 8px;
}
.casecard p {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0;
}
.casecard small {
  font-size: 10px;
  color: var(--cyan);
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.login-art {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 80%, #341360 0, transparent 50%),
    radial-gradient(ellipse at 85% 0, #123d50 0, transparent 55%), #0a0d19;
  border-right: 1px solid var(--line);
}
.login-art .brand {
  padding: 0;
  margin-bottom: 90px;
}
.login-art h1 {
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.13;
  max-width: 500px;
}
.login-art h1 em {
  font-style: normal;
  color: var(--cyan);
}
.login-art p {
  max-width: 400px;
  color: var(--muted);
  font-size: 15px;
  margin-top: 24px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 355px;
}
.login-form h2 {
  font-size: 25px;
  margin-bottom: 10px;
}
.login-form label {
  margin-top: 22px;
}
.login-form button {
  width: 100%;
  margin-top: 25px;
}
.login-form .eyebrow {
  margin-bottom: 18px;
}
.login-form .muted {
  line-height: 1.7;
}
.steps {
  display: flex;
  gap: 10px;
  margin-top: 40px;
}
.steps span {
  padding: 10px 14px;
  border: 1px solid #34405c;
  border-radius: 24px;
  color: #b9c4df;
  font-size: 11px;
}
#toast {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 15px 23px;
  background: #163a36;
  border: 1px solid #507c65;
  color: #d7ffe6;
  border-radius: 12px;
  z-index: 10;
  max-width: 450px;
  font-size: 13px;
}
.boot {
  height: 100vh;
  display: grid;
  place-content: center;
  gap: 20px;
  color: var(--cyan);
  font-size: 30px;
  font-weight: 800;
}
.boot span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.money {
  font-variant-numeric: tabular-nums;
}
.total {
  font-size: 32px;
  font-weight: 750;
  color: var(--cyan);
}
.detailgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detailgrid p {
  font-size: 13px;
  margin: 0;
}
.detailgrid small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}
.timeline {
  padding: 0;
  list-style: none;
}
.timeline li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.timeline small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.footnote {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 15px;
}
.tablewrap {
  overflow: auto;
}
.network {
  font-size: 10px;
  color: #ffc66d;
}
.network.bouygues {
  color: #80d6ff;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .content {
    padding: 26px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 25px 10px;
  }
  .brand {
    font-size: 22px;
  }
  .login-art {
    padding: 35px;
  }
  .login-art .brand {
    margin-bottom: 60px;
  }
}
@media (max-width: 680px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    padding-bottom: 14px;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
  }
  .nav button {
    white-space: nowrap;
    padding: 10px;
  }
  .nav-caption,
  .profile {
    display: none;
  }
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 18px;
    flex-wrap: wrap;
  }
  .content {
    padding: 22px 16px;
  }
  .pagehead {
    align-items: flex-start;
    flex-direction: column;
  }
  .pagehead button {
    width: 100%;
  }
  h1 {
    font-size: 26px;
  }
  .card {
    padding: 18px;
  }
  .card .value {
    font-size: 27px;
  }
  .formgrid,
  .detailgrid {
    grid-template-columns: 1fr;
  }
  .login {
    display: block;
  }
  .login-art {
    padding: 25px;
  }
  .login-art .brand {
    margin-bottom: 25px;
  }
  .login-art h1 {
    font-size: 30px;
  }
  .login-art p,
  .steps {
    display: none;
  }
  .login-form {
    padding: 32px 24px;
  }
  th,
  td {
    padding: 13px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .board {
    grid-template-columns: repeat(4, 250px);
  }
  dialog {
    padding: 20px;
  }
}

.shell { display:block; }
body { background:var(--ink); font-family:"DM Sans","Segoe UI",system-ui,sans-serif; }
h1,h2,h3 { font-family:"Space Grotesk","Segoe UI",sans-serif; }
.content { max-width:1440px; }
.login-art { background:radial-gradient(ellipse at 20% 80%,#6e08f118,transparent 60%),var(--panel); }
.brand img { width:40px;height:40px;object-fit:contain; }
html[data-theme="light"] .eyebrow,html[data-theme="light"] .total,html[data-theme="light"] .casecard small { color:#007b9c; }
html[data-theme="light"] .notice { background:#e6f5fb;color:#205368; }
html[data-theme="light"] .notice.warn { background:#fff3dc;color:#77531a; }
html[data-theme="light"] .error { color:#b52b46; }
html[data-theme="light"] .card .value.lime { color:#357018; }
html[data-theme="light"] .card .value.cyan { color:#007b9c; }
.content > .env { display:inline-block;margin-bottom:18px; }
html[data-theme="light"] .env { color:#805b18!important;border-color:#c4a56a;background:#fff5df; }
html[data-theme="light"] .badge { background:#e8edf8;color:#435574; }
html[data-theme="light"] .badge.submitted,html[data-theme="light"] .badge.processing { background:#dff4fc;color:#15617c; }
html[data-theme="light"] .badge.signed,html[data-theme="light"] .badge.active,html[data-theme="light"] .badge.done { background:#e6f5db;color:#3d6c20; }
html[data-theme="light"] .badge.needs_correction { background:#fff0d6;color:#80531b; }
html[data-theme="light"] .badge.cancelled { background:#fce3e8;color:#a83048; }
.import-json { white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6; }
.import-avatar { max-width:240px;max-height:240px;object-fit:contain; }
