/* ATHAKIL studio · shared presentation, without changing canvas geometry. */
:root {
  --studio-bg: #f3eff1;
  --studio-surface: #ffffff;
  --studio-ink: #332a30;
  --studio-muted: #746970;
  --studio-line: #e9e1e5;
  --studio-shadow: 0 4px 18px #38212c06, 0 1px 3px #38212c04;
  --studio-raised: 0 12px 28px #38212c10, 0 2px 7px #38212c06;
  --studio-radius: 16px;
  --studio-ease: cubic-bezier(.22, 1, .36, 1);
  --studio-fast: 160ms;
  --studio-enter: 340ms;
  --text-secondary: var(--studio-muted);
  --accent-soft: var(--accent-faint);
}
body { background: var(--studio-bg); color: var(--studio-ink); }
.app-shell { padding: 12px; gap: 12px; }
.main { border: 1px solid var(--studio-line); border-radius: 20px; overflow: hidden; box-shadow: var(--studio-shadow); }
.sidebar {
  width: 238px; border-radius: 20px; padding: 24px 16px 0;
  background: radial-gradient(ellipse at 0 0, #452a36 0, transparent 50%), var(--sidebar);
  border: 1px solid #ffffff0a; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--sidebar-border) transparent;
}
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { display: flex; padding: 0 9px 25px; gap: 12px; }
.sidebar .brand-mark { width: 42px; }
.sidebar .brand strong { font-size: 17px; letter-spacing: 2px; }
.sidebar .brand small { font-size: 11px; letter-spacing: 2px; }
.workspace-picker { border-radius: 12px; padding: 12px 10px; background: #ffffff04; }
.workspace-picker:hover { border-color: #8d5d70; background: #ffffff08; }
.workspace-icon { border-radius: 9px; }
.sidebar-section-label { font-size: 10px; letter-spacing: 1.7px; color: #ae929f; margin-top: 24px; }
.primary-nav { gap: 5px; }
.primary-nav .nav-item { position: relative; border-radius: 10px; padding: 11px 12px; font-size: 12px; gap: 11px; }
.nav-item.active { background: #5e3345; color: #fff1f5; box-shadow: inset 0 0 0 1px #ffffff09; }
.nav-item.active::before { content: ''; position: absolute; left: 0; width: 3px; height: 17px; border-radius: 3px; background: var(--brand-pink); }
.nav-count { border-radius: 6px; background: #ffffff0c; color: #edcad7; }
.workflow-item { border-radius: 9px; }
.sidebar .sidebar-help { padding: 10px 8px; font-size: 11px; color: #bba5b0; }
.sidebar .sidebar-help:hover { color: #fff1f5; }
.sidebar .sidebar-help > span { border-radius: 5px; font-size: 10px; padding: 2px 5px; }
.sidebar-spacer { min-height: 18px; }
.sidebar .prototype-card { display: none; }
.profile { margin: 12px 0 0; padding: 17px 4px; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; background: #563043; color: #ffdce6; }
.topbar { height: 60px; padding: 0 28px; background: #fff; }
.breadcrumb { gap: 10px; font-size: 11px; color: var(--studio-muted); }
.breadcrumb strong { color: var(--studio-ink); font-weight: 600; }
.preview-badge { border-radius: 20px; padding: 6px 10px; font-size: 10px; color: #64565e; background: #faf7f8; border-color: var(--studio-line); }
.statusbar { min-height: 29px; color: #776b73; font-size: 10px; background: #fff; }
.dashboard-view,.billing-view,.trash-view,.accounts-view,.library-view,.clients-view,.credentials-view,.executions-view {
  padding: 32px; background: linear-gradient(135deg, #fffafb 0, #f8f6f7 40%, #f8f6f7 100%);
  scrollbar-gutter: stable;
}
.page-heading { align-items: flex-start; gap: 24px; margin-bottom: 30px; }
.page-heading > div:first-child { min-width: 0; }
.page-eyebrow { color: var(--accent-text); letter-spacing: 1.8px; font-size: 10px; margin-bottom: 12px; }
.page-heading h1 { font-size: clamp(25px, 2.4vw, 34px); letter-spacing: -1.15px; color: var(--studio-ink); line-height: 1.2; }
.page-heading p { color: var(--studio-muted); font-size: 13px; line-height: 1.8; max-width: 650px; }
.page-actions { padding-top: 5px; align-items: center; }
.button { min-height: 39px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.button.primary { border-color: #b53349; background: linear-gradient(145deg, #d14257, #bd344b); box-shadow: 0 4px 10px #b5334920, inset 0 1px #ffffff22; }
.button.primary:hover { background: linear-gradient(145deg, #c43a50, #aa2d43); box-shadow: 0 6px 15px #b533492c; }
.button.secondary { border-color: #e4dce1; color: #54444e; box-shadow: 0 1px 3px #38212c04; }
.button.secondary:hover { background: #fff8fa; border-color: #d3a8b8; }
.button:disabled { transform: none!important; box-shadow: none; }
.icon-button { border-radius: 8px; }
.text-button { font-weight: 550; }
:is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid var(--brand-rose); outline-offset: 3px; }
.ops-metrics { gap: 16px; margin-bottom: 24px; }
.ops-metric { position: relative; padding: 24px; border: 1px solid var(--studio-line); border-radius: var(--studio-radius); box-shadow: var(--studio-shadow); }
.ops-metric > span:first-child { display: block; min-height: 30px; padding-right: 38px; color: #64565f; font-size: 12px; }
.ops-metric > strong { margin: 12px 0 9px; color: var(--studio-ink); font-size: 38px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -1.5px; }
.ops-metric small { font-size: 11px; color: var(--studio-muted); }
.ops-metric .metric-symbol { position: absolute; right: 20px; top: 20px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #f8f1f4; color: #a76379; }
.metric-symbol svg { width: 16px; height: 16px; }
.ops-metric.accent { background: linear-gradient(130deg, #512c3c, #33242d); border-color: #5b3445; box-shadow: 0 10px 22px #38212c16; }
.ops-metric.accent > span:first-child,.ops-metric.accent small { color: #e3c6d1; }
.ops-metric.accent > strong { color: #fff5f8; }
.ops-metric.accent .metric-symbol { color: #ffd2e1; background: #ffffff0e; }
.ops-panel,.table-container,.client-card,.credential-card { border-color: var(--studio-line); border-radius: var(--studio-radius); box-shadow: var(--studio-shadow); }
.ops-panel-heading { padding: 22px 24px; border-color: #f0e9ec; }
.ops-panel-heading h2 { color: #43323d; font-size: 15px; }
.ops-panel-heading p,.ops-caption { color: var(--studio-muted); }
.ops-row { border-color: #f2edf0; }
.ops-row-icon { border-radius: 11px; }
.ops-grow strong { color: #493943; }
.ops-grow small,.ops-empty p,.ops-footnote { color: var(--studio-muted); }
.ops-empty > span { border: 1px solid #f1dfe5; border-radius: 14px; width: 48px; height: 48px; }
.ops-empty strong { color: #58464f; }
.ops-pill,.status-pill,.target-badge { border-radius: 7px; }
.workspace-table thead th { background: #fcfafb; color: #776570; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; border-color: #eee6ea; padding-top: 15px; padding-bottom: 15px; }
.workspace-table td { border-color: #f0e9ed; }
.workspace-table tbody tr:hover { background: #fff9fb; }
.ops-panel .ops-table { box-shadow: none; border-radius: 0; }
.server-performance { border: 1px solid #e7dbe2; background: #fff; border-radius: 12px; box-shadow: var(--studio-shadow); gap: 14px; font-variant-numeric: tabular-nums; }
.folder-breadcrumb { border-color: var(--studio-line); }
.browser-search { border-radius: 11px; border-color: var(--studio-line); box-shadow: var(--studio-shadow); padding: 12px 14px; }
.sort-label select { border-radius: 9px; border-color: var(--studio-line); }
.folder-card { padding: 22px; border-radius: 16px; border-color: var(--studio-line); box-shadow: var(--studio-shadow); }
.folder-card > strong { color: #473540; font-size: 17px; }
.folder-art { width: 48px; height: 43px; border-radius: 12px; background: #fbeef3; color: #bb6b86; }
.folder-counts,.folder-purpose { color: #82707b; }
.folder-card-bottom { border-color: #f1e9ed; }
.folder-client-strip { border-radius: 13px; background: #fff5f8; border-color: #efdae3; }
.file-icon { border-radius: 11px; }
.section-title-row h2 { color: #594551; }
.workflow-heading { padding: 23px 28px; background: #fff; }
.workflow-heading p { color: var(--studio-muted); font-size: 12px; line-height: 1.7; }
.title-line { flex-wrap: wrap; }
.title-line h1 { font-size: 24px; color: var(--studio-ink); overflow-wrap: anywhere; }
.view-bar { background: #fff; padding-top: 6px; padding-bottom: 6px; min-height: 50px; }
.tabs { gap: 5px; }
.tab { border-bottom: 0; margin-bottom: 0; padding: 9px 12px; border-radius: 9px; font-size: 11px; color: #82717c; }
.tab.active { background: #faeaf0; color: #9b2f4e; box-shadow: inset 0 0 0 1px #f1d7e1; }
.tab:hover:not(.active) { background: #faf7f8; color: #5b4250; }
.session-state { color: #7e717a; font-size: 10px; }
.canvas { background-color: #f8f5f7; background-image: radial-gradient(#d8cbd2 1px, transparent 1px); background-size: 22px 22px; }
.canvas-top { top: 18px; }
.canvas-label { padding: 8px 10px; border: 1px solid #e9dfe5; background: #fffdfef2; border-radius: 10px; color: #826a78; box-shadow: 0 2px 5px #38212c03; font-size: 11px; }
.node-counter { font-size: 10px; }
.canvas .add-step { border-radius: 11px; box-shadow: 0 4px 12px #38212c0a; }
.flow-node { border-radius: 14px; border-color: #dfd5dc; box-shadow: 0 4px 10px #38212c08; }
.flow-node:hover { border-color: #c99eae; box-shadow: var(--studio-raised); }
.flow-node.selected { border-color: var(--brand-rose); box-shadow: 0 0 0 4px #d1425712, 0 8px 18px #38212c0d; }
.node-icon { border-radius: 11px; }
.flow-node .node-name { color: #44313e; }
.node-subtitle,.node-index { color: #897080; }
.edge { stroke: #bda7b3; }
.edge.active-path { stroke: #bd597e; }
.zoom-controls { border-radius: 10px; padding: 4px; border-color: #e4d9e0; box-shadow: 0 4px 12px #38212c08; }
.canvas-info { border-radius: 9px; }
.test-console { border-color: var(--studio-line); }
.console-header { background: #fdfbfc; border-color: #efe7ec; }
.inspector { border-left: 1px solid var(--studio-line); background: #fff; }
.inspector-header { color: #907482; letter-spacing: 1.3px; font-size: 10px; border-bottom-color: #f0e8ed; }
.inspector-node { background: #fdfafb; }
.inspector-tabs { border-color: #eee5eb; }
.inspector-tab { color: #8b7582; }
.inspector-tab.active { color: #a13758; }
.node-credential { background: #fbf6f8; border-color: #ebdee5; border-radius: 12px; }
.parameter-label { flex-wrap: wrap; gap: 6px 10px; }
.parameter-field input:not([type=checkbox]),.parameter-field textarea,.parameter-field select,.field input,.field select,.field textarea,.setup-field input,.setup-field select,.setup-field textarea { border-color: #e3d9e0; border-radius: 9px; }
.parameter-field input:focus,.parameter-field textarea:focus,.parameter-field select:focus { border-color: #c36d8c; }
.parameter-label label { color: #59414e; }
.parameter-help,.field-help { color: #82717c; }
.parameter-card { border-color: #eadfe6; border-radius: 12px; background: #fdfafb; }
.parameter-group { border-color: #eee5eb; }
.inspector-footer { border-color: #eee5eb; background: #fff; }
dialog { border: 1px solid #eadce3; border-radius: 20px; box-shadow: 0 32px 100px #241b2038, 0 8px 24px #241b2012; max-height: 88dvh; }
dialog::backdrop { background: #241b2070; backdrop-filter: blur(5px); }
.dialog-heading { padding: 25px 26px 20px; gap: 14px; }
.dialog-heading h2 { color: #47323f; letter-spacing: -.5px; }
.dialog-copy { color: #776573; }
.dialog-actions { flex-wrap: wrap; padding-top: 18px; border-top: 1px solid #f0e7ec; gap: 10px; }
.dialog-actions .button { white-space: normal; }
.search-field { border-radius: 11px; }
.library-step { border-radius: 12px; padding: 14px; }
.library-step:hover { background: #fff4f8; }
.toast { border-radius: 12px; background: #352330; color: #fff1f6; box-shadow: 0 10px 35px #241b2026; }
.access-gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 8vw; padding: 6vh 10vw; background: radial-gradient(ellipse at 12% 18%, #f5dce6 0, transparent 50%), #f8f3f6; overflow: auto; }
.access-story { max-width: 540px; }
.access-overline { display: flex; align-items: center; gap: 13px; color: #85556d; font-size: 11px; font-weight: 650; letter-spacing: 2px; }
.access-overline img { width: 46px; height: auto; }
.access-story h2 { font-size: clamp(35px, 4.5vw, 66px); font-weight: 750; line-height: 1.09; letter-spacing: -2.7px; margin: 38px 0 24px; color: #432b3a; }
.access-story h2 span { color: #b03d60; }
.access-story > p { color: #816a78; font-size: 15px; line-height: 1.9; max-width: 370px; }
.access-flow { display: flex; align-items: center; gap: 12px; margin-top: 42px; }
.access-flow > span { min-width: 78px; text-align: center; padding: 16px 13px; background: #ffffffa8; border: 1px solid #ead5df; border-radius: 13px; color: #785366; font-size: 11px; box-shadow: 0 4px 14px #59354405; }
.access-flow > b { width: 24px; height: 1px; background: #d6a5ba; }
.access-card { width: 100%; max-width: 460px; border-radius: 22px; padding: 38px; border-color: #eadde5; box-shadow: 0 24px 75px #56364710, 0 2px 6px #56364705; }
.access-card h1 { color: #44303e; letter-spacing: -.9px; }
.access-card .brand-mark { width: 58px; }
.access-card p { color: #816d7b; font-size: 13px; }
.access-card form { gap: 5px; }
.access-card input { min-height: 45px; }
.access-card .button { width: 100%; min-height: 46px; }

/* One-time entrance motion belongs to the view, not refreshed dashboard rows. */
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="on"] :is(.button,.icon-button,.nav-item,.workspace-picker,.workflow-item,.tab,.inspector-tab,.folder-card,.library-step,.ops-row,.workspace-table tbody tr,.flow-node) {
    transition: background-color var(--studio-fast), color var(--studio-fast), border-color var(--studio-fast), box-shadow 220ms, transform 220ms var(--studio-ease);
  }
  html[data-motion="on"] :is(input,select,textarea) { transition: border-color var(--studio-fast), box-shadow var(--studio-fast); }
  html[data-motion="on"] .main > :is(section,.workflow-heading):not([hidden]) { animation: studio-arrive var(--studio-enter) var(--studio-ease) both; }
  html[data-motion="on"] #editorView:not([hidden]) { animation-name: studio-fade; }
  html[data-motion="on"] dialog[open] { animation: studio-dialog 240ms var(--studio-ease) both; }
  html[data-motion="on"] dialog[open]::backdrop { animation: studio-fade 200ms ease-out; }
  html[data-motion="on"] .inspector-content { animation: studio-fade 180ms ease-out; }
  html[data-motion="on"] .inspector.mobile-visible { animation: studio-panel 280ms var(--studio-ease); }
  html[data-motion="on"] .access-card { animation: studio-arrive 600ms var(--studio-ease) both; }
  html[data-motion="on"] .access-story { animation: studio-arrive 700ms var(--studio-ease) both; }
  html[data-motion="on"] .access-flow > span { animation: studio-arrive 700ms var(--studio-ease) both; }
  html[data-motion="on"] .access-flow > span:nth-of-type(2) { animation-delay: 80ms; }
  html[data-motion="on"] .access-flow > span:nth-of-type(3) { animation-delay: 160ms; }
  html[data-motion="on"] .test-console { transition: height 260ms var(--studio-ease); }
  html[data-motion="on"] .sidebar.mobile-open { animation: studio-navigation 260ms var(--studio-ease); }
  @media (hover: hover) {
    html[data-motion="on"] .button:not(:disabled):hover { transform: translateY(-1px); }
    html[data-motion="on"] .button:not(:disabled):active { transform: translateY(0) scale(.98); }
    html[data-motion="on"] .folder-card:hover { transform: translateY(-3px); box-shadow: var(--studio-raised); }
    html[data-motion="on"] .library-step:hover { transform: translateX(3px); }
    html[data-motion="on"] .nav-item:hover { transform: translateX(2px); }
  }
}
@keyframes studio-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes studio-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes studio-dialog { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes studio-panel { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes studio-navigation { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
html[data-motion="off"] *,html[data-motion="off"] *::before,html[data-motion="off"] *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; } }

@media (max-width: 1350px) {
  .sidebar { width: 218px; padding-left: 13px; padding-right: 13px; }
  .dashboard-view,.billing-view,.trash-view,.accounts-view,.library-view,.clients-view,.credentials-view,.executions-view { padding: 26px; }
  .ops-metric { padding: 20px; }
  .ops-metric > strong { font-size: 33px; }
  .page-heading { flex-wrap: wrap; gap: 12px; }
}
@media (max-height: 820px) and (min-width: 1101px) {
  .sidebar { padding-top: 18px; }
  .sidebar .brand { padding-bottom: 10px; }
  .sidebar .brand-mark { width: 36px; }
  .workspace-picker { padding-top: 7px; padding-bottom: 7px; }
  .sidebar-section-label { margin-top: 14px; margin-bottom: 8px; }
  .sidebar .workflow-label { margin-top: 8px; }
  .sidebar .workflow-item { padding-top: 7px; padding-bottom: 7px; }
  .primary-nav { gap: 3px; }
  .primary-nav .nav-item { padding-top: 8px; padding-bottom: 8px; }
  .sidebar .sidebar-help { padding-top: 4px; padding-bottom: 4px; min-height: 24px; line-height: 1.2; }
  .sidebar-spacer { min-height: 8px; }
  .profile { margin-top: 6px; padding-top: 8px; padding-bottom: 8px; }
  .profile .avatar { width: 28px; height: 28px; }
}
@media (min-width: 621px) and (max-width: 1100px) {
  .app-shell { padding: 8px; gap: 8px; }
  .sidebar { width: 68px; padding: 18px 10px 0; border-radius: 16px; }
  .sidebar .brand { padding: 0 0 20px; justify-content: center; }
  .sidebar .brand-mark { width: 32px; }
  .sidebar .brand > span,.sidebar .sidebar-help,.sidebar .brand small { display: none; }
  .sidebar #motionToggle { display: flex; width: 46px; min-height: 40px; justify-content: center; padding: 10px; font-size: 0; }
  #motionToggle > span { display: none; }
  .primary-nav .nav-item { padding: 12px; font-size: 0; }
  .inspector { top: 69px; bottom: 38px; width: min(420px,calc(100vw - 94px)); border-radius: 15px 0 0 15px; }
  .main { border-radius: 16px; }
  .access-gate { padding: 6vh 6vw; gap: 5vw; }
}
@media (max-width: 800px) {
  .ops-metric > strong { font-size: 30px; }
  .page-heading h1 { font-size: 27px; }
  .access-gate { grid-template-columns: 1fr; justify-items: center; }
  .access-story { display: none; }
  .dialog-actions .button { min-height: 42px; }
}
@media (max-width: 620px) {
  .app-shell { padding: 0; gap: 0; }
  .main { border: 0; border-radius: 0; }
  .sidebar { width: 248px; left: 8px; top: 8px; bottom: 8px; border-radius: 18px; padding: 22px 16px 0; }
  .sidebar .brand { display: flex; }
  .sidebar.mobile-open .brand > span { display: block; }
  .primary-nav .nav-item { font-size: 12px; }
  .sidebar .sidebar-help { display: flex; }
  .topbar { height: 52px; padding: 0 15px; }
  .preview-badge { font-size: 9px; padding: 5px 7px; }
  .dashboard-view,.billing-view,.trash-view,.accounts-view,.library-view,.clients-view,.credentials-view,.executions-view { padding: 24px 16px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { font-size: 12px; }
  .page-actions { width: 100%; }
  .ops-metrics { gap: 10px; }
  .ops-metric { padding: 16px; }
  .ops-metric > span:first-child { font-size: 11px; padding-right: 22px; min-height: 32px; }
  .ops-metric .metric-symbol { right: 12px; top: 14px; width: 24px; height: 24px; border-radius: 7px; }
  .metric-symbol svg { width: 13px; height: 13px; }
  .ops-metric > strong { font-size: 29px; }
  .ops-metric small { font-size: 10px; }
  .ops-panel-heading { padding: 18px; }
  .workflow-heading { padding: 18px 16px; }
  .title-line h1 { font-size: 21px; }
  .view-bar { padding-left: 12px; padding-right: 12px; }
  .tab { padding: 9px 8px; font-size: 10px; }
  .inspector { top: 52px; bottom: 29px; border-radius: 0; width: 100%; }
  .canvas-label { padding: 7px; gap: 6px; }
  .canvas-label .node-counter { display: none; }
  .canvas-top { left: 12px; right: 12px; }
  .access-gate { padding: 20px; }
  .access-card { padding: 28px; }
  dialog { border-radius: 17px; }
  .dialog-heading { padding: 22px 20px 18px; }
  .dialog-heading h2 { font-size: 20px; overflow-wrap: anywhere; }
}
