/* The studio console.
   Loaded on top of site.css, so the typeface, the colours and the buttons are
   the site's; everything here is the shell and the forms, which a shop front
   stylesheet has no reason to carry. Rectangles throughout, like the site. */

:root { --cbg: #f4f1ec; --cside: #171310; --cline: #e2dcd3 }

body:has(.console) { background: var(--cbg) }

/* ---------- sign in ---------- */
.gate { min-height: 100svh; display: grid; place-items: center; padding: 40px 20px; background: var(--cside) }
.gatebox { width: min(420px, 100%); background: var(--bg); border: 1px solid var(--cline); padding: clamp(28px, 5vw, 44px) }
.gatemark { height: 34px; width: auto; margin-bottom: 26px }
.gatetitle { font-size: 30px; margin: 4px 0 22px }
.gate .btn.wide, .btn.wide { width: 100%; justify-content: center }

/* ---------- the shell ---------- */
.console { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100svh; align-items: start }

.cside { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column;
  background: var(--cside); color: #cfc6b8; padding: 22px 0 18px }
.cmark { display: flex; flex-direction: column; gap: 6px; padding: 0 22px 22px; color: #fff; text-decoration: none }
.cmark img { height: 28px; width: auto; filter: brightness(0) invert(1) }
.cmark span { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: #8e8679 }

.ctabs { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1 }
.cgroup { margin: 16px 0 6px; padding: 0 22px; font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: #6f685c }
.ctabs button { text-align: left; min-height: 42px; padding: 0 22px; border: 0; border-left: 3px solid transparent;
  background: transparent; font: inherit; font-size: 13px; letter-spacing: .04em; color: #cfc6b8; cursor: pointer }
.ctabs button:hover { background: rgba(255,255,255,.06); color: #fff }
.ctabs button.on { background: rgba(255,255,255,.1); border-left-color: var(--accent); color: #fff; font-weight: 600 }

.cside-end { display: flex; flex-direction: column; gap: 1px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 14px }
.cout { text-align: left; min-height: 38px; padding: 0 22px; border: 0; background: transparent; font: inherit;
  font-size: 12px; color: #8e8679; cursor: pointer; text-decoration: none; display: flex; align-items: center }
.cout:hover { color: #fff }

.cmain { padding: clamp(22px, 3vw, 38px) clamp(20px, 3vw, 40px) 60px; max-width: 1280px }
.chead { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px }
.ceyebrow { margin: 0; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--soft) }
.ctitle { font-size: clamp(26px, 3vw, 34px); margin: 6px 0 0 }
.chead input[type="search"] { min-width: min(320px, 100%); min-height: 42px; border: 1px solid var(--cline);
  background: var(--bg); padding: 0 14px; font: inherit; font-size: 14px }

/* ---------- forms that a person can actually use ---------- */
.fld { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; align-items: start }
.fld > label, .fld label { display: flex; flex-direction: column; gap: 7px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--soft); font-weight: 500 }
.fld label.wide { grid-column: 1 / -1 }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--cline); background: var(--bg); padding: 11px 13px;
  font: inherit; font-size: 15px; color: var(--ink); letter-spacing: normal; text-transform: none }
.fld textarea { min-height: 112px; resize: vertical; line-height: 1.5 }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px }
.fld input[type="file"] { padding: 9px; font-size: 13px; background: var(--card) }
.fld input[type="number"] { max-width: 110px }

/* ---------- a row of something being edited ---------- */
.erow { background: var(--bg); border: 1px solid var(--cline); padding: clamp(16px, 2vw, 22px); margin-bottom: 12px }
.erow + .erow { margin-top: 0 }
.erow-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--cline) }
.erow-n { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--soft) }
.erow-acts { display: flex; gap: 6px }
.erow-acts button { min-height: 34px; padding: 0 12px; border: 1px solid var(--cline); background: var(--bg);
  font: inherit; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; color: var(--ink2) }
.erow-acts button:hover { border-color: var(--ink); color: var(--ink) }
.erow-acts button.danger:hover { border-color: var(--accent); color: var(--accent) }
.erow-prev { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap }
.erow-prev img, .erow-prev video { width: 170px; height: 120px; object-fit: cover; display: block; background: #e8e2d9 }

/* ---------- the explainer above an editor, and the save bar ---------- */
.cnote { background: var(--bg); border: 1px solid var(--cline); border-left: 3px solid var(--accent);
  padding: 16px 18px; margin-bottom: 20px }
.cnote h3 { font-size: 15px; margin: 0 0 6px; letter-spacing: 0; text-transform: none; color: var(--ink) }
.cnote p { margin: 0; font-size: 13.5px; color: var(--ink2); max-width: 78ch }

.cbar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  background: var(--cbg); border-top: 1px solid var(--cline); padding: 14px 0; margin-top: 18px }
.cbar .said { margin: 0 auto 0 0; font-size: 13px; color: var(--ink2) }

/* ---------- messages ---------- */
.msg { background: var(--bg); border: 1px solid var(--cline); padding: 18px; margin-bottom: 12px }
.msg.unseen { border-left: 3px solid var(--accent) }
.msg-who { margin: 0 0 8px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--soft) }
.msg-body { margin: 0 0 12px; white-space: pre-wrap; line-height: 1.6 }
.msg-files { display: flex; gap: 10px; flex-wrap: wrap }
.msg-files img, .msg-files video { width: 190px; height: 140px; object-fit: cover; display: block; background: #e8e2d9 }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .console { grid-template-columns: 1fr }
  .cside { position: static; height: auto; padding: 16px 0 10px }
  .cmark { padding: 0 18px 14px }
  .ctabs { flex-direction: row; overflow-x: auto; gap: 0; padding: 0 12px }
  .cgroup { display: none }
  .ctabs button { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 0 14px }
  .ctabs button.on { border-left-color: transparent; border-bottom-color: var(--accent) }
  .cside-end { flex-direction: row; gap: 0; padding: 10px 12px 0 }
  .cout { padding: 0 10px }
}

/* ---------- uploading ---------- */
.uprow { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 18px }
.upbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; background: var(--ink); color: #fff;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer }
.upbtn:hover { background: var(--accent) }
.upbtn input[type="file"] { display: none }
.upinline { display: flex; align-items: center; gap: 10px; margin-top: 8px }
.upinline input[type="file"] { font-size: 12px; min-height: 0; border: 0; padding: 0; background: transparent }
.upinline img { width: 84px; height: 62px; object-fit: cover; border: 1px solid var(--cline); display: block }

/* ---------- the portfolio grid ---------- */
.pfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px }
.pfcard { background: var(--bg); border: 1px solid var(--cline); padding: 10px }
.pfcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; margin-bottom: 9px; background: #e8e2d9 }
.pfcard .p_cat { width: 100%; min-height: 38px; border: 1px solid var(--cline); background: var(--bg); padding: 0 10px; font: inherit; font-size: 13px }
.pfacts { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px }
.pfacts button { min-height: 30px; padding: 0 9px; border: 1px solid var(--cline); background: var(--bg); font: inherit;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; color: var(--ink2) }
.pfacts button:hover { border-color: var(--ink); color: var(--ink) }
.pfacts button.danger:hover { border-color: var(--accent); color: var(--accent) }
.pffeat { display: flex; align-items: center; gap: 5px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft) }
.pffeat input { width: 14px; min-height: 14px; margin: 0 }
