@charset "UTF-8";
:root {
  --green: #267456;
  --green-dark: #19583f;
  --green-soft: #e8f1eb;
  --ink: #26352f;
  --muted: #7a867f;
  --line: #dfe5e0;
  --panel: #f6f8f5;
  --paper: #fff;
  --editor: #fff;
  --shadow: 0 20px 70px #183b2520;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  font-size: 13px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--panel);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
input,
select {
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #26745612;
}
input::placeholder {
  color: #98a29b;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  padding: 0;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
label > input,
label > select {
  display: block;
  width: 100%;
  margin-top: 8px;
}
label small {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 5px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--green-soft);
  color: var(--green);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -1.1px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  background: var(--green);
  color: white;
  border-radius: 11px;
  box-shadow: 0 3px 6px #1c5c3a12;
}
.brand-mark .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}
.brand-suffix {
  font-weight: 400;
  color: #6d7e70;
  margin-left: 5px;
}
.version-tag {
  align-self: center;
  margin-left: 16px;
  font:
    10px Consolas,
    monospace;
  letter-spacing: 1px;
  color: #6b8471;
  border: 1px solid #b9cabc;
  border-radius: 4px;
  padding: 5px 7px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 12px;
  transition: background 0.15s;
}
.button:hover {
  background: var(--panel);
}
.button.primary {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.button.primary:hover {
  background: var(--green-dark);
}
.button.danger {
  color: #a33c35;
  border-color: #e4bfbb;
}
.button.full {
  width: 100%;
  padding: 13px 16px;
  justify-content: space-between;
  font-size: 13px;
}
.button.small {
  padding: 7px 10px;
  font-size: 11px;
}
.small-label,
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.8px;
  color: var(--green);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #448465;
  margin-right: 6px;
}
.boot-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
/* Entrada */
.auth-screen {
  display: grid;
  grid-template-columns: 54% 46%;
  min-height: 100vh;
}
.auth-story {
  background: #e9efe5;
  padding: 38px 8% 23px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-story:after {
  content: "";
  position: absolute;
  right: -160px;
  top: 170px;
  border: 1px solid #d7e2d1;
  border-radius: 50%;
  width: 530px;
  height: 530px;
  pointer-events: none;
}
.auth-pitch {
  margin-top: 65px;
  z-index: 1;
}
.auth-pitch h1 {
  font-size: clamp(44px, 4.7vw, 72px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -3px;
  margin: 22px 0;
}
.auth-pitch h1 > span {
  color: var(--green);
}
.auth-pitch p {
  font-size: 14px;
  line-height: 1.8;
  color: #778474;
}
.editor-preview {
  width: 100%;
  max-width: 530px;
  background: #fcfdfb;
  border: 1px solid #d4ded0;
  border-radius: 9px;
  box-shadow: 0 14px 24px #3658380a;
  margin-top: 28px;
  z-index: 1;
  transform: rotate(-1deg);
  overflow: hidden;
}
.preview-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 38px;
  padding: 0 15px;
  border-bottom: 1px solid #e7ece3;
  color: #70846f;
  font:
    11px Consolas,
    monospace;
}
.preview-chrome > .icon {
  margin-left: auto;
  width: 15px;
}
.window-dots {
  display: flex;
  gap: 5px;
}
.window-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8d4c2;
}
.window-dots i:first-child {
  background: #e1b6a3;
}
.window-dots i:nth-child(2) {
  background: #dcca94;
}
.preview-code {
  display: flex;
  padding: 16px 0;
  font:
    12px/1.9 Consolas,
    "Courier New",
    monospace;
}
.preview-numbers {
  padding: 0 17px;
  color: #b6c0b0;
  text-align: right;
  border-right: 1px solid #eef1eb;
  user-select: none;
}
.preview-code pre {
  margin: 0 16px;
  font: inherit;
  white-space: pre-wrap;
}
.code-purple {
  color: #9862a1;
}
.code-muted {
  color: #92a08b;
}
.code-blue {
  color: #327c9b;
}
.code-green {
  color: #6c8944;
}
.cursor-demo {
  color: var(--green);
}
.preview-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid #e7ece3;
  background: #f2f6ef;
  color: #88937f;
  font-size: 9px;
}
.preview-footer .icon {
  width: 11px;
  height: 11px;
}
.auth-story-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #86937e;
  font-size: 10px;
  margin-top: auto;
  padding-top: 30px;
  z-index: 1;
}
.auth-story-footer .icon {
  width: 12px;
}
.auth-entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 44px 40px 22px;
  background: #fdfefc;
}
.auth-entry-inner {
  max-width: 366px;
  width: 100%;
  margin: auto 0;
}
.auth-entry h2 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.9px;
  margin: 14px 0 9px;
}
.auth-entry-inner > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 26px;
}
.segmented {
  display: flex;
  padding: 4px;
  border: 1px solid #e4e9df;
  background: #f1f4ee;
  border-radius: 7px;
  margin: 20px 0 26px;
}
.segmented button {
  flex: 1;
  padding: 10px 6px;
  font-weight: 550;
  font-size: 12px;
  color: var(--muted);
  border-radius: 5px;
}
.segmented .active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 4px #233e2610;
}
#auth-form > label,
#register-fields > label,
#assignment-fields > label {
  margin-bottom: 18px;
}
.password-field {
  position: relative;
  margin-top: 8px;
}
.password-field input {
  width: 100%;
  padding-right: 42px;
}
.password-field button {
  position: absolute;
  right: 7px;
  top: 4px;
  height: 32px;
  width: 32px;
  color: #91a08e;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.form-grid select {
  padding: 10px;
  font-size: 12px;
}
.form-error {
  border: 1px solid #f0d0c9;
  background: #fff1ed;
  color: #ad5142;
  border-radius: 6px;
  padding: 11px;
  line-height: 1.6;
  font-size: 12px;
}
.auth-bottom {
  display: flex;
  gap: 12px;
  justify-content: center;
  line-height: 1.8;
  font-size: 10px;
  color: #8b9687;
  margin-top: 29px;
  padding-top: 22px;
  border-top: 1px solid #e8ece3;
}
.auth-bottom .icon {
  margin-top: 5px;
  color: #819879;
}
.auth-bottom strong {
  font-weight: 400;
  color: #a4ad9e;
}
.auth-legal {
  display: flex;
  justify-content: space-between;
  max-width: 366px;
  width: 100%;
  margin-top: 35px;
  padding-top: 18px;
  color: #a0aa99;
  font-size: 9px;
}
.notice {
  display: flex;
  gap: 9px;
  background: var(--green-soft);
  padding: 12px;
  border-radius: 6px;
  color: #57745f;
  font-size: 12px;
  line-height: 1.7;
}
.notice .icon {
  width: 16px;
  margin-top: 2px;
}
.notice.compact {
  font-size: 10px;
  font-weight: 400;
  margin: 8px 0 17px;
}
.notice.warning {
  background: #fbf4e3;
  color: #927744;
}
/* Espacio de trabajo */
.workspace {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-header {
  height: 65px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}
.app-header .brand {
  font-size: 24px;
}
.app-header .brand-mark {
  height: 34px;
  width: 34px;
  border-radius: 8px;
}
.app-header .brand-mark .icon {
  width: 23px;
}
.header-divider {
  height: 22px;
  width: 1px;
  background: var(--line);
}
.workspace-label {
  color: #7f8a82;
  font-size: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.connection-status {
  font-size: 11px;
  color: #7c8c7f;
}
.connection-status.error {
  color: #ba5946;
}
.local-tag {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1.3px;
  background: var(--green-soft);
  color: #558563;
  padding: 5px 7px;
  border: 1px solid #d9e7db;
  border-radius: 4px;
}
.profile-button {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
}
.profile-button > .icon {
  width: 12px;
}
.avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0ebe1;
  color: #467552;
  border: 1px solid #d4e3d5;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.menu-bar {
  height: 33px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 0 17px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.menu {
  position: relative;
  font-size: 11px;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 4px;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu[open] summary,
.menu summary:hover {
  background: var(--green-soft);
}
.menu-popup {
  position: absolute;
  top: 30px;
  left: 0;
  min-width: 262px;
  border: 1px solid var(--line);
  padding: 5px;
  background: var(--paper);
  border-radius: 7px;
  box-shadow: 0 8px 24px #142a2120;
  z-index: 60;
}
.menu-popup button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  border-radius: 4px;
  font-size: 11px;
}
.menu-popup button:hover {
  background: var(--green-soft);
  color: var(--green);
}
kbd {
  font:
    9px "Segoe UI",
    sans-serif;
  color: #8f9a91;
  white-space: nowrap;
}
.menu-spacer,
.toolbar-spacer,
.status-spacer {
  flex: 1;
}
.menu-note {
  font-size: 10px;
  color: #a0a99f;
  margin-right: 10px;
}
.toolbar {
  height: 45px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  background: #f9fbf7;
  flex-shrink: 0;
}
.tool-button {
  width: 31px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #67806c;
}
.tool-button:hover {
  color: var(--green);
  background: #e6eee3;
}
.tool-button .icon {
  width: 17px;
  height: 17px;
}
.tool-button:first-child {
  color: var(--green);
}
.tool-divider {
  height: 17px;
  width: 1px;
  background: #dfe6da;
  margin: 0 9px;
}
.language-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.language-picker .icon {
  width: 14px;
}
.language-picker select {
  border: 0;
  background: none;
  padding: 5px 4px;
  margin: 0;
  width: 130px;
  color: #6b7c6d;
  font-size: 11px;
  box-shadow: none;
}
.work-area {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 0 13px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar > * {
  flex-shrink: 0;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1px;
  color: var(--ink);
  height: 36px;
  padding: 0 7px;
}
.sidebar-heading .icon {
  width: 16px;
}
.sidebar-heading .sidebar-create {
  width: auto;
  gap: 4px;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}
.new-note-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--green);
  border: 1px solid #236c50;
  color: white;
  border-radius: 6px;
  font-weight: 550;
  font-size: 12px;
  box-shadow: 0 2px 3px #244c3210;
}
.new-note-button:hover {
  background: var(--green-dark);
}
.new-note-button kbd {
  margin-left: auto;
  color: #c4dacb;
  font-size: 9px;
}
.new-note-button .icon {
  width: 16px;
}
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  padding: 0 10px;
}
.sidebar > .sidebar-search {
  margin: 10px 0 8px;
}
.sidebar-search .icon {
  width: 14px;
  height: 14px;
  color: #8a978a;
}
.sidebar-search input {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 9px 0;
  width: 100%;
  font-size: 11px;
}
.sidebar-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sidebar-nav button {
  gap: 7px;
  font-size: 12px;
}
.sidebar-nav button,
.folder-list button,
.trash-link,
.admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  width: 100%;
  font-size: 11px;
  border-radius: 5px;
  text-align: left;
  color: #7c897b;
}
.sidebar-nav button:hover,
.folder-list button:hover,
.trash-link:hover {
  background: #eaf0e6;
}
.sidebar-nav button.active,
.folder-list button.active,
.trash-link.active {
  color: var(--green);
  background: #e3ede2;
  font-weight: 600;
}
.sidebar-nav .icon,
.folder-list .icon,
.trash-link .icon,
.admin-link .icon {
  width: 16px;
  height: 16px;
}
.count {
  margin-left: auto;
  font-size: 9px;
  border-radius: 4px;
  min-width: 18px;
  padding: 2px 4px;
  text-align: center;
  color: #899981;
}
.active > .count {
  background: #d3e3d0;
  color: #548357;
}
.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1.1px;
  color: #99a28f;
  font-weight: 550;
  margin: 26px 8px 9px;
}
.sidebar-section-title > span + span {
  font-size: 9px;
  letter-spacing: 0;
}
.folder-list {
  flex-shrink: 0;
  max-height: 120px;
  overflow: auto;
}
.folder-list button {
  padding: 8px 10px;
}
.folder-list button > .icon {
  color: #b4a56c;
}
.folder-list button span:first-of-type {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.note-section {
  margin: 10px 5px 6px;
  height: 25px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.6px;
  color: var(--ink);
}
.note-section .icon {
  width: 12px;
}
.note-list {
  flex: 1 0 180px;
  min-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 3px 4px 0;
  scrollbar-width: thin;
  scrollbar-color: #becdb7 transparent;
}
.note-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
  margin: 0 0 5px;
  color: var(--ink);
  background: var(--paper);
}
.note-item:hover {
  background: #ebf1e6;
}
.note-item:last-child {
  margin-bottom: 0;
}
.note-item.active {
  background: var(--green-soft);
  border-color: #9fbea3;
  box-shadow: inset 3px 0 0 var(--green);
  color: var(--green);
}
.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 29px;
  border: 1px solid #cfddc8;
  background: #edf4e8;
  border-radius: 3px;
  font:
    7px Consolas,
    monospace;
  color: #739759;
  flex-shrink: 0;
}
.file-icon.php {
  background: #eff0f9;
  color: #8c85aa;
  border-color: #d8d7e9;
}
.file-icon.javascript {
  background: #fcf5dc;
  border-color: #e6dfbd;
  color: #a59442;
}
.file-icon.text {
  background: #f0f3ed;
  color: #8a9680;
  border-color: #dbe2d4;
}
.note-info {
  min-width: 0;
  flex: 1;
}
.note-info strong {
  display: block;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
.note-info small {
  display: block;
  font-size: 10px;
  color: #6f806b;
  margin-top: 5px;
}
.note-item > .icon {
  height: 11px;
  width: 11px;
  color: #a2ac94;
}
.sidebar-bottom {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.sidebar-folders {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.sidebar-folders summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  list-style: none;
  cursor: pointer;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-folders summary::-webkit-details-marker {
  display: none;
}
.sidebar-folders summary:hover {
  color: var(--green);
  background: var(--green-soft);
}
.sidebar-folders summary .icon {
  width: 15px;
  height: 15px;
}
.sidebar-folders summary > .icon:last-child {
  transform: rotate(-90deg);
  transition: transform 0.15s;
}
.sidebar-folders[open] summary > .icon:last-child {
  transform: rotate(0deg);
}
.sidebar-folders summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.sidebar-bottom .followups-link {
  margin: 0 0 4px;
  padding: 8px 10px;
  font-size: 12px;
}
.sidebar-shortcuts {
  display: flex;
  gap: 7px;
}
.sidebar-shortcuts .followups-link,
.sidebar-shortcuts .admin-link {
  flex: 1;
  justify-content: center;
  width: auto;
  min-width: 0;
  margin: 0;
  gap: 7px;
  padding: 9px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
}
.sidebar-shortcuts .admin-link:hover {
  color: var(--green);
  background: var(--green-soft);
}
.sidebar-user .trash-link {
  width: auto;
  gap: 3px;
  padding: 5px;
  flex-shrink: 0;
}
.sidebar-user .trash-link .count {
  padding: 2px;
  min-width: 10px;
}
.sidebar-bottom .trash-link,
.sidebar-bottom .admin-link {
  padding-top: 8px;
  padding-bottom: 8px;
}
.admin-link {
  color: #6d826a;
  margin-top: 4px;
}
.admin-link .icon:last-child {
  width: 12px;
  margin-left: auto;
}
.admin-link.active {
  background: #e3ede2;
  color: var(--green);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 9px 4px;
  margin: 4px 7px 0;
}
.sidebar-user > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.sidebar-user strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.sidebar-user small {
  display: block;
  font-size: 9px;
  color: #98a18e;
  margin-top: 4px;
}
.sidebar-user .icon {
  width: 15px;
}
.main-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--paper);
}
.editor-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tabs-bar {
  display: flex;
  height: 43px;
  flex-shrink: 0;
  background: #eef2eb;
  border-bottom: 1px solid var(--line);
  padding: 6px 7px 0;
}
.tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
  gap: 3px;
}
.note-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 135px;
  max-width: 220px;
  padding: 0 8px 0 13px;
  color: #929c88;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  font-size: 11px;
}
.note-tab.active {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: inset 0 2px 0 var(--green);
  color: var(--ink);
}
.note-tab > .icon {
  width: 13px;
  color: #88a17a;
}
.note-tab > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.note-tab .tab-close {
  height: 21px;
  width: 21px;
  margin-left: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  padding: 3px;
  color: #a3ab98;
}
.tab-close:hover {
  background: #edf0e8;
}
.tab-close > .icon {
  height: 11px;
  width: 11px;
}
.tab-dirty {
  font-size: 9px;
  color: var(--green);
}
.tab-new {
  color: #8c9985;
  padding: 4px 11px;
  margin-bottom: 4px;
}
.tab-new .icon {
  width: 15px;
}
.document-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 22px;
  border-bottom: 1px solid #edf0e9;
  flex-shrink: 0;
  background: var(--paper);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-size: 10px;
  color: #a5ac9e;
}
.breadcrumb > .icon {
  width: 12px;
  height: 12px;
}
.breadcrumb strong {
  font-weight: 450;
  color: #809079;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.document-actions {
  display: flex;
  gap: 5px;
}
.document-actions .icon {
  width: 15px;
}
.is-favorite .icon {
  fill: #e4d495;
  color: #b39c48;
}
.editor-container {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--editor);
  overflow: hidden;
}
.CodeMirror {
  height: 100%;
  font:
    13px/1.8 Consolas,
    "Cascadia Mono",
    "Courier New",
    monospace;
  color: #43513e;
  background: var(--editor);
}
.CodeMirror-lines {
  padding: 22px 0 40px;
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
  padding: 0 18px;
}
.CodeMirror-gutters {
  background: #fafcf8;
  border-right: 1px solid #eef1e9;
  padding-left: 7px;
}
.CodeMirror-linenumber {
  color: #bcc6b3;
  padding: 0 9px 0 6px;
  font-size: 11px;
}
.CodeMirror-activeline-background {
  background: #f2f7ed;
}
.CodeMirror-selected {
  background: #dcead3 !important;
}
.CodeMirror-cursor {
  border-left-color: var(--green);
}
.CodeMirror-foldgutter {
  width: 14px;
}
.cm-s-default .cm-header {
  color: #467b47;
  font-weight: 600;
}
.cm-s-default .cm-comment {
  color: #9aa78f;
}
.cm-s-default .cm-string {
  color: #7d984b;
}
.cm-s-default .cm-keyword {
  color: #9478a7;
}
.cm-s-default .cm-def {
  color: #4d8a9d;
}
.cm-s-default .cm-variable-2 {
  color: #a28849;
}
.cm-s-default .cm-meta {
  color: #9483af;
}
.editor-status {
  height: 27px;
  background: #edf3e8;
  border-top: 1px solid #e1e9da;
  display: flex;
  align-items: center;
  font-size: 9px;
  color: #849577;
  flex-shrink: 0;
  gap: 0;
}
.editor-status > span,
.editor-status > button {
  padding: 0 16px;
  border-right: 1px solid #dce5d4;
  white-space: nowrap;
}
.editor-status .status-spacer {
  border: 0;
}
.editor-status > button {
  font-size: 9px;
  color: #849577;
}
.empty-editor {
  position: absolute;
  inset: 0;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}
.empty-editor h2 {
  font-weight: 500;
  font-size: 23px;
  color: var(--ink);
  letter-spacing: -0.6px;
  margin: 20px 0 0;
}
.empty-editor p {
  font-size: 12px;
  line-height: 1.7;
}
.empty-editor .button {
  margin-top: 15px;
}
.empty-editor small {
  font-size: 10px;
  margin-top: 16px;
  color: #a0ab97;
}
.empty-symbol {
  height: 65px;
  width: 65px;
  border-radius: 18px;
  background: var(--green-soft);
  color: #91ae85;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-symbol .icon {
  height: 35px;
  width: 35px;
}
.search-panel {
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.search-row + .search-row {
  margin-top: 8px;
}
.search-row > input {
  padding: 7px 10px;
  flex: 1;
  max-width: 460px;
  font-size: 11px;
}
.search-row label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  white-space: nowrap;
}
.search-row label input {
  margin: 0;
}
.search-row > span {
  font-size: 10px;
  color: var(--muted);
  min-width: 80px;
}
.mobile-toggle {
  display: none;
}
/* Administración */
.admin-view {
  height: 100%;
  overflow: auto;
  background: #f8faf6;
  padding: 35px 38px;
}
.admin-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.admin-title h1 {
  font-weight: 550;
  font-size: 27px;
  letter-spacing: -1px;
  margin: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.admin-title p {
  color: #899580;
  font-size: 12px;
}
.admin-badge {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  background: #e7efe3;
  color: #6d8d5d;
  border: 1px solid #d7e4cf;
  border-radius: 5px;
  font-size: 9px;
  padding: 4px 7px;
  letter-spacing: 0;
}
.admin-badge .icon {
  width: 11px;
  height: 11px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 25px 0 29px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 21px;
  background: var(--paper);
}
.stat-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #96a089;
}
.stat-card .icon {
  width: 17px;
  color: #8aaa77;
}
.stat-card strong {
  font-size: 28px;
  font-weight: 500;
  display: block;
  margin-top: 14px;
  letter-spacing: -1px;
}
.stat-card small {
  font-size: 9px;
  display: block;
  color: #abb39f;
  margin-top: 5px;
}
.admin-section {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
}
.admin-tabs {
  display: flex;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.admin-tabs button {
  padding: 17px 0 15px;
  color: #9aa58f;
  font-size: 11px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.admin-tabs button.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.admin-filters {
  display: flex;
  gap: 12px;
  padding: 18px 22px;
  align-items: center;
}
.admin-filters .sidebar-search {
  flex: 1;
  max-width: 380px;
}
.admin-filters select {
  font-size: 10px;
  padding: 8px 10px;
}
.admin-filters > .button {
  margin-left: auto;
}
.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 440px);
  min-height: 150px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  white-space: nowrap;
}
th {
  text-align: left;
  padding: 13px 21px;
  background: #f6f9f3;
  color: #9aa68e;
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.6px;
  position: sticky;
  top: 0;
  z-index: 1;
}
td {
  padding: 15px 21px;
  border-top: 1px solid #edf1e8;
  color: #829175;
}
tr:hover td {
  background: #fcfdfb;
}
td strong {
  display: block;
  color: #53654b;
  font-size: 11px;
  font-weight: 500;
}
td small {
  display: block;
  font-size: 9px;
  color: #a6b09c;
  margin-top: 4px;
}
.table-note {
  display: flex;
  gap: 9px;
  align-items: center;
}
.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 7px;
  background: #eef3e9;
  color: #7c9669;
  font-size: 9px;
}
.badge.gray {
  background: #f0f1ed;
  color: #939b88;
}
.badge.amber {
  background: #faf3e0;
  color: #a79864;
}
.table-action {
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  border: 1px solid #dbe6d4;
  border-radius: 4px;
  padding: 6px 9px;
  white-space: nowrap;
}
.table-action:hover {
  background: var(--green-soft);
}
.admin-notice {
  font-size: 10px;
  color: #9b8e63;
  padding: 10px 22px;
  margin: 0;
  background: #fcf8ed;
  border-top: 1px solid #eee7d3;
}
.admin-notice .icon {
  width: 13px;
  height: 13px;
  margin-right: 5px;
}
.password-value {
  font:
    12px Consolas,
    monospace;
  background: var(--green-soft);
  padding: 5px 8px;
  border-radius: 3px;
  user-select: all;
}
.table-empty {
  padding: 50px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.table-footer {
  border-top: 1px solid var(--line);
  padding: 12px 22px;
  font-size: 9px;
  color: #a0ac93;
  background: #fcfdfb;
}
/* Diálogos y avisos */
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: 90dvh;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #1e342d50;
  backdrop-filter: blur(2px);
}
.modal-header {
  padding: 25px 25px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
  font-weight: 550;
  margin: 10px 0 0;
}
.modal-header .small-label {
  font-size: 8px;
}
#modal-body {
  padding: 21px 25px;
  font-size: 12px;
  line-height: 1.7;
  max-height: 57dvh;
  overflow: auto;
}
#modal-body > label {
  margin-bottom: 17px;
}
#modal-body > label:last-child {
  margin-bottom: 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 17px 25px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
#modal-error {
  margin: 0 25px 15px;
}
.modal-copy {
  color: var(--muted);
  margin: 0 0 17px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-align: left;
}
.history-list button:hover {
  background: var(--green-soft);
}
.history-list strong {
  font-weight: 500;
  font-size: 11px;
  display: block;
}
.history-list small {
  color: var(--muted);
  font-size: 10px;
}
.revision-content {
  font:
    11px/1.6 Consolas,
    monospace;
  max-height: 240px;
  white-space: pre-wrap;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 5px;
}
.shortcut-table td {
  font-size: 11px;
  padding: 8px 0;
}
.shortcut-table td:last-child {
  text-align: right;
  color: var(--green);
  font:
    11px Consolas,
    monospace;
}
#toast-container {
  position: fixed;
  right: 22px;
  bottom: 43px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  min-width: 230px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  background: #244e3b;
  color: #eef5ed;
  font-size: 11px;
  border: 1px solid #49735a;
  border-radius: 7px;
  box-shadow: 0 4px 20px #1f3c2520;
  line-height: 1.6;
}
.toast.error {
  background: #8e493c;
  border-color: #a46c59;
}
.toast .icon {
  width: 15px;
}
.empty-list {
  text-align: center;
  padding: 25px 10px;
  color: #a0ab96;
  font-size: 11px;
  line-height: 1.7;
}
/* Tema oscuro */
body.dark {
  --green: #7cb48d;
  --green-dark: #507e5c;
  --green-soft: #293e32;
  --ink: #d1ddce;
  --muted: #8b9c86;
  --line: #354333;
  --panel: #212c23;
  --paper: #263129;
  --editor: #263129;
  color-scheme: dark;
}
.dark .toolbar,
.dark .tabs-bar,
.dark .editor-status {
  background: #243026;
}
.dark .tool-button,
.dark .language-picker select {
  color: #a0b697;
}
.dark .CodeMirror {
  color: #c4d1bc;
}
.dark .CodeMirror-gutters {
  background: #232e25;
  border-color: #354333;
}
.dark .CodeMirror-activeline-background {
  background: #2d3d2e;
}
.dark .CodeMirror-selected {
  background: #3d583c !important;
}
.dark .CodeMirror-linenumber {
  color: #61745a;
}
.dark .note-item.active,
.dark .admin-view {
  background: #263129;
}
.dark .sidebar-nav button:hover,
.dark .folder-list button:hover,
.dark .note-item:hover {
  background: #2b3a2c;
}
.dark .sidebar-nav button.active,
.dark .folder-list button.active,
.dark .trash-link.active {
  background: #304433;
}
.dark th,
.dark .table-footer {
  background: #222e24;
}
.dark td {
  border-color: #354333;
}
.dark td strong {
  color: #b8cfad;
}
.dark tr:hover td {
  background: #2c3b2e;
}
.dark .menu-note {
  color: #687e5e;
}
.dark .segmented {
  background: #27342a;
}
.dark .admin-notice,
.dark .notice.warning {
  background: #3c3828;
  color: #c2b781;
}
.dark .breadcrumb,
.dark .breadcrumb strong {
  color: #8da782;
}
.dark .file-icon {
  background: #32432d;
  border-color: #4b5c41;
}
.dark .stat-card {
  background: var(--paper);
}
@media (min-width: 1600px) {
  .auth-story {
    padding-left: 14%;
    padding-right: 14%;
  }
  .auth-pitch {
    margin-top: 75px;
  }
  .editor-preview {
    margin-top: 36px;
  }
  .sidebar {
    width: 320px;
  }
  .CodeMirror {
    font-size: 14px;
  }
  .admin-view {
    padding: 40px 50px;
  }
}
@media (max-width: 1000px) {
  .auth-story {
    padding-left: 10%;
    padding-right: 10%;
  }
  .auth-pitch h1 {
    font-size: 51px;
  }
  .version-tag {
    display: none;
  }
  .auth-entry {
    padding: 30px;
  }
  .sidebar {
    width: 280px;
  }
  .toolbar {
    padding: 0 12px;
  }
  .tool-divider {
    margin: 0 5px;
  }
  .header-right {
    gap: 14px;
  }
  .workspace-label {
    display: none;
  }
  .admin-view {
    padding: 25px 22px;
  }
  .stats-grid {
    gap: 9px;
  }
  .stat-card {
    padding: 14px;
  }
  .admin-title h1 {
    font-size: 23px;
  }
  .admin-badge {
    display: none;
  }
  .admin-title .button {
    font-size: 10px;
    padding: 8px;
  }
  .admin-tabs {
    gap: 19px;
    padding: 0 16px;
  }
  .admin-filters {
    padding: 14px 16px;
  }
  .menu-note {
    display: none;
  }
}
@media (max-width: 720px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 25px 30px;
  }
  .auth-pitch {
    margin-top: 30px;
  }
  .auth-pitch h1 {
    font-size: 38px;
    letter-spacing: -1.6px;
  }
  .auth-pitch h1 br {
    display: none;
  }
  .auth-pitch h1 br:after {
    content: " ";
  }
  .auth-pitch p,
  .editor-preview,
  .auth-story-footer {
    display: none;
  }
  .auth-entry {
    padding: 30px 24px;
  }
  .auth-entry-inner {
    max-width: 420px;
  }
  .auth-legal {
    max-width: 420px;
  }
  .auth-entry h2 {
    font-size: 25px;
  }
  .auth-story:after {
    display: none;
  }
  .app-header {
    padding: 0 12px;
    height: 55px;
  }
  .app-brand {
    gap: 9px;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .header-divider,
  .local-tag,
  #header-username,
  .connection-status .status-dot {
    display: none;
  }
  .app-header .brand {
    font-size: 21px;
  }
  .app-header .brand-mark {
    width: 29px;
    height: 29px;
  }
  .header-right {
    gap: 11px;
  }
  .connection-status {
    font-size: 9px;
  }
  .menu-bar {
    padding: 0 5px;
    gap: 0;
  }
  .menu summary {
    padding: 7px 8px;
    font-size: 10px;
  }
  .menu-popup {
    min-width: 228px;
  }
  .menu:nth-child(n + 4) .menu-popup {
    left: auto;
    right: 0;
  }
  .toolbar {
    gap: 1px;
    height: 40px;
    padding: 0 7px;
  }
  .tool-button {
    width: 27px;
  }
  .toolbar .tool-divider {
    margin: 0 3px;
  }
  .toolbar .tool-button[data-command="export"],
  .toolbar .tool-button[data-command="comment"],
  .toolbar .tool-button[data-command="history"] {
    display: none;
  }
  .language-picker .icon {
    display: none;
  }
  .language-picker select {
    width: 90px;
    font-size: 10px;
  }
  .sidebar {
    position: absolute;
    top: 128px;
    bottom: 0;
    left: 0;
    z-index: 35;
    width: min(340px, calc(100vw - 24px));
    box-shadow: 10px 0 30px #20382520;
    transform: translateX(-105%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .document-heading {
    padding: 0 12px;
    height: 37px;
  }
  .breadcrumb {
    gap: 7px;
    font-size: 9px;
  }
  .breadcrumb > .icon {
    display: none;
  }
  .CodeMirror {
    font-size: 12px;
  }
  .CodeMirror-lines {
    padding-top: 15px;
  }
  .editor-status > span,
  .editor-status > button {
    padding: 0 7px;
    font-size: 8px;
  }
  #status-size {
    display: none;
  }
  .note-tab {
    min-width: 120px;
  }
  .search-row {
    gap: 5px;
  }
  .search-panel {
    padding: 8px;
  }
  .search-row > span {
    min-width: 40px;
    font-size: 8px;
  }
  .search-row .button {
    padding: 5px;
  }
  .search-row label {
    font-size: 9px;
  }
  .search-row input[type="checkbox"] {
    width: 12px;
    height: 12px;
  }
  .admin-view {
    padding: 20px 13px;
  }
  .admin-title {
    align-items: flex-start;
  }
  .admin-title h1 {
    font-size: 21px;
  }
  .admin-title p {
    font-size: 11px;
  }
  .admin-title > .button {
    font-size: 0;
    padding: 8px;
  }
  .admin-title > .button .icon {
    width: 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 18px 0;
  }
  .stat-card strong {
    font-size: 25px;
    margin-top: 8px;
  }
  .admin-tabs {
    gap: 18px;
  }
  .admin-tabs button {
    font-size: 10px;
  }
  .admin-filters {
    flex-wrap: wrap;
  }
  .admin-filters .sidebar-search {
    flex-basis: 100%;
    max-width: none;
  }
  .admin-filters select {
    flex: 1;
  }
  .table-wrap {
    max-height: none;
  }
  td,
  th {
    padding: 12px 15px;
  }
  #toast-container {
    right: 12px;
    left: 12px;
    bottom: 38px;
  }
  .toast {
    max-width: 100%;
    min-width: 0;
  }
  .form-grid {
    gap: 9px;
  }
  .modal-header,
  #modal-body,
  .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.trash-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbf4e3;
  color: #927744;
  padding: 9px 18px;
  font-size: 11px;
  border-bottom: 1px solid #eee5ce;
}
.trash-banner span {
  flex: 1;
}
.trash-banner .icon {
  width: 15px;
}

