/* Documents presentation layer.
   Upload, editor, list and preview behavior remain in user-catalog.js. */
@font-face {
  font-family: "Aileron Live";
  src: url("/assets/fonts/aileron/Aileron-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aileron Live";
  src: url("/assets/fonts/aileron/Aileron-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

body.user-catalog {
  --docs-live-paper: rgba(249, 249, 249, .84);
  --docs-live-paper-soft: rgba(244, 245, 246, .42);
  --docs-live-ink: #292b31;
  --docs-live-muted: #71757d;
  --docs-live-line: rgba(40, 43, 49, .095);
  --docs-live-shadow: 0 16px 42px rgba(35, 38, 46, .072);
  color: var(--docs-live-ink);
  background: linear-gradient(180deg, #e5e7ea 0, #eff0f1 250px, #e9ebed 100%) !important;
  font-family: "Aileron Live", "Avenir Next", system-ui, sans-serif;
}

body.user-catalog :is(button, input, select, textarea) {
  font-family: "Aileron Live", "Avenir Next", system-ui, sans-serif;
}

@media (min-width: 801px) {
  body.user-catalog main.wrap,
  body.user-catalog .site-footer {
    zoom: 1;
  }
}

body.user-catalog main.wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 90vw;
  max-width: none;
  margin: 0 auto;
  padding: 24px 0 76px;
}

@media (min-width: 981px) {
  html.gritt-shell-page body.user-catalog > .header {
    position: absolute !important;
    inset: 0 0 auto !important;
    z-index: 40;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

body.user-catalog .page-title-block {
  order: 0;
  position: relative;
  overflow: hidden;
  min-height: 142px;
  margin: 0 0 2px;
  padding: 32px 36px 24px;
  border: 0;
  border-radius: 10px 3px 13px 3px;
  background: linear-gradient(92deg, rgba(216, 219, 226, .88), rgba(239, 240, 245, .46) 46%, rgba(232, 240, 237, .18) 72%, rgba(247, 247, 248, 0));
  box-shadow: 0 13px 36px rgba(36, 38, 46, .052);
}

body.user-catalog .page-title-block::before {
  content: attr(data-page-label);
  display: block;
  margin-bottom: 9px;
  color: var(--docs-live-muted);
  font: 600 9px/1.2 "Aileron Live", sans-serif;
  letter-spacing: .18em;
}

body.user-catalog .docs-page-title {
  margin: 0;
  color: var(--docs-live-ink) !important;
  font: 600 31px/1.08 "Aileron Live", sans-serif;
  letter-spacing: -.025em;
  text-transform: none;
}

body.user-catalog #uplForm,
body.user-catalog #ud-editorBox,
body.user-catalog main.wrap > section:not(.page-title-block) {
  position: relative;
  overflow: visible;
  margin: 0;
  padding: 22px 24px;
  border: 0 !important;
  border-radius: 10px 3px 13px 3px;
  background: linear-gradient(93deg, var(--docs-live-paper), rgba(239, 240, 245, .47) 43%, rgba(232, 240, 237, .18) 70%, rgba(246, 247, 248, .04));
  box-shadow: var(--docs-live-shadow) !important;
}

body.user-catalog #uplForm {
  order: 1;
  background: linear-gradient(93deg, rgba(249, 249, 249, .88), rgba(239, 238, 245, .48) 43%, rgba(231, 240, 236, .24) 70%, rgba(246, 247, 248, .04)) !important;
}

body.user-catalog main.wrap > section:not(.page-title-block) {
  order: 2;
  background: linear-gradient(93deg, rgba(236, 237, 239, .70), rgba(240, 240, 245, .50) 42%, rgba(232, 240, 237, .18) 70%, rgba(248, 248, 249, .03)) !important;
}

body.user-catalog #ud-editorBox {
  order: 3;
  padding: 0;
  background: linear-gradient(93deg, rgba(235, 236, 238, .70), rgba(240, 239, 245, .50) 43%, rgba(233, 240, 238, .17) 70%, rgba(248, 248, 249, .03)) !important;
}

body.user-catalog .docs-live-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 17px;
}

body.user-catalog .docs-live-eyebrow {
  color: var(--docs-live-muted);
  font: 600 9px/1.2 "Aileron Live", sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
}

body.user-catalog .docs-live-section-head h2 {
  margin: 6px 0 0;
  color: var(--docs-live-ink);
  font: 600 17px/1.2 "Aileron Live", sans-serif;
  letter-spacing: -.01em;
}

body.user-catalog .docs-live-section-head p {
  margin: 6px 0 0;
  color: var(--docs-live-muted);
  font-size: 11px;
  line-height: 1.45;
}

body.user-catalog .upl-info,
body.user-catalog .docs-live-info {
  position: relative;
  z-index: 4;
  margin: 0;
}

body.user-catalog .upl-info {
  position: absolute;
  top: 19px;
  right: 22px;
}

body.user-catalog :is(.upl-info-summary, .docs-live-info > summary) {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px 1px 5px 1px;
  background: rgba(215, 218, 223, .76);
  color: #5f636b;
  cursor: pointer;
  list-style: none;
}

body.user-catalog :is(.upl-info-summary, .docs-live-info > summary)::-webkit-details-marker {
  display: none;
}

body.user-catalog .upl-info-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body.user-catalog .upl-info-body,
body.user-catalog .docs-live-info-body {
  position: absolute;
  top: 34px;
  right: 0;
  width: min(340px, calc(100vw - 48px));
  padding: 13px 15px;
  border: 0;
  border-radius: 5px 1px 7px 1px;
  background: rgba(48, 51, 58, .96);
  color: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 32px rgba(26, 28, 34, .20);
  font-size: 11px;
  line-height: 1.48;
}

body.user-catalog .upl-info-body p,
body.user-catalog .docs-live-info-body p {
  margin: 0 0 8px;
}

body.user-catalog .upl-info-body p:last-child,
body.user-catalog .docs-live-info-body p:last-child {
  margin-bottom: 0;
}

body.user-catalog .upl-main-row {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(250px, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  margin: 0;
}

body.user-catalog .upl-secondary-row {
  margin-top: 10px;
}

body.user-catalog .upl-main-row > label.btn,
body.user-catalog .upl-picked-name,
body.user-catalog .upl-secondary-row .input,
body.user-catalog .ud-editor-fields .input,
body.user-catalog .ud-editor-body {
  border-color: var(--docs-live-line) !important;
  border-radius: 4px 1px 5px 1px !important;
  background: linear-gradient(90deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .24)) !important;
}

body.user-catalog .upl-main-row > label.btn {
  justify-content: flex-start;
  min-height: 35px;
}

body.user-catalog .upl-picked-name {
  min-height: 35px;
  padding: 9px 11px;
  color: var(--docs-live-muted);
  font: 400 11px/1.4 "Aileron Live", sans-serif;
}

body.user-catalog .upl-ext-toggle,
body.user-catalog .ud-editor-consent {
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--docs-live-muted);
  font-size: 11px;
}

body.user-catalog .btn,
body.user-catalog button,
body.user-catalog .item .actions button {
  border: 0 !important;
  border-radius: 4px 1px 5px 1px !important;
  background: linear-gradient(90deg, rgba(214, 217, 222, .90), rgba(214, 217, 222, .28)) !important;
  color: var(--docs-live-ink) !important;
  box-shadow: none !important;
  font-family: "Aileron Live", sans-serif !important;
  font-size: 11px !important;
}

body.user-catalog :is(button[type="submit"], #txtSave, .btn-primary) {
  background: linear-gradient(90deg, rgba(65, 69, 78, .96), rgba(65, 69, 78, .54)) !important;
  color: #fff !important;
}

body.user-catalog .docs-toolbar {
  margin: 0;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--docs-live-line);
}

