.office-body {
  background: #f5f5f7;
}
.office-header {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 var(--gutter);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.office-header > span {
  font-size: 12px;
  color: var(--muted);
}
.office-header > .text-link {
  margin-left: auto;
  font-size: 12px;
}
.office-main {
  max-width: 1600px;
  margin: auto;
  padding: 50px var(--gutter) 80px;
}
.office-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 35px;
}
.office-heading .eyebrow {
  margin-bottom: 18px;
}
.office-heading h1 {
  font-size: 48px;
}
.office-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #dcdce1;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.office-tabs button {
  padding: 15px 20px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
  border-bottom: 2px solid transparent;
}
.office-tabs button.active {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}
.owner-login {
  max-width: 570px;
  margin: 30px auto 0;
  background: white;
  border-radius: 18px;
  padding: 45px;
}
.owner-login > .eyebrow {
  margin-bottom: 25px;
}
.owner-login h1 {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 25px;
}
.owner-login > p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  margin: 25px 0;
}
.owner-login > .button {
  font-size: 13px;
}
.owner-login details {
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 25px;
}
.owner-login summary {
  font-size: 13px;
  font-weight: 500;
}
.owner-login form {
  display: grid;
  gap: 20px;
  padding-top: 25px;
}
.office-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
}
.stat-card > span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 20px;
}
.stat-card > strong {
  font-size: 38px;
  letter-spacing: -0.05em;
  font-weight: 550;
}
.office-panel {
  background: white;
  border-radius: 12px;
  padding: 28px;
  margin-top: 25px;
}
.office-panel h2 {
  font-size: 25px;
  margin-bottom: 20px;
}
.office-panel > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.office-panel > .button {
  margin-top: 20px;
  font-size: 12px;
}
.office-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
  flex-wrap: wrap;
}
.office-toolbar input,
.office-toolbar select {
  border: 1px solid #d7d7dc;
  background: white;
  border-radius: 7px;
  min-height: 43px;
  padding: 10px 14px;
  font-size: 12px;
}
.office-toolbar input {
  width: 320px;
  max-width: 100%;
}
.office-toolbar .button {
  font-size: 12px;
  margin-left: auto;
  min-height: 43px;
}
.office-table-wrap {
  width: 100%;
  overflow: auto;
  background: white;
  border-radius: 12px;
}
.office-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.office-table th,
.office-table td {
  text-align: left;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.office-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
  background: #fbfbfc;
}
.office-table tr:last-child td {
  border-bottom: 0;
}
.office-product-name {
  display: flex;
  align-items: center;
  gap: 16px;
}
.office-product-name img {
  width: 55px;
  height: 55px;
  background: var(--surface);
  border-radius: 7px;
  object-fit: contain;
  padding: 4px;
}
.office-product-name p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.status-badge {
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 10px;
  background: #eaf0ea;
  color: #4c6e4c;
  display: inline-block;
}
.status-badge.inactive,
.status-badge.cancelled {
  background: #f0e8e5;
  color: #8d5c50;
}
.status-badge.preparing {
  background: #f5efe2;
  color: #8b702c;
}
.status-badge.completed {
  background: #e8edf6;
  color: #5374a8;
}
.office-table .button {
  font-size: 10px;
  min-height: 32px;
  padding: 7px 15px;
}
.editor-dialog {
  width: 1100px;
  border-radius: 15px;
  padding: 30px;
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
.editor-dialog .dialog-top {
  position: sticky;
  top: -30px;
  background: white;
  z-index: 2;
  padding-top: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
}
.editor-dialog h2 {
  font-size: 26px;
}
.editor-form {
  display: grid;
  gap: 24px;
}
.editor-form h3 {
  font-size: 20px;
  margin-top: 10px;
}
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.editor-grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.editor-form .field {
  font-size: 11px;
}
.editor-form .field input,
.editor-form .field select {
  font-size: 12px;
}
.editor-form textarea {
  font-size: 12px;
}
.editor-form .fineprint {
  font-size: 11px;
}
.editor-form .field.wide {
  grid-column: 1/-1;
}
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: -30px;
  background: white;
  padding-bottom: 15px;
  z-index: 2;
}
.editor-actions .button {
  font-size: 12px;
}
.variant-editor {
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 10px;
  display: grid;
  gap: 18px;
  margin-top: 15px;
}
.variant-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.variant-heading > strong {
  font-size: 12px;
}
.variant-heading .text-button {
  font-size: 10px;
}
.editor-languages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.editor-languages > .field > span {
  font-size: 10px;
  color: var(--muted);
}
.media-input {
  display: flex;
  gap: 20px;
  align-items: center;
}
.media-input > img {
  width: 100px;
  height: 100px;
  background: var(--surface);
  border-radius: 7px;
  object-fit: contain;
}
.media-input > .field {
  flex: 1;
}
.image-library {
  max-height: 240px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
  margin-top: 15px;
}
.image-library button {
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: white;
}
.image-library button:hover {
  border-color: var(--ink);
}
.image-library img {
  width: 100%;
  height: 70px;
  object-fit: contain;
}
.media-upload {
  border: 1px dashed #bdbdc6;
  padding: 18px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 12px;
}
.media-upload input {
  font-size: 11px;
  margin-top: 10px;
  display: block;
}
.office-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.office-settings .office-panel {
  margin-top: 0;
}
.office-settings form {
  display: grid;
  gap: 20px;
}
.office-settings h3 {
  margin-top: 10px;
  font-size: 18px;
}
.settings-full {
  grid-column: 1/-1;
}
.order-editor-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.order-editor-summary h3 {
  font-size: 18px;
  margin-bottom: 15px;
}
.order-editor-summary p {
  font-size: 12px;
  line-height: 1.9;
}
.order-editor-summary .receipt-lines {
  grid-column: 1/-1;
}
.order-editor-summary .summary-lines {
  grid-column: 1/-1;
  margin-top: 0;
}
.audit-action {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px !important;
}
.empty-office {
  padding: 60px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.office-error {
  margin-bottom: 25px;
}
.editor-message {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 600px;
}
.field input[readonly] {
  background: #f7f7f9;
  color: var(--muted);
}
.office-order-search {
  display: flex;
  gap: 15px;
}
.office-order-search input {
  flex: 1;
}
.variant-editor .editor-grid {
  gap: 15px;
}
.low-stock {
  color: #a26324;
}
.office-loader {
  padding: 40px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .office-stats {
    grid-template-columns: 1fr 1fr;
  }
  .office-settings {
    grid-template-columns: 1fr;
  }
  .settings-full {
    grid-column: auto;
  }
  .editor-grid.three {
    grid-template-columns: 1fr 1fr;
  }
  .editor-languages {
    grid-template-columns: 1fr;
  }
  .image-library {
    grid-template-columns: repeat(5, 1fr);
  }
  .office-heading h1 {
    font-size: 40px;
  }
  .office-header {
    gap: 20px;
  }
  .office-header > .text-link {
    font-size: 10px;
  }
  .office-header > span {
    display: none;
  }
}
@media (max-width: 600px) {
  .office-header {
    height: 70px;
    gap: 15px;
  }
  .office-header .wordmark {
    font-size: 22px;
  }
  .office-header > .text-link {
    font-size: 9px;
  }
  .office-header > .text-button {
    font-size: 9px;
  }
  .office-main {
    padding-top: 30px;
  }
  .office-heading {
    display: block;
    margin-bottom: 23px;
  }
  .office-heading h1 {
    font-size: 36px;
  }
  .office-heading .button {
    font-size: 10px;
    margin-top: 23px;
    min-height: 40px;
  }
  .office-tabs {
    gap: 0;
    margin-bottom: 23px;
  }
  .office-tabs button {
    font-size: 10px;
    padding: 12px 16px;
  }
  .office-stats {
    gap: 12px;
  }
  .stat-card {
    padding: 20px;
  }
  .stat-card > span {
    font-size: 9px;
    margin-bottom: 15px;
  }
  .stat-card > strong {
    font-size: 30px;
  }
  .office-panel {
    padding: 23px;
  }
  .office-panel h2 {
    font-size: 23px;
  }
  .office-panel > p {
    font-size: 12px;
  }
  .office-toolbar {
    gap: 10px;
  }
  .office-toolbar input {
    width: 100%;
  }
  .office-toolbar select {
    font-size: 11px;
    flex: 1;
  }
  .office-toolbar .button {
    font-size: 10px;
    padding-inline: 16px;
  }
  .office-table th,
  .office-table td {
    padding: 15px;
    font-size: 10px;
  }
  .office-product-name {
    gap: 12px;
  }
  .office-product-name img {
    width: 45px;
    height: 45px;
  }
  .office-product-name p {
    font-size: 9px;
  }
  .office-table .button {
    font-size: 9px;
  }
  .editor-dialog {
    padding: 20px;
    width: calc(100% - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .editor-dialog .dialog-top {
    top: -20px;
    padding-top: 10px;
  }
  .editor-dialog h2 {
    font-size: 23px;
  }
  .editor-grid,
  .editor-grid.three {
    grid-template-columns: 1fr;
  }
  .editor-grid .field.wide {
    grid-column: auto;
  }
  .editor-grid {
    gap: 15px;
  }
  .editor-form {
    gap: 20px;
  }
  .editor-actions {
    bottom: -20px;
    padding-bottom: 10px;
    gap: 15px;
  }
  .editor-actions .button {
    font-size: 11px;
    padding-inline: 20px;
  }
  .editor-message {
    font-size: 9px;
  }
  .variant-editor {
    padding: 15px;
  }
  .variant-heading > strong {
    font-size: 11px;
  }
  .image-library {
    grid-template-columns: repeat(4, 1fr);
  }
  .image-library img {
    height: 55px;
  }
  .media-input {
    gap: 15px;
  }
  .media-input > img {
    width: 70px;
    height: 70px;
  }
  .order-editor-summary {
    grid-template-columns: 1fr;
  }
  .order-editor-summary .receipt-lines,
  .order-editor-summary .summary-lines {
    grid-column: auto;
  }
  .owner-login {
    padding: 28px;
    margin-top: 10px;
  }
  .owner-login h1 {
    font-size: 33px;
  }
  .owner-login > p:not(.eyebrow) {
    font-size: 12px;
  }
  .owner-login > .button {
    font-size: 11px;
  }
  .owner-login details {
    margin-top: 28px;
  }
  .owner-login summary {
    font-size: 12px;
  }
}
