.office{margin:0;background:#f8f3eb;color:#342216;font:16px/1.5 system-ui,sans-serif}.office *,.workbox *{box-sizing:border-box}.office header{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#39261a;color:#f4e6d3;padding:14px max(4vw,16px)}.office header a{display:flex;gap:12px;align-items:center;font:22px Georgia,serif;color:inherit;text-decoration:none}.office header img{width:40px;height:40px;border-radius:50%}.office header span{font-size:13px}.office main{max-width:1100px;margin:auto;padding:24px 16px 80px}.office h1,.workbox h2{font:normal clamp(30px,5vw,48px)/1.1 Georgia,serif;margin:18px 0}.office h2{font:normal 25px Georgia,serif}.office nav{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}.office button,.workbox button,.office .linkbtn{font:inherit;cursor:pointer;padding:9px 15px;border:1px solid #cabca9;border-radius:10px;background:#fffaf3;color:#432d20}.office button.active,.office button[type=submit],.workbox button[type=submit]{background:#573822;color:white}.office button:disabled,.workbox button:disabled{opacity:.55}.panel,.workbox .thread{border:1px solid #d9cbbb;border-radius:14px;background:#fffdf9;padding:clamp(16px,3vw,28px);margin:12px 0;overflow-wrap:anywhere}.office form,.workbox form{display:grid;gap:12px;max-width:640px}.office label,.workbox label{display:grid;gap:4px;font-size:15px}.office input,.office textarea,.office select,.workbox input,.workbox select,.workbox textarea{min-width:0;width:100%;padding:11px;border:1px solid #b8a693;border-radius:7px;background:white;color:#30241b;font:inherit}.office form button,.workbox form button{justify-self:start}.office textarea,.workbox textarea{min-height:90px}.office .line,.workbox .line{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.office details{padding:13px 0;border-bottom:1px solid #ddcdbd}.office summary{cursor:pointer;font-weight:650}.office dl{display:grid;grid-template-columns:minmax(90px,auto) 1fr;gap:6px 14px}.office dd{margin:0;white-space:pre-wrap}.office dt{color:#715b4a}.office .metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.office .metrics strong{display:block;font:32px Georgia,serif}.workbox{max-width:780px;margin:30px 0}.talk{padding:10px 14px;margin:8px 0;border-left:3px solid #c9b39b;white-space:pre-wrap}.talk.staff{border-color:#795036;background:#f5eee5}.office .status,.workbox .status{color:#88421c;min-height:1.5em}.office .productrow{display:flex;gap:14px;align-items:center;border-bottom:1px solid #ddcdbd;padding:12px 0}.office .productrow img{width:55px;height:66px;object-fit:cover;border-radius:6px}.office .productrow strong{display:block}.office .formwrap{max-width:500px;margin:8vh auto}.workbox time,.office time{font-size:.8em;color:#766555}.office .previews{display:flex;gap:8px;flex-wrap:wrap}.office .previews img,.office .previews video{width:80px;height:90px;object-fit:cover;border-radius:6px}
.office .gallery-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:12px}.gallery-tile{position:relative;min-width:0}.office .move-media{display:block;width:100%;padding:0;border:2px solid transparent;overflow:hidden;cursor:grab;touch-action:none;user-select:none}.move-media img,.move-media video{width:100%;aspect-ratio:3/4;display:block;object-fit:cover;pointer-events:none}.office .remove-media{position:absolute;right:2px;top:2px;padding:0;width:32px;height:32px;border-radius:50%;font-size:24px;line-height:1;background:#39261a;color:white}.gallery-tile.target .move-media{border-color:#a66222;outline:2px solid #a66222}.gallery-tile.moving .move-media{opacity:.6}.gallery-tile small{display:block;text-align:center}

.office main:has(.cabinet-nav){padding-bottom:calc(100px + env(safe-area-inset-bottom))}
.office .cabinet-logout{float:right;margin:0 0 8px 12px}
.office .cabinet-nav{position:fixed;z-index:10;bottom:calc(8px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:min(440px,calc(100% - 16px));box-sizing:border-box;margin:0;padding:5px;gap:2px;background:#39261a;border-radius:20px;box-shadow:0 3px 18px #39261a45}
.office .cabinet-nav button{display:grid;justify-items:center;align-content:center;gap:4px;min-width:0;min-height:50px;margin:0;padding:4px 1px;border:0;border-radius:15px;background:transparent;color:#fff2df;font:600 clamp(10px,2.8vw,13px)/1.15 system-ui}
.office .cabinet-nav button[aria-current],.office .cabinet-nav button:hover{background:#654631;color:#ffe1ad}
.cabinet-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
@media (min-width:761px){
  main:has(#customer-inbox) > .inner{min-height:0;padding-bottom:0}
  main:has(#customer-inbox) > .inner > p:last-child{margin-bottom:0}
  .wrap:has(> #customer-inbox){padding-top:20px}
  #customer-inbox{margin-top:0}
}

.order-tools,.order-line{display:flex;align-items:center;gap:12px}
.order-tools h1{margin-block:.5em}
.order-line{align-items:flex-start;border-bottom:1px solid #ddcdbd}
.office .order-line details{flex:1;min-width:0;border:0}
.office .archive-toggle,.office .order-action{display:grid;place-items:center;width:36px;height:36px;flex:none;padding:0;border-radius:10px}
.office .order-action{margin-top:5px;font-size:22px}
.archive-toggle{position:relative}
.archive-toggle svg{width:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.archive-toggle:is(:hover,:focus-visible)::after{content:attr(data-tip);position:absolute;top:calc(100% + 5px);right:0;z-index:2;white-space:nowrap;background:#39261a;color:white;border-radius:6px;padding:5px 8px;font-size:12px}

.order-overview{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px 12px;max-width:calc(100% - 22px);vertical-align:middle}
.order-time{font-size:.85rem;font-weight:400;color:#615448;white-space:nowrap}
.order-status{padding:3px 9px;border-radius:12px;background:#eee9e3;color:#504539;font-size:.85rem;font-weight:650}
.order-status:is([data-state="NEW"],[data-state="INITIALIZING"]){color:#245184;background:#e6effa}
.order-status:is([data-state="FORM_SHOWED"],[data-state="AUTHORIZED"]){color:#714400;background:#fff0cb}
.order-status[data-state="CONFIRMED"]{color:#175c32;background:#e2f3e6}
.order-status:is([data-state="REJECTED"],[data-state="CANCELED"],[data-state="DEADLINE_EXPIRED"]){color:#922e27;background:#fce9e6}
.order-status:is([data-state="REFUNDED"],[data-state="PARTIAL_REFUNDED"]){color:#603e7c;background:#f2eaf8}

.office .product-preview{border:0;background:transparent;padding:0;flex:none}
.product-preview img{display:block}
.office .product-remove{position:relative;display:grid;place-items:center;flex:none;width:36px;height:36px;margin-left:auto;padding:0;border-radius:10px}
.product-remove svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.product-remove:is(:hover,:focus-visible)::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 4px);right:0;z-index:2;white-space:nowrap;background:#39261a;color:white;border-radius:6px;padding:5px 8px;font-size:12px}

.office .product-edit-name{padding:0;border:0;background:transparent;text-align:left;color:#624023;text-decoration:underline;text-underline-offset:3px}

@media(max-width:760px){
  main:has(#customer-inbox)>.inner{min-height:0;padding-bottom:0}
  main:has(#customer-inbox)>.inner::before,main:has(#customer-inbox)>.inner::after{display:none}
  main:has(#customer-inbox)>.inner p:last-child{margin-bottom:0}
  .wrap:has(>#customer-inbox){padding-top:16px}
  #customer-inbox,#customer-inbox>h2:first-child{margin-top:0}
}
.workbox ::placeholder,.office .thread ::placeholder{color:#706c68;opacity:1}

.office .ticket-open{flex:1;min-width:0;display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;text-align:left;background:transparent;border:0;padding:13px 0}
.ticket-subject{width:100%;font-weight:400;overflow-wrap:anywhere}
.order-status[data-state=new]{color:#245184;background:#e6effa}
.order-status[data-state=read]{color:#714400;background:#fff0cb}
.order-status[data-state=processed]{color:#175c32;background:#e2f3e6}
.order-status[data-state=buyer_reply]{color:#603e7c;background:#f2eaf8}

.buyer-ticket{border-bottom:1px solid #dbcdbb}
.buyer-ticket>summary{display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;padding:14px 0;cursor:pointer;list-style:none}
.buyer-ticket>summary::-webkit-details-marker{display:none}
.buyer-ticket>summary::before{content:'›';color:#765238;font-size:1.2em}
.buyer-ticket[open]>summary::before{transform:rotate(90deg)}
.buyer-ticket>summary strong{flex:1 1 12em;min-width:0;overflow-wrap:anywhere}
.order-status[data-state=pending]{background:#e6effa;color:#245184}
.order-status[data-state=answered]{background:#e2f3e6;color:#175c32}

.behavior-block{margin:12px 0}.behavior-table{overflow:auto}.behavior-table table{border-collapse:collapse;width:100%}.behavior-table th,.behavior-table td{padding:7px;text-align:left;border-bottom:1px solid #dfcfbd}
.funnel-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto;align-items:center;gap:8px;margin:9px 0}.funnel-row progress{accent-color:#795036;width:100%}
.heat-grid{display:grid;grid-template:repeat(20,1fr)/repeat(20,1fr);aspect-ratio:3/4;max-width:320px;background:repeating-linear-gradient(0deg,#f3e7d8 0 4.8%,#fff 4.8% 5%);border:1px solid #cfbda8}
.replay-stage{position:relative;max-width:320px;height:150px;overflow:hidden;background:#f5ebdf;border:1px solid #d5c0a8;border-radius:8px}.replay-stage span{position:absolute;color:#a3481c;line-height:1}
.office form.report-period{display:flex;align-items:end;flex-wrap:wrap;gap:10px}.report-period label{flex:1 1 135px;min-width:0}.report-period input,.report-period select{width:100%;min-width:0}
@media(max-width:760px){.office .traffic .metrics{grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));gap:8px}.office .traffic .metrics>.panel{min-width:0;padding:10px;margin:6px 0}.office .traffic .metrics>.panel>strong:first-child{font:600 13px/1.35 system-ui;white-space:nowrap}.office .traffic .metrics>.panel>span:first-child{font:500 11px/1.4 system-ui;white-space:nowrap}}
.cabinet-nav [data-tab="support"]{position:relative}.cabinet-nav .support-count{position:absolute;top:0;left:calc(50% + 5px);min-width:17px;padding:1px 4px;border-radius:20px;background:#ffe0a6;color:#39261a;border:1px solid #62452f;font:700 11px/15px system-ui;text-align:center;pointer-events:none}.cabinet-nav .support-count[hidden]{display:none}

.cabinet-nav [data-tab="orders"]{position:relative}
.order-new{color:#734313;font-weight:650}
.order-status[data-state=processing],.office .order-stage[data-state=processing]{color:#724400;background:#fff0c7}
.order-status[data-state=shipped],.office .order-stage[data-state=shipped]{color:#175b45;background:#dcf4e9}
.order-status[data-state=cancelled],.office .order-stage[data-state=cancelled]{color:#912d29;background:#fbe5e3}
.order-status-pair{display:inline-flex;align-items:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}

@media (max-width:760px){
  .office main:has(.order-tools){padding:8px 8px 90px}
  .office:has(.order-tools) header{padding-block:5px}
  .office .order-tools{min-height:38px;gap:8px}
  .office .order-tools h1{font-size:26px;margin:2px 0}
  .office main:has(.order-tools) .cabinet-logout{padding:5px 10px;margin-bottom:0}
  .order-tools + .panel{padding:0 6px;margin:5px 0}
  .order-tools + .panel .order-line{align-items:center;gap:3px}
  .order-tools + .panel details{padding:3px 0}
  .order-tools + .panel summary{display:flex;align-items:center;gap:3px}
  .order-tools + .panel summary::-webkit-details-marker{display:none}
  .order-tools + .panel summary::before{content:'›';font-size:15px;color:#745942}
  .order-tools + .panel details[open] summary::before{transform:rotate(90deg)}
  .order-tools + .panel .order-overview{display:grid;flex:1;min-width:0;max-width:none;grid-template-columns:minmax(0,1fr) minmax(0,auto);align-items:center;gap:1px 3px;font:500 16px/1.15 system-ui}
  .order-overview>strong{grid-column:1;grid-row:1}
  .order-tools + .panel .order-time{grid-column:2;grid-row:1;text-align:right;font:400 13px/1.2 system-ui}
  .order-overview>.order-buyer{display:contents}
  .order-overview .order-name{grid-row:2;grid-column:1/-1}

  .order-overview .order-total{grid-row:3;grid-column:1;align-self:start}
  .order-overview>.order-status-pair{grid-row:3;grid-column:2;justify-content:flex-end;gap:3px;flex-wrap:wrap}
  .order-tools + .panel .order-status,.order-tools + .panel .order-new{font:600 13px/1.2 system-ui;padding:1px 5px}
  .order-tools + .panel .order-new{margin-left:4px}
  .order-tools + .panel .order-action{width:26px;height:30px;font-size:17px;margin:0}
}
.order-name,.order-total{display:block}.order-total{white-space:nowrap}

.order-tools + .panel .order-line:nth-child(even){background:#f8f3eb}
.order-line .order-overview>strong{color:#254e73}
.order-line .order-name{color:#33271f}
.order-line .order-total{color:#743950}
.office .order-line .order-time{color:#59534d}
.order-line .order-new{color:#563472;background:#eee4f6;border-radius:6px;padding-inline:5px}
.office .order-overview .order-copy{grid-column:1;grid-row:1;justify-self:start;min-height:24px;padding:0 3px;border:0;background:transparent;color:#254e73;font:600 12px/1.2 system-ui;white-space:nowrap;cursor:pointer}.order-copy:is(:hover,:focus-visible){text-decoration:underline}
