/* Studio: Vesna's back office. Same brand, working tool posture: summary first, state in form. */
body.studio { background: var(--paper); padding-top: var(--bar-h); }
.st-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - var(--bar-h)); }
.st-side { background: var(--night); color: var(--night-ink); position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--bar-h)); display: flex; flex-direction: column; padding: 26px 18px 22px max(18px, env(safe-area-inset-left, 0px)); gap: 26px; overflow-y: auto; }
.st-side .wordmark b { font-size: 16px; letter-spacing: .3em; }
.st-nav { display: grid; gap: 2px; }
.st-nav a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: #cfcac0; font-size: 14.5px; border-left: 2px solid transparent; }
.st-nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.st-nav a[aria-current="page"] { color: #fff; border-left-color: var(--gold); background: rgba(255,255,255,.06); }
.st-nav .badge { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: #fff; font-size: 11px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.st-nav .badge:empty { display: none; }
.st-side .foot { margin-top: auto; font-size: 12.5px; color: var(--night-mute); display: grid; gap: 8px; }
.st-side .foot a { color: #d8d4cb; }
.st-main { min-width: 0; padding: 30px max(clamp(18px, 3vw, 44px), env(safe-area-inset-right, 0px)) 80px clamp(18px, 3vw, 44px); }
.st-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.st-top h1 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.4vw, 46px); line-height: 1; }
.st-top p { margin: 8px 0 0; color: var(--stone); font-size: 14.5px; }
.st-sec[hidden] { display: none !important; }
.sample-banner { display: flex; gap: 12px; align-items: flex-start; background: #f1ead9; border: 1px solid #e2d6b9; padding: 12px 16px; font-size: 13.5px; color: #5c4d2e; margin-bottom: 22px; }
.sample-banner b { font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.tile { background: #fff; border: 1px solid var(--hair-2); padding: 18px 20px; display: grid; gap: 6px; text-decoration: none; }
.tile .k { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); }
.tile .v { font-family: var(--display); font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12.5px; color: var(--stone); }
a.tile:hover { border-color: var(--ink); }
@media (max-width: 1100px) { .tiles { grid-template-columns: 1fr 1fr; } }
.panel { background: #fff; border: 1px solid var(--hair-2); }
.panel + .panel { margin-top: 18px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hair-2); flex-wrap: wrap; }
.panel-h h2 { font-family: var(--display); font-size: 24px; font-weight: 400; }
.panel-b { padding: 6px 20px 16px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cols-2 { grid-template-columns: 1fr; } }
.todo { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair-2); }
.todo:last-child { border-bottom: 0; }
.todo .bar { align-self: stretch; background: var(--gold); }
.todo .bar.ok { background: var(--ok); } .todo .bar.info { background: #1a74b0; } .todo .bar.mute { background: #c9c4ba; }
.todo b { font-weight: 500; display: block; }
.todo span { font-size: 13px; color: var(--stone); }
.feed { list-style: none; padding: 0; margin: 0; display: grid; }
.feed li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hair-2); font-size: 13.5px; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--stone); font-size: 12px; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; background: #eeebe5; color: var(--graphite); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: #e3eee5; color: #2f5e3c; } .pill.warn { background: #f6ecd8; color: #8a5e14; } .pill.info { background: #e1ecf5; color: #1d5f8f; } .pill.danger { background: #f6e1dc; color: #8f3b2c; } .pill.mute { background: #efedea; color: #7b766e; }
.tag-sample { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8a7a55; border: 1px dashed #cdbf9b; padding: 2px 6px; margin-left: 6px; white-space: nowrap; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { border: 1px solid var(--hair); background: #fff; min-height: 40px; padding: 0 12px; font-size: 14px; }
.toolbar input { flex: 1 1 220px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); padding: 10px 12px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--hair-2); vertical-align: middle; }
.tbl tr:hover td { background: #fbfaf8; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl img { width: 52px; height: 52px; object-fit: cover; background: #ddd; }
.tbl .t { font-family: var(--display); font-style: italic; font-size: 18px; }
.acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mini { background: #fff; border: 1px solid var(--hair); min-height: 32px; padding: 0 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.mini:hover { border-color: var(--ink); }
.mini.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.mini.danger:hover { border-color: var(--danger); color: var(--danger); }
.inq-grid { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .inq-grid { grid-template-columns: 1fr; } }
.inq-item { display: grid; gap: 4px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--hair-2); padding: 14px 16px; cursor: pointer; }
.inq-item + .inq-item { margin-top: 8px; }
.inq-item[aria-current="true"] { border-color: var(--ink); }
.inq-item .r1 { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.inq-item b { font-weight: 500; }
.inq-item small { color: var(--stone); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--stone); }
.kv dd { margin: 0; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--night); color: var(--night-ink); font-size: 12.5px; padding: 8px 10px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; z-index: 2; }
.chart .tip b { font-weight: 500; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--graphite); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.seg { display: inline-flex; border: 1px solid var(--hair); }
.seg button { background: #fff; border: 0; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pl td.l1 { font-weight: 500; }
.pl tr.sub td { color: var(--stone); }
.pl tr.sub td:first-child { padding-left: 28px; }
.pl tr.tot td { border-top: 1px solid var(--ink); font-weight: 600; }
.pl tr.net td { font-family: var(--display); font-size: 22px; border-top: 2px solid var(--ink); }
.neg { color: var(--danger); }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 84px; gap: 12px; align-items: center; font-size: 13.5px; }
.hbar .track { height: 12px; background: #f1efea; position: relative; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: #1a74b0; border-radius: 0 3px 3px 0; }
.hbar .num { text-align: right; font-variant-numeric: tabular-nums; }
.photo-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.photo-pick figure { margin: 0; width: 86px; position: relative; }
.photo-pick img { width: 86px; height: 86px; object-fit: cover; border: 2px solid transparent; }
.photo-pick figure.is-primary img { border-color: var(--gold); }
.photo-pick button { font-size: 10.5px; background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--stone); text-decoration: underline; }
.st-menu { display: none; }
@media (max-width: 860px) {
  .st-shell { grid-template-columns: 1fr; }
  .st-side { position: static; height: auto; padding: 14px max(16px, env(safe-area-inset-left, 0px)); gap: 12px; }
  .st-side .foot { display: none; }
  .st-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .st-nav a { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 10px; }
  .st-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
  .tbl .hide-sm { display: none; }
}
/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 14px; }
.cal .dow { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); text-align: center; padding-bottom: 6px; }
.cal .day { aspect-ratio: 1 / .9; max-width: 100%; background: #fff; border: 1px solid var(--hair-2); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 6px 7px; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 0; }
.cal .day:hover { border-color: var(--ink); }
.cal .day.past { color: #b3aea5; }
.cal .day.closed { background: #f7f6f2; }
.cal .day.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal .day.today .n { color: var(--gold); font-weight: 600; }
.cal .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal .dots i, .cal-key i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cal-key { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--graphite); margin-top: 12px; align-items: center; }
.cal-key i { margin-right: 6px; }
.tile .v.neg { color: var(--danger); }
.st-main .panel-b > .todo:first-child { padding-top: 16px; }
.dlg .photo-pick figure div { display: flex; gap: 6px; }
@media (max-width: 560px) { .cal .day { padding: 4px; font-size: 12px; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } .hbar { grid-template-columns: 96px minmax(0,1fr) 70px; font-size: 12.5px; } .tile .v { font-size: 30px; } .tiles { gap: 10px; } }
.sample-banner > b { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 560px) { .sample-banner { flex-direction: column; gap: 4px; } }
/* phone: tables become cards */
@media (max-width: 700px) {
  #artTbl thead, #ordersList thead { display: none; }
  #artTbl tr, #ordersList tbody tr { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 14px; border-bottom: 1px solid var(--hair-2); align-items: center; }
  #ordersList tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  #artTbl td, #ordersList td { padding: 0; border: 0; }
  #artTbl tr:hover td, #ordersList tr:hover td { background: none; }
  #artTbl td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  #artTbl td:nth-child(2) { grid-column: 2; grid-row: 1; }
  #artTbl td:nth-child(4) { grid-column: 3; grid-row: 1; }
  #artTbl td:nth-child(5) { grid-column: 2 / -1; grid-row: 2; }
  #artTbl td:nth-child(6), #ordersList td:last-child { grid-column: 1 / -1; }
  #artTbl td:nth-child(6) .acts, #ordersList td:last-child .acts { justify-content: flex-start; }
  #ordersList td:nth-child(1) { grid-column: 1; grid-row: 1; }
  #ordersList td:nth-child(2) { grid-column: 1; grid-row: 2; }
  #ordersList td:nth-child(5) { grid-column: 2; grid-row: 1; }
  #ordersList td:nth-child(6) { grid-column: 2; grid-row: 2; justify-self: end; }
  #artTbl td[colspan], #ordersList td[colspan] { grid-column: 1 / -1; }
  #artTbl .acts .mini, #ordersList .acts .mini { min-height: 36px; }
}
#ordersList td b { white-space: nowrap; }
