/* Suitzo CMS — friendly, light admin in the Suitzo colours. */
:root {
  --paper: #fbf7f0; --paper-2: #f3ecdf; --card: #fffdf9; --mint: #e9f3f1;
  --ink: #0b2e38; --ink-2: #33525b; --ink-3: #6a7f84;
  --teal: #0d9488; --teal-d: #0b7a70; --teal-soft: #dcefeb; --amber: #f6b930; --amber-soft: #fdf1cf;
  --line: #e6dccb; --line-2: #efe7d9; --red: #b42318; --red-soft: #fde8e6; --green: #0f7a3d; --green-soft: #e3f4ea;
  --r: 12px; --shadow: 0 1px 2px rgba(11,46,56,.05), 0 6px 20px -12px rgba(11,46,56,.18);
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: var(--teal-d); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h3 { font-size: 1.08rem; } h4 { font-size: .95rem; }
code { background: var(--paper-2); padding: .05em .35em; border-radius: 5px; font-size: .88em; }
.muted { color: var(--ink-3); } .small { font-size: .82rem; font-weight: 400; }
[hidden] { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1rem .8rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; padding: .2rem .5rem 1rem; }
.brand em { font-style: normal; color: var(--teal); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: grid; gap: 2px; overflow-y: auto; }
.nav a, .side__foot a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.nav a:hover, .side__foot a:hover { background: var(--paper); color: var(--ink); }
.nav a.on, .side__foot a.on { background: var(--teal-soft); color: var(--teal-d); }
.nav .count { margin-left: auto; background: var(--amber); color: var(--ink); border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; }
.side__foot { margin-top: auto; border-top: 1px solid var(--line-2); padding-top: .7rem; display: grid; gap: .2rem; }
.side__foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbtn { background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: .3rem .7rem; font: inherit; font-size: .85rem; text-align: left; }
.linkbtn:hover { color: var(--red); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: .6rem; padding: .6rem 1.6rem; background: rgba(251,247,240,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-2); }
.pub { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.state { font-size: .8rem; font-weight: 650; padding: .32rem .7rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); }
.state.ok { background: var(--green-soft); color: var(--green); } .state.dirty { background: var(--amber-soft); color: #7a5200; }
.state.busy { background: var(--teal-soft); color: var(--teal-d); } .state.bad { background: var(--red-soft); color: var(--red); }
.content { padding: 1.4rem 1.6rem 4rem; max-width: 1320px; width: 100%; }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.phead p { margin: .3rem 0 0; }
.only-mobile { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .only-mobile { display: inline-grid; margin-right: auto; }
  .top { padding: .6rem 1rem; } .content { padding: 1.1rem 1rem 3rem; }
}

/* building blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card > h3:first-child { margin-bottom: .3rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.split { display: grid; grid-template-columns: minmax(270px, 340px) 1fr; gap: 1.1rem; align-items: start; }
.split--wide { grid-template-columns: 1fr minmax(300px, 380px); }
@media (max-width: 1100px) { .split, .split--wide { grid-template-columns: 1fr; } }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.stack > * + * { margin-top: 1rem; }
.field { margin-bottom: .9rem; }
.field > label, .lbl { display: block; font-weight: 650; font-size: .88rem; margin-bottom: .3rem; color: var(--ink); }
.input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
textarea.input { resize: vertical; line-height: 1.45; }
select.input { padding-right: 2rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; margin: .4rem 0; }
.hint { font-size: .82rem; color: var(--ink-3); margin: .3rem 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem .95rem; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); } .btn.primary:hover { background: #134552; }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; } .btn.teal:hover { background: var(--teal-d); }
.btn.ghost { background: transparent; } .btn.ghost:hover { background: #fff; }
.btn.danger { color: var(--red); } .btn.danger:hover { border-color: var(--red); background: var(--red-soft); }
.btn.sm { padding: .32rem .65rem; font-size: .84rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { border: 0; background: none; padding: .3rem; border-radius: 7px; cursor: pointer; color: var(--ink-3); line-height: 0; }
.iconbtn:hover { background: var(--paper-2); color: var(--ink); } .iconbtn:disabled { opacity: .25; cursor: default; }
.actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }

.alert { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 550; border: 1px solid transparent; }
.alert.ok { background: var(--green-soft); color: var(--green); border-color: #c4e6d2; }
.alert.warn { background: var(--amber-soft); color: #7a5200; border-color: #f3dc9b; }
.alert.bad { background: var(--red-soft); color: var(--red); border-color: #f6c9c4; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .16rem .55rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); white-space: nowrap; }
.pill.live, .pill.good { background: var(--green-soft); color: var(--green); } .pill.soon, .pill.warn { background: var(--amber-soft); color: #7a5200; }
.pill.bad { background: var(--red-soft); color: var(--red); } .pill.teal { background: var(--teal-soft); color: var(--teal-d); }

table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
table.data td { padding: .65rem .6rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.r { text-align: right; white-space: nowrap; }
.twrap { overflow-x: auto; }
.empty { color: var(--ink-3); text-align: center; padding: 1.6rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--r); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.7rem; letter-spacing: -.02em; }
.stat span { color: var(--ink-3); font-size: .85rem; }
.stat:hover { border-color: var(--teal); }

/* sections list (page editor) */
.secs { display: grid; gap: .45rem; }
.sec { display: flex; align-items: center; gap: .55rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sec:hover { border-color: var(--teal); } .sec.on { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); } .sec.off { opacity: .55; }
.sec__no { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: .78rem; background: var(--paper-2); color: var(--ink-3); }
.sec__body { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.sec__kind { font-weight: 700; font-size: .88rem; display: block; }
.sec__prev { font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sec__acts { display: flex; flex: none; }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.kind { display: block; border: 1.5px dashed var(--line); border-radius: 10px; padding: .75rem .9rem; text-decoration: none; color: inherit; background: #fff; }
.kind:hover { border-color: var(--teal); border-style: solid; } .kind b { display: block; margin-bottom: .2rem; } .kind span { font-size: .8rem; color: var(--ink-3); }
.subh { margin: 1.1rem 0 .45rem; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

/* repeating items */
.items { display: grid; gap: .55rem; }
.item { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; padding: .55rem .75rem; font-weight: 650; font-size: .9rem; }
.item > summary::-webkit-details-marker { display: none; }
.item > summary .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__in { padding: 0 .75rem .75rem; display: grid; gap: .55rem; }
.item__in .field { margin: 0; }
.links .link { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: .45rem; margin-bottom: .45rem; }
@media (max-width: 640px) { .links .link { grid-template-columns: 1fr; } }
details.adv { margin: .4rem 0 1rem; } details.adv > summary { cursor: pointer; font-weight: 650; color: var(--ink-2); margin-bottom: .7rem; }

/* SEO panel */
.seo__head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.seo__head h3 { margin-right: auto; }
.score { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; font-size: .95rem; }
.score.good { background: var(--green-soft); color: var(--green); } .score.warn { background: var(--amber-soft); color: #7a5200; } .score.bad { background: var(--red-soft); color: var(--red); }
.gprev { border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; background: #fff; margin-bottom: 1rem; font-family: arial, sans-serif; }
.gprev__url { font-size: .78rem; color: #4d5156; }
.gprev__t { color: #1a0dab; font-size: 1.15rem; margin: .2rem 0; line-height: 1.3; }
.gprev__d { font-size: .86rem; color: #4d5156; line-height: 1.45; }
.seo__list-h { margin: 1rem 0 .4rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .86rem; }
.checks li { padding-left: 1.5rem; position: relative; }
.checks li::before { position: absolute; left: 0; top: .05rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.checks li.good::before { content: '✓'; background: var(--green-soft); color: var(--green); }
.checks li.warn::before { content: '!'; background: var(--amber-soft); color: #7a5200; }
.checks li.bad::before { content: '✕'; background: var(--red-soft); color: var(--red); }
.len-ok { color: var(--green); } .len-warn { color: #9a6700; } .len-bad { color: var(--red); }

/* rich text */
.rich { background: #fff; border-radius: 9px; }
.rich .ql-toolbar { border-color: var(--line) !important; border-radius: 9px 9px 0 0; background: var(--paper); }
.rich .ql-container { border-color: var(--line) !important; border-radius: 0 0 9px 9px; font: inherit; font-size: 1rem; }
.rich .ql-editor { min-height: var(--min, 260px); line-height: 1.65; }
.rich .ql-editor img { max-width: 100%; border-radius: 8px; }

/* media */
.mpick { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mpick__thumb { width: 88px; height: 56px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper) center/cover; display: grid; place-items: center; overflow: hidden; font-size: .72rem; color: var(--ink-3); }
.mpick__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.mcell { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.mcell img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--paper); }
.mcell__b { padding: .5rem .6rem; font-size: .78rem; }
.mcell__b .n { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.modal { position: fixed; inset: 0; background: rgba(11,46,56,.45); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal__box { background: var(--card); border-radius: 14px; width: min(860px, 100%); max-height: 86vh; overflow: auto; padding: 1.1rem 1.2rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); }
.modal__head { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.modal__head h3 { margin-right: auto; }
.mgrid--pick .mcell { cursor: pointer; } .mgrid--pick .mcell:hover { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 1.2rem; text-align: center; background: #fff; }
.drop.over { border-color: var(--teal); background: var(--teal-soft); }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(1200px 500px at 10% -10%, var(--mint), transparent), var(--paper); }
.auth__box { width: min(400px, 100%); }
.auth__brand { display: flex; align-items: center; gap: .6rem; justify-content: center; font-weight: 800; font-size: 1.3rem; margin-bottom: 1.2rem; }
.auth .card { padding: 1.5rem; }
.code-input { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: grid; place-items: center; padding: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; width: fit-content; margin: .6rem 0; }
.codes { columns: 2; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; background: var(--paper); padding: .8rem 1rem; border-radius: 10px; }
pre.log { white-space: pre-wrap; font: 12px/1.5 ui-monospace, Consolas, monospace; background: var(--paper-2); padding: .7rem .9rem; border-radius: 8px; max-height: 280px; overflow: auto; margin: .5rem 0 0; }
.bar { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
