/* System Administration › Vendor Configuration Studio (v0.12.0).
   Uses the console's tokens (styles.css :root). */

.st-head { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1.2rem; align-items: start; }
.st-crumb { font-size: .72rem; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.st-title h2 { font-size: 1.2rem; margin: .1rem 0 .3rem; }
.st-title .hint { max-width: 62ch; margin: 0; }
.st-pick { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; }
.st-pick select { min-width: 220px; }
.st-rights { width: 100%; text-align: right; }
.st-tabs { grid-column: 1 / -1; display: flex; gap: .3rem; flex-wrap: wrap; border-top: 1px solid var(--line);
  padding-top: .7rem; margin-top: .3rem; }
.st-tabs button { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 8px;
  padding: .42rem .9rem; font: inherit; font-size: .86rem; cursor: pointer; }
.st-tabs button.on { background: var(--deep); border-color: var(--deep); color: #fff; font-weight: 600; }
.st-tabs button:focus-visible, .st-mini:focus-visible, .st-el:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
@media (max-width: 820px) { .st-head { grid-template-columns: 1fr; } .st-pick { justify-content: flex-start; } .st-rights { text-align: left; } }

.st-pill { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px;
  background: var(--line); color: var(--ink); white-space: nowrap; }
.st-pill.ok { background: #DDEFE5; color: #1F5E43; }
.st-pill.warn { background: #FBEBCD; color: #7A5212; }
.st-pill.bad { background: #F6D8D4; color: #8E2A1F; }
.st-kind { font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 6px; background: var(--bg); }
.st-kind.k-DOCUMENT { background: #E4EEF6; color: var(--blue); }
.st-kind.k-FORM { background: #EAF4EE; color: var(--green); }
.st-kind.k-REPORT { background: #F3EEF8; color: #5B3F86; }
.st-kind.k-MESSAGES { background: #FCF2E2; color: #7A5212; }
.st-dash td { vertical-align: middle; }

.st-sticky { position: relative; }
.st-toolbar { display: flex; gap: .8rem 1.2rem; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.st-toolbar .btnrow { margin: 0; }
.st-state { font-size: .8rem; color: var(--mut); margin-top: .25rem; }
.st-dirty { color: #9A5B00; }
.st-pub { margin: .7rem 0 0; }
.st-pub input { width: 100%; }
.st-valid ul { margin: .3rem 0 0 1.1rem; }
.st-valid .st-warns { color: #7A5212; }
.st-inline { flex-direction: row; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink); }
.st-inline input { min-width: 0; }

/* field table */
.st-ftable { font-size: .82rem; }
.st-ftable th { white-space: nowrap; position: sticky; top: 0; background: #fff; }
.st-ftable td { vertical-align: middle; padding: .35rem .4rem; }
.st-sec td { background: var(--bg); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--deep); padding: .35rem .5rem; }
.st-frow.off td:not(:first-child) { opacity: .55; }
.st-frow.dragging { opacity: .4; }
.st-frow.drop-before td { box-shadow: inset 0 3px 0 var(--amber); }
.st-frow.drop-after td { box-shadow: inset 0 -3px 0 var(--amber); }
.st-grip { cursor: grab; color: var(--mut); width: 36px; text-align: center; user-select: none; }
.st-updown { display: flex; flex-direction: column; gap: 1px; }
.st-mini { border: 1px solid var(--line); background: #fff; border-radius: 5px; font-size: .68rem; line-height: 1;
  padding: .18rem .32rem; cursor: pointer; color: var(--teal); }
.st-mini:disabled { opacity: .35; cursor: default; }
.st-key { font-size: .74rem; background: var(--bg); padding: .05rem .3rem; border-radius: 4px; }
.st-lock { display: inline-block; font-size: .66rem; margin-left: .3rem; padding: 0 .35rem; border-radius: 4px;
  background: #FBEBCD; color: #7A5212; white-space: nowrap; }
.st-src { display: inline-block; font-size: .66rem; color: var(--mut); margin-top: .15rem; }
.st-src.here { color: #fff; background: var(--teal); padding: 0 .35rem; border-radius: 4px; }
.st-src.def { opacity: .7; }
.st-in { min-width: 0; width: 100%; font-size: .8rem; padding: .3rem .4rem; }
textarea.st-in { font: inherit; font-size: .8rem; border: 1px solid var(--line); border-radius: 8px; margin-top: .25rem; }
.st-def { max-width: 120px; }
.st-compact select { width: auto; margin: 1px 0; }
.st-has { background: #FCF2E2 !important; border-color: var(--amber) !important; color: #7A5212 !important; }
.st-off { opacity: .55; }

/* toggles */
.st-tog { position: relative; display: inline-block; width: 34px; height: 20px; flex-direction: row; }
.st-tog input { opacity: 0; width: 0; height: 0; min-width: 0; position: absolute; }
.st-tog span { position: absolute; inset: 0; background: #C9D0DC; border-radius: 20px; transition: .15s; cursor: pointer; }
.st-tog span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.st-tog input:checked + span { background: var(--green); }
.st-tog input:checked + span::before { transform: translateX(14px); }
.st-tog input:disabled + span { opacity: .45; cursor: not-allowed; }
.st-tog input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 1px; }

/* condition builder */
.st-cond { background: #FFFBF2; border: 1px solid #F1DDB4; border-radius: 10px; padding: .7rem .8rem; }
.st-cond .formrow { margin-bottom: .4rem; align-items: center; }
.st-cond select, .st-cond input { min-width: 120px; font-size: .8rem; padding: .3rem .45rem; }
.st-condrow td { background: #FFFDF8; }

/* designer */
.st-design { display: grid; grid-template-columns: 250px 1fr; gap: 1.2rem; align-items: start; }
.st-tlist .st-titem { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .65rem; margin-bottom: .45rem;
  cursor: pointer; font-size: .84rem; }
.st-tlist .st-titem:hover { border-color: var(--teal); }
.st-tlist .st-titem.on { border-color: var(--deep); box-shadow: inset 3px 0 0 var(--amber); }
.st-tlist .st-titem .hint { margin: .1rem 0 .2rem; }
.st-tlist label { margin-bottom: .45rem; }
.st-tlist select, .st-tlist input { min-width: 0; width: 100%; }
.st-dgrid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 270px; gap: 1rem; align-items: start; }
@media (max-width: 1250px) { .st-dgrid { grid-template-columns: 200px minmax(0, 1fr); } .st-props { grid-column: 1 / -1; } }
@media (max-width: 900px) { .st-design, .st-dgrid { grid-template-columns: 1fr; } }
.st-palette { max-height: 70vh; overflow: auto; }
.st-psec { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mut);
  margin: .55rem 0 .2rem; }
.st-pal { display: flex; justify-content: space-between; align-items: center; gap: .3rem; font-size: .8rem;
  border: 1px dashed #C9D3E2; border-radius: 7px; padding: .26rem .45rem; margin-bottom: .25rem; background: #fff; cursor: grab; }
.st-pal.used { background: var(--bg); color: var(--mut); }
.st-pal.cfg-off { text-decoration: line-through; }
.st-canvaswrap { overflow: auto; }
.st-paper { background: #FFFEF8; border: 1px solid #E0DCCB; box-shadow: 0 6px 18px rgba(33,41,92,.12);
  border-radius: 3px; padding: 12px; width: var(--pw); max-width: 100%; margin: .5rem auto; min-height: 220px; }
.st-paper.page { aspect-ratio: 8.5 / 11; width: 100%; max-width: 620px; }
.st-crow { display: flex; gap: 4px; margin-bottom: 4px; }
.st-el { border: 1px solid transparent; border-radius: 4px; padding: 3px 5px; cursor: pointer; min-width: 0;
  background: rgba(255,255,255,.6); }
.st-el:hover { border-color: #B8C6DA; }
.st-el.sel { border-color: var(--teal); background: #EEF6FA; box-shadow: 0 0 0 2px rgba(28,114,147,.15); }
.st-el.hid { opacity: .45; }
.st-el.cond { border-style: dashed; border-color: #E2B866; }
.st-el.dragging { opacity: .35; }
.st-el.drop-before { box-shadow: inset 3px 0 0 var(--amber); }
.st-el.drop-after { box-shadow: inset -3px 0 0 var(--amber); }
.st-elh { font-size: .62rem; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-align: left; }
.st-els { font-size: .8rem; color: #222; overflow-wrap: anywhere; }
.st-els.s-XS { font-size: .62rem; } .st-els.s-S { font-size: .7rem; } .st-els.s-L { font-size: .92rem; }
.st-els.s-XL { font-size: 1.05rem; } .st-els.s-XXL { font-size: 1.25rem; } .st-els.b { font-weight: 700; }
.st-el.t-divider .st-els { border-top: 1px solid #333; height: 1px; overflow: hidden; margin-top: 4px; }
.st-ifb { font-size: .6rem; background: #FBEBCD; color: #7A5212; border-radius: 3px; padding: 0 .25rem; text-transform: none; }
.st-props label { margin-bottom: .45rem; }
.st-props select, .st-props input, .st-props textarea { min-width: 0; width: 100%; }
.st-props textarea { font: inherit; font-size: .82rem; border: 1px solid var(--line); border-radius: 8px; padding: .4rem; }
.st-req { margin: .2rem 0 .6rem 1rem; font-size: .8rem; }
.st-facts { align-items: center; }
.st-prev { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: flex-start; background: #E9EDF3; border-radius: 10px;
  padding: 1rem; overflow: auto; }
.st-preview-paper { flex: 0 1 auto; max-width: 100%; overflow: auto; }
.st-preview-paper .pk-doc { box-shadow: 0 4px 16px rgba(0,0,0,.18); margin: 0 auto; }
.st-thermal { background: #FFFEF6; font: 10.5px/1.35 "Courier New", monospace; padding: 10px 12px; margin: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); white-space: pre; }
.st-thermal:empty { display: none; }
.st-detail { max-width: 340px; overflow-wrap: anywhere; }
.warn-ghost { color: var(--red) !important; border-color: var(--red) !important; }

/* fields configured as required on operational screens */
.fc-req { color: var(--red); font-weight: 700; margin-left: .15rem; }
