html, body {
  margin: 0;
  font-family: "Host Grotesk", sans-serif;
  background: #fff;
  color: #000;
}

.portal-title {
  position: absolute;
  top: 15%;
  left: 8%;
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #333;
}

.field label {
  display: block;
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 15px;
  border: 0;
  border-bottom: 1px solid #000;
  border-radius: 0;
  padding: 6px 0;
  background: transparent;
  outline: none;
}

.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #000;
}

.btn:hover { text-decoration: underline; }
.btn-blue { color: #0024ff; }
.muted { opacity: 0.5; }

.error {
  margin: 0;
  font-size: 13px;
}

/* Login: home composition, artwork on the right third */
.login {
  display: flex;
  min-height: 100vh;
}

.login-left {
  position: relative;
  width: 66.666%;
}

.login-form {
  position: absolute;
  top: 42%;
  left: 20%;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-right {
  width: 33.333%;
  background: #f5f5f5 url("/assets/login.jpg") center / cover;
}

/* Panel: scattered words like the home page */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 40px 8px;
  font-size: 14px;
  font-weight: 500;
}

.topbar nav { display: flex; gap: 26px; }

.topbar a {
  color: #000;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.25s ease;
}

.topbar a:hover { opacity: 0.6; }
.topbar a.activo { font-weight: 700; opacity: 1; }
.topbar form { margin: 0; }

.panel {
  position: relative;
  min-height: calc(100vh - 48px);
}

.panel-item {
  position: absolute;
  font-size: 1rem;
  color: #000;
  text-decoration: none;
}

a.panel-item:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .login { flex-direction: column; }
  .login-left { width: 100%; min-height: 70vh; }
  .login-form { left: 8%; width: 84%; max-width: 320px; }
  .login-right { width: 100%; min-height: 30vh; }
  .topbar { padding: 20px 16px 8px; }
}

/* Agregar obra: form left, live preview right */
.editor {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 60px;
  padding: 60px 60px 80px;
}

.editor-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 30px;
}

.editor fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.editor.locked .drop,
.editor.locked .thumbs,
.editor.locked .form {
  opacity: 0.4;
  pointer-events: none;
}

.drop {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px dashed #000;
  border-radius: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: #000;
  cursor: pointer;
}

.drop span { opacity: 0.6; font-size: 12px; }
.drop.over { border-style: solid; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 36px;
}

.thumbs:empty { margin-bottom: 20px; }

.thumb {
  position: relative;
  aspect-ratio: 1;
  background: #f5f5f5 center / cover;
  cursor: grab;
}

.thumb.dragging { opacity: 0.3; }

.thumb .n {
  position: absolute;
  left: 4px;
  top: 2px;
  font-size: 11px;
  color: #fff;
  mix-blend-mode: difference;
}

.thumb .x {
  position: absolute;
  right: 4px;
  top: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: #fff;
  mix-blend-mode: difference;
  cursor: pointer;
}

.thumb .proc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0.6;
}

.thumb.portada::after {
  content: "portada";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1px 0;
  font-size: 10px;
  text-align: center;
  background: #0024ff;
  color: #fff;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field .label {
  display: block;
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.field textarea {
  width: 100%;
  min-height: 90px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 0;
  font: inherit;
  font-size: 15px;
  background: transparent;
  outline: none;
  resize: vertical;
}

.cats {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.cats label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

.actions[hidden], .confirm[hidden], .estado[hidden], .confirm-actions[hidden] { display: none; }

.btn:disabled {
  opacity: 0.3;
  cursor: default;
  text-decoration: none;
}

.confirm, .estado { font-size: 14px; }
.confirm { margin-top: 24px; }
.estado { margin-bottom: 30px; }

.confirm p, .estado p { margin: 0 0 12px; }
.estado a { color: #0024ff; text-decoration: none; }
.estado a:hover { text-decoration: underline; }

.confirm-actions {
  display: flex;
  gap: 26px;
}

.aviso {
  min-height: 1.4em;
  margin: 16px 0 0;
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 24px;
}

.tab {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  opacity: 0.5;
  cursor: pointer;
}

.tab.on { font-weight: 700; opacity: 1; }

.preview {
  border: 1px solid #eee;
  padding: 50px 40px;
}

.preview[hidden] { display: none; }
.preview .obra-detalle-titulo { margin-top: 0; }
.preview .objetual-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }

.obra-item.new .obra-imagen-container {
  outline: 2px solid #0024ff;
  outline-offset: 4px;
}

.obra-item.new .obra-nombre { color: #0024ff; }

@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; padding: 32px 16px 60px; gap: 40px; }
  .preview { padding: 24px 16px; }
  .preview .objetual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Gestionar obras: the public grid with actions under each tile */
.manage { padding: 60px 60px 80px; }
.manage .editor-title { margin-bottom: 8px; }

.manage-count {
  margin: 0 0 16px;
  font-size: 14px;
  opacity: 0.6;
}

.manage-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 20px;
  background: #fff;
}

.manage-bar .estado, .manage-bar .aviso, .manage-order { margin: 0; padding: 12px 0; }
.manage-bar .aviso[hidden], .manage-order[hidden] { display: none; }

.manage-order {
  display: flex;
  align-items: baseline;
  gap: 26px;
  font-size: 14px;
}

.manage-hint { font-size: 13px; opacity: 0.6; }

.manage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 30px;
}

.manage-tile { cursor: grab; }
.manage-tile[draggable="false"] { cursor: default; }
.manage-tile.dragging { opacity: 0.3; }

.manage-img {
  aspect-ratio: 4 / 5;
  margin-bottom: 12px;
  background: #f5f5f5;
}

.manage-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manage-title {
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.manage-tag {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.6;
}

.manage-tile.oculta .manage-img { opacity: 0.25; }
.manage-tile.oculta .manage-title { opacity: 0.4; }

.manage-acts {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
}

.manage-acts .btn { font-size: 13px; }
.manage-acts .btn.on { text-decoration: underline; }

.manage-confirm {
  grid-column: 1 / -1;
  padding: 18px 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 14px;
  line-height: 1.6;
}

.manage-confirm p { margin: 0 0 10px; }
.manage-confirm b { font-weight: 600; }

@media (max-width: 900px) {
  .manage { padding: 32px 16px 60px; }
  .manage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
}
