/* homes.me/studio and /signin (src/client/studio.js). */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/assets/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/assets/fonts/poppins-500.woff2) format("woff2"); }
:root { --o: #ff4000; --ink: #1b1d21; --mut: #6b7280; --line: #e5e7eb; --bg: #f6f7f9; --card: #fff; --ok: #067647; --warn: #b54708; --bad: #b42318; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.5 Poppins, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; }
h1 { font-size: 26px; margin: 0 0 8px; font-weight: 500; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 600; }
code { background: #eef0f3; padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.st-muted { color: var(--mut); }
.st-err { color: var(--bad); }
.st-lede { color: #374151; max-width: 860px; margin: 0 0 20px; }
.st-empty { padding: 40px; text-align: center; color: var(--mut); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.st-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-grow { flex: 1; }
.st-btn { font: 600 14px/1 Poppins, system-ui, sans-serif; padding: 10px 16px; border-radius: 999px; border: 1px solid #d5d8de; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.st-btn:hover { border-color: #b8bcc5; }
.st-primary { background: var(--o); border-color: var(--o); color: #fff; }
.st-primary:hover { background: #e63a00; border-color: #e63a00; }
.st-link { border: 0; background: none; color: var(--mut); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; padding: 0; }
.st-tag { display: inline-block; font-size: 12px; background: #eef0f3; border-radius: 999px; padding: 2px 9px; color: #374151; white-space: nowrap; }
.st-badge { display: inline-block; font-size: 11px; font-weight: 600; background: #fef0c7; color: var(--warn); border-radius: 999px; padding: 1px 7px; }
.st-badge.ok { background: #dcfae6; color: var(--ok); }
input, select, textarea { font: 15px/1.4 Poppins, system-ui, sans-serif; color: var(--ink); padding: 9px 12px; border: 1px solid #d5d8de; border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--o); border-color: transparent; }
textarea { width: 100%; resize: vertical; }

/* Sign in */
.st-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, #ffe6dc, transparent 50%), var(--bg); }
.auth-card { background: var(--card); border-radius: 20px; padding: 36px; width: min(420px, 100%); box-shadow: 0 20px 60px rgba(16, 24, 40, .12); text-align: center; }
.auth-logo img { height: 34px; width: auto; }
.auth-card h1 { margin-top: 22px; }
.auth-card p { color: #374151; }
.g-btn { display: flex; justify-content: center; min-height: 44px; margin: 22px 0 6px; }
.auth-actions { display: flex; gap: 8px; justify-content: center; }
.dev-login { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: 13px; color: var(--mut); }
.dev-login input { width: 100%; margin-top: 4px; }

/* The app */
.st-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.st-side { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.st-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 8px; }
.st-brand img { height: 24px; width: auto; }
.st-brand span { font-weight: 600; color: var(--o); }
.st-nav { display: grid; gap: 2px; }
.st-nav a { text-decoration: none; padding: 9px 12px; border-radius: 10px; color: #374151; display: flex; justify-content: space-between; align-items: center; }
.st-nav a:hover { background: var(--bg); }
.st-nav a.on { background: #fff1eb; color: var(--o); font-weight: 600; }
.st-me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.st-me img { border-radius: 50%; }
.st-me div { display: grid; line-height: 1.2; min-width: 0; }
.st-me strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.st-me small { color: var(--mut); text-transform: capitalize; }
.st-main { padding: 32px 36px 80px; min-width: 0; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.st-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; display: grid; }
.st-card b { font-size: 30px; font-weight: 600; }
.st-card span { color: var(--mut); font-size: 14px; }
.st-card:hover { border-color: var(--o); }
.st-panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.st-panel p { margin: 0 0 12px; color: #374151; }
.st-progress { height: 6px; background: #eef0f3; border-radius: 999px; overflow: hidden; }
.st-progress i { display: block; height: 100%; width: 0; background: var(--o); transition: width .2s; }
.st-langs { display: grid; gap: 10px; }
.st-lang { display: grid; grid-template-columns: 110px 1fr 220px; gap: 12px; align-items: center; text-decoration: none; }
.st-lang i { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--o) var(--w), #eef0f3 var(--w)); }
.st-lang small { color: var(--mut); }
.st-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.st-filters input[type="search"], .st-filters input[type="email"] { flex: 1 1 260px; }
.st-search { width: 100%; margin-bottom: 12px; }
.st-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.st-table td { padding: 10px 12px; border-bottom: 1px solid #f0f1f3; vertical-align: top; }
.st-src { min-width: 260px; max-width: 420px; }
.st-cell { min-width: 140px; max-width: 260px; cursor: pointer; border-left: 1px solid #f0f1f3; }
.st-cell:hover { background: #fff7f3; }
.st-cell.set { background: #f3fbf6; }
.st-add { color: var(--o); font-size: 13px; }
.st-paths a { display: block; font-size: 12px; color: var(--mut); white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.st-edit-tr td { background: #fff7f3; }
.st-editor { background: #fff; border: 1px solid #ffd2c0; border-radius: 12px; padding: 14px; margin: 8px 0; display: grid; gap: 10px; }
.st-editor-head { display: grid; gap: 2px; }
.st-editor-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-editor-foot label { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mut); }
.st-img-edit { display: grid; grid-template-columns: 200px 1fr; gap: 14px; }
.st-img-edit img { width: 100%; max-height: 160px; object-fit: contain; background: #eef0f3; border-radius: 10px; }
.st-img-edit label { display: grid; gap: 4px; font-size: 13px; color: var(--mut); margin-bottom: 8px; }
.st-pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 16px; }
.st-list { display: grid; gap: 10px; }
.st-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.st-item header { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.st-item footer { display: flex; gap: 8px; justify-content: flex-end; }
.st-item footer:empty { display: none; }
.st-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-diff p { margin: 0; padding: 10px 12px; border-radius: 10px; word-break: break-word; }
.st-diff .was { background: #fef3f2; color: #7a271a; text-decoration: line-through; text-decoration-color: rgba(180, 35, 24, .4); }
.st-diff .now { background: #ecfdf3; color: #054f31; }
.st-diff-img { display: flex; gap: 12px; }
.st-diff-img figure { margin: 0; }
.st-diff-img img { width: 220px; height: 140px; object-fit: cover; border-radius: 10px; background: #eef0f3; }
.st-diff-img figcaption { font-size: 12px; color: var(--mut); }
.st-status { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: #eef0f3; }
.s-published { background: #dcfae6; color: var(--ok); }
.s-pending { background: #fef0c7; color: var(--warn); }
.s-rejected { background: #fee4e2; color: var(--bad); }
.st-pages { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.st-pages li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid #f0f1f3; font-size: 14px; }
.st-pages a { text-decoration: none; }
.st-pages a:first-child:hover { color: var(--o); }
.st-str { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.st-str img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; background: #eef0f3; }
.st-str:not(:has(img)) { grid-template-columns: 1fr auto; }
.st-str + .st-editor { margin-top: -4px; }
.st-str-act { display: flex; gap: 4px; }
.st-chip { font: 600 11px/1 Poppins, system-ui, sans-serif; border: 1px solid #d5d8de; background: #fff; border-radius: 999px; padding: 6px 8px; cursor: pointer; }
.st-chip.set { background: #dcfae6; border-color: #a6f4c5; color: var(--ok); }
.st-chip:hover { border-color: var(--o); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.st-tile { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer; text-align: left; text-decoration: none; display: grid; }
.st-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef0f3; display: block; }
.st-tile span { font-size: 12px; color: var(--mut); padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tile .st-badge { position: absolute; top: 8px; left: 8px; }
.st-tile:hover { border-color: var(--o); }
.st-tile.set { border-color: #a6f4c5; }
.st-people td img { border-radius: 50%; float: left; margin-right: 10px; }
.st-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 10; }
.st-toast.err { background: var(--bad); }
@media (max-width: 820px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .st-nav { display: flex; flex-wrap: wrap; }
  .st-me { margin: 0; border: 0; }
  .st-main { padding: 20px 16px 80px; }
  .st-diff, .st-img-edit { grid-template-columns: 1fr; }
  .st-lang { grid-template-columns: 90px 1fr; }
  .st-lang small { grid-column: 1 / -1; }
}
