/* Forms, editor, alerts, detail widgets – split from app.css (same variables). */
/* Forms */
.fieldset { margin: 0; padding: 20px 24px; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); }
.fieldset legend { padding: 0 6px; font-weight: 600; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 600; }
.field input, .field select { min-height: 40px; padding: 0 10px; border: 1px solid var(--slate-300); border-radius: 6px; font: inherit; background: #fff; }
.field__row { display: flex; gap: 8px; align-items: center; }
.field__row input { flex: 1; }
.credential { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.credential code { word-break: break-all; }
.json-viewer__secrets { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.field [aria-invalid="true"] { border-color: var(--red-800); box-shadow: 0 0 0 2px var(--red-100); }
.field__hint { font-size: 12px; color: var(--slate-600); }
.field__hint--error { color: var(--red-800); font-weight: 600; }
.preview-box { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px dashed var(--slate-300); border-radius: 8px; background: var(--slate-50); }
.json-editor { width: 100%; padding: 12px; border: 1px solid var(--slate-300); border-radius: var(--radius); font: 12px/1.6 var(--mono); }

/* Editor */
.tabs { display: inline-flex; align-self: flex-start; padding: 4px; border-radius: 8px; background: var(--slate-200); }
.tab { min-height: 36px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; font: inherit; color: var(--slate-700); cursor: pointer; }
.tab[aria-selected="true"] { background: #fff; color: var(--slate-900); font-weight: 600; }
.editor-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.editor-layout__main { flex: 999 1 520px; min-width: 0; }
.preview { flex: 1 1 320px; min-width: 0; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: var(--radius); background: var(--slate-900); color: var(--slate-200); }
.preview__line { color: var(--indigo-200); }
.preview__body { margin: 0; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; }

/* Alerts, JSON viewer, toasts */
.alert { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-radius: 8px; border: 1px solid; }
.alert--danger { background: var(--red-50); border-color: var(--red-200); color: var(--red-900); }
.alert--success { background: var(--green-50); border-color: var(--green-200); color: var(--green-900); }
.alert--info { display: block; background: var(--indigo-50); border-color: var(--indigo-200); color: var(--indigo-900); }
.json-viewer { padding: 14px 20px; border-radius: var(--radius); background: var(--slate-900); color: var(--slate-200); }
.json-viewer summary { cursor: pointer; font-weight: 600; }
.json-viewer pre { margin: 12px 0 0; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; }
.alert .json-viewer { margin-top: 6px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 10; }
.toast { padding: 12px 16px; border-radius: 8px; color: #fff; background: var(--slate-900); box-shadow: 0 4px 12px rgb(15 23 42 / 0.2); }
.toast--success { background: var(--green-800); }
.toast--info { background: var(--slate-700); }

/* Card header, relationship bar */
.card__header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--slate-200); }
.relation-bar { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; }
.relation-bar__step { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; color: var(--slate-900); text-decoration: none; border-right: 1px solid var(--slate-200); }
.relation-bar__step:last-child { border-right: 0; }
a.relation-bar__step:hover { background: var(--slate-50); color: var(--slate-900); }
.relation-bar__step--current { background: var(--indigo-50); }
.relation-bar__label { font-size: 12px; font-weight: 600; color: var(--slate-600); text-transform: uppercase; letter-spacing: 0.04em; }
.relation-bar__title { font-weight: 600; }
.relation-bar__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.field textarea { padding: 8px 10px; border: 1px solid var(--slate-300); border-radius: 6px; font: inherit; }
.search select { min-height: 36px; padding: 0 8px; border: 1px solid var(--slate-300); border-radius: 6px; font: inherit; background: #fff; }

/* Orders & products */
.btn--danger { background: #fff; color: var(--red-800); border-color: var(--red-200); }
.btn--danger:hover { background: var(--red-50); color: var(--red-900); }
.btn--small { min-height: 32px; padding: 0 10px; font-size: 12px; }
.status-with-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.action-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--slate-100); font-size: 12px; font-weight: 600; white-space: nowrap; }
.item-line + .item-line { margin-top: 4px; }
.reason--progress { color: var(--blue-800); font-weight: 600; }
.alert__hint { font-weight: 600; }
.toast--error { background: var(--red-800); }
.sidebar__quit .btn { width: 100%; justify-content: center; }
.stopped { max-width: 480px; margin: 20vh auto; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.sidebar__vendor { display: flex; flex-direction: column; gap: 6px; text-decoration: none; opacity: 0.85; }
.sidebar__vendor:hover, .sidebar__vendor:focus-visible { opacity: 1; }
.sidebar__vendor img { width: 120px; height: auto; }
.about-vendor__logo { width: 195px; height: auto; }
.help-toggle { margin-left: 6px; padding: 0 4px; border: 0; background: none; color: var(--indigo-600, #4f46e5); font: inherit; font-weight: 400; cursor: pointer; border-radius: 4px; }
.help-toggle:hover, .help-toggle[aria-expanded="true"] { background: var(--indigo-50); }
.field__help { padding: 8px 10px; border-left: 3px solid var(--indigo-200); background: var(--indigo-50); color: var(--slate-700, #334155); font-size: 13px; border-radius: 4px; }
.sidebar__signout { width: 100%; justify-content: center; }
