/* Shared console layout and form controls. Page modules supply their own operational states. */
:root {
 --ink:#22343f; --muted:#637580; --canvas:#f4f6f8; --paper:#fff; --line:#dce4e8;
 --green:#176d63; --green-soft:#e7f3ef; --amber:#966122; --amber-soft:#fff5e4;
 --red:#ae403c; --red-soft:#fff0ed;
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
body { background:var(--canvas); color:var(--ink); font-size:14px; line-height:1.55; }
[hidden] { display:none!important; }
button,input,select,textarea { font-family:inherit; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
:where(input,select,textarea,button,a,summary):focus-visible { outline:2px solid #438d83; outline-offset:3px; }
a { text-underline-offset:3px; }
.console-app .topbar { background:var(--paper); border-bottom:1px solid var(--line); }
.console-app .topbar-inner { max-width:1520px; gap:2rem; min-height:76px; padding:.8rem 2rem; flex-wrap:wrap; }
.wordmark { font-size:1rem; letter-spacing:-.015em; }
.wordmark small { font-size:.72rem; letter-spacing:0; margin-top:.2rem; }
.brand-symbol { border-radius:.6rem; width:2.5rem; height:2.5rem; }
.console-app .topbar nav { display:flex; gap:.3rem; align-self:stretch; align-items:center; margin-right:auto; }
.console-app .topbar nav a { padding:.65rem .8rem; border-radius:.4rem; font-size:.86rem; font-weight:550; white-space:nowrap; }
.console-app .topbar nav a[aria-current=page] { color:var(--green); background:var(--green-soft); text-decoration:none; }
.console-app .topbar nav a:hover { background:#f0f5f4; }
.console-app .topbar form { gap:.7rem; margin-left:auto; }
.account { font-family:inherit; font-size:.8rem; color:var(--muted); }
.console-app .workspace { max-width:1520px; padding:1.8rem 2rem 4rem; }
.console-app .page-heading { padding-bottom:1.4rem; border:0; align-items:center; gap:1.2rem; }
.console-app .page-heading h1 { font-size:1.8rem; line-height:1.3; letter-spacing:-.035em; margin:.25rem 0 .5rem; }
.console-app .page-heading p:last-child { font-size:.88rem; line-height:1.7; max-width:55rem; }
.eyebrow { font-family:inherit; font-size:.76rem; font-weight:600; line-height:1.5; letter-spacing:.025em; margin:0 0 .3rem; }
.button { min-height:2.5rem; padding:.55rem .95rem; font-size:.84rem; font-weight:600; border-radius:.45rem; text-decoration:none; }
.button-primary:hover:not(:disabled) { background:#115d54; }
.button-secondary { background:var(--paper); border-color:#cbd8dc; color:var(--ink); }
.button-secondary:hover:not(:disabled) { background:#f0f7f5; border-color:#84aaa1; }
.button:hover:not(:disabled) { transform:none; }
.button:active:not(:disabled) { transform:translateY(1px); }
.state { display:inline-flex; align-items:center; gap:.3rem; font-family:inherit; font-size:.72rem; font-weight:600; padding:.25rem .5rem; border-radius:.35rem; }
.notice { margin:0 0 1.25rem; border:1px solid #bcdace; border-left:3px solid var(--green); border-radius:.45rem; background:var(--green-soft); font-size:.86rem; }
.notice-error { background:var(--red-soft); border-color:#eac6c2; border-left-color:var(--red); }
.feedback-toast { position:fixed; top:max(1rem,env(safe-area-inset-top)); right:max(1rem,env(safe-area-inset-right)); z-index:1000; width:min(26rem,calc(100vw - 2rem)); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.5rem; align-items:start; padding:1rem .65rem 1rem 1.1rem; border:1px solid #bcdace; border-left:4px solid var(--green); border-radius:.6rem; background:var(--paper); box-shadow:0 8px 32px #22343f24; }
.feedback-toast[data-state=error] { border-color:#eac6c2; border-left-color:var(--red); }
.feedback-toast strong { display:block; font-size:.95rem; line-height:1.5; color:var(--green); }
.feedback-toast[data-state=error] strong { color:var(--red); }
.feedback-toast p { margin:.35rem 0 0; font-size:.85rem; line-height:1.7; color:var(--ink); white-space:pre-wrap; overflow-wrap:anywhere; max-height:50vh; overflow:auto; }
.feedback-toast button { display:grid; place-items:center; width:2.5rem; height:2.5rem; border:0; border-radius:.4rem; padding:0; background:transparent; color:var(--muted); font-size:1.4rem; line-height:1; }
.feedback-toast button:hover { background:var(--canvas); color:var(--ink); }
label { display:grid; min-width:0; gap:.45rem; font-size:.83rem; font-weight:550; color:var(--ink); align-content:start; }
input,select,textarea { width:100%; min-width:0; min-height:2.5rem; border:1px solid #cbd6dc; border-radius:.4rem; padding:.55rem .7rem; background:var(--paper); color:var(--ink); font-family:inherit; font-size:.86rem; font-weight:400; line-height:1.5; transition:border-color .15s,box-shadow .15s; }
input:hover,select:hover,textarea:hover { border-color:#95b1b8; }
input:focus,select:focus,textarea:focus { border-color:var(--green); box-shadow:0 0 0 3px #176d6310; }
input[readonly] { color:#526977; background:#f5f8f9; }
input::placeholder,textarea::placeholder { color:#7e909b; }
textarea { resize:vertical; line-height:1.7; }
input[type=checkbox] { width:1rem; height:1rem; min-height:0; accent-color:var(--green); margin:0; flex-shrink:0; }
.check-label { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; font-weight:450; line-height:1.7; }
.check-label .muted { font-size:.8rem; }
.panel-actions { display:flex; flex-wrap:wrap; gap:.6rem; }
.setup-section { background:var(--paper); padding:1.4rem 1.5rem; margin-bottom:1rem; border:1px solid var(--line); border-radius:.6rem; }
.setup-section>h2 { font-size:1.05rem; margin:0 0 1.1rem; }
.setup-section summary { cursor:pointer; font-size:.85rem; font-weight:600; }
.setup-section p { font-size:.85rem; color:var(--muted); line-height:1.75; }
.grants { margin:0; padding:1rem 1.25rem; background:#f9fbfc; }
.grants p { margin:.8rem 0 0; max-width:70rem; }
.connection-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.2rem; margin-top:1.25rem; align-items:start; }
.connection-card { background:var(--paper); border:1px solid var(--line); border-radius:.65rem; padding:1.35rem 1.5rem; min-width:0; }
.connection-card-head { display:flex; justify-content:space-between; align-items:center; gap:.7rem; border-bottom:1px solid #edf1f3; margin-bottom:1.15rem; padding-bottom:.9rem; }
.connection-card h2 { font-size:1.08rem; margin:.15rem 0 0; letter-spacing:-.02em; }
.connection-role { color:var(--muted); font-size:.74rem; }
.connection-fields { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:1rem; align-items:start; }
.connection-fields>label { grid-column:span 3; }
.connection-fields>.field-host { grid-column:span 4; }
.connection-fields>.field-port { grid-column:span 2; }
.connection-advanced { border-top:1px solid #edf1f3; margin-top:1.2rem; padding-top:.85rem; }
.connection-advanced summary { cursor:pointer; color:var(--muted); font-size:.8rem; }
.connection-advanced .connection-fields { margin-top:1rem; }
.connection-fields>.field-ca_file { grid-column:1/-1; }
.connection-result { display:block; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--muted); font-size:.78rem; line-height:1.7; margin:.8rem 0; }
.connection-result:empty { display:none; }
.connection-result[data-state=success] { color:var(--green); }
.connection-result[data-state=error] { color:var(--red); background:var(--red-soft); padding:.65rem; border-radius:.35rem; }
.connection-card>.panel-actions { justify-content:flex-end; margin-top:1rem; }
/* A saved value has a real masked state, never an empty input pretending to be saved. */
.secret-field { display:grid; gap:.3rem; min-width:0; width:100%; }
.secret-input { position:relative; display:flex; min-width:0; }
.secret-input input { width:100%; min-width:0; padding-right:2.65rem!important; font-family:var(--mono); font-size:.8rem; }
.secret-toggle { position:absolute; inset:1px 1px 1px auto; width:2.4rem; border:0; border-radius:0 .4rem .4rem 0; background:transparent; color:#587381; display:grid; place-items:center; padding:.6rem; }
.secret-toggle:hover:not(:disabled) { background:#e9f1f1; color:var(--green); }
.secret-toggle svg { width:1.05rem; height:1.05rem; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.secret-caption { display:flex; align-items:center; justify-content:space-between; gap:.5rem; min-height:1.3rem; font-size:.7rem; font-weight:400; }
.secret-status { color:var(--muted); }
.secret-field[data-saved=true]:not([data-replacing=true]) .secret-status { color:var(--green); }
.secret-field[data-replacing=true] .secret-status { color:var(--amber); }
.secret-edit { border:0; background:transparent; padding:0 .1rem; color:var(--green); font-size:.72rem; line-height:1.6; font-weight:550; }
.secret-edit:hover { text-decoration:underline; }
.secret-error { color:var(--red); font-size:.75rem; font-weight:400; overflow-wrap:anywhere; }
.secret-error:empty { display:none; }
.profile-form { display:grid; gap:1.1rem; margin:0; }
.profile-form .button { justify-self:start; }
.profile-form select { width:100%; font:inherit; }
.profile-form h2 { font-size:1.2rem; margin:0; }
.release-form { max-width:72rem; }
.release-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.release-form>[name=confirmation],.release-form>label:has(input[name=confirmation]) { max-width:30rem; width:100%; }
.token-output { display:block; overflow-wrap:anywhere; white-space:pre-wrap; margin-top:1rem; user-select:all; }
.release-request { padding:1rem 0; border-bottom:1px solid var(--line); }
.release-request p { overflow-wrap:anywhere; }
.records-section { padding-top:1.7rem; }
.records-section h2,.section-heading h2 { font-size:1.15rem; margin:.25rem 0; letter-spacing:-.02em; }
.section-heading { padding-bottom:.85rem; }
.job-row { width:100%; border:0; border-bottom:1px solid var(--line); background:var(--paper); text-align:left; display:grid; grid-template-columns:minmax(0,1.2fr) minmax(6rem,.6fr) minmax(11rem,1fr); gap:1rem; padding:.95rem 1.1rem; color:var(--ink); font-size:.85rem; align-items:center; }
.job-row:first-child { border-radius:.5rem .5rem 0 0; }
.job-row:hover { background:#ebf4f2; }
.job-row small { display:block; color:var(--muted); font:.73rem/1.7 var(--mono); margin-top:.2rem; }
.audit-item { display:block; padding:.85rem 1rem; font-size:.81rem; color:var(--muted); background:var(--paper); }
#jobs>.muted,#release-requests>.muted { padding:2rem; text-align:center; background:var(--paper); border:1px dashed var(--line); border-radius:.6rem; }
dialog { border:1px solid var(--line); border-radius:.8rem; padding:1.6rem; background:var(--paper); color:var(--ink); max-width:38rem; width:calc(100% - 2rem); box-shadow:0 14px 70px #27394726; }
dialog::backdrop { background:#152c3a66; }
dialog h2 { margin:0; font-size:1.2rem; }
dialog p { font-size:.86rem; line-height:1.8; }
dialog form { display:grid; gap:1rem; }
.drawer { margin:0 0 0 auto; max-width:42rem; height:100dvh; max-height:100dvh; border:0; border-left:1px solid var(--line); border-radius:0; padding:1.6rem; }
.drawer header { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.steps { list-style:none; padding:0; margin:2rem 0; }
.steps li { border-left:2px solid var(--line); padding:0 0 1.5rem 1.2rem; position:relative; font-size:.85rem; }
.steps li::before { content:''; position:absolute; left:-6px; top:0; width:10px; height:10px; border-radius:50%; background:var(--muted); }
.steps li[data-state=running]::before { background:var(--green); animation:pulse 1.5s infinite; }
.steps li[data-state=succeeded]::before { background:var(--green); }
.steps li[data-state=failed]::before { background:var(--red); }
.steps small { display:block; color:var(--muted); font-size:.73rem; margin-top:.4rem; }
.job-result { white-space:pre-wrap; overflow-wrap:anywhere; padding:1rem; background:#f3f6f8; border:1px solid var(--line); border-radius:.4rem; font:.76rem/1.8 var(--mono); max-height:24rem; overflow:auto; }
.login-frame { border-radius:.85rem; padding:2.1rem; box-shadow:0 14px 50px #293a4910; }
.login-frame h1 { font-size:1.65rem; line-height:1.4; }
.login-mark { margin-bottom:1.3rem; }
.login-form { margin-top:1.8rem; gap:1rem; }
.login-form .secret-input input { padding-right:2.65rem; }
.login-form .secret-caption { display:none; }
@media(max-width:1150px) {
 .console-app .topbar-inner { gap:1rem; padding:1rem 1.5rem .7rem; }
 .console-app .topbar nav { order:3; flex-basis:100%; overflow-x:auto; padding-bottom:.2rem; }
 .console-app .topbar nav a { font-size:.84rem; }
}
@media(max-width:800px) {
 .console-app .workspace { padding:1.4rem 1.1rem 3rem; }
 .connection-grid { grid-template-columns:1fr; }
 .connection-card { padding:1.2rem; }
 .release-fields { grid-template-columns:1fr 1fr; }
 .console-app .page-heading { align-items:start; flex-direction:column; gap:1rem; }
}
@media(max-width:480px) {
 .console-app .topbar-inner { padding:.8rem 1rem .5rem; }
 .console-app .workspace { padding:1.2rem .85rem 2.5rem; }
 .console-app .page-heading h1 { font-size:1.55rem; }
 .console-app .topbar nav a { padding:.6rem .7rem; }
 .connection-fields { gap:.85rem; }
 .connection-fields>.field-username,.connection-fields>.field-password,.connection-advanced .connection-fields>label { grid-column:1/-1; }
 .connection-card>.panel-actions { justify-content:stretch; }
 .connection-card>.panel-actions .button { flex:1; }
 .release-fields { grid-template-columns:1fr; }
 .job-row { grid-template-columns:minmax(0,1fr) auto; padding:.9rem; }
 .job-row>span:last-child { grid-column:1/-1; color:var(--muted); font-size:.75rem; }
 .setup-section { padding:1.1rem; }
 .drawer { padding:1.2rem; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { animation:none!important; transition:none!important; } }
