/* COLD STUDIO — layout and components (colours, type and shapes come from cold.css) */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.wordmark { font-weight: 700; letter-spacing: .14em; font-size: 13px; }
.wordmark span { font-weight: 400; color: var(--muted); }
.wordmark.inv { color: #fff; }
.wordmark.inv span { color: #8c8c8c; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 32px 28px; box-shadow: var(--shadow); }
.login-card h1 { font: 400 40px/1.1 var(--serif); margin: 26px 0 8px; }
.say { min-height: 20px; font-size: 13px; color: var(--ink2); margin: 12px 0 0; }
.say.err { color: var(--ko); }

/* layout */
.app { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.side { grid-row: 1 / span 2; background: #000; color: #f2f2f2; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 12px 14px; }
.brand { padding: 2px 10px 18px; }
.side-client { padding: 0 10px 14px; }
.side-client select { width: 100%; background: #161616; color: #fff; border: 1px solid #2a2a2a; border-radius: var(--r-s); padding: 8px 10px; }
.side-client .name { font-size: 15px; font-weight: 600; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav .sec { font-size: 12px; font-weight: 500; color: #8c8c8c; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: #d6d6d6; text-decoration: none; cursor: pointer; }
.nav a:hover { background: #1b1b1b; color: #fff; }
.nav a.on { background: #fff; color: #000; font-weight: 500; }
.nav .cnt { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 19px; min-width: 19px; text-align: center; }
.foot { padding: 12px 10px 0; font-size: 12px; color: #9a9a9a; border-top: 1px solid #1f1f1f; display: flex; gap: 10px; align-items: center; }
.foot .av { width: 28px; height: 28px; border-radius: 50%; background: #262626; color: #e6e6e6; display: flex; align-items: center; justify-content: center; font-weight: 600; text-transform: uppercase; flex: none; }
.foot .who { min-width: 0; flex: 1; }
.foot b { color: #d6d6d6; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top { display: none; }
.main { padding: 32px 36px 80px; min-width: 0; max-width: 1280px; width: 100%; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 30; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .app.menu .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .top-client { margin-left: auto; font-size: 13px; color: var(--muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding: 20px 16px 80px; }
}

/* page head */
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font: 400 40px/1.05 var(--serif); margin: 0; }
.head .sub { color: var(--muted); margin-top: 4px; }
.head .act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* buttons, fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-s); padding: 8px 14px; font-weight: 500; font-size: 13.5px; text-decoration: none; min-height: 38px; }
.btn:hover { border-color: var(--line-2); }
.btn.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.solid:hover { background: #2a2a2a; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.warn { background: var(--warnbg); border-color: #f0d9ad; color: var(--warn); }
.btn.danger { color: var(--ko); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 12.5px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg, .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: 5px; }
.fld input, .fld select, .fld textarea, .in { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 11px; outline: none; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .in:focus { border-color: var(--ink); }
.fld textarea { min-height: 90px; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 15px; margin: 0 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; border-radius: 99px; padding: 1px 9px; line-height: 20px; background: var(--soft); color: var(--ink2); white-space: nowrap; }
.chip.draft { background: var(--soft); color: var(--muted); }
.chip.review { background: var(--bluebg); color: var(--blue); }
.chip.changes { background: var(--warnbg); color: var(--warn); }
.chip.approved { background: var(--okbg); color: var(--ok); }
.chip.published { background: #111; color: #fff; }
.chip.ko { background: var(--kobg); color: var(--ko); }

/* week */
.weeknav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.weeknav .lbl { font-weight: 600; font-size: 15px; margin: 0 6px; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--soft); border-radius: var(--r); padding: 10px; min-height: 180px; display: flex; flex-direction: column; gap: 8px; }
.day.today { outline: 2px solid var(--ink); }
.day h3 { margin: 0 2px; font-size: 12.5px; font-weight: 600; color: var(--ink2); display: flex; justify-content: space-between; }
.day h3 .n { color: var(--muted); font-weight: 500; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: block; width: 100%; }
.post:hover { border-color: var(--line-2); }
.post .th { aspect-ratio: 4 / 5; background: #e9e7e3 center / cover no-repeat; position: relative; }
.post .th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.post .th .k { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 6px; }
.post .meta { padding: 7px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.post .t { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post .pl { font-size: 11.5px; color: var(--muted); }
.addday { border: 1px dashed var(--line-2); background: transparent; border-radius: 10px; padding: 8px; font-size: 12.5px; color: var(--muted); }
.addday:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 1100px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .week { grid-template-columns: 1fr; } .day { min-height: 0; } .day .posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 16px; }
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.42); }
.sheet-card { position: relative; width: 100%; max-width: 860px; background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); padding: 26px 26px 22px; }
.sheet-x { position: absolute; right: 12px; top: 12px; }
.sheet-card h2 { font: 400 30px/1.1 var(--serif); margin: 0 40px 6px 0; }
@media (max-width: 860px) { .sheet { padding: 0; align-items: stretch; } .sheet-card { border-radius: 0; min-height: 100vh; padding: 20px 16px 30px; } }

/* post detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 14px; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.media { display: flex; flex-direction: column; gap: 10px; }
.media .m { border-radius: 10px; overflow: hidden; background: #e9e7e3; border: 1px solid var(--line); }
.media img, .media video { width: 100%; display: block; max-height: 70vh; object-fit: contain; background: #111; }
.media .bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-size: 12px; color: var(--muted); background: var(--panel); }
.cap { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.cap .h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--soft); font-weight: 600; font-size: 13px; }
.cap pre { margin: 0; padding: 10px 12px; white-space: pre-wrap; word-wrap: break-word; font: 13.5px/1.55 var(--sans); }
.cap .tags { color: var(--blue); }
.feedback { background: var(--warnbg); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; white-space: pre-wrap; }
.decide { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.decide .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.thread { margin-top: 18px; }
.thread .c { border-left: 2px solid var(--line); padding: 2px 0 2px 10px; margin-bottom: 10px; font-size: 13.5px; }
.thread .c .w { font-size: 12px; color: var(--muted); }
.thread form { display: flex; gap: 8px; }
.thread form input { flex: 1; }
.upl { border: 1px dashed var(--line-2); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); margin-bottom: 14px; }
.upl.drag { border-color: var(--ink); color: var(--ink); background: var(--soft); }
.files { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.files .f { position: relative; width: 84px; height: 105px; border-radius: 8px; overflow: hidden; background: #e9e7e3 center / cover; border: 1px solid var(--line); }
.files .f video { width: 100%; height: 100%; object-fit: cover; }
.files .f button { position: absolute; right: 3px; top: 3px; border: 0; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; padding: 0 5px; }

/* ideas */
.idea { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.idea .im { aspect-ratio: 4 / 3; background: #e9e7e3 center / cover; }
.idea .b { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.idea h3 { margin: 0; font-size: 14.5px; }
.idea p { margin: 0; color: var(--ink2); font-size: 13.5px; white-space: pre-wrap; }
.idea .f { display: flex; gap: 6px; align-items: center; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.react.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* plan */
.plan-body { white-space: pre-wrap; font-size: 14.5px; line-height: 1.65; }
.list .it { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list .it:last-child { border-bottom: 0; }
.list .it .d { font-weight: 600; min-width: 130px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 80; font-size: 13.5px; box-shadow: var(--shadow); }
.loading { color: var(--muted); padding: 30px 0; }
