/* Velmora Manager · Online Career
   Follows the existing menu language: flat production surfaces, condensed
   uppercase labels, a single cobalt accent, restrained motion. Everything
   here is additive; nothing overrides a single-player rule. */

:root{
  --mp-ink:#111820;
  --mp-muted:#5c6b7a;
  --mp-line:rgba(17,24,32,.14);
  --mp-surface:#f7f7f6;
  --mp-card:#fff;
  --mp-accent:#174f9f;
  --mp-good:#1f7a4d;
  --mp-warn:#a2650f;
  --mp-danger:#a3242f;
}

/* ---------------------------------------------------------------
   Lobby overlay
   --------------------------------------------------------------- */
.mp-overlay{
  position:fixed;
  inset:0;
  z-index:99000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:clamp(12px,3vw,40px);
  background:rgba(12,18,26,.62);
  backdrop-filter:blur(3px);
}
.mp-overlay.is-open{display:flex}

.mp-dialog{
  display:flex;
  flex-direction:column;
  width:min(980px,100%);
  max-height:min(860px,94vh);
  overflow:hidden;
  color:var(--mp-ink);
  background:var(--mp-surface);
  border:1px solid var(--mp-line);
  border-radius:10px;
  box-shadow:0 30px 80px rgba(9,15,22,.4);
  font-family:Arial,Helvetica,sans-serif;
  animation:mpRise .22s ease-out;
}
@keyframes mpRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.mp-dialog-head{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding:20px 22px 16px;
  border-bottom:1px solid var(--mp-line);
  background:var(--mp-card);
}
.mp-dialog-head>div{flex:1;min-width:0}
.mp-dialog-head span{
  display:block;
  font-size:11px;
  letter-spacing:.16em;
  font-weight:700;
  color:var(--mp-accent);
}
.mp-dialog-head h2{
  margin:4px 0 2px;
  font-size:clamp(20px,2.4vw,27px);
  letter-spacing:.03em;
  text-transform:uppercase;
}
.mp-dialog-head p{margin:0;font-size:13px;line-height:1.45;color:var(--mp-muted)}

.mp-close{
  flex:0 0 auto;
  width:34px;height:34px;
  font-size:20px;line-height:1;
  color:var(--mp-muted);
  background:transparent;
  border:1px solid var(--mp-line);
  border-radius:6px;
  cursor:pointer;
}
.mp-close:hover{color:var(--mp-ink);border-color:var(--mp-ink)}

.mp-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:20px 22px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.mp-foot{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:16px 22px;
  border-top:1px solid var(--mp-line);
  background:var(--mp-card);
}

