/* Continuum Automations operations workspace v7.
   Final Lab operating layer over the accepted v5 model and v3/v4 compatibility UI. */

:root{
  --v7-blue:var(--v4-blue,#4da3ff);
  --v7-blue-soft:color-mix(in srgb,var(--v7-blue) 13%,transparent);
  --v7-green:var(--v4-green,#5ee6b3);
  --v7-amber:var(--v4-amber,#eeb867);
  --v7-red:var(--v4-red,#ff7d86);
}

/* Dashboard should read like a control application, not a product landing page. */
.v3-dashboard[data-operations-v7="ready"]{
  padding-top:18px;
  padding-bottom:80px;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  min-height:0;
  margin:0;
  padding:14px 0 16px;
  border:0;
  background:none;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head>div{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:
    "eyebrow eyebrow"
    "title copy";
  align-items:baseline;
  gap:3px 18px;
  min-width:0;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head .v3-eyebrow{
  grid-area:eyebrow;
  color:var(--v7-blue);
  font-size:9px;
  font-weight:950;
  letter-spacing:.13em;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head h1{
  grid-area:title;
  margin:0;
  color:var(--v4-text);
  font-size:clamp(24px,3vw,32px);
  line-height:1.05;
  letter-spacing:-.045em;
  white-space:nowrap;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head h1 br,
.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head h1 em{
  display:none;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head p{
  grid-area:copy;
  margin:0;
  max-width:760px;
  color:var(--v4-muted);
  font-size:12px;
  line-height:1.5;
}

.v3-dashboard[data-operations-v7="ready"] .v7-workspace-head [data-new]{
  min-height:42px;
  padding:0 16px;
  border-radius:11px;
  white-space:nowrap;
  box-shadow:none;
}

.v7-workspace-nav{
  position:sticky;
  top:62px;
  z-index:30;
  padding:9px 0;
  border-top:1px solid var(--v4-border);
  border-bottom:1px solid var(--v4-border);
  background:color-mix(in srgb,var(--v4-surface) 92%,transparent);
  backdrop-filter:blur(14px);
}

.v7-workspace-nav .v4-workspace-tabs button{
  min-height:36px;
}

.v7-workspace-nav .v4-search,
.v7-workspace-nav .v4-catalog-button{
  height:36px;
}

/* Workspace status and operational filters. */
.v7-operations-bar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 0 13px;
  border-bottom:1px solid var(--v4-border);
}

.v7-ops-summary{
  display:flex;
  align-items:stretch;
  gap:6px;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
}
.v7-ops-summary::-webkit-scrollbar{display:none}

.v7-ops-summary>span{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:auto auto;
  align-items:baseline;
  gap:5px;
  min-height:34px;
  padding:7px 9px;
  border:1px solid var(--v4-border);
  border-radius:9px;
  background:var(--v4-surface-2);
}

.v7-ops-summary small{
  color:var(--v4-dim);
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
}
.v7-ops-summary strong{
  color:var(--v4-text);
  font-size:12px;
  font-variant-numeric:tabular-nums;
}
.v7-ops-summary .is-ready strong{color:var(--v7-green)}
.v7-ops-summary .is-attention strong{color:var(--v7-amber)}
.v7-ops-summary .is-runtime strong{color:var(--v7-blue)}

.v7-ops-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.v7-filter-group{
  display:flex;
  gap:3px;
  padding:3px;
  border:1px solid var(--v4-border);
  border-radius:10px;
  background:var(--v4-surface-2);
}

.v7-filter-group button,
.v7-manage-button{
  appearance:none;
  min-height:31px;
  padding:0 9px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--v4-muted);
  font:inherit;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.v7-filter-group button:hover,
.v7-filter-group button:focus-visible,
.v7-filter-group button.is-active{
  border-color:var(--v4-border-strong);
  background:var(--v7-blue-soft);
  color:var(--v4-text);
  outline:none;
}

.v7-manage-button{
  display:flex;
  align-items:center;
  gap:6px;
  border-color:var(--v4-border);
  background:var(--v4-surface-2);
  color:var(--v4-text);
}
.v7-manage-button:hover,
.v7-manage-button:focus-visible{
  border-color:var(--v4-border-strong);
  background:var(--v7-blue-soft);
  outline:none;
}
.v7-manage-button b{
  display:grid;
  place-items:center;
  min-width:20px;
  height:20px;
  border-radius:999px;
  background:var(--v4-surface-3);
  color:var(--v7-blue);
  font-size:8px;
}

/* Remove the old dashboard status-card billboard. V7 owns the compact operational summary. */
.v3-dashboard[data-operations-v7="ready"] .v3-system-deck{
  display:none!important;
}

.v3-dashboard[data-operations-v7="ready"] .v3-system-section-head{
  margin-top:16px;
  margin-bottom:8px;
}
.v3-dashboard[data-operations-v7="ready"] .v3-system-section-head h2{
  font-size:16px;
}
.v3-dashboard[data-operations-v7="ready"] .v3-system-section-head>small{
  font-size:10px;
}

/* Automation list becomes denser and carries real local readiness. */
.v3-dashboard[data-operations-v7="ready"] .v3-drafts{
  gap:8px;
}

.v7-automation-row{
  position:relative;
  min-height:0!important;
  padding:14px 15px!important;
  border-radius:14px!important;
  box-shadow:none!important;
  text-align:left;
}

.v7-automation-row:hover,
.v7-automation-row:focus-visible{
  transform:none!important;
  border-color:var(--v4-border-strong)!important;
  background:color-mix(in srgb,var(--v4-surface-2) 88%,var(--v7-blue) 12%)!important;
  outline:none;
}

.v7-automation-row .v3-card-head{
  align-items:center;
  margin-bottom:5px;
}
.v7-automation-row .v3-card-head strong{
  font-size:14px!important;
  line-height:1.25;
}
.v7-automation-row .v3-card-head small{
  color:var(--v4-dim)!important;
  font-size:8px!important;
  letter-spacing:.09em;
}
.v7-automation-row .v3-card-head em{
  font-size:9px!important;
}
.v7-automation-row>p{
  margin:5px 0 8px!important;
  max-width:920px;
  color:var(--v4-muted)!important;
  font-size:10px!important;
  line-height:1.45!important;
}
.v7-automation-row .v3-card-foot{
  margin-top:8px!important;
  padding-top:8px!important;
  border-top:1px solid var(--v4-border);
}
.v7-automation-row .v3-card-foot b,
.v7-automation-row .v3-card-foot small{
  font-size:9px!important;
}

.v7-card-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  margin:6px 0 5px;
}
.v7-card-meta>span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:24px;
  padding:3px 7px;
  border:1px solid var(--v4-border);
  border-radius:999px;
  background:var(--v4-surface-3);
  color:var(--v4-muted);
  font-size:8px;
  font-weight:800;
  white-space:nowrap;
}
.v7-card-meta>small{
  flex:1 1 220px;
  min-width:0;
  color:var(--v4-dim);
  font-size:9px;
  line-height:1.4;
  text-align:right;
}
.v7-card-meta .is-runtime{color:var(--v7-blue)}
.v7-readiness i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
.v7-readiness.is-ready{color:var(--v7-green)!important}
.v7-readiness.is-needs-setup{color:var(--v7-amber)!important}

.v7-filter-empty{
  display:grid;
  place-items:center;
  gap:4px;
  min-height:160px;
  padding:28px;
  border:1px dashed var(--v4-border);
  border-radius:14px;
  color:var(--v4-muted);
  text-align:center;
}
.v7-filter-empty strong{color:var(--v4-text);font-size:13px}
.v7-filter-empty span{font-size:10px}

/* Templates become a tool drawer, not another landing section. */
.v7-template-workspace{
  padding-top:18px!important;
}
.v7-template-workspace .v4-template-intro{
  align-items:center;
  padding:0 0 12px;
}
.v7-template-workspace .v4-template-intro strong{
  font-size:16px;
}
.v7-template-workspace .v4-template-intro p{
  font-size:10px;
}
.v7-template-workspace .v3-template-strip{
  gap:8px!important;
}
.v7-template-workspace .v3-template{
  min-height:116px!important;
  padding:13px!important;
  border-radius:13px!important;
  box-shadow:none!important;
}
.v7-template-workspace .v3-template strong{font-size:12px!important}
.v7-template-workspace .v3-template small{font-size:9px!important;line-height:1.4!important}
.v7-template-workspace .v3-template b{font-size:8px!important}

/* Runs is intentionally an operational empty table. */
.v4-runs-panel[data-v7-runs="ready"]{
  gap:8px;
  padding:18px 0;
}
.v4-runs-panel[data-v7-runs="ready"] .v4-runs-head{
  align-items:center;
  padding:14px 15px;
  border-radius:13px;
  box-shadow:none;
}
.v4-runs-panel[data-v7-runs="ready"] .v4-runs-head h2{
  font-size:17px;
}
.v4-runs-panel[data-v7-runs="ready"] .v4-runs-head p{
  max-width:760px;
  font-size:10px;
}
.v7-run-columns{
  display:grid;
  grid-template-columns:82px 52px minmax(0,1fr) auto;
  gap:12px;
  padding:0 14px;
  color:var(--v4-dim);
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
}
.v4-runs-panel[data-v7-runs="ready"] .v4-run-preview{
  box-shadow:none;
}

/* Editor status makes the working truth visible without another explanatory block. */
.v3-editor-page[data-operations-v7="ready"] .v3-editor-shell{
  padding-top:12px;
}
.v7-editor-status{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin:8px 0 12px;
  padding:5px;
  border:1px solid var(--v4-border);
  border-radius:11px;
  background:var(--v4-surface-2);
}
.v7-editor-status>span{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:30px;
  padding:4px 7px;
  border-radius:7px;
  background:var(--v4-surface-3);
}
.v7-editor-status small{
  color:var(--v4-dim);
  font-size:7px;
  font-weight:900;
  letter-spacing:.08em;
}
.v7-editor-status strong{
  color:var(--v7-green);
  font-size:8px;
  letter-spacing:.04em;
  text-align:right;
}
.v7-editor-status .is-off strong{color:var(--v7-amber)}

.v7-review-readiness{
  display:grid;
  gap:10px;
  margin-bottom:12px;
  padding:13px;
  border:1px solid var(--v4-border-strong);
  border-radius:13px;
  background:linear-gradient(145deg,var(--v7-blue-soft),var(--v4-surface-2));
}
.v7-review-readiness header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.v7-review-readiness header>div{display:grid;gap:3px}
.v7-review-readiness header span{
  color:var(--v7-blue);
  font-size:8px;
  font-weight:950;
  letter-spacing:.1em;
}
.v7-review-readiness header strong{
  color:var(--v4-text);
  font-size:13px;
}
.v7-review-readiness header>b{
  padding:5px 7px;
  border-radius:999px;
  background:var(--v4-surface-3);
  color:var(--v7-green);
  font-size:8px;
  letter-spacing:.06em;
}
.v7-review-readiness ul{
  display:grid;
  gap:5px;
  margin:0;
  padding:0;
  list-style:none;
}
.v7-review-readiness li{
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--v7-amber);
  font-size:10px;
}
.v7-review-readiness li i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
.v7-review-readiness li.is-good{color:var(--v7-green)}
.v7-review-readiness footer{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding-top:8px;
  border-top:1px solid var(--v4-border);
}
.v7-review-readiness footer span{
  padding:4px 6px;
  border-radius:999px;
  background:var(--v4-surface-3);
  color:var(--v4-muted);
  font-size:8px;
}
.v7-review-readiness footer .is-runtime{color:var(--v7-blue)}

/* Local management surface. */
.v7-manage-backdrop{
  position:fixed;
  inset:0;
  z-index:6200;
  display:grid;
  place-items:center;
  padding:16px;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(12px);
}
.v7-manage-modal{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  width:min(880px,100%);
  max-height:min(760px,calc(100dvh - 32px));
  overflow:hidden;
  border:1px solid var(--v4-border-strong);
  border-radius:18px;
  background:var(--v4-surface);
  color:var(--v4-text);
  box-shadow:0 28px 90px rgba(0,0,0,.46);
}
.v7-manage-modal>header{
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:18px;
  padding:17px 18px;
  border-bottom:1px solid var(--v4-border);
  background:var(--v4-surface-2);
}
.v7-manage-modal>header>div{display:grid;gap:4px}
.v7-manage-modal>header span{
  color:var(--v7-blue);
  font-size:8px;
  font-weight:950;
  letter-spacing:.12em;
}
.v7-manage-modal h2{
  margin:0;
  font-size:20px;
  letter-spacing:-.03em;
}
.v7-manage-modal>header p{
  margin:0;
  max-width:650px;
  color:var(--v4-muted);
  font-size:10px;
  line-height:1.45;
}
.v7-manage-modal>header>button{
  width:40px;
  height:40px;
  border:1px solid var(--v4-border);
  border-radius:10px;
  background:var(--v4-surface-3);
  color:var(--v4-text);
  font:inherit;
  font-size:20px;
  cursor:pointer;
}
.v7-manage-list{
  display:grid;
  align-content:start;
  gap:6px;
  overflow:auto;
  padding:10px;
}
.v7-manage-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:12px;
  border:1px solid var(--v4-border);
  border-radius:12px;
  background:var(--v4-surface-2);
}
.v7-manage-copy{display:grid;gap:3px;min-width:0}
.v7-manage-copy>span{
  color:var(--v4-dim);
  font-size:7px;
  font-weight:950;
  letter-spacing:.1em;
}
.v7-manage-copy strong{
  overflow:hidden;
  color:var(--v4-text);
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.v7-manage-copy small{
  color:var(--v4-muted);
  font-size:9px;
}
.v7-manage-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  flex-wrap:wrap;
}
.v7-manage-actions button,
.v7-manage-modal>footer button{
  min-height:34px;
  padding:0 10px;
  border:1px solid var(--v4-border);
  border-radius:8px;
  background:var(--v4-surface-3);
  color:var(--v4-text);
  font:inherit;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}
.v7-manage-actions button:hover,
.v7-manage-actions button:focus-visible,
.v7-manage-modal>footer button:hover,
.v7-manage-modal>footer button:focus-visible{
  border-color:var(--v4-border-strong);
  background:var(--v7-blue-soft);
  outline:none;
}
.v7-manage-actions button.is-danger{
  border-color:color-mix(in srgb,var(--v7-red) 38%,var(--v4-border));
  color:var(--v7-red);
}
.v7-manage-modal>footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-top:1px solid var(--v4-border);
  background:var(--v4-surface-2);
}
.v7-manage-modal>footer span{
  color:var(--v7-amber);
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
}
.v7-manage-empty{
  display:grid;
  place-items:center;
  gap:4px;
  min-height:180px;
  color:var(--v4-muted);
  text-align:center;
}
.v7-manage-empty strong{color:var(--v4-text);font-size:13px}
.v7-manage-empty span{font-size:10px}

html[data-theme="light"] .v7-manage-backdrop{
  background:rgba(11,27,44,.42);
}

@media(max-width:980px){
  .v7-workspace-nav{
    top:58px;
  }
  .v7-operations-bar{
    grid-template-columns:1fr;
  }
  .v7-ops-actions{
    justify-content:space-between;
  }
  .v7-filter-group{
    min-width:0;
    overflow-x:auto;
  }
}

@media(max-width:760px){
  .v3-dashboard[data-operations-v7="ready"]{
    padding-top:6px;
    padding-bottom:72px;
  }
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head{
    grid-template-columns:1fr auto;
    gap:10px;
    padding:10px 0 12px;
  }
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head>div{
    grid-template-columns:1fr;
    grid-template-areas:"eyebrow" "title";
  }
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head h1{
    font-size:23px;
  }
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head p{
    display:none;
  }
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head [data-new]{
    min-height:40px;
    padding:0 12px;
    font-size:10px;
  }
  .v7-workspace-nav{
    position:static;
    grid-template-columns:1fr;
    gap:7px;
    padding:8px 0;
    background:transparent;
    backdrop-filter:none;
  }
  .v7-workspace-nav .v4-workspace-tools{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    width:100%;
  }
  .v7-workspace-nav .v4-search{
    min-width:0;
    width:100%;
  }
  .v7-operations-bar{
    gap:9px;
    padding:9px 0 11px;
  }
  .v7-ops-summary>span{
    min-height:32px;
    padding:6px 8px;
  }
  .v7-ops-actions{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:6px;
  }
  .v7-filter-group{
    overflow-x:auto;
    scrollbar-width:none;
  }
  .v7-filter-group::-webkit-scrollbar{display:none}
  .v7-filter-group button{
    flex:0 0 auto;
    min-height:34px;
  }
  .v7-manage-button{
    min-height:40px;
  }
  .v7-automation-row{
    padding:12px!important;
  }
  .v7-card-meta>small{
    flex-basis:100%;
    text-align:left;
  }
  .v7-automation-row .v3-mini-flow,
  .v7-automation-row .v3-card-flow{
    margin-top:7px!important;
  }
  .v7-editor-status{
    grid-template-columns:1fr 1fr;
  }
  .v7-editor-status>span{
    min-height:34px;
  }
  .v7-run-columns{
    display:none;
  }
  .v4-runs-panel[data-v7-runs="ready"] .v4-run-preview>div{
    grid-template-columns:62px 42px minmax(0,1fr)!important;
  }
  .v4-runs-panel[data-v7-runs="ready"] .v4-run-preview small{
    grid-column:3;
  }
  .v7-manage-backdrop{
    align-items:end;
    padding:0;
  }
  .v7-manage-modal{
    width:100%;
    max-height:92dvh;
    border-radius:18px 18px 0 0;
  }
  .v7-manage-row{
    grid-template-columns:1fr;
    gap:9px;
  }
  .v7-manage-actions{
    justify-content:flex-start;
  }
  .v7-manage-actions button{
    min-height:40px;
  }
}

@media(max-width:420px){
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head [data-new]{
    width:42px;
    padding:0;
    overflow:hidden;
    color:transparent;
    font-size:0;
  }
  .v3-dashboard[data-operations-v7="ready"] .v7-workspace-head [data-new]::after{
    content:"+";
    color:var(--v4-text);
    font-size:20px;
  }
  .v7-ops-summary small{font-size:7px}
  .v7-ops-summary strong{font-size:11px}
  .v7-filter-group button{padding:0 8px;font-size:8px}
  .v7-manage-button{padding:0 9px}
  .v7-review-readiness header{
    align-items:flex-start;
  }
}

@media(prefers-reduced-motion:reduce){
  .v7-automation-row,
  .v7-filter-group button,
  .v7-manage-actions button{transition:none!important}
}