body.dark {
  color: var(--ink);
}
.dark .brand-suffix,
.dark .workspace-label,
.dark .sidebar-user small {
  color: #9ab393;
}
.dark .document-heading,
.dark .editor-status,
.dark .local-tag {
  border-color: var(--line);
}
.dark .button.primary,
.dark .new-note-button,
.dark .brand-mark {
  background: #3e7a53;
  color: #f0f8ee;
  border-color: #4d8b61;
}
.dark .note-info small {
  color: #a8bda1;
}
.dark .note-item.active {
  background: var(--green-soft);
  border-color: #708e65;
}
.dark .note-list {
  scrollbar-color: #61785b transparent;
}

/* PowerNOte uses the supplied logo at its original proportions. */
.brand-logo {
  display: block;
  width: 92px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.9px;
  white-space: nowrap;
}
.app-header .brand {
  gap: 13px;
}
.auth-brand {
  flex-wrap: wrap;
  gap: 16px;
}
.auth-brand .brand-logo {
  width: 146px;
  height: 87px;
}
.auth-brand .brand-name {
  font-size: 31px;
}
.auth-brand .version-tag {
  margin-left: 0;
}
.boot-logo {
  width: 170px;
  height: auto;
  object-fit: contain;
  margin-bottom: 15px;
}
.boot-name {
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.8px;
}
@media (max-width: 1000px) {
  .app-header .brand-logo {
    width: 80px;
    height: 48px;
  }
  .app-header .brand-name {
    font-size: 24px;
  }
  .auth-brand .brand-logo {
    width: 128px;
    height: 76px;
  }
  .auth-brand .brand-name {
    font-size: 29px;
  }
}
@media (max-width: 720px) {
  .app-header .brand {
    gap: 8px;
  }
  .app-header .brand-logo {
    width: 64px;
    height: 38px;
  }
  .app-header .brand-name {
    font-size: 20px;
    letter-spacing: -0.6px;
  }
  .auth-brand {
    gap: 13px;
  }
  .auth-brand .brand-logo {
    width: 110px;
    height: 65px;
  }
  .auth-brand .brand-name {
    font-size: 28px;
  }
}
@media (max-width: 400px) {
  .app-header .brand-logo {
    width: 52px;
    height: 32px;
  }
  .app-header .brand-name {
    font-size: 18px;
  }
}
