@import url('./logging-workspace.css');
/* Shared dashboard workspace. Colours, fonts and controls follow the active
   Drako theme; only navigation, spacing and page hierarchy are defined here. */
.dashboard-rail,.sidebar-toggle { display:none; }
.rail-category-popup { position:fixed; inset:auto; left:calc(var(--sidebar) + 8px); top:16px; width:248px; max-width:calc(100vw - var(--sidebar) - 24px); max-height:calc(100dvh - 32px); overflow-y:auto; margin:0; padding:12px; border:1px solid var(--edge); border-radius:12px; background:var(--paper); color:var(--ink); box-shadow:0 12px 32px #00000020; }
.rail-category-popup h2 { margin:4px 10px 12px; font-size:14px; font-weight:650; }
.rail-category-popup .nav-link { display:flex; gap:12px; align-items:center; min-height:44px; padding:10px; margin:2px 0; border:1px solid transparent; border-radius:8px; font-size:13px; color:var(--ink); text-decoration:none; }
.rail-category-popup .nav-link:hover { background:var(--wash); }
.rail-category-popup .nav-link.active { background:var(--accent-wash); border-color:var(--accent-line); color:var(--accent-ink); }
.rail-category-popup .nav-link:focus-visible { outline:2px solid var(--accent-ink); outline-offset:1px; }
.rail-category-popup .icon { width:18px; height:18px; flex-shrink:0; }
.rail-link[aria-expanded=true] { background:var(--nav-hover); }
:root[data-site-theme] .workspace-shell .page { max-width:none; }
:root[data-site-theme] .workspace-shell .page:has(.module-workspace-page) { padding:0; }
.module-settings.module-workspace-page { max-width:none; }
.workspace-content .commands-page { max-width:none; }
.module-workspace { display:grid; grid-template-columns:260px minmax(0,1fr); align-items:start; min-height:calc(100dvh - 68px); }
.workspace-content { min-width:0; padding:32px clamp(24px,3vw,48px) 120px; container:workspace-content / inline-size; }
.module-workspace { --workspace-card-padding:24px; }
:root[data-site-theme] .module-workspace .settings-section>header { padding:20px var(--workspace-card-padding); }
.module-workspace .settings-section>.settings-fields.settings-fields-grouped { padding:4px var(--workspace-card-padding) 24px; }
.module-workspace .settings-section>.settings-fields:not(.settings-fields-grouped)>.field-row { padding-inline:var(--workspace-card-padding); }
.module-workspace .activation-control[data-enabled=false] { --activation-colour:var(--accent); --activation-hover:var(--accent); --activation-ink:var(--accent-on); --activation-border:var(--accent-line); }
.module-workspace .message-workspace:not(.message-workspace-browse) { grid-template-columns:minmax(0,1fr); }
.module-workspace .message-workspace:not(.message-workspace-browse)>.message-workspace-editor { padding:var(--workspace-card-padding); }
.module-workspace .message-workspace-navigation .button { min-height:44px; }
.module-workspace .composer-designer { container:workspace-designer / inline-size; }
@container workspace-designer (max-width:600px) {
  .module-workspace .composer-channel { display:grid; grid-template-columns:22px minmax(0,1fr) auto; padding:12px; gap:8px; }
  .module-workspace .composer-channel>strong { min-width:0; }
  .module-workspace .composer-channel>.actions-inline { grid-column:1/-1; margin:0; flex-wrap:wrap; }
  .module-workspace .composer-channel>.composer-json-actions>.button { flex:1; }
  .module-workspace .composer-channel>.composer-history-actions { justify-content:flex-end; }
  .module-workspace .composer-channel>.actions-inline>.button { min-height:44px; }
  .module-workspace .composer-touch-tools { grid-column:1/-1; }
}
.workspace-page-body>.settings-layout>.settings-main { min-width:0; scroll-margin-top:24px; }
.workspace-navigation { position:sticky; top:0; max-height:100dvh; min-height:calc(100dvh - 68px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--edge) transparent; padding:28px 16px 100px; border-right:1px solid var(--line); background:var(--canvas); }
.workspace-navigation-header { padding:0 10px 22px; }
.workspace-navigation-header h1 { font-family:var(--display); margin:0; font-size:24px; line-height:1.25; letter-spacing:-.6px; }
.workspace-search { display:flex; align-items:center; gap:8px; min-width:0; padding:0 10px; border:1px solid var(--edge); border-radius:8px; background:var(--paper); }
.workspace-search>.icon { width:17px; flex-shrink:0; color:var(--muted); }
.workspace-search>input { width:100%; min-width:0; min-height:44px; padding:10px 0; border:0; background:transparent; box-shadow:none; font-size:13px; }
.workspace-search:focus-within { outline:2px solid var(--accent-ink); outline-offset:2px; }
.workspace-search>input:focus { outline:none; box-shadow:none; }
.workspace-navigation-list { padding-top:14px; }
.workspace-nav-group+.workspace-nav-group { margin-top:24px; }
.workspace-nav-group>h3 { margin:0 12px 8px; padding:8px 0; border-bottom:1px solid var(--edge); color:var(--ink); font-size:13px; line-height:1.4; font-weight:650; }
.workspace-navigation .workspace-nav-link { position:relative; display:flex; align-items:center; gap:10px; width:100%; min-height:46px; margin:4px 0; padding:12px 14px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--muted); box-shadow:none; text-align:left; font-size:14px; font-weight:500; }
.workspace-nav-name { flex:1; min-width:0; overflow-wrap:anywhere; }
.workspace-nav-link>.icon { width:18px; height:18px; flex-shrink:0; color:var(--muted); }
.workspace-navigation .workspace-nav-link:hover { background:var(--wash); }
.workspace-navigation .workspace-nav-link[aria-current=page] { background:var(--paper); border-color:var(--edge); color:var(--ink); font-weight:650; box-shadow:0 2px 4px #00000004; }
.workspace-nav-link[aria-current=page]::before { content:''; position:absolute; inset:12px auto 12px -1px; width:3px; border-radius:3px; background:var(--accent-ink); }
.workspace-nav-link[aria-current=page]>.icon { color:var(--accent-ink); }
.workspace-no-results { padding:16px 10px; color:var(--muted); font-size:13px; line-height:1.6; }
.workspace-nav-link:focus-visible { outline:2px solid var(--accent-ink); outline-offset:2px; }
.workspace-mobile-header { display:none; }
.workspace-feature-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; padding:0 0 26px; margin:0; }
.workspace-panels>[role=region] { scroll-margin-top:24px; }
.module-settings .workspace-feature-header h2 { margin:0 0 8px; font-family:var(--display); font-size:32px; line-height:1.2; letter-spacing:-.8px; }
.workspace-feature-header p { margin:0; max-width:72ch; color:var(--muted); font-size:14px; line-height:1.6; }
.module-settings .workspace-feature-header>.section-enable { margin-left:auto; }
.workspace-content .module-command-link { display:flex; width:fit-content; margin:0 0 20px auto; font-size:12px; }
.module-settings .workspace-feature-form { overflow:visible; }
.module-settings .workspace-grouped-fields { padding:0; }
.workspace-field-section { min-width:0; padding:22px 24px; }
.workspace-field-section+.workspace-field-section { border-top:1px solid var(--line); }
.workspace-field-section>header { margin-bottom:10px; }
.workspace-field-section>header h3 { margin:0 0 6px; font-size:16px; font-weight:650; }
.workspace-field-section>header p { margin:0; max-width:70ch; color:var(--muted); font-size:13px; line-height:1.5; }
.module-settings.module-workspace-page .settings-field-group { grid-template-columns:minmax(0,1fr); }
.module-workspace .settings-field-group>.field-row { grid-column:auto; padding:12px 0; }
.module-workspace .workspace-field-rows.settings-fields-grouped { padding:0; }
.module-workspace .workspace-field-rows .settings-field-group { display:block; padding:0; border:0; margin:0; }
.module-workspace .workspace-field-rows .field-row { padding:14px 0; }
.module-workspace .workspace-field-rows .settings-field-group+.settings-field-group { padding-top:0; }
.module-workspace .workspace-field-rows .field-control { min-width:0; }
.module-workspace .workspace-records .settings-section-header { gap:16px; }
.module-workspace .workspace-records .settings-section-header>.button { flex-shrink:0; margin-left:auto; min-height:44px; }
.module-workspace .workspace-records .record-row { display:flex; align-items:center; gap:16px; padding:16px var(--workspace-card-padding); }
.workspace-records .record-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.module-workspace .workspace-records .record-row>.actions-inline { flex:0 0 auto; width:auto; margin:0; gap:8px; }
.module-workspace .workspace-records .record-row .button { min-height:44px; }
.module-workspace .workspace-records .item-list-empty { margin:0; padding:24px var(--workspace-card-padding); border-top:1px solid var(--line); }
.workspace-access-custom .custom-access-list { padding:12px 0 0; }
.workspace-access-custom .custom-access-empty { padding:12px 0 0; border:0; border-radius:0; }
@container workspace-content (max-width:600px) {
  .module-workspace .workspace-records .record-row { flex-direction:column; align-items:stretch; }
  .module-workspace .workspace-records .record-row>.actions-inline { align-self:flex-end; }
  .workspace-access-custom .custom-access-options { grid-template-columns:minmax(0,1fr); }
  .workspace-access-custom .custom-access-module { flex-direction:column; align-items:stretch; }
  .workspace-access-custom .custom-access-module-options>.custom-access-option { flex:1; min-width:0; }
}
@container settings-controls (min-width:640px) {
  .module-workspace .settings-field-group>.field-row { grid-template-columns:minmax(180px,.9fr) minmax(240px,1.1fr); align-items:start; gap:24px; }
  .module-workspace .settings-field-group>.field-row.wide { grid-template-columns:minmax(0,1fr); }
}
@container module-settings (max-width:900px) {
  .module-workspace { grid-template-columns:minmax(0,1fr); }
  .module-workspace>.workspace-navigation { display:none; }
  .workspace-content { padding:24px 24px 120px; }
  .workspace-mobile-header { display:block; }
  .workspace-mobile-header .module-section-picker:not([hidden]) { display:flex; align-items:center; gap:14px; margin:16px 0 24px; font-size:13px; color:var(--muted); }
}
@container module-settings (max-width:480px) {
  .module-workspace { --workspace-card-padding:16px; }
  .workspace-content { padding-inline:16px; }
  .workspace-field-section { padding:20px 16px; }
  .module-settings .workspace-feature-header h2 { font-size:27px; }
}
body:has(.workspace-shell)>.save-bar { bottom:0; left:var(--sidebar); right:0; border:0; border-top:1px solid var(--line); border-radius:0; padding:16px 32px; background:var(--paper); color:var(--ink); box-shadow:0 -4px 18px #00000006; }
body:has(.workspace-shell)>.save-bar .save-summary small { color:var(--muted); }
body:has(.workspace-shell)>.save-bar>.button:not(.primary) { color:var(--ink); border-color:var(--edge); }
body:has(.workspace-shell)>.save-bar>.icon { color:var(--accent-ink); }
@media(min-width:721px) {
  :root:has(.workspace-shell:not(.sidebar-expanded)) { --sidebar:88px; }
  .workspace-shell:not(.sidebar-expanded) .sidebar>.nav-scroll { display:none; }
  :root[data-site-theme] .workspace-shell:not(.sidebar-expanded) .brand { justify-content:center; min-height:68px; padding:16px 8px; }
  .workspace-shell:not(.sidebar-expanded) .brand strong { display:none; }
  .workspace-shell .brand>.icon { width:36px; height:36px; color:var(--accent-ink); }
  :root[data-site-theme] .workspace-shell:not(.sidebar-expanded) .server-picker { margin:8px auto; padding:6px; width:48px; min-height:48px; justify-content:center; }
  .workspace-shell:not(.sidebar-expanded) .server-picker .picker-copy,.workspace-shell:not(.sidebar-expanded) .server-picker>.icon { display:none; }
  .workspace-shell .sidebar-toggle { display:flex; align-self:center; flex-shrink:0; margin:0 8px 8px; color:var(--nav-ink); }
  .workspace-shell.sidebar-expanded .sidebar-toggle { align-self:flex-end; margin-top:-10px; }
  .workspace-shell:not(.sidebar-expanded) .dashboard-rail { display:flex; flex-direction:column; gap:3px; overflow-y:auto; min-height:0; padding:0 7px 16px; scrollbar-width:thin; scrollbar-color:var(--nav-line) transparent; }
  .rail-link { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; width:100%; min-height:56px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--nav-ink); padding:9px 2px; font-size:10px; line-height:1.25; font-weight:500; text-align:center; text-decoration:none; }
  .rail-link>.icon { width:20px; height:20px; }
  .rail-link>span { max-width:100%; overflow-wrap:anywhere; }
  .rail-link>span.rail-label-long { font-size:9px; overflow-wrap:normal; }
  .rail-link:hover { background:var(--nav-hover); }
  .rail-link.active { background:var(--accent); color:var(--accent-on); font-weight:650; }
  .rail-module-groups,.rail-workspace { padding-top:10px; margin-top:10px; border-top:1px solid var(--nav-line); }
}
@media(max-width:720px) {
  body:has(.workspace-shell)>.save-bar { left:0; padding:14px 16px; }
  .workspace-shell .topbar { gap:10px; }
}
