.admin-workspace { max-width: 1180px; margin: auto; padding: 32px 30px 60px; }
.admin-shortcuts { display:flex; flex-wrap:wrap; gap:12px 28px; padding:18px 0 0; font-size:13px; color:var(--accent-ink); }
.admin-shortcuts a { min-height:44px; display:inline-flex; align-items:center; }
#admin-code { font-size:17px; }
#admin-login .primary { justify-content:center; }
#admin-logout { font-size:12px; white-space:nowrap; }
.seller-label { color:var(--muted); font-size:12px; }
.seller-links { display:flex; flex-wrap:wrap; gap:10px 24px; padding:18px 0; font-size:13px; color:var(--accent-ink); }
.seller-links a { min-height:44px; display:inline-flex; align-items:center; }
@media(max-width:580px){.desk-header:has(#admin-logout){flex-wrap:wrap;gap:12px;} .desk-header #admin-logout{margin-left:auto;} .storage-label{line-height:1.6;}}
.admin-title, .admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-title h1 { font-size: 40px; margin: 0; }
.admin-title p, .admin-section-heading p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 6px 0; max-width: 65ch; }
.storage-label { font-size: 12px; color: #29603a; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--line); margin: 28px 0; }
.admin-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; font-weight: 700; padding: 14px 2px; min-height: 48px; }
.admin-tabs button[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent-ink); }
.admin-section-heading h2 { font-size: 28px; margin: 0; }
.admin-section-heading h2 span { color: var(--muted); font-size: 18px; margin-left: 8px; }
.product-search { display: block; max-width: 420px; font-size: 12px; color: var(--muted); margin: 24px 0 16px; }
.product-search input { display: block; width: 100%; margin-top: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; }
.product-list { border-top: 1px solid var(--line); }
.product-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); padding: 18px 0; }
.product-open { border: 0; padding: 8px 0; background: transparent; text-align: left; min-width: 0; }
.product-open strong { display: block; font-size: 18px; margin-bottom: 6px; }
.product-open span { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.product-open:hover strong { color: var(--accent-ink); }
.availability-toggle { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 0; min-height: 44px; font-size: 13px; }
.switch-track { display: block; width: 42px; height: 24px; background: #77736e; border-radius: 20px; padding: 3px; flex-shrink: 0; }
.switch-track::after { content: ''; display: block; background: white; width: 18px; height: 18px; border-radius: 50%; }
[aria-checked="true"] .switch-track { background: var(--accent-ink); }
[aria-checked="true"] .switch-track::after { margin-left: 18px; }
.history-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 24px 0 12px; }
.history-filters label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; flex: 1 1 130px; }
.history-filters label:first-child { flex: 2 1 220px; }
.history-filters input, .history-filters select { border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 46px; width: 100%; min-width: 0; background: white; }
.date-help { font-size: 12px; color: var(--muted); max-width: 75ch; line-height: 1.5; }
.history-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; font-size: 13px; }
.history-tools a { display: inline-block; margin: 0 12px 0 0; min-height: 44px; padding: 12px 0; }
.history-table { overflow: auto; border-top: 1px solid var(--line); }
.history-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th, .history-table td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 14px 10px; line-height: 1.55; }
.history-table th { color: var(--muted); font-weight: 600; background: #faf9f7; }
.history-table td { overflow-wrap: anywhere; max-width: 360px; }
.history-table th:first-child,.history-table td:first-child { padding-left: 0; }
.history-table button { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.history-table small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.history-pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 24px 0; font-size: 13px; }
.admin-dialog { width: min(680px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px; color: var(--text); }
.admin-dialog::backdrop { background: rgb(20 17 14 / .5); }
.admin-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.admin-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; flex-shrink: 0; }
.admin-dialog h2 { margin: 0; font-size: 28px; }
.admin-dialog-body { overflow: auto; padding: 0 26px 24px; }
.admin-dialog-body .field { font-size: 14px; margin-bottom: 22px; }
.admin-dialog-body .field input, .admin-dialog-body .field textarea { font-size: 15px; padding: 12px; }
.availability-field { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0 0 24px; }
.availability-field input { accent-color: var(--accent-ink); width: 20px; height: 20px; }
.admin-dialog footer { display: flex; justify-content: end; gap: 12px; padding: 16px 26px; border-top: 1px solid var(--line); flex-shrink: 0; }
.history-dialog { width: min(900px,calc(100vw - 32px)); }
.history-dialog[open] { display: flex; flex-direction: column; }
.history-dialog h3 { margin: 28px 0 12px; font-size: 20px; }
.history-dialog p, .history-dialog li { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.history-dialog summary { cursor: pointer; padding: 12px 0; font-size: 13px; }
.history-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; padding: 14px; background: var(--surface); }
@media(max-width:580px) {
 .admin-workspace { padding: 24px 16px 40px; }
 .admin-title,.admin-section-heading { align-items: start; flex-direction: column; gap: 12px; }
 .admin-title h1 { font-size: 34px; }
 .admin-tabs { gap: 0 18px; margin: 20px 0; }
 .admin-tabs button { font-size: 13px; }
 .product-row { gap: 12px; }
 .product-open strong { font-size: 16px; }
 .availability-toggle { font-size: 11px; flex-direction: column; gap: 5px; }
 .history-filters label { flex-basis: calc(50% - 14px); }
 .history-filters label:first-child { flex-basis: 100%; }
 .history-table table { min-width: 620px; }
 .admin-dialog { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
 .admin-dialog form { max-height: 100dvh; height: 100dvh; }
 .admin-dialog header { padding: 18px 16px; }
 .admin-dialog-body { padding: 0 16px 20px; flex: 1; }
 .admin-dialog footer { padding: 14px 16px; }
 .admin-dialog footer button { flex: 1; }
 .desk-header #back-live { font-size: 12px; padding: 10px; }
 #admin-app .desk-header { display:grid;grid-template-columns:86px minmax(0,1fr); }
 #admin-app .desk-header .account { min-width:0; }
 #admin-app .desk-header #back-live { justify-self:start;grid-column:1/-1; }
 #admin-app .desk-header #admin-logout { grid-column:2;grid-row:2;justify-self:end; }
}