body.user-catalog #docsList .item {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--docs-live-line);
  border-radius: 0;
  background: transparent;
}

body.user-catalog #docsList .item:last-child {
  border-bottom: 0;
}

body.user-catalog #docsList .item > .head {
  min-height: 60px;
  padding: 10px 5px;
  border-radius: 0;
  background: transparent;
}

body.user-catalog #docsList .item .title {
  color: var(--docs-live-ink);
  font: 600 12px/1.2 "Aileron Live", sans-serif;
}

body.user-catalog #docsList .item .meta,
body.user-catalog .docs-v12-status {
  color: var(--docs-live-muted);
  font-family: "Aileron Live", sans-serif;
}

body.user-catalog .ud-editor-summary {
  position: relative;
  min-height: 76px;
  padding: 26px 24px 15px;
  border: 0;
}

body.user-catalog .ud-editor-summary::before {
  content: attr(data-editor-label);
  position: absolute;
  top: 12px;
  left: 24px;
  color: var(--docs-live-muted);
  font: 600 9px/1.2 "Aileron Live", sans-serif;
  letter-spacing: .17em;
}

body.user-catalog .ud-editor-summary strong {
  color: var(--docs-live-ink);
  font: 600 17px/1.2 "Aileron Live", sans-serif;
}

body.user-catalog .ud-editor-fields {
  padding: 4px 24px 0;
}

body.user-catalog .ud-editor-body {
  width: calc(100% - 48px);
  margin: 12px 24px 0;
}

body.user-catalog .ud-editor-actions {
  padding: 12px 24px 22px;
}

body.user-catalog .upl-progress-bar {
  height: 9px;
  border: 0;
  border-radius: 2px;
  background: rgba(63, 67, 75, .12);
}