.mp-notice{
  margin:0;
  padding:12px 22px;
  font-size:13px;
  line-height:1.5;
  border-bottom:1px solid var(--mp-line);
}
.mp-notice.is-error{color:#7d1b24;background:#fbeced}
.mp-notice.is-warn{color:#7a4c07;background:#fdf3e2}
.mp-notice.is-info{color:#123f7d;background:#eaf1fb}

/* Buttons ------------------------------------------------------- */
.mp-dialog button{
  font:700 12px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.11em;
  text-transform:uppercase;
  padding:11px 16px;
  color:var(--mp-ink);
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:6px;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,transform .14s ease;
}
.mp-dialog button:hover:not(:disabled){border-color:var(--mp-ink);transform:translateY(-1px)}
.mp-dialog button:disabled{opacity:.45;cursor:not-allowed}
.mp-dialog button.is-primary{color:#fff;background:var(--mp-accent);border-color:var(--mp-accent)}
.mp-dialog button.is-primary:hover:not(:disabled){background:#123f7d}
.mp-dialog button.is-danger{color:#fff;background:var(--mp-danger);border-color:var(--mp-danger)}
.mp-dialog :focus-visible,
.mp-status :focus-visible{outline:3px solid var(--mp-accent);outline-offset:2px}

.mp-link{
  align-self:flex-start;
  font:700 12px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.11em;
  text-transform:uppercase;
  padding:11px 16px;
  color:#fff;
  background:var(--mp-accent);
  border-radius:6px;
  text-decoration:none;
}

/* Careers list --------------------------------------------------- */
.mp-career-list{display:flex;flex-direction:column;gap:10px}
.mp-career-row{
  display:grid;
  grid-template-columns:64px 1fr auto;
  gap:16px;
  align-items:center;
  padding:14px 16px;
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:8px;
}
.mp-career-crest,.mp-seat-crest{
  display:grid;
  place-items:center;
  width:56px;height:56px;
  overflow:hidden;
  background:#eef1f4;
  border-radius:6px;
}
.mp-career-crest img,.mp-seat-crest img{max-width:100%;max-height:100%}
.mp-crest-fallback{font:700 16px/1 Arial;letter-spacing:.06em;color:var(--mp-muted)}
.mp-career-copy{min-width:0}
.mp-career-copy span{
  display:block;font-size:10px;letter-spacing:.14em;font-weight:700;color:var(--mp-accent);
}
.mp-career-copy h3{margin:3px 0;font-size:17px;text-transform:uppercase;letter-spacing:.02em}
.mp-career-copy p{margin:0;font-size:13px;color:var(--mp-ink)}
.mp-career-copy small{display:block;margin-top:3px;font-size:11px;letter-spacing:.08em;color:var(--mp-muted)}
.mp-career-actions{display:flex;flex-direction:column;gap:8px}

.mp-empty{
  padding:34px 24px;
  text-align:center;
  background:var(--mp-card);
  border:1px dashed var(--mp-line);
  border-radius:8px;
}
.mp-empty h3{margin:0 0 8px;font-size:16px;letter-spacing:.05em;text-transform:uppercase}
.mp-empty p{margin:0 auto;max-width:56ch;font-size:13px;line-height:1.6;color:var(--mp-muted)}
.mp-empty .mp-link{margin-top:16px;align-self:center;display:inline-block}

/* Forms ---------------------------------------------------------- */
.mp-form{display:flex;flex-direction:column;gap:14px}
.mp-field{display:flex;flex-direction:column;gap:6px}
.mp-field>span,.mp-field>legend{
  font-size:11px;letter-spacing:.13em;font-weight:700;color:var(--mp-muted);text-transform:uppercase;
}
.mp-field>span i{font-style:normal;opacity:.65}
.mp-field input,.mp-field select{
  padding:11px 12px;
  font:400 14px/1.3 Arial,Helvetica,sans-serif;
  color:var(--mp-ink);
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:6px;
}
.mp-field input:focus,.mp-field select:focus{border-color:var(--mp-accent);outline:none}
.mp-field-inline{flex:1;min-width:180px}
.mp-code-input{
  font:700 22px/1 "Velmora Menu Condensed",Arial,Helvetica,sans-serif;
  letter-spacing:.42em;
  text-transform:uppercase;
  text-align:center;
}
.mp-choice{margin:0;padding:0;border:0}
.mp-choice label{
  display:flex;gap:10px;align-items:flex-start;
  padding:11px 12px;margin-top:8px;
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:6px;
  cursor:pointer;
}
.mp-choice label:has(input:checked){border-color:var(--mp-accent);box-shadow:inset 0 0 0 1px var(--mp-accent)}
.mp-choice b{display:block;font-size:12px;letter-spacing:.09em}
.mp-choice small{display:block;margin-top:2px;font-size:12px;color:var(--mp-muted)}

.mp-note{margin:0;font-size:12.5px;line-height:1.55;color:var(--mp-muted)}
.mp-note.is-warn{color:var(--mp-warn)}
.mp-note.is-error{color:var(--mp-danger)}

.mp-preview{
  padding:16px;
  background:var(--mp-card);
  border:1px solid var(--mp-accent);
  border-radius:8px;
}
.mp-preview span{font-size:10px;letter-spacing:.14em;font-weight:700;color:var(--mp-accent)}
.mp-preview h3{margin:4px 0;font-size:19px;text-transform:uppercase}
.mp-preview p{margin:0;font-size:13px;color:var(--mp-ink)}
.mp-preview small{display:block;margin-top:6px;font-size:11px;letter-spacing:.1em;color:var(--mp-muted)}

/* Lobby ---------------------------------------------------------- */
.mp-seats{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
.mp-seat{
  display:grid;
  grid-template-columns:56px 1fr auto;
  gap:12px;
  align-items:center;
  padding:14px;
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:8px;
}
.mp-seat.is-empty{border-style:dashed;opacity:.8}
.mp-seat-copy{min-width:0}
.mp-seat-copy span{display:block;font-size:10px;letter-spacing:.14em;font-weight:700;color:var(--mp-accent)}
.mp-seat-copy h4{margin:3px 0;font-size:15px;text-transform:uppercase;letter-spacing:.02em}
.mp-seat-copy p{margin:0;font-size:13px;color:var(--mp-ink)}
.mp-seat-copy small{display:block;margin-top:3px;font-size:10px;letter-spacing:.1em;color:var(--mp-muted)}
.mp-seat-state{display:flex;flex-direction:column;gap:6px;align-items:flex-end}

.mp-tag{
  display:inline-block;
  padding:3px 8px;
  font:700 10px/1.4 Arial;
  letter-spacing:.1em;
  color:var(--mp-muted);
  background:#eef1f4;
  border-radius:3px;
}
.mp-tag.is-good{color:#0e5c37;background:#e4f3ea}
.mp-tag.is-warn{color:var(--mp-warn);background:#fdf3e2}

.mp-dot{
  display:inline-flex;align-items:center;gap:6px;
  font:700 10px/1.4 Arial;letter-spacing:.1em;color:var(--mp-muted);
}
.mp-dot::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.mp-dot.is-good{color:var(--mp-good)}
.mp-dot.is-warn{color:var(--mp-warn)}
.mp-dot.is-idle{color:#94a2b0}

.mp-lobby-actions{display:flex;flex-wrap:wrap;gap:10px}
.mp-invite{
  display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;
  padding:16px;
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:8px;
}
.mp-invite span{display:block;font-size:10px;letter-spacing:.14em;font-weight:700;color:var(--mp-accent)}
.mp-invite small{display:block;margin-top:4px;font-size:12px;color:var(--mp-muted)}
.mp-code{
  display:block;margin:4px 0;
  font:700 30px/1 "Velmora Menu Condensed",Arial,Helvetica,sans-serif;
  letter-spacing:.24em;
}

/* Club picker ---------------------------------------------------- */
.mp-club-picker{
  padding:14px;
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:8px;
}
.mp-picker-head{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.mp-club-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:8px;
  max-height:320px;
  overflow-y:auto;
  margin:0;padding:0;
  list-style:none;
}
.mp-club{
  position:relative;
  width:100%;
  display:flex;flex-direction:column;gap:3px;
  padding:11px 12px!important;
  text-align:left!important;
  text-transform:none!important;
  letter-spacing:0!important;
  border-left:3px solid var(--mp-club-accent,var(--mp-accent))!important;
}
.mp-club b{font:700 13px/1.25 Arial;letter-spacing:.01em}
.mp-club small{font:400 11px/1.3 Arial;color:var(--mp-muted)}
.mp-club .mp-tag{position:absolute;top:8px;right:8px;font-style:normal}
.mp-club.is-mine{box-shadow:inset 0 0 0 1px var(--mp-accent)}

/* In-place confirmation ------------------------------------------ */
.mp-confirm{
  position:absolute;
  left:22px;right:22px;bottom:calc(100% + 8px);
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  padding:14px 16px;
  background:var(--mp-card);
  border:1px solid var(--mp-danger);
  border-radius:8px;
  box-shadow:0 12px 30px rgba(9,15,22,.18);
}
.mp-confirm>div{flex:1;min-width:220px}
.mp-confirm strong{display:block;font-size:13px;text-transform:uppercase;letter-spacing:.05em}
.mp-confirm small{display:block;margin-top:3px;font-size:12px;line-height:1.5;color:var(--mp-muted)}

/* ---------------------------------------------------------------
   In-career status component
   --------------------------------------------------------------- */
.mp-status{
  position:fixed;
  right:14px;
  bottom:62px;
  z-index:98000;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  font-family:Arial,Helvetica,sans-serif;
  pointer-events:none;
}
.mp-status>*{pointer-events:auto}

.mp-status-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 13px;
  font:700 11px/1 Arial;
  letter-spacing:.11em;
  color:var(--mp-ink);
  background:rgba(255,255,255,.96);
  border:1px solid var(--mp-line);
  border-radius:999px;
  box-shadow:0 6px 18px rgba(9,15,22,.14);
  cursor:pointer;
}
.mp-status-dot{width:9px;height:9px;border-radius:50%;background:var(--mp-good)}
.mp-status[data-mode="locked"] .mp-status-dot{background:var(--mp-warn)}
.mp-status[data-mode="offline"] .mp-status-dot{background:#94a2b0}
.mp-status[data-mode="readonly"] .mp-status-dot{background:var(--mp-danger)}
.mp-status[data-mode="locked"] .mp-status-chip{border-color:var(--mp-warn)}
.mp-status-chip i{
  font-style:normal;
  padding:2px 6px;
  font-size:10px;
  color:#fff;
  background:var(--mp-accent);
  border-radius:999px;
}

.mp-status-panel{
  width:min(340px,calc(100vw - 28px));
  max-height:min(70vh,560px);
  overflow-y:auto;
  color:var(--mp-ink);
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:10px;
  box-shadow:0 18px 44px rgba(9,15,22,.24);
}
.mp-status-panel header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--mp-line);
}
.mp-status-panel small{font-size:10px;letter-spacing:.14em;font-weight:700;color:var(--mp-accent)}
.mp-status-panel strong{display:block;font-size:15px;text-transform:uppercase;letter-spacing:.02em}
.mp-status-panel header button{
  width:28px;height:28px;font-size:17px;line-height:1;
  color:var(--mp-muted);background:transparent;
  border:1px solid var(--mp-line);border-radius:5px;cursor:pointer;
}
.mp-status-panel>div{padding:14px 16px;display:flex;flex-direction:column;gap:12px}

.mp-wait{
  margin:0;
  padding:11px 12px;
  font-size:12.5px;
  line-height:1.55;
  color:#7a4c07;
  background:#fdf3e2;
  border-left:3px solid var(--mp-warn);
  border-radius:4px;
}
.mp-wait.is-good{color:#0e5c37;background:#e9f4ee;border-left-color:var(--mp-good)}
.mp-wait.is-warn{color:#7d1b24;background:#fbeced;border-left-color:var(--mp-danger)}

.mp-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}
.mp-facts div{padding:9px 10px;background:#f4f6f8;border-radius:5px}
.mp-facts dt{font-size:9.5px;letter-spacing:.13em;font-weight:700;color:var(--mp-muted)}
.mp-facts dd{margin:3px 0 0;font-size:12.5px;font-weight:700;letter-spacing:.03em}

.mp-people{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.mp-people li{
  display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;
  padding:9px 10px;background:#f4f6f8;border-radius:5px;
}
.mp-people b{display:block;font-size:12.5px}
.mp-people small{display:block;font-size:11px;color:var(--mp-muted)}
.mp-people i{font-style:normal;font:700 9.5px/1.4 Arial;letter-spacing:.1em;color:var(--mp-accent)}

.mp-recovery{
  padding:11px 12px;
  background:#f4f6f8;
  border:1px dashed var(--mp-line);
  border-radius:5px;
}
.mp-recovery p{margin:0 0 9px;font-size:12px;line-height:1.55;color:var(--mp-muted)}
.mp-status-panel button:not(header button){
  width:100%;
  font:700 11px/1 Arial;
  letter-spacing:.11em;
  text-transform:uppercase;
  padding:10px 12px;
  color:var(--mp-ink);
  background:var(--mp-card);
  border:1px solid var(--mp-line);
  border-radius:6px;
  cursor:pointer;
}
.mp-status-panel button.is-primary{color:#fff;background:var(--mp-accent);border-color:var(--mp-accent)}

.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width:760px){
  .mp-overlay{padding:0}
  .mp-dialog{width:100%;max-height:100vh;border-radius:0;border:0}
  .mp-career-row{grid-template-columns:48px 1fr;grid-template-areas:"crest copy" "actions actions"}
  .mp-career-crest{grid-area:crest;width:48px;height:48px}
  .mp-career-copy{grid-area:copy}
  .mp-career-actions{grid-area:actions;flex-direction:row}
  .mp-career-actions button{flex:1}
  .mp-seats{grid-template-columns:1fr}
  .mp-foot{position:sticky;bottom:0}
  .mp-foot button{flex:1 1 140px}
  .mp-confirm{left:12px;right:12px}
  .mp-club-grid{grid-template-columns:1fr 1fr;max-height:260px}
  .mp-status{right:10px;bottom:74px}
  .mp-status-panel{width:calc(100vw - 20px)}
  .mp-facts{grid-template-columns:1fr}
}

@media (min-width:1600px){
  .mp-dialog{width:min(1160px,100%)}
  .mp-club-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));max-height:420px}
}

/* Motion is opt-out in both the browser setting and the in-game one. */
@media (prefers-reduced-motion:reduce){
  .mp-dialog{animation:none}
  .mp-dialog button:hover:not(:disabled){transform:none}
}
html[data-vm-reduced-motion="true"] .mp-dialog{animation:none}
html[data-vm-reduced-motion="true"] .mp-dialog button:hover:not(:disabled){transform:none}
html[data-vm-reduced-motion="true"] .mp-dialog button{transition:none}
