.gsm-dialog[hidden]{display:none!important}
.gsm-dialog{width:min(1100px,calc(100vw - 40px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #334155;border-radius:20px;background:#101b2d;color:#edf3ff;box-shadow:0 32px 100px #0009;overflow:auto}
.gsm-dialog::backdrop{background:#020617b8;backdrop-filter:blur(5px)}
.gsm-dialog *{box-sizing:border-box}
.gsm-shell{min-width:0}
.gsm-head{display:flex;justify-content:space-between;gap:24px;padding:28px 30px;border-bottom:1px solid #31405a}
.gsm-head h2{margin:5px 0 8px;font-size:26px;color:#f7faff}
.gsm-head p,.gsm-content>p{margin:0;color:#b9c8df;line-height:1.7}
.gsm-kicker{font-size:12px;font-weight:700;letter-spacing:.08em;color:#82c9ff}
.gsm-close{align-self:flex-start;flex:none;width:40px;height:40px;border:1px solid #40516b;border-radius:10px;background:#1a2a42;color:#edf3ff;font-size:25px;cursor:pointer}
.gsm-body{padding:24px 30px 30px}
.gsm-controls{display:grid;grid-template-columns:minmax(220px,auto) minmax(160px,1fr) auto minmax(150px,1fr);align-items:end;gap:14px}
.gsm-controls label{display:grid;gap:7px;font-size:13px;color:#d5e1f3}
.gsm-controls input,.gsm-controls select{width:100%;min-width:0;height:44px;padding:9px 12px;border:1px solid #435570;border-radius:10px;background:#0c1729;color:#f2f6ff;font:inherit}
.gsm-controls input::placeholder{color:#8fabc9}
.gsm-button{min-height:44px;padding:10px 16px;border:1px solid #4a5d78;border-radius:10px;background:#1c2b43;color:#edf3ff;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.gsm-button:hover:not(:disabled){background:#2b405f}
.gsm-button.gsm-primary{border-color:#66b7ff;background:#2379c8;color:white}
.gsm-button.gsm-primary:hover:not(:disabled){background:#2c8ee6}
.gsm-button:disabled{opacity:.48;cursor:not-allowed}
.gsm-message{min-height:24px;margin:18px 0;color:#c3d5eb;line-height:1.6;font-size:14px}
.gsm-message[data-kind=error]{color:#ffb8b8}
.gsm-layout{display:grid;grid-template-columns:205px minmax(0,1fr);gap:22px;border-top:1px solid #31405a;padding-top:22px}
.gsm-systems{display:flex;flex-direction:column;gap:8px;max-height:480px;overflow:auto;padding-right:4px}
.gsm-systems p{font-size:14px;color:#a9bdd6}
.gsm-system{padding:12px 14px;border:1px solid #34465f;border-radius:10px;background:#142137;color:#e4edfc;text-align:left;font:inherit;cursor:pointer}
.gsm-system span{display:block;margin-top:5px;color:#9fb6d3;font-size:12px}
.gsm-system[aria-current=true]{border-color:#69b8ff;background:#153c61}
.gsm-content{min-width:0}
#gm2SystemMax section.gsm-content{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important}
#gm2SystemMax .gsm-preview table{background:#101b2d}
.gsm-content h3{margin:0 0 9px;font-size:21px;color:#f4f7ff}
.gsm-content>.gsm-button{margin-top:18px}
.gsm-preview{margin-top:22px}
.gsm-summary{padding:13px 15px;border:1px solid #3c577a;border-radius:10px;background:#132945;color:#d0e5ff;line-height:1.7}
.gsm-table-wrap{overflow:auto;max-height:380px;margin-top:14px;border:1px solid #34465f;border-radius:10px}
.gsm-preview table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}
.gsm-preview th,.gsm-preview td{padding:11px 13px;border-bottom:1px solid #2b3e58;overflow-wrap:anywhere;vertical-align:top}
.gsm-preview th{position:sticky;top:0;background:#1b2e48;color:#e9f3ff}
.gsm-preview td{color:#c4d5eb}
.gsm-preview td:last-child{color:#9de6be}
.gsm-decision{display:grid;gap:15px;margin-top:18px;padding-top:18px;border-top:1px solid #34465f}
.gsm-decision label{display:flex;align-items:flex-start;gap:9px;color:#d9e6f9;font-size:14px;line-height:1.6}
.gsm-decision input{width:18px;height:18px;flex:none;margin-top:3px;accent-color:#52abff}
.gsm-decision .gsm-button{justify-self:start}
.gsm-operation{margin-top:20px;padding:15px;border:1px solid #405777;border-radius:10px;color:#d6e4f6;line-height:1.8;font-size:14px;overflow-wrap:anywhere}
.gsm-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:15px}
.gsm-dialog :focus-visible{outline:3px solid #86ceff;outline-offset:3px}
@media(max-width:700px){.gsm-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:14px}.gsm-head{padding:20px;gap:12px}.gsm-head h2{font-size:23px}.gsm-body{padding:18px}.gsm-controls{grid-template-columns:1fr 1fr}.gsm-controls>label:nth-child(2){grid-column:2}.gsm-controls>.gsm-button{grid-column:1}.gsm-layout{grid-template-columns:1fr;gap:18px}.gsm-systems{flex-direction:row;max-height:none;overflow-x:auto;padding-bottom:8px}.gsm-system{flex:0 0 145px}.gsm-content>.gsm-button,.gsm-decision .gsm-button{width:100%}.gsm-table-wrap{max-height:320px}}

/* Keep this dialog within its own geometry despite shared entry-page rules. */
#gm2SystemMax .gsm-head>div{flex:1 1 auto;min-width:0}
#gm2SystemMax #gsmClose{flex:0 0 44px;width:44px;min-width:44px;max-width:44px;height:44px}
#gm2SystemMax .gsm-controls>label{min-width:0}
#gm2SystemMax .gsm-system{display:block;width:100%}
#gm2SystemMax .gsm-systems{min-width:0}
@media(max-width:700px){#gm2SystemMax .gsm-controls{grid-template-columns:repeat(2,minmax(0,1fr))}#gm2SystemMax .gsm-layout{grid-template-columns:minmax(0,1fr)}}

/* The public theme uses important declarations in this named layer. Scope
 * matching-layer overrides to the new dialog and retain the GM2 gold palette. */
@layer public-a2 {
  #gm2SystemMax.gsm-dialog{background:#171e19!important;color:#f1ebdc!important;border-color:#716244!important}
  #gm2SystemMax .gsm-head h2,#gm2SystemMax .gsm-content h3{color:#f4e8c6!important}
  #gm2SystemMax #gsmClose{min-height:44px!important;padding:0!important;font-size:24px!important;background:#29332c!important;color:#f1ebdc!important;border:1px solid #62694f!important;box-shadow:none!important}
  #gm2SystemMax .gsm-controls input,#gm2SystemMax .gsm-controls select{background:#1d2a21!important;color:#f1ebdc!important;border:1px solid #66765b!important;font-size:14px!important}
  #gm2SystemMax .gsm-button{background:#2b382c!important;color:#f1ebdc!important;border:1px solid #6b7457!important;box-shadow:none!important}
  #gm2SystemMax .gsm-button.gsm-primary{background:#d2aa58!important;color:#192019!important;border-color:#dfbd73!important}
  #gm2SystemMax .gsm-system{display:block!important;padding:12px 14px!important;text-align:left!important;background:#202b22!important;color:#eee8d7!important;border:1px solid #4b5845!important;box-shadow:none!important}
  #gm2SystemMax .gsm-system[aria-current=true]{background:#3c3d25!important;border-color:#d2b66b!important}
  #gm2SystemMax .gsm-system span{color:#bdc8b0!important}
  #gm2SystemMax .gsm-decision input{width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;flex:0 0 18px!important}
}
#gm2SystemMax .gsm-summary{background:#233024;color:#e0e6cf;border-color:#66704d}
#gm2SystemMax .gsm-preview table{border-collapse:collapse!important;background:#18241c!important}
#gm2SystemMax .gsm-preview th{background:#2d3a2b!important;color:#f2ebd2!important;border-color:#536349!important}
#gm2SystemMax .gsm-preview td{background:#18241c!important;color:#dce3d1!important;border-color:#3e513d!important}
#gm2SystemMax .gsm-preview td:last-child{color:#b1e2a2!important}