body.user-catalog .upl-progress-fill {
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(80, 87, 97, .55), rgba(67, 128, 111, .76));
}

html:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog {
  --docs-live-paper: rgba(25, 29, 35, .88);
  --docs-live-paper-soft: rgba(20, 24, 30, .42);
  --docs-live-ink: rgba(238, 241, 244, .94);
  --docs-live-muted: rgba(197, 202, 210, .66);
  --docs-live-line: rgba(235, 238, 242, .12);
  --docs-live-shadow: 0 18px 44px rgba(0, 0, 0, .25);
  background: linear-gradient(180deg, #11151a 0, #171b21 250px, #101419 100%) !important;
}

html:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog .page-title-block {
  background: linear-gradient(92deg, rgba(39, 40, 54, .90), rgba(20, 24, 30, .48) 66%, rgba(20, 24, 30, 0));
}

html:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog main.wrap > section:not(.page-title-block) {
  background: linear-gradient(93deg, rgba(29, 37, 39, .82), rgba(20, 24, 30, .42) 68%, transparent) !important;
}

html:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog #ud-editorBox {
  background: linear-gradient(93deg, rgba(31, 31, 43, .88), rgba(20, 24, 30, .42) 68%, transparent) !important;
}

html:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog #uplForm {
  background: linear-gradient(93deg, rgba(27, 31, 36, .90), rgba(20, 24, 30, .42) 68%, transparent) !important;
}

html:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog :is(.upl-main-row > label.btn, .upl-picked-name, .upl-secondary-row .input, .ud-editor-fields .input, .ud-editor-body) {
  background: linear-gradient(90deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012)) !important;
  color: var(--docs-live-ink) !important;
}

@media (max-width: 1000px) {
  body.user-catalog main.wrap {
    width: min(100% - 24px, 760px);
    padding-top: 16px;
  }

  body.user-catalog .upl-main-row {
    grid-template-columns: 1fr 1fr;
  }

  body.user-catalog .upl-picked-name {
    grid-column: 1 / -1;
    order: 4;
  }
}

@media (max-width: 680px) {
  body.user-catalog .page-title-block {
    min-height: 120px;
    padding: 24px 18px 18px;
  }

  body.user-catalog .docs-page-title {
    font-size: 26px;
  }

  body.user-catalog #uplForm,
  body.user-catalog main.wrap > section:not(.page-title-block) {
    padding: 18px;
  }

  body.user-catalog .upl-main-row,
  body.user-catalog .ud-editor-fields {
    grid-template-columns: 1fr;
  }

  body.user-catalog .docs-toolbar {
    align-items: flex-start;
  }
}

/* Shared-shell theme rules are intentionally strong; keep this page layer last. */
html.gritt-shell-page body.user-catalog {
  background: linear-gradient(180deg, #e5e7ea 0, #eff0f1 250px, #e9ebed 100%) !important;
}

html.gritt-shell-page body.user-catalog .docs-page-title {
  color: var(--docs-live-ink) !important;
}

html.gritt-shell-page body.user-catalog :is(#uplForm, #ud-editorBox, main.wrap > section:not(.page-title-block)) {
  border: 0 !important;
  box-shadow: var(--docs-live-shadow) !important;
}

html.gritt-shell-page:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog {
  background: linear-gradient(180deg, #11151a 0, #171b21 250px, #101419 100%) !important;
}

html.gritt-shell-page:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog #uplForm {
  background: linear-gradient(93deg, rgba(27, 31, 36, .90), rgba(20, 24, 30, .42) 68%, transparent) !important;
}

html.gritt-shell-page:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog #ud-editorBox {
  background: linear-gradient(93deg, rgba(31, 31, 43, .88), rgba(20, 24, 30, .42) 68%, transparent) !important;
}

html.gritt-shell-page:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog main.wrap > section:not(.page-title-block) {
  background: linear-gradient(93deg, rgba(29, 37, 39, .82), rgba(20, 24, 30, .42) 68%, transparent) !important;
}

html.gritt-shell-page:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog #uplForm#uplForm {
  border: 0 !important;
  border-radius: 7px 2px 10px 2px !important;
  background-color: transparent !important;
  background-image: linear-gradient(93deg, rgba(27, 31, 36, .90), rgba(20, 24, 30, .42) 68%, transparent) !important;
  box-shadow: var(--docs-live-shadow) !important;
}

html.gritt-shell-page:is([data-theme="carbon-steel"], [data-skin="carbon-steel"], .cs-carbon-steel) body.user-catalog #ud-editorBox#ud-editorBox {
  border: 0 !important;
  border-radius: 7px 2px 10px 2px !important;
  background-color: transparent !important;
  background-image: linear-gradient(93deg, rgba(31, 31, 43, .88), rgba(20, 24, 30, .42) 68%, transparent) !important;
  box-shadow: var(--docs-live-shadow) !important;
}
