@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
:root{--bg:#faf5ea;--ink:#23211c;--muted:#6d695f;--surface:#f1ebde;--line:#ded8cb;--orange:#b63b12;--green:#4c6446;font-family:Montserrat,Arial,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,textarea,select{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button{border:0;background:none}button:disabled{opacity:.5;cursor:wait}button,a,input,textarea,select{outline-offset:5px}button:focus-visible,a:focus-visible{outline:2px solid var(--orange)}[hidden]{display:none!important}.topbar{height:104px;max-width:1392px;padding:0 48px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin:auto}.workspace,.shop-link{font-size:.875rem}.workspace{color:var(--muted)}.brand img{display:block;width:310px;height:auto;max-height:58px;object-fit:contain}.shop-link{justify-self:end;display:flex;align-items:center;gap:10px}.shop-link:hover{text-decoration:underline}.admin-main{max-width:1200px;margin:0 auto;padding:24px 40px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.intro h1{font-size:1.5rem;font-weight:600;letter-spacing:-.035em;line-height:1.3;margin:0}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--line);margin-bottom:24px}.tab{padding:0 2px 18px;font-size:1rem;display:flex;align-items:center;gap:10px;color:var(--muted);position:relative}.tab.active{color:var(--ink);font-weight:600}.tab.active:after{content:'';position:absolute;bottom:-1px;height:3px;background:var(--ink);left:0;right:0;border-radius:3px}.tab span{background:var(--surface);border-radius:99px;min-width:27px;padding:4px 8px;font-size:.75rem}.tab.active span{background:var(--ink);color:var(--bg)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}h2{font-size:1.5rem;font-weight:600;letter-spacing:-.035em;margin:0}.section-heading p{font-size:.875rem;color:var(--muted);margin:9px 0 0;line-height:1.6}.button{min-height:44px;padding:12px 23px;border:1px solid var(--ink);border-radius:999px;font-size:.875rem;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:10px;transition:background .15s,transform .15s;white-space:nowrap}.button:hover{transform:translateY(-1px)}.primary{background:var(--ink);color:var(--bg)}.primary:hover{background:#444036}.secondary{background:transparent}.secondary:hover{background:#e9e3d6}.plus{font-size:1.4rem;line-height:16px;font-weight:400}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0 24px}.filter-group{display:flex;gap:6px}.filter{font-size:.875rem;min-height:40px;padding:9px 13px;border-radius:999px;border:1px solid transparent;white-space:nowrap}.filter.active{border-color:var(--line);background:var(--surface)}.filter:hover{background:var(--surface)}.filter span{color:var(--muted);font-size:.75rem;margin-left:5px}.sort-label{display:flex;align-items:center;gap:12px;font-size:.75rem;color:var(--muted)}select{appearance:none;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2323211c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;border:1px solid var(--line);border-radius:8px;padding:11px 32px 11px 12px;font-size:.875rem;color:var(--ink);max-width:100%}.list-heading,.product-row{display:grid;grid-template-columns:minmax(0,1fr) 132px 154px 146px;align-items:center;column-gap:24px}.list-heading{padding:0 20px 13px;border-bottom:1px solid var(--line);font-size:.75rem;color:var(--muted)}.product-row{padding:19px 20px;border-bottom:1px solid var(--line);transition:background .15s}.product-row:hover{background:#f5efe3}.product-identity{display:flex;gap:20px;align-items:center;min-width:0}.product-photo{width:66px;height:88px;object-fit:cover;background:var(--surface);border-radius:6px;flex-shrink:0}.product-name{font-size:1rem;font-weight:600;margin:0 0 7px;line-height:1.5;overflow-wrap:anywhere}.product-description{font-size:.8125rem;line-height:1.5;color:var(--muted);margin:0 0 7px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.product-id{font-size:.75rem;color:var(--muted);letter-spacing:.03em}.product-price{font-size:.9375rem;font-weight:600;white-space:nowrap}.old-price{display:block;color:var(--orange);font-size:.75rem;font-weight:400;text-decoration:line-through;margin-top:5px}.stock{font-size:.8125rem;line-height:1.6;display:inline-flex;align-items:center;gap:7px}.stock:before{content:'';width:6px;height:6px;flex-shrink:0;border-radius:50%;background:var(--green)}.stock.unavailable{color:var(--muted)}.stock.unavailable:before{background:#b4ad9e}.edit-button{border:1px solid var(--line);border-radius:999px;min-height:40px;padding:10px 14px;font-size:.8125rem;display:flex;align-items:center;justify-content:center;gap:8px}.edit-button:hover{border-color:var(--ink)}.edit-button svg{width:14px;height:14px;flex-shrink:0}.list-footer{display:flex;justify-content:space-between;color:var(--muted);font-size:.75rem;padding:20px}.page-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:24px;padding-top:24px;color:var(--muted);font-size:.75rem;gap:15px}.text-button{font-size:.75rem;text-decoration:underline;text-underline-offset:4px;padding:7px 0;color:var(--muted)}.order-list{display:grid;gap:20px}.order-card{border:1px solid var(--line);border-radius:18px;padding:25px 28px}.order-header{display:flex;justify-content:space-between;gap:15px;align-items:center;padding-bottom:22px;border-bottom:1px solid var(--line)}.order-header h3{font-size:1.0625rem;margin:0 0 7px;font-weight:600}.order-meta{font-size:.75rem;color:var(--muted)}.order-status{font-size:.75rem;padding:7px 11px;border-radius:99px;background:#eee3cd;color:#75582c;white-space:nowrap}.order-status.done{background:#e5e9dd;color:#425b38}.order-status.cancelled{background:var(--surface);color:var(--muted)}.order-body{display:grid;grid-template-columns:1fr 240px;gap:28px;padding:22px 0}.order-items{display:grid;gap:14px}.order-item{display:flex;align-items:center;gap:15px}.order-item img{width:45px;height:60px;object-fit:cover;border-radius:4px}.order-item h4{font-size:.875rem;font-weight:600;margin:0 0 7px}.order-item p{font-size:.8125rem;color:var(--muted);margin:0}.customer{border-left:1px solid var(--line);padding-left:24px;font-size:.875rem;line-height:1.8}.customer p{margin:0 0 8px}.customer span{font-size:.75rem;color:var(--muted);display:block}.order-footer{display:flex;justify-content:space-between;align-items:center;padding-top:20px;border-top:1px solid var(--line);gap:16px}.order-total{font-weight:600;font-size:1.125rem}.order-total span{font-size:.75rem;font-weight:400;color:var(--muted);margin-right:12px}.order-actions{display:flex;gap:10px}.order-result{font-size:.8125rem;color:var(--muted)}.empty{text-align:center;padding:64px 24px;color:var(--muted)}.empty h3{color:var(--ink);font-size:1.25rem;font-weight:500}.empty p{font-size:.875rem;line-height:1.7}dialog{border:1px solid var(--line);border-radius:22px;padding:0;background:var(--bg);color:var(--ink);width:min(870px,calc(100% - 32px));max-height:calc(100dvh - 40px);box-shadow:0 24px 100px #23211c30}dialog::backdrop{background:#23211c70;backdrop-filter:blur(4px)}.modal-heading{padding:28px 32px 24px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.modal-heading .icon-button{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;font-size:1.75rem;line-height:1}.icon-button:hover{background:var(--surface)}.editor-layout{padding:28px 32px;display:grid;grid-template-columns:260px 1fr;gap:32px}.photo-preview{aspect-ratio:3/4;background:var(--surface);border:1px solid var(--line);border-radius:10px;overflow:hidden;display:grid;place-items:center}.photo-preview img{width:100%;height:100%;object-fit:contain;min-height:0}.photo-preview span{display:flex;flex-direction:column;align-items:center;gap:20px;color:var(--muted);font-size:.75rem}.upload-label{width:100%;margin-top:14px;cursor:pointer;position:relative}.upload-label input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer} .upload-label input:focus{outline:none}.upload-label:focus-within{outline:1px solid var(--ink);outline-offset:2px}.field{display:flex;flex-direction:column;gap:8px;font-size:.875rem;font-weight:500}.field input,.field textarea{width:100%;background:#fcf9f2;border:1px solid #d5cebf;border-radius:8px;padding:11px 12px;line-height:1.5;font-size:.9375rem}.field input:focus,.field textarea:focus,.field select:focus{outline:2px solid #a49477;outline-offset:1px}.field input:read-only{background:var(--surface);color:var(--muted)}.field textarea{resize:vertical;min-height:112px}.editor-fields{display:flex;flex-direction:column;gap:19px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.stock-field input{max-width:120px}.modal-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px 32px;justify-content:flex-end;border-top:1px solid var(--line);background:#f4eee0}.modal-footer>div{display:flex;gap:10px}.form-error{color:var(--orange);font-size:.875rem;line-height:1.6;padding:0 32px 20px;margin:0}.confirm-dialog{max-width:470px;padding:32px}.confirm-dialog h2{line-height:1.4}.confirm-actions{margin-top:24px;display:flex;gap:10px;justify-content:flex-end}.notification{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--bg);border-radius:14px;padding:16px 24px;font-size:.875rem;line-height:1.6;box-shadow:0 8px 24px #23211c22;max-width:calc(100% - 32px);width:max-content;z-index:5}
@media(min-width:1500px){.admin-main{padding-top:24px}}@media(max-width:1000px){.topbar{padding:0 28px}.workspace{font-size:.75rem}.brand img{width:260px}.admin-main{padding:40px 28px 24px}.list-heading,.product-row{grid-template-columns:minmax(0,1fr) 100px 126px 42px;gap:18px}.edit-button{font-size:0;padding:10px}.edit-button svg{width:17px;height:17px}.sort-label{font-size:0;gap:0}.editor-layout{grid-template-columns:220px 1fr;gap:24px}.list-footer span:last-child{display:none}}@media(max-width:700px){.topbar{height:88px;padding:0 20px;grid-template-columns:1fr auto;gap:20px;border-bottom:1px solid var(--line)}.workspace{display:none}.brand img{width:220px;max-width:100%;height:auto}.shop-link{font-size:0;gap:0}.shop-link svg{width:23px;height:23px}.admin-main{padding:32px 20px 24px}.intro{align-items:flex-start;margin-bottom:24px}.intro h1{font-size:1.5rem}.tabs{margin-bottom:28px}.section-heading{align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:18px}.section-heading h2{font-size:1.25rem}.section-heading p{font-size:.8125rem}.section-heading>.button{width:100%}.toolbar{padding:10px 0 18px;align-items:stretch;flex-direction:column;gap:16px}.filter-group{gap:2px;justify-content:space-between}.filter{font-size:.75rem;padding:9px 8px}.filter span{margin-left:3px}.sort-label{font-size:.75rem;justify-content:space-between}.sort-label select{font-size:.8125rem}.list-heading{display:none}.product-list{border-top:1px solid var(--line)}.product-row{position:relative;grid-template-columns:1fr auto;gap:0 12px;padding:18px 0}.product-identity{grid-column:1;grid-row:1/4;gap:13px;align-self:start}.product-photo{width:56px;height:75px}.product-name{font-size:.875rem;margin-bottom:4px;padding-right:4px}.product-description{display:none}.product-id{font-size:.6875rem}.product-price{grid-column:2;grid-row:1;font-size:.875rem;text-align:right}.old-price{font-size:.6875rem}.stock-wrap{grid-column:1;grid-row:4;padding:8px 0 0 69px}.stock{font-size:.6875rem}.edit-button{grid-column:2;grid-row:3/5;justify-self:end;width:40px;height:40px;margin-top:12px}.list-footer{padding:18px 0}.page-footer{margin-top:34px;font-size:.6875rem;line-height:1.8}.order-card{padding:20px 16px}.order-header{align-items:flex-start;gap:10px}.order-header h3{font-size:1rem}.order-meta{font-size:.6875rem;line-height:1.6}.order-status{font-size:.6875rem}.order-body{grid-template-columns:1fr;gap:20px}.customer{padding:16px 0 0;border-left:0;border-top:1px solid var(--line);display:flex;gap:24px;flex-wrap:wrap}.customer p{margin:0}.order-footer{flex-wrap:wrap}.order-actions{width:100%}.order-actions .button{flex:1;padding:12px 16px}.order-result{line-height:1.6}dialog{max-height:calc(100dvh - 24px);width:calc(100% - 20px);border-radius:16px}.modal-heading{padding:20px}.editor-layout{grid-template-columns:1fr;padding:20px;gap:24px}.photo-column{display:grid;grid-template-columns:100px 1fr;gap:12px 16px;align-items:start}.photo-preview{grid-column:1;grid-row:1/4;width:100px}.photo-preview span{padding:8px;text-align:center;gap:10px;font-size:.6875rem}.photo-preview svg{width:24px}.upload-label{margin:0;font-size:.75rem;padding:10px}.photo-column .field{grid-column:1/-1}.modal-footer{padding:20px;flex-direction:column;align-items:stretch}.modal-footer>div{justify-content:flex-end}.modal-footer .button{flex:1;padding:12px 16px}.form-error{padding:0 20px 20px}.confirm-dialog{padding:25px}.confirm-actions .button{padding:12px 16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Keep touch scrolling on the page vertical, including Safari's edge bounce. */
html,body{overflow-x:clip;overscroll-behavior-x:none}
body{min-width:0}
.brand,.field,.editor-fields,.product-identity>div,.order-item>div{min-width:0}
.product-id,.order-item h4,.order-meta{overflow-wrap:anywhere}
.field-row{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px),(hover:none) and (pointer:coarse){
  /* Keep Safari from zooming the viewport when a form control receives focus. */
  .field input,.field textarea,.field select,.sort-label select{font-size:16px}
  /* Safari can rubber-band the viewport even when it has no horizontal overflow. */
  html:has(#admin-screen:not([hidden])){height:100%;overflow:hidden;overscroll-behavior:none}
  body:has(>#admin-screen:not([hidden])){position:fixed;inset:0;width:100%;height:100dvh;overflow:hidden}
  #admin-screen{width:100%;height:100dvh;overflow-x:hidden;overflow-y:auto;overscroll-behavior-x:none;touch-action:pan-y pinch-zoom}
}
@media(max-width:700px){
  .topbar,.product-row{grid-template-columns:minmax(0,1fr) auto}
  .filter-group{flex-wrap:wrap}
  .sort-label select{min-width:0}
  .photo-column{grid-template-columns:100px minmax(0,1fr)}
}

.login-screen{min-height:100dvh;display:grid;place-items:center;padding:24px}
.login-form{width:100%;max-width:320px;display:grid;gap:20px}
.login-form .button{width:100%;margin-top:4px}
.login-error{color:var(--orange);font-size:.875rem;line-height:1.6;margin:0}
.header-actions{justify-self:end;display:flex;align-items:center;gap:24px}
.header-actions .text-button{font-size:.875rem;color:var(--ink)}
@media(max-width:700px){.header-actions{gap:16px}.header-actions .text-button{font-size:.75rem}}

.field-error{color:var(--orange);font-size:.8125rem;font-weight:400;line-height:1.5}
.field input[aria-invalid="true"]{border-color:var(--orange)}

.metrics-period{display:flex;align-items:flex-end;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.metrics-period .field{max-width:200px}
.metrics-error{color:var(--orange);font-size:.875rem;line-height:1.6}
.metric-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.metric-card{padding:24px;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;gap:12px}
.metric-card h3{margin:0;font-size:.875rem;font-weight:500;line-height:1.5}
.metric-card strong{font-size:2rem;font-weight:600;line-height:1.2}
.metric-card>span,.metrics-empty{font-size:.8125rem;color:var(--muted)}
.metrics-section{margin-top:32px}.metrics-section>h3{font-size:1.125rem;font-weight:600;margin:0 0 16px}
.metrics-table-wrap{overflow-x:auto}.metrics-table{width:100%;border-collapse:collapse;font-size:.875rem}
.metrics-table th,.metrics-table td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:right}
.metrics-table th:first-child{text-align:left}.metrics-table thead th{color:var(--muted);font-weight:500;white-space:nowrap}
.metrics-table tbody th{font-weight:500}.metrics-table .product-id{display:block;margin-top:5px}
@media(max-width:700px){.metric-cards{grid-template-columns:1fr}.metric-card{padding:18px}.metrics-period{gap:12px}.metrics-period .field{flex:1;min-width:120px}.metrics-period .button{width:100%}.tabs{gap:24px}.metrics-table th,.metrics-table td{padding:12px 8px}}
