/* AI Workbench static HTML adapter: Button, Tabs, Filter, Card,
   Descriptions, Form, Radio and SideSheet. Uses the existing shell tokens. */
.data-page {
  height:100%; min-height:0; overflow-y:auto; scrollbar-gutter:stable;
  padding:28px 32px 36px; background:var(--surface);
}
.data-page svg, .data-overlay svg { width:16px; height:16px; flex-shrink:0; }
.data-page h1 { font-size:20px; font-weight:600; line-height:28px; color:var(--ink-strong); }
.data-page h2, .data-overlay h2 { font-size:16px; font-weight:600; line-height:24px; }
.data-overlay h3 { font-size:14px; font-weight:600; line-height:20px; }
.d-breadcrumb { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; margin-bottom:12px; }
.d-breadcrumb svg { width:12px; height:12px; color:var(--faint); }
.d-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:32px; }
.d-toolbar { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; margin-bottom:16px; }
.d-filters { display:flex; width:100%; align-items:center; justify-content:flex-start; gap:8px; flex-wrap:wrap; }
.d-filters .s-search { width:238px; min-width:200px; }
.d-filters .s-select { width:124px; }
.d-filters .s-select select { font-size:12px; padding-left:10px; }
.d-filters .s-select.source { width:150px; }
.d-filters .s-select.asset { width:166px; }
.d-filter-summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:16px; font-size:12px; color:var(--muted); }
.d-filter-chip { display:flex; align-items:center; gap:5px; min-height:24px; padding:2px 4px 2px 8px; border:1px solid var(--rule); border-radius:6px; color:var(--ink-soft); background:var(--surface-soft); }
.d-filter-chip button { height:18px; width:18px; padding:2px; border-radius:4px; background:transparent; color:var(--muted); cursor:pointer; }
.d-filter-chip button:hover { background:var(--surface-active); }
.d-filter-chip svg { width:12px; height:12px; }
.d-application-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr)); gap:12px; }
.d-application-card { display:flex; min-width:0; min-height:256px; flex-direction:column; padding:16px; border:1px solid var(--rule-soft); border-radius:8px; background:#fcfcfd; box-shadow:var(--shadow-card); cursor:pointer; transition:border-color 160ms ease,box-shadow 160ms ease,background-color 160ms ease; }
.d-application-card:hover { border-color:#92a0ff; background:var(--surface); box-shadow:var(--shadow-panel); }
.d-application-card[aria-selected=true] { border-color:var(--accent); background:var(--accent-faint); }
.d-card-head { display:flex; align-items:center; gap:8px; min-width:0; }
.d-card-icon { display:flex; width:40px; height:40px; flex:0 0 auto; align-items:center; justify-content:center; border-radius:8px; background:var(--accent-soft); color:var(--accent); }
.d-card-icon svg { width:20px; height:20px; }
.d-card-heading { display:flex; min-width:0; flex:1; flex-direction:column; gap:2px; }
.d-card-heading strong { overflow:hidden; color:var(--ink); font-size:14px; font-weight:500; line-height:20px; text-overflow:ellipsis; white-space:nowrap; }
.d-card-path { display:flex; min-width:0; align-items:center; gap:4px; overflow:hidden; color:var(--muted); font-size:12px; line-height:18px; text-overflow:ellipsis; white-space:nowrap; }
.d-card-path svg { width:11px; height:11px; }
.d-card-divider { height:1px; flex:0 0 auto; margin:12px 0; border-top:1px dashed var(--rule); }
.d-card-fields { display:flex; flex-direction:column; gap:12px; margin:0; }
.d-card-fields > div { display:grid; min-width:0; align-items:center; grid-template-columns:72px minmax(0,1fr); gap:8px; font-size:13px; line-height:20px; }
.d-card-fields dt { color:var(--muted); }
.d-card-fields dd { display:flex; min-width:0; align-items:center; gap:6px; margin:0; overflow:hidden; color:var(--ink); }
.d-card-fields .s-tag { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.d-card-meta { display:flex; min-width:0; align-items:center; justify-content:space-between; gap:12px; margin-top:auto; padding-top:12px; border-top:1px dashed var(--rule); color:var(--muted); font-size:12px; line-height:20px; }
.d-card-meta span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.d-card-meta span:last-child { text-align:right; }
.d-version { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.d-version-code { font-size:12px; font-variant-numeric:tabular-nums; }
.d-version .s-tag { font-size:11px; padding:1px 5px; min-height:20px; }
.d-status { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-size:12px; }
.d-status::before { content:""; width:6px; height:6px; border-radius:50%; background:#8aa093; }
.d-status.live { color:var(--success); }
.d-status.live::before { background:var(--success); }
.d-status.pending { color:var(--accent); }
.d-status.pending::before { background:var(--accent); }
.d-status.expiring { color:var(--warning); }
.d-status.expiring::before { background:var(--warning); }
.d-empty { text-align:center; margin-top:4px; padding:56px 16px; border:1px solid var(--rule-soft); border-radius:8px; background:var(--surface-soft); color:var(--muted); }
.d-empty > svg { width:32px; height:32px; margin:0 auto 12px; color:var(--faint); }
.d-empty strong { display:block; color:var(--ink-soft); font-weight:500; margin-bottom:4px; }
.d-empty p { margin-bottom:14px; font-size:12px; }
.data-overlay { position:fixed; inset:0; z-index:94; display:flex; justify-content:flex-end; background:rgba(9,9,11,.28); backdrop-filter:blur(2px); }
.d-sheet { width:min(684px,100vw); height:100dvh; min-height:0; display:flex; flex-direction:column; background:var(--surface); box-shadow:var(--shadow-float); border-left:1px solid var(--rule); animation:d-sheet-enter 200ms ease-out; }
.d-sheet-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; padding:18px 24px 14px; border-bottom:1px solid var(--rule); flex-shrink:0; }
.d-sheet-title { display:flex; align-items:center; gap:10px; min-width:0; }
.d-back { border:1px solid var(--rule); width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; background:var(--surface); color:var(--ink-soft); flex-shrink:0; }
.d-back:hover { background:var(--surface-hover); }
.d-sheet-body { flex:1; min-height:0; overflow-y:auto; padding:24px; overscroll-behavior:contain; }
.d-sheet-foot { display:flex; align-items:center; justify-content:flex-end; flex-shrink:0; gap:8px; padding:16px 24px; border-top:1px solid var(--rule); background:var(--surface); padding-bottom:max(16px,env(safe-area-inset-bottom)); }
.d-sheet-foot .d-foot-note { margin-right:auto; font-size:12px; color:var(--muted); }
.d-identity { margin-bottom:24px; }
.d-identity > small { color:var(--faint); font-size:12px; }
.d-identity h3 { font-size:18px; line-height:26px; margin:8px 0 12px; }
.d-identity-tags { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.d-detail-section { margin-top:24px; padding-top:24px; border-top:1px solid var(--rule-soft); }
.d-detail-section h3 { margin-bottom:14px; }
.d-detail-section > p { color:var(--ink-soft); line-height:24px; }
.d-description-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-top:24px; }
.d-description-grid > div { min-width:0; }
.d-description-grid dt { font-size:12px; color:var(--muted); margin-bottom:7px; }
.d-description-grid dd { font-size:14px; line-height:22px; word-break:break-word; }
.d-description-grid dd small { display:block; color:var(--muted); margin-top:4px; font-size:12px; }
.d-steps { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.d-step { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }
.d-step > span { display:flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; background:var(--surface-tint); font-size:12px; }
.d-step.active { color:var(--ink); font-weight:500; }
.d-step.active > span { color:var(--surface); background:var(--black-button); }
.d-step.done > span { color:var(--success); background:var(--success-soft); }
.d-step-line { height:1px; background:var(--rule); flex:1; }
.d-form-section + .d-form-section { margin-top:28px; padding-top:24px; border-top:1px solid var(--rule-soft); }
.d-form-section h3 { margin-bottom:20px; }
.d-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.d-field { display:flex; flex-direction:column; gap:8px; min-width:0; }
.d-field.full { grid-column:1/-1; }
.d-field > label, .d-field > legend { font-size:13px; font-weight:500; color:var(--ink); }
.d-field em { font-style:normal; color:var(--danger); margin-left:2px; }
.d-field input:not([type=radio]), .d-field textarea { width:100%; border:1px solid var(--rule); border-radius:8px; padding:8px 12px; background:var(--surface); outline:0; font-size:14px; }
.d-field input:not([type=radio]) { height:36px; }
.d-field textarea { min-height:100px; line-height:22px; resize:vertical; }
.d-field input[readonly] { color:var(--muted); background:var(--surface-soft); }
.d-field input:focus, .d-field textarea:focus { border-color:var(--faint); box-shadow:0 0 0 2px var(--surface-active); }
.d-field input[aria-invalid=true], .d-field textarea[aria-invalid=true] { border-color:var(--danger); }
.d-field .s-select select { font-size:14px; }
.d-field small { color:var(--muted); font-size:12px; line-height:20px; }
.d-field .d-error { color:var(--danger); font-size:12px; }
.d-text-help { display:flex; justify-content:space-between; gap:12px; }
.d-version-group { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.d-version-option { display:flex; min-height:48px; align-items:center; gap:10px; border:1px solid var(--rule); border-radius:8px; padding:12px 14px; cursor:pointer; }
.d-version-option:has(input:checked) { background:var(--accent-faint); border-color:var(--accent); }
.d-version-option input { accent-color:var(--accent); flex-shrink:0; }
.d-version-option strong { font-size:13px; font-weight:500; }
fieldset.d-field { border:0; }
.d-field > legend { margin-bottom:8px; }
.d-inline-note { display:flex; align-items:flex-start; gap:8px; background:var(--surface-soft); padding:12px; border-radius:8px; color:var(--muted); font-size:12px; line-height:20px; margin-top:16px; }
.d-inline-note svg { margin-top:2px; color:var(--faint); }
.d-confirm-title { margin-bottom:16px; }
.d-confirm-card { border:1px solid var(--rule); border-radius:12px; padding:20px; margin-bottom:20px; }
.d-confirm-card .d-description-grid { margin:0; gap:20px; }
.d-confirm-card .d-description-grid .full { grid-column:1/-1; }
.d-confirm-card dd { font-size:13px; white-space:pre-wrap; }
.d-approval-flow { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:14px; background:var(--surface-soft); border-radius:8px; font-size:12px; color:var(--muted); }
.d-success { padding:28px 0; text-align:center; }
.d-success-mark { display:flex; align-items:center; justify-content:center; width:48px; height:48px; margin:0 auto 16px; border-radius:50%; background:var(--success-soft); color:var(--success); }
.d-success-mark svg { width:24px; height:24px; }
.d-success h3 { font-size:18px; margin-bottom:8px; }
.d-success p { color:var(--muted); font-size:13px; line-height:22px; }
.d-success-card { text-align:left; margin-top:28px; }
@keyframes d-sheet-enter { from { opacity:0; transform:translateX(12px); } to { opacity:1; transform:translateX(0); } }
@media (max-width:1280px) {
  .data-page { padding:24px; }
}
@media (max-width:760px) {
  .data-page { height:calc(100dvh - 56px); padding:20px 16px 32px; }
  .d-head { align-items:center; gap:10px; margin-bottom:24px; }
  .d-head .s-button { font-size:12px; height:32px; padding:0 10px; gap:5px; }
  .d-toolbar { gap:12px; }
  .d-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .d-filters .s-search { grid-column:1/-1; width:100%; min-width:0; }
  .d-filters .s-select, .d-filters .s-select.asset, .d-filters .s-select.source { width:100%; }
  .d-filters > .s-button { justify-self:start; }
  .d-sheet-head { padding:16px; }
  .d-sheet-body { padding:20px 16px; }
  .d-sheet-foot { padding:12px 16px; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
  .d-sheet-foot .d-foot-note { font-size:11px; }
  .d-form-grid { grid-template-columns:1fr; gap:20px; }
  .d-version-group { grid-template-columns:1fr; }
  .d-description-grid { grid-template-columns:1fr; gap:20px 16px; }
  .d-confirm-card { padding:16px; }
}
@media (prefers-reduced-motion:reduce) { .d-sheet { animation:none; } }
