/* VoltSketch on the web - the host's own bits: banner, account chip, dialogs.
   Kept apart from the engine's css/app.css, which is shared byte-for-byte. */
#vsk-web-banner {
  font: 12px/1.5 "Segoe UI", system-ui, sans-serif; padding: 6px 12px;
  background: #2B1F16; color: #F0C4A2; border-bottom: 1px solid #4D3424; text-align: center;
}
#vsk-web-banner.flash { animation: vskwebflash .9s ease-out; }
@keyframes vskwebflash { 0%, 60% { background: #9A5427; color: #fff; } 100% { background: #2B1F16; } }
#vsk-web-banner .vsk-web-link {
  font: inherit; font-weight: 700; color: #fff; background: transparent; border: 1px solid #D9824A;
  border-radius: 4px; padding: 1px 8px; margin-left: 6px; cursor: pointer;
}
#vsk-account { margin-left: 8px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vsk-web-modal {
  position: fixed; inset: 0; z-index: 9999; background: rgba(8, 12, 18, .62);
  display: grid; place-items: center; padding: 16px;
}
.vsk-web-modal .vsk-dlg {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: #161d27; color: #e7edf5; border: 1px solid #2b3747; border-radius: 10px;
  padding: 18px 20px; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.vsk-web-modal h3 { margin: 0 0 10px; font-size: 17px; }
.vsk-web-modal h4 { margin: 16px 0 6px; font-size: 14px; }
.vsk-web-modal .note { color: #9fb0c4; font-size: 13px; margin: 6px 0; }
.vsk-web-modal input {
  width: 100%; box-sizing: border-box; margin: 6px 0; padding: 9px 10px; font: inherit;
  background: #0f151d; color: #e7edf5; border: 1px solid #33425a; border-radius: 6px;
}
.vsk-web-modal .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.vsk-web-modal .btn {
  font: inherit; padding: 7px 12px; border-radius: 6px; border: 1px solid #33425a;
  background: #1f2936; color: #e7edf5; cursor: pointer;
}
.vsk-web-modal .btn:hover { background: #283547; }
.vsk-web-modal .crew { list-style: none; padding: 0; margin: 0; }
.vsk-web-modal .crew li { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid #222d3b; }
.vsk-web-modal .drawings { display: grid; gap: 6px; }
.vsk-web-modal .drow {
  display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 6px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #222d3b;
}
.vsk-web-modal .drow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsk-web-modal .drow small { grid-column: 1; grid-row: 2; color: #8496ab; }
@media (max-width: 600px) {
  .vsk-web-modal .drow { grid-template-columns: 1fr 1fr; }
  .vsk-web-modal .drow small { grid-column: 1 / -1; grid-row: auto; }
}

/* ---- Landing page / sign-in (over the program until signed in) ---- */
#vsk-gate {
  position: fixed; inset: 0; z-index: 10000; overflow: auto;
  display: grid; place-items: center; padding: 24px 16px;
  background:
    linear-gradient(rgba(10,14,20,.94), rgba(10,14,20,.97)),
    repeating-linear-gradient(30deg, transparent 0 38px, rgba(242,167,59,.06) 38px 39px),
    repeating-linear-gradient(150deg, transparent 0 38px, rgba(242,167,59,.06) 38px 39px),
    #0b1017;
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; color: #e7edf5;
}
#vsk-gate .gate-card {
  width: min(420px, 100%); background: #141b25; border: 1px solid #2b3747; border-radius: 12px;
  padding: 26px 26px 18px; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
#vsk-gate .gate-head { display: flex; align-items: center; gap: 10px; color: #D9824A; font-weight: 800; letter-spacing: .14em; font-size: 15px; }
#vsk-gate .gate-head svg { width: 30px; height: 30px; }
#vsk-gate .gate-tag { color: #9fb0c4; font-size: 13.5px; margin: 8px 0 18px; }
#vsk-gate h2 { font-size: 21px; margin: 0 0 12px; }
#vsk-gate .gate-form { display: grid; gap: 10px; }
#vsk-gate .gate-field { display: grid; gap: 4px; font-size: 13px; color: #b9c6d6; }
#vsk-gate .gate-field input {
  font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 7px;
  background: #0d131b; color: #e7edf5; border: 1px solid #33425a;
}
#vsk-gate .gate-field input:focus { outline: 2px solid #D9824A; outline-offset: 1px; border-color: #D9824A; }
#vsk-gate .gate-check { font-size: 13.5px; color: #b9c6d6; display: flex; gap: 8px; align-items: flex-start; }
#vsk-gate .gate-check input { margin-top: 3px; accent-color: #D9824A; }
#vsk-gate .btn.primary {
  font: inherit; font-weight: 700; padding: 11px 14px; border-radius: 7px; cursor: pointer;
  background: #D9824A; color: #2A1405; border: 1px solid #D9824A; margin-top: 4px;
}
#vsk-gate .btn.primary:hover { filter: brightness(1.07); }
#vsk-gate .btn.primary:disabled { opacity: .6; cursor: progress; }
#vsk-gate .gate-link {
  font: inherit; font-size: 13.5px; background: none; border: 0; padding: 4px 0; margin-top: 4px;
  color: #D9824A; cursor: pointer; text-align: left; display: block;
}
#vsk-gate .gate-link:hover, #vsk-gate a:hover { text-decoration: underline; }
#vsk-gate a { color: #D9824A; text-decoration: none; }
#vsk-gate .gate-msg { min-height: 1.2em; margin: 0; font-size: 13.5px; color: #9fb0c4; }
#vsk-gate .gate-msg.bad { color: #ff8a80; }
#vsk-gate .gate-note { font-size: 13px; color: #9fb0c4; margin: 0 0 4px; }
#vsk-gate .gate-alt { margin-top: 18px; padding-top: 14px; border-top: 1px solid #243041; }
#vsk-gate .gate-alt p { margin: 0 0 2px; font-size: 13.5px; }
#vsk-gate .gate-alt .gate-note { margin-top: 10px; }
#vsk-gate .gate-foot {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; padding-top: 12px;
  border-top: 1px solid #243041; font-size: 12.5px;
}
#vsk-gate .gate-foot a, #vsk-gate .gate-foot .gate-link { color: #8496ab; font-size: 12.5px; margin: 0; padding: 0; }
.vsk-web-modal { z-index: 10001; }
.vsk-web-modal .row.left { justify-content: flex-start; margin-top: 4px; }
.vsk-web-modal .gate-check.block { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; color: #c9d4e2; }
.vsk-web-modal .gate-check.block input { width: auto; margin: 4px 0 0; accent-color: #D9824A; }
.vsk-web-modal .mfa-setup img { display: block; background: #fff; padding: 8px; border-radius: 6px; margin: 6px 0; }
.vsk-web-modal code { user-select: all; background: #0f151d; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.vsk-web-modal a { color: #D9824A; }

/* The engine styles a bare .card as a flex row; dialogs here are a column. */
.vsk-web-modal .vsk-dlg { display: block; }
#vsk-gate .btn.primary { text-align: center; justify-content: center; }
#vsk-gate .gate-check.agree { display: block; }
#vsk-gate .gate-check.agree input { margin: 0 6px 0 2px; vertical-align: -2px; }

/* ---- Account security (2026-11-15) ---- */
#vsk-gate .gate-notice { background: #2a2210; border: 1px solid #4D3424; color: #f2c47a; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.vsk-web-modal .act { display: grid; gap: 0; max-height: 50vh; overflow: auto; border: 1px solid #222d3b; border-radius: 8px; }
.vsk-web-modal .arow { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 7px 10px; border-bottom: 1px solid #222d3b; font-size: 13px; }
.vsk-web-modal .arow .when { color: #8496ab; white-space: nowrap; }
.vsk-web-modal .drow.sess { grid-template-columns: 1fr; }
.vsk-web-modal .drow.sess small { grid-column: 1; grid-row: auto; }
.vsk-web-modal ul.plain { margin: 4px 0 8px 18px; padding: 0; }
.vsk-web-modal .btn.danger { border-color: #7a2c2c; color: #ffb4b4; }
.vsk-web-modal .btn.danger:hover { background: #3a1c1c; }
.vsk-web-modal select { font: inherit; background: #0f151d; color: #e7edf5; border: 1px solid #33425a; border-radius: 6px; padding: 6px 8px; }
.vsk-web-modal .row.left .note { align-self: center; margin: 0; }
@media (max-width: 600px) { .vsk-web-modal .arow { grid-template-columns: 1fr; gap: 2px; } }

/* Company sign-in (Microsoft / SAML) on the sign-in card. */
#vsk-gate .gate-sso { display: grid; gap: 8px; margin-top: 12px; }
#vsk-gate .gate-sso:empty { display: none; }
#vsk-gate .gate-or { text-align: center; color: #8496ab; font-size: 12.5px; margin: 0; display: flex; align-items: center; gap: 10px; }
#vsk-gate .gate-or::before, #vsk-gate .gate-or::after { content: ''; flex: 1; border-top: 1px solid #243041; }
#vsk-gate .btn.sso {
  background: #121a24; color: #e6edf5; border: 1px solid #344458; border-radius: 8px; padding: 10px 14px;
  font-weight: 600; cursor: pointer; text-align: center; justify-content: center;
}
#vsk-gate .btn.sso:hover { border-color: #D9824A; }

/* ---- My drawings (library) ---- */
.vsk-web-modal .vsk-dlg.wide { width: min(940px, 100%); }
.vsk-web-modal .libtop { display: flex; gap: 10px; align-items: center; }
.vsk-web-modal .libtop input[type="search"] { flex: 1; }
.vsk-web-modal .libcheck { display: flex; align-items: center; gap: 4px; white-space: nowrap; color: #9fb0c4; font-size: 13px; }
.vsk-web-modal input[type="checkbox"] { width: auto; margin: 0; accent-color: #D9824A; }
.vsk-web-modal .libbulk {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; padding: 8px 10px;
  background: #1d2632; border: 1px solid #D9824A55; border-radius: 6px;
}
.vsk-web-modal .libbulk b { margin-right: 6px; color: #D9824A; }
.vsk-web-modal .drawings { max-height: 56vh; overflow: auto; }
.vsk-web-modal .drow.lib { grid-template-columns: auto minmax(0, 1fr) auto; }
.vsk-web-modal .drow.lib .dname { display: grid; min-width: 0; }
.vsk-web-modal .drow.lib .dname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsk-web-modal .drow.lib .dname small { color: #8496ab; }
.vsk-web-modal .drow.lib.cur .dname b { color: #D9824A; }
.vsk-web-modal .dacts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.vsk-web-modal .dacts .btn, .vsk-web-modal .libbulk .btn { padding: 4px 9px; font-size: 13px; }
@media (max-width: 700px) {
  .vsk-web-modal .drow.lib { grid-template-columns: auto minmax(0, 1fr); }
  .vsk-web-modal .drow.lib .dacts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- voltkit.js: toasts and the Download / Email dialogs ---- */
#vsk-toasts { position: fixed; right: 16px; bottom: 44px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 32px)); }
.vsk-toast { font: 13px/1.45 "Segoe UI", system-ui, sans-serif; padding: 9px 13px; border-radius: 7px; color: #eef0fa;
  background: #232A33; border: 1px solid #3B4552; box-shadow: 0 8px 26px rgba(0,0,0,.4); transition: opacity .35s, transform .35s; }
.vsk-toast.ok { border-color: #2f8f6b; } .vsk-toast.err { border-color: #DC0E2F; } .vsk-toast.warn { border-color: #E8A33D; }
.vsk-toast.out { opacity: 0; transform: translateY(6px); }
.vsk-web-modal .vsk-form label { display: block; font-size: 13px; color: #9fb0c4; margin: 8px 0 0; }
.vsk-web-modal .vsk-form label.inline { display: flex; gap: 8px; align-items: center; }
.vsk-web-modal textarea { width: 100%; box-sizing: border-box; margin: 6px 0; padding: 9px 10px; font: inherit;
  background: #0f151d; color: #e7edf5; border: 1px solid #33425a; border-radius: 6px; resize: vertical; }
/* The start screen's account chip sits in its own header, not a tool bar. */
body[data-page="start"] #vsk-account { margin-left: 0; }
body[data-page="start"] #vsk-web-banner { order: -1; }
