:root{
  --bg: #0b1220;
  --card:#101a33;
  --text:#e7ecff;
  --muted:#a9b3d6;
  --border: rgba(255,255,255,0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --accent:#5aa6ff;
  --ok:#33d17a;
  --warn:#ffcc66;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: var(--accent); }

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 40px;
}

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(16,26,51,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width:0;
}

.logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(90,166,255,0.18);
  border: 1px solid rgba(90,166,255,0.25);
  box-shadow: var(--shadow);
}

.title{ font-weight:800; }
.subtitle{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

/* Cards */
.card{
  background: rgba(16,26,51,0.95);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin: 12px 0;
}

h2,h3{ margin:0 0 10px 0; line-height:1.2; }
h2{ font-size:20px; }
h3{ font-size:18px; }

.small{ font-size:13px; color:var(--muted); }
.hint{ font-size:12px; color:var(--muted); margin-top:10px; }
.msg{ margin:10px 0 0; font-size:13px; color:var(--muted); }

/* Forms */
.field{
  display:flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}
label{ font-size:13px; color:var(--muted); }

input, select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
}

input::placeholder{ color: rgba(231,236,255,0.55); }

input:focus, select:focus{
  border-color: rgba(90,166,255,0.55);
  box-shadow: 0 0 0 3px rgba(90,166,255,0.18);
}

/* ✅ Dropdown lisible sur PC (options souvent en fond blanc) */
select option{
  color: #111;
  background: #fff;
}

/* Buttons */
.row{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.row.space{ justify-content: space-between; }

.btn{
  appearance:none;
  border: 1px solid rgba(90,166,255,0.35);
  background: rgba(90,166,255,0.18);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor:pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.btn.secondary{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  box-shadow:none;
}
.btn:disabled{ opacity:0.55; cursor:not-allowed; }

.tabs{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.tab{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 700;
  font-size: 13px;
}
.tab.active{
  border-color: rgba(90,166,255,0.45);
  background: rgba(90,166,255,0.18);
}

/* List / items */
.list{ margin-top:10px; }

.item{
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
}
.itemTop{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
}
.itemTitle{ font-weight:800; font-size:16px; }
.badges{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  font-size: 12px;
}
.badge.ok{
  border-color: rgba(51,209,122,0.45);
  background: rgba(51,209,122,0.16);
}
.badge.warn{
  border-color: rgba(255,204,102,0.45);
  background: rgba(255,204,102,0.16);
}

.pill{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
}

.checkboxRow{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 14px;
}
.checkboxRow input{ width:18px; height:18px; }

.iconBtn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 12px;
  cursor:pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Modales + mobile fix */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
}
.modal.open{ display:flex; }

.modalContent{
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: auto;
  background: rgba(16,26,51,0.98);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.modalHeader{
  position: sticky;
  top: 0;
  background: rgba(16,26,51,0.98);
  z-index: 2;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 10px 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 520px){
  .container{ padding: 12px 12px 34px; }
  .itemTitle{ font-size: 15px; }
}
