/* Docs extends the existing Nexo design without changing its base stylesheet. */
.docs-library,
.docs-editor {
  --doc-ink: #263e32;
  --doc-muted: #7b8979;
  --doc-line: #e2e8dd;
}
.docs-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 29px;
  background: #edf2e7;
  border: 1px solid #dfe7d6;
  border-radius: 20px;
  margin-bottom: 27px;
}
.docs-intro > div:first-child {
  display: flex;
  align-items: center;
  gap: 18px;
}
.docs-intro-icon {
  display: grid;
  place-items: center;
  background: #dfe9d4;
  color: #647c4c;
  border-radius: 16px;
  min-width: 62px;
  height: 62px;
}
.docs-intro-icon .icon {
  width: 29px;
  height: 29px;
}
.docs-intro h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 7px;
}
.docs-intro p {
  color: #7c8871;
  font-size: 13px;
  max-width: 440px;
  margin: 0;
  line-height: 1.65;
}
.docs-create-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
}
.docs-list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.docs-list-toolbar .filter-tabs {
  margin-right: auto;
}
.docs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--doc-line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  max-width: 260px;
  flex: 1;
}
.docs-search input {
  border: 0;
  outline: 0;
  background: none;
  width: 100%;
  font: inherit;
  font-size: 12px;
  min-width: 0;
}
.docs-search .icon {
  width: 16px;
  color: #8b9882;
}
.docs-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 17px;
}
.docs-section-head h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.docs-section-head > span {
  font-size: 11px;
  color: var(--doc-muted);
}
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.docs-note {
  border: 1px solid #e2e7dd;
  overflow: hidden;
  box-shadow: 0 3px 12px #183b2503;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.docs-note:hover {
  transform: translateY(-3px);
  border-color: #afc0a5;
}
.docs-note-open {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  text-align: left;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.docs-note-cover {
  height: 116px;
  display: flex;
  align-items: center;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--doc-color) 7%, #fafbf8);
}
.docs-note-cover > span {
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--doc-color);
  background: #ffffffd4;
  width: 47px;
  height: 55px;
  border: 1px solid #fff;
}
.docs-note-cover > span .icon {
  width: 24px;
  height: 24px;
}
.docs-cover-lines {
  margin-left: 22px;
  width: 58%;
  display: grid;
  gap: 10px;
  opacity: 0.23;
}
.docs-cover-lines i {
  height: 5px;
  background: var(--doc-color);
  border-radius: 9px;
}
.docs-cover-lines i:nth-child(2) {
  width: 80%;
}
.docs-cover-lines i:nth-child(3) {
  width: 50%;
}
.docs-note-cover.board {
  background-color: #f6f8f3;
  background-image: radial-gradient(#d4ddcf 1px, transparent 1px);
  background-size: 15px 15px;
}
.docs-cover-shapes {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 25px;
  color: var(--doc-color);
}
.docs-cover-shapes i {
  width: 39px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 5px;
  transform: rotate(-4deg);
  background: #fff;
}
.docs-cover-shapes i:last-child {
  border-radius: 50%;
  transform: rotate(5deg);
}
.docs-cover-shapes b {
  font-size: 24px;
  font-weight: 400;
}
.docs-note-body {
  padding: 20px 21px 16px;
}
.docs-kind {
  font-size: 9px;
  color: #8e9a85;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.docs-note h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 7px 0 12px;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.docs-note-body p {
  font-size: 11px;
  color: #93a08c;
  margin: 0;
}
.docs-note-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 21px;
  padding: 14px 0 17px;
  border-top: 1px solid #edf0e8;
}
.docs-note-foot button {
  font-size: 11px;
}
.docs-template {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 5px;
  border: 1px dashed #cfdac6;
  border-radius: 15px;
  padding: 21px 24px;
}
.docs-template > span {
  color: #90a278;
}
.docs-template h3 {
  font-size: 13px;
  margin: 0 0 6px;
  font-weight: 600;
}
.docs-template p {
  font-size: 12px;
  color: #8a9780;
  margin: 0;
}
.docs-template .btn {
  margin-left: auto;
}
.docs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
  color: var(--doc-muted);
  min-height: 260px;
}
.docs-empty > .icon {
  width: 40px;
  height: 40px;
  color: #b0bfa6;
  margin-bottom: 15px;
}
.docs-empty h2 {
  font-size: 20px;
  line-height: 1.5;
  color: var(--doc-ink);
  margin: 0 0 8px;
}
.docs-empty p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 470px;
  margin: 0 0 22px;
}
.docs-error {
  border: 1px solid #e5c7bd;
  border-radius: 12px;
  padding: 16px 19px;
  background: #fff8f4;
  color: #955343;
  font-size: 13px;
  line-height: 1.6;
  margin: 15px 0;
}
.docs-error[hidden] {
  display: none;
}
.docs-error > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.docs-error .btn {
  font-size: 11px;
}
.docs-load-more {
  text-align: center;
  margin: 24px;
}
.docs-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--doc-line);
  padding-bottom: 18px;
  margin-bottom: 30px;
}
.docs-editor-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.docs-save-state {
  font-size: 11px;
  color: #7e9175;
}
.docs-save-state:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98b18b;
  margin-right: 6px;
}
.docs-save-state[data-state="dirty"]:before,
.docs-save-state[data-state="saving"]:before {
  background: #c6a366;
}
.docs-save-state[data-state="error"] {
  color: #b05748;
}
.docs-save-state[data-state="error"]:before {
  background: #b05748;
}
.docs-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px auto 25px;
  max-width: 880px;
}
.docs-document-mark {
  width: 44px;
  height: 50px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
}
.docs-document-mark .icon {
  width: 24px;
  height: 24px;
}
.docs-title {
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(23px, 3vw, 35px);
  letter-spacing: -1px;
  color: var(--doc-ink);
  background: transparent;
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  padding: 8px 0;
}
.docs-title:focus {
  box-shadow: 0 2px 0 #b7c8aa;
}
.docs-title[readonly] {
  cursor: default;
}
.docs-color-label {
  flex-shrink: 0;
}
.docs-color-label input,
.docs-drawing-options input[type="color"] {
  width: 28px;
  height: 28px;
  border: 1px solid #dde4d8;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 2px;
}
.docs-paper {
  max-width: 880px;
  margin: 0 auto;
  min-height: 540px;
  background: #fff;
  border: 1px solid #e5e9df;
  border-radius: 17px;
  padding: 32px 56px 60px;
  box-shadow: 0 4px 22px #28443003;
}
.docs-writing-help {
  font-size: 11px;
  line-height: 1.6;
  color: #99a38e;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eff2e9;
}
.doc-block {
  position: relative;
  padding: 6px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 36px;
}
.doc-block-text {
  font-size: 15px;
  line-height: 1.85;
  outline: 0;
  min-width: 0;
  min-height: 28px;
  flex: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #37483c;
}
.doc-block-text[contenteditable="true"]:empty:before {
  content: attr(data-placeholder);
  color: #b4bba9;
  pointer-events: none;
}
.doc-block-heading1 .doc-block-text {
  font-size: 27px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.7px;
  margin: 17px 0 6px;
}
.doc-block-heading2 .doc-block-text {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 600;
  margin: 11px 0 3px;
}
.doc-block-todo input {
  accent-color: #164e3d;
  position: relative;
  top: 2px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.doc-block-text.checked {
  text-decoration: line-through;
  color: #98a18f;
}
.doc-block-marker {
  min-width: 16px;
  color: #87947b;
}
.doc-block-quote {
  border-left: 3px solid #b4c3a3;
  margin: 10px 0;
  padding: 6px 18px;
  background: #f7f9f3;
}
.doc-block-quote .doc-block-text {
  font-style: italic;
  color: #6c7c60;
}
.doc-block-code {
  padding: 16px 18px;
  background: #f0f3ec;
  border-radius: 9px;
  margin: 12px 0;
}
.doc-block-code .doc-block-text {
  font-family: monospace;
  font-size: 13px;
  tab-size: 2;
  color: #376250;
}
.doc-block-divider {
  padding: 22px 0;
}
.doc-block-divider hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #e3e9dc;
}
.doc-block-controls {
  position: absolute;
  right: 0;
  bottom: calc(100% - 3px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #e1e7db;
  background: #fff;
  border-radius: 7px;
  padding: 3px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px #163b2510;
}
.doc-block:hover .doc-block-controls,
.doc-block:focus-within .doc-block-controls {
  opacity: 1;
  pointer-events: auto;
}
.doc-block-controls select {
  background: #f5f7f1;
  border: 0;
  max-width: 135px;
  border-radius: 4px;
  font-size: 10px;
  padding: 4px 5px;
  color: #65765b;
}
.doc-block-controls button {
  background: none;
  border: 0;
  color: #7d8c70;
  padding: 3px 6px;
  min-width: 24px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}
.doc-block-controls button:hover {
  background: #eef3e8;
}
.doc-block-controls button:disabled {
  opacity: 0.3;
}
.docs-add-block {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  color: #99a78c;
  border: 1px dashed #dfe6d7;
  border-radius: 8px;
  width: 100%;
  font: inherit;
  font-size: 12px;
  margin-top: 26px;
  padding: 12px;
  cursor: pointer;
}
.docs-add-block:hover {
  color: #345744;
  background: #f7f9f4;
}
.docs-board-shell {
  border: 1px solid #dce4d4;
  border-radius: 17px;
  background: #fff;
  overflow: hidden;
}
.docs-board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e4e9dc;
}
.docs-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: auto;
  scrollbar-width: thin;
}
.docs-tool {
  border: 0;
  border-radius: 8px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-width: 45px;
  min-height: 46px;
  padding: 7px;
  cursor: pointer;
  color: #849178;
  font: inherit;
}
.docs-tool .icon {
  width: 19px;
  height: 19px;
}
.docs-tool span {
  font-size: 8px;
  white-space: nowrap;
}
.docs-tool.active {
  background: #e9f0e3;
  color: #24553e;
}
.docs-board-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
  border-left: 1px solid #e3e9dc;
  padding-left: 7px;
}
.docs-board-actions .icon-button {
  width: 31px;
  height: 34px;
  font-size: 22px;
}
.docs-board-actions .icon {
  width: 17px;
  height: 17px;
}
.docs-drawing-options {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 17px;
  border-bottom: 1px solid #edf0e8;
  background: #fcfdf9;
  font-size: 10px;
  color: #819074;
}
.docs-drawing-options label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.docs-drawing-options select {
  border: 1px solid #dce3d3;
  border-radius: 4px;
  background: white;
  font: inherit;
  color: #597047;
  padding: 4px;
}
.docs-drawing-options input[type="checkbox"] {
  accent-color: #164e3d;
}
.docs-drawing-options input[type="color"] {
  width: 24px;
  height: 24px;
}
.docs-board-stage {
  position: relative;
  height: clamp(380px, 58dvh, 720px);
  background: #fafbf7;
  overflow: hidden;
}
#doc-board {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: 0;
}
#doc-board:focus-visible {
  box-shadow: inset 0 0 0 2px #83a56e;
}
.doc-shape {
  cursor: move;
}
#doc-board [data-doc-resize] {
  cursor: nwse-resize;
}
.docs-board-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  color: #a8b49d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 80%;
}
.docs-board-empty .icon {
  width: 37px;
  height: 37px;
  color: #b6c1ab;
}
.docs-board-empty strong {
  font-size: 19px;
  font-weight: 500;
}
.docs-board-empty span {
  font-size: 12px;
}
.docs-board-zoom {
  position: absolute;
  left: 15px;
  bottom: 15px;
  display: flex;
  align-items: center;
  border: 1px solid #dde5d3;
  border-radius: 9px;
  background: #fffffff0;
  box-shadow: 0 2px 10px #18382309;
  font-size: 11px;
  color: #6e7f60;
  overflow: hidden;
}
.docs-board-zoom button {
  border: 0;
  background: none;
  font-size: 18px;
  min-width: 36px;
  min-height: 34px;
  color: #69825b;
  cursor: pointer;
}
.docs-board-zoom span {
  padding: 0 6px;
}
.docs-board-hint {
  font-size: 10px;
  color: #98a38d;
  margin: 0;
  padding: 11px 16px;
  background: #fff;
  border-top: 1px solid #e7ecdf;
  line-height: 1.7;
}
.docs-text-dialog {
  max-width: 480px;
  width: calc(100vw - 32px);
  padding: 26px;
  border: 1px solid #dce5d4;
  border-radius: 17px;
  color: #284533;
  box-shadow: 0 20px 90px #133a2730;
}
.docs-text-dialog::backdrop {
  background: #17372755;
}
.docs-text-dialog h2 {
  font-size: 20px;
  margin: 0 0 18px;
}
.docs-text-dialog label {
  font-size: 12px;
  display: block;
  margin: 0 0 8px;
}
.docs-text-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d4dfca;
  border-radius: 9px;
  font: inherit;
  padding: 13px;
  resize: vertical;
}
.docs-text-dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}
.docs-library button:focus-visible,
.docs-editor button:focus-visible,
.docs-library input:focus-visible {
  outline: 2px solid #77a36a;
  outline-offset: 3px;
}
@media (min-width: 1600px) {
  .docs-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .docs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .docs-create-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .docs-paper {
    padding: 28px 34px 48px;
  }
  .docs-tool span {
    display: none;
  }
  .docs-tool {
    min-width: 37px;
    min-height: 35px;
    padding: 6px;
  }
  .docs-list-toolbar .filter-tabs {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .docs-intro {
    padding: 21px;
    border-radius: 15px;
  }
  .docs-intro-icon {
    display: none;
  }
  .docs-intro h2 {
    font-size: 17px;
  }
  .docs-create-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .docs-search {
    max-width: none;
    min-width: 120px;
  }
  .docs-list-toolbar {
    gap: 8px;
  }
  .docs-list-toolbar .btn {
    font-size: 11px;
    padding: 10px;
  }
  .docs-template {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 19px;
  }
  .docs-template > div {
    flex: 1;
    min-width: 200px;
  }
  .docs-template .btn {
    width: 100%;
    justify-content: center;
  }
  .docs-paper {
    padding: 24px 20px 35px;
    min-height: 480px;
  }
  .docs-title-row {
    gap: 10px;
  }
  .docs-document-mark {
    width: 33px;
    height: 39px;
    border-radius: 8px;
  }
  .docs-document-mark .icon {
    width: 19px;
    height: 19px;
  }
  .docs-title {
    font-size: 25px;
    letter-spacing: -0.5px;
  }
  .docs-editor-top {
    gap: 8px;
    margin-bottom: 22px;
    align-items: flex-start;
  }
  .docs-editor-meta {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 240px;
  }
  .docs-editor-meta .btn {
    font-size: 11px;
    padding: 9px;
  }
  .docs-editor-meta .btn .icon {
    width: 15px;
  }
  .docs-save-state {
    width: 100%;
    text-align: right;
    font-size: 10px;
    order: 3;
  }
  .docs-editor-top > .text-link {
    font-size: 12px;
    margin-top: 8px;
    white-space: nowrap;
  }
  .docs-writing-help {
    font-size: 10px;
    margin-bottom: 32px;
  }
  .doc-block-text {
    font-size: 15px;
  }
  .doc-block-controls {
    max-width: 100%;
  }
  .doc-block-controls select {
    max-width: 115px;
  }
  .doc-block {
    padding: 9px 0;
  }
  .doc-block-heading1 .doc-block-text {
    font-size: 24px;
  }
  .docs-board-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 7px;
  }
  .docs-board-actions {
    align-self: flex-end;
    border-left: 0;
  }
  .docs-tools {
    justify-content: space-between;
  }
  .docs-tool {
    min-width: 32px;
    min-height: 35px;
    padding: 5px;
  }
  .docs-drawing-options {
    gap: 11px;
    padding: 7px 11px;
  }
  .docs-board-stage {
    height: 60dvh;
    min-height: 350px;
  }
  .docs-board-hint {
    font-size: 9px;
  }
  .docs-board-empty strong {
    font-size: 17px;
  }
  .docs-note-cover {
    height: 102px;
  }
  .docs-note h3 {
    font-size: 18px;
  }
  .docs-color-label input {
    width: 24px;
    height: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .docs-note {
    transition: none;
  }
  .docs-note:hover {
    transform: none;
  }
}
@media print {
  .docs-editor-top,
  .docs-writing-help,
  .doc-block-controls,
  .docs-add-block,
  .docs-color-label,
  .docs-board-toolbar,
  .docs-drawing-options,
  .docs-board-zoom,
  .docs-board-hint {
    display: none !important;
  }
  .docs-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .docs-board-shell {
    border: 0;
  }
  .docs-board-stage {
    height: 700px;
  }
}
.docs-native-board {
  position: relative;
  border: 1px solid #dbe4d4;
  border-radius: 15px;
  overflow: hidden;
  background: white;
  height: clamp(560px, 72dvh, 950px);
}
.docs-native-board iframe {
  display: block;
  border: 0;
  width: 100%;
  height: 100%;
  background: white;
}
.docs-board-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #f8faf5;
  color: #788d6d;
  font-size: 13px;
  padding: 25px;
  text-align: center;
}
.docs-board-loading[hidden] {
  display: none;
}
.docs-board-loading > .skeleton {
  width: 100px;
  height: 70px;
  border-radius: 15px;
}
.docs-native-board:fullscreen {
  border: 0;
  border-radius: 0;
  width: 100vw;
  height: 100dvh;
}
.docs-editor-board .docs-title-row {
  max-width: none;
}
@media (max-width: 640px) {
  .docs-native-board {
    height: calc(100dvh - 110px);
    min-height: 580px;
    margin: 0 -12px;
    border-radius: 9px;
  }
  .docs-editor-board .docs-title-row {
    margin-bottom: 17px;
  }
  .docs-editor-board .docs-board-hint {
    font-size: 10px;
  }
}
.docs-export-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.docs-export-options .btn {
  justify-content: center;
}
