:root {
  --bg: #fff;
  --fg: #000;
  --muted: #555;
  --line: #ccc;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.44 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 24px;
}

.hidden {
  display: none !important;
}

.tac {
  text-align: center;
}

.b {
  font-weight: 800;
}

.action {
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action.bold {
  font-weight: 800;
}

.action.current {
  pointer-events: none;
  opacity: .7;
}

.btn {
  appearance: none;
  border: 2px solid var(--fg);
  background: transparent;
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.solid {
  background: var(--fg);
  color: var(--bg);
}

.btn.ghost {
  background: var(--bg);
  color: var(--fg);
}

.btn.tiny {
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 800;
}

.btn.linklike {
  border: none;
  background: transparent;
  padding: 0 4px;
  font-weight: 800;
  cursor: pointer;
}

.status-inline {
  margin-left: 12px;
  color: var(--muted);
}

.sep {
  color: var(--muted);
  padding: 0 6px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

/* Icon Buttons - Consistent Size */
.icon-btn {
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
  color: var(--fg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: #eee;
}

.icon-btn svg {
  display: block;
  width: 24px;
  height: 24px;
}

.toolbar-bottom .icon-btn {
  border: 1px solid transparent;
}

.toolbar-bottom .icon-btn:hover {
  border-color: var(--fg);
  background: transparent;
}

/* estados destructivos */
.action.danger {
  color: #000;
}

.btn.danger {
  border-color: #000;
  color: #000;
}

.btn.danger.solid {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* AUTH — sin contenedores ni cajas */
.auth-plain {
  max-width: 680px;
  margin: 24px auto;
}

.auth-lines {
  max-width: 520px;
  margin: 18px auto 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-lines input {
  padding: 12px 4px;
  border: none;
  border-bottom: 2px solid var(--fg);
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 18px;
  font-family: inherit;
}

.auth-actions-plain {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
}

/* LISTS */
.page-with-footer {
  padding-bottom: 120px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--fg);
  padding-bottom: 12px;
}

.barTitle {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.list .row {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.list .t {
  font-weight: 800;
  text-transform: uppercase;
  display: block;
  font-size: 18px;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.list .preview {
  margin-top: 6px;
  color: #444;
  font-size: 15px;
}

.list .date {
  position: absolute;
  right: 0;
  top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.row .sel {
  position: absolute;
  left: -32px;
  top: 24px;
  transform: scale(1.5);
  accent-color: #000;
}

.list.has-select {
  margin-left: 32px;
}

/* Folder Headers in List */
.folder-header {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

/* FOOTERS (listas + editor) */
.foot-page {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 2px solid var(--fg);
  z-index: 10;
  padding-bottom: 10px;
}

.two-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.two-rows .row-1,
.two-rows .row-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 8px 16px;
}

/* SEND / DELETE / USER bars */
.send-bar {
  background: #fff;
}

.sendbar-center {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  white-space: nowrap;
}

.sendto-label {
  font-weight: 800;
}

.sendto-input {
  padding: 8px;
  border: none;
  border-bottom: 2px dashed var(--fg);
  background: transparent;
  min-width: 280px;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
}

.sendbar-msg {
  position: absolute;
  right: 16px;
  color: var(--muted);
}

.send-formats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 12px;
}

.fmt.solid {
  background: #000;
  color: #fff;
}

/* EDITOR (barra abajo) */
.editor-with-footer {
  padding-bottom: 140px;
}

.sheet {
  max-width: 980px;
  margin: 0 auto;
}

.toolbar-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-bottom button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.edit-actions-one {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.title-edit {
  display: block;
  font-size: 36px;
  font-weight: 900;
  margin: 24px 0 10px;
  line-height: 1.2;
  outline: none;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  font-family: inherit;
}

.title-edit:focus {
  border-bottom: 1px solid var(--line);
}

.title-edit.is-placeholder {
  color: #333;
  opacity: .6;
}

.folder-input {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid transparent;
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
  outline: none;
  font-family: inherit;
  font-weight: 600;
}

.folder-input:focus {
  border-bottom: 1px solid var(--line);
  color: var(--fg);
}

.body-input {
  min-height: 60vh;
  outline: none;
  padding-top: 8px;
  text-align: inherit;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 700;
  /* Bold body text */
}

.body-input:empty:before {
  content: attr(data-ph);
  color: #999;
  pointer-events: none;
  font-weight: 400;
}

.body-input .is-h1 {
  font-size: 2em;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.body-input ul,
.body-input ol {
  list-style-position: inside;
  padding-left: 0;
  margin: .8em 0;
  text-align: inherit;
}

@media (max-width:800px) {

  .two-rows .row-1,
  .two-rows .row-2 {
    overflow-x: auto;
    justify-content: space-around;
  }

  .barTitle {
    font-size: 20px;
  }

  .list .t {
    font-size: 16px;
  }
}