@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-Light.otf') format('opentype'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-LightItalic.otf') format('opentype'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-RegularItalic.otf') format('opentype'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-Medium.otf') format('opentype'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-MediumItalic.otf') format('opentype'); font-weight: 500; font-style: italic; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-Bold.otf') format('opentype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Klavika'; src: url('/fonts/Klavika-BoldItalic.otf') format('opentype'); font-weight: 700; font-style: italic; }

:root {
  --ink: #24272a;
  --yellow: #ffcd00;
  --yellow-tint: #fff7d9;
  --paper: #f5f4f1;
  --surface: #ffffff;
  --line: #e2e0da;
  --ink-soft: #6b6f73;
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  font-family: 'Klavika', Arial, sans-serif;
  font-weight: 400;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-size: 17px;
}
.num { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.mark {
  width: 34px; height: 34px;
  background: var(--ink);
  border-radius: 8px;
  position: relative;
  flex: 0 0 auto;
}
.mark::before {
  content: "";
  position: absolute; top: 7px; left: 7px; right: 7px;
  height: 5px; background: var(--yellow); border-radius: 1px;
}
.mark::after {
  content: "";
  position: absolute; left: 7px; right: 7px; bottom: 7px; height: 11px;
  background: #fff;
  clip-path: polygon(0 0, 28% 0, 28% 55%, 72% 55%, 72% 0, 100% 0, 100% 100%, 0 100%);
}
.wordmark { font-family: 'Klavika', Arial, sans-serif; font-weight: 700; font-size: 21px; line-height: 1; }
.wordmark small {
  display: block; font-family: 'Klavika', Arial, sans-serif; font-weight: 500;
  font-size: 9px; letter-spacing: 0.14em; color: var(--ink-soft); margin-top: 4px;
}

.btn-ghost {
  background: none; border: 2px solid var(--ink);
  padding: 14px 18px; border-radius: 8px;
  font: 700 16px 'Klavika', Arial, sans-serif; color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-block; min-height: 52px;
}
button.primary, a.primary {
  background: var(--ink); color: white;
  border: none; padding: 16px 22px; border-radius: 8px;
  font: 700 18px 'Klavika', Arial, sans-serif;
  cursor: pointer; text-align: center; text-decoration: none; display: inline-block;
  min-height: 56px;
}
button.action {
  background: var(--yellow); color: var(--ink);
  border: none; padding: 14px 18px; border-radius: 8px;
  font: 700 16px 'Klavika', Arial, sans-serif;
  cursor: pointer; min-height: 52px;
}

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 20px; margin-bottom: 16px;
}
.panel h2 { margin: 0 0 16px 0; font-family: 'Klavika', Arial, sans-serif; font-size: 21px; font-weight: 700; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }

label { display: block; margin-top: 16px; font-size: 15px; font-weight: 600; color: var(--ink); }
label:first-of-type { margin-top: 0; }
input, select {
  width: 100%; padding: 14px; margin-top: 8px;
  border: 2px solid var(--line); border-radius: 8px;
  font-size: 17px; font-family: 'Klavika', Arial, sans-serif;
  background: var(--surface); min-height: 52px;
}
input:focus, select:focus, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }

.row {
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line);
  border-radius: 8px; padding: 18px; margin-bottom: 14px;
}
.row[data-estado="Publicada"], .row[data-estado="En subasta"] { border-left-color: var(--yellow); }
.row[data-estado="Adjudicada"] { border-left-color: var(--ink); }
.row-title { font-weight: 700; font-size: 18px; }
.row-meta { color: var(--ink-soft); font-size: 15px; margin-top: 6px; line-height: 1.5; }
.row-estado {
  font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 8px; display: flex; align-items: center; gap: 6px;
}
.row[data-estado="Publicada"] .row-estado, .row[data-estado="En subasta"] .row-estado { color: var(--ink); }
.row[data-estado="Publicada"] .row-estado::before, .row[data-estado="En subasta"] .row-estado::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow);
}
.row-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions input { width: auto; flex: 1; min-width: 100px; margin-top: 0; }

.empty { color: var(--ink-soft); font-size: 16px; padding: 14px 0; }
.msg { font-size: 15px; margin-top: 12px; font-weight: 600; line-height: 1.4; }
.msg.error { color: #a3341e; }
.msg.success { color: #2f5230; }
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.hidden { display: none !important; }

@media (min-width: 640px) {
  .row-actions { align-items: center; }
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(36,39,42,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-box {
  background: var(--surface); border-radius: 10px; padding: 22px; width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto;
}
.modal-box h3 { margin: 0 0 14px 0; font-family: 'Klavika', Arial, sans-serif; font-size: 17px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions button { flex: 1; }
textarea {
  width: 100%; padding: 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 16px; font-family: 'Klavika', Arial, sans-serif; background: var(--paper); min-height: 80px; resize: vertical;
}
