/* ==========================================================================
   Techmave Studio — admin-only additions on top of styles.css tokens.
   No new colors, no dark mode: one copper accent, hairline borders.
   ========================================================================== */

body { font-size: 16px; }

/* ————————————————————————— top bar ————————————————————————— */

.studio-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ivory) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.studio-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.studio-bar__mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.studio-bar__mark .nav__mark-dot { color: var(--copper); }
.studio-bar__tag {
  color: var(--copper);
  margin-left: 2px;
}
.studio-bar__end { display: flex; align-items: center; gap: 14px; }

.studio-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-base) var(--ease-quart);
}
.studio-link:hover { color: var(--ink); }
.studio-link--danger:hover { color: var(--copper); }
.studio-link:disabled { opacity: 0.4; cursor: not-allowed; }

/* ————————————————————————— panels ————————————————————————— */

.studio { padding-block: 56px 96px; max-width: 880px; }
.studio-panel { display: block; }
.studio-panel__title { margin: 0 0 12px; }
.studio-panel__sub { color: var(--muted); margin: 0 0 32px; max-width: 52ch; }

.studio-notice {
  margin: 0 0 28px;
  padding: 14px 18px;
  border-left: 2px solid var(--copper);
  background: color-mix(in srgb, var(--ivory-2) 55%, transparent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.55;
}
.studio-notice .mono { display: block; color: var(--copper); margin-bottom: 4px; }
.studio-notice code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--ivory-2);
  padding: 1px 6px;
  border-radius: var(--r-xs);
}
.studio-notice a { color: var(--copper); font-weight: 600; }

.studio-error { color: var(--copper); font-size: 14px; margin: 16px 0; }
.studio-msg { color: var(--muted); font-size: 14px; }

/* ————————————————————————— login ————————————————————————— */

.login {
  max-width: 400px;
  display: grid;
  gap: 18px;
  margin-top: 48px;
}
.login .h2 { margin: 0; }
.login .studio-panel__sub { margin-bottom: 0; }
.login .btn { align-self: start; }
.login .btn.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* ————————————————————————— fields ————————————————————————— */

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label { color: var(--muted); }
.field input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  transition: border-color var(--t-base) var(--ease-quart);
}
.field input:focus {
  outline: none;
  border-color: var(--copper);
}
.field input::placeholder { color: var(--muted); opacity: 0.7; }

/* ————————————————————————— posts list ————————————————————————— */

.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.list-head .secno { margin-bottom: 20px; }

.posts {
  border-top: 1px solid var(--line);
}
.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-base) var(--ease-quart);
}
.post-row:hover { background: color-mix(in srgb, var(--ivory-2) 45%, transparent); }
.post-row__main {
  flex: 1;
  display: grid;
  gap: 6px;
  justify-items: start;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
}
.post-row__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  transition: color var(--t-base) var(--ease-quart);
}
.post-row:hover .post-row__title { color: var(--copper); }
.post-row__meta { margin: 0; }
.post-row__act { display: flex; gap: 18px; }

/* ————————————————————————— editor ————————————————————————— */

.editor__row {
  display: grid;
  grid-template-columns: 1fr 1fr 110px;
  gap: 16px;
}
.editor__row .field--grow { grid-column: auto; }
.editor__row--foot {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.check input {
  accent-color: var(--copper-fill);
  width: 16px;
  height: 16px;
}

/* rich text box — compact, hairline, no decoration beyond the tools */
.rte {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  overflow: hidden;
}
.rte__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--ivory-2);
}
.rte__bar button {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  padding: 5px 9px;
  transition: background var(--t-fast) var(--ease-quart),
              color var(--t-fast) var(--ease-quart),
              border-color var(--t-fast) var(--ease-quart);
}
.rte__bar button:hover {
  background: var(--ink);
  color: var(--ivory);
}
.rte__bar button:active {
  background: var(--copper-fill);
  border-color: var(--copper-fill);
  color: var(--ivory);
}
.rte__body {
  min-height: 320px;
  max-height: 640px;
  overflow-y: auto;
  padding: 20px 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  outline: none;
}
/* the placeholder lives on the empty editor — dim state + ghost text */
.rte__body:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  opacity: 0.6;
  font-style: italic;
}

/* content written inside the editor, on-brand type */
.rte__body h2 { font-size: 26px; margin: 28px 0 12px; }
.rte__body h3 { font-size: 20px; margin: 24px 0 10px; }
.rte__body p { margin: 0 0 14px; }
.rte__body ul, .rte__body ol { margin: 0 0 14px; padding-left: 24px; }
.rte__body li { margin-bottom: 6px; }
.rte__body blockquote {
  margin: 16px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--copper);
  font-style: italic;
  color: var(--muted);
}
.rte__body a { color: var(--copper); font-weight: 600; }
.rte__body img {
  max-width: 100%;
  border-radius: var(--r-md);
  margin: 14px 0;
}

/* ————————————————————————— responsive ————————————————————————— */

@media (max-width: 640px) {
  .editor__row { grid-template-columns: 1fr; }
  .field--narrow { max-width: 160px; }
  .post-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
