.admin-page {
  background: #f8fbf8;
}

.admin-page :focus-visible {
  outline: 3px solid rgba(139, 37, 69, 0.34);
  outline-offset: 3px;
}

.admin-header,
.admin-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--leaf-dark);
  font-size: 14px;
  font-weight: 800;
}

.admin-nav-button {
  padding: 0;
  color: var(--berry);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.admin-shell {
  display: grid;
  gap: 26px;
  padding-bottom: 70px;
}

.admin-hero,
.admin-stats,
.admin-tabs,
.admin-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 32px;
}

.admin-hero h1 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.95;
}

.admin-hero p,
.admin-section-head p {
  margin-top: 10px;
  color: var(--muted);
}

.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-refresh,
.product-editor button,
.product-import button,
.products-toolbar button,
.order-card button,
.delivery-editor button,
.delivery-row button,
.notification-row button,
.notification-preview button {
  min-height: 42px;
  padding: 0 16px;
  color: white;
  background: var(--leaf-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.admin-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-refresh.secondary {
  color: var(--leaf-dark);
  background: var(--sage-2);
}

.admin-loading .admin-refresh,
.admin-loading .admin-tabs button {
  cursor: progress;
}

.admin-loading .admin-hero::after {
  content: "Обновляем";
  flex: 0 0 auto;
  padding: 8px 10px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.route-date-input {
  width: auto;
  min-height: 42px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
}

.admin-stats article {
  padding: 22px;
  background: white;
}

.admin-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--berry);
  font-size: 28px;
}

.admin-tabs {
  position: sticky;
  top: 12px;
  z-index: 15;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(25, 83, 59, 0.08);
  scrollbar-width: thin;
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.admin-tabs button.active {
  color: white;
  background: var(--leaf-dark);
}

.admin-section {
  padding: 28px;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.admin-section:not(.active) {
  display: none;
}

.admin-section-head {
  margin-bottom: 20px;
}

.admin-section-head:has(button) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-section h2 {
  font-size: 38px;
}

.admin-section-head select {
  min-height: 42px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

.inventory-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.inventory-editor,
.recipe-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inventory-editor h3,
.recipe-editor h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
}

.inventory-editor input,
.inventory-editor textarea,
.inventory-editor select,
.recipe-editor input,
.recipe-editor textarea,
.recipe-editor select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
}

.recipe-editor textarea {
  min-height: 170px;
  padding-top: 12px;
  line-height: 1.5;
}

.inventory-editor button,
.recipe-editor button,
.material-row button,
.recipe-row button,
.order-checklist-box button {
  min-height: 42px;
  padding: 0 16px;
  color: white;
  background: var(--leaf-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.inventory-grid .inventory-recipes {
  grid-column: 1 / -1;
}

.material-row,
.recipe-row,
.forecast-row,
.forecast-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.recipe-row,
.forecast-summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.recipe-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.material-row div,
.recipe-row div,
.forecast-row div,
.forecast-summary {
  display: grid;
  gap: 4px;
}

.material-row span,
.recipe-row span,
.forecast-row span,
.forecast-summary span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.material-row.warn,
.forecast-row.danger {
  border-color: #e8c76f;
  background: #fffaf0;
}

.material-row.danger {
  border-color: #df9b9b;
  background: #fff4f4;
}

.material-row.ok,
.forecast-row.ok {
  background: #f7fcf8;
}

.checklist-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.checklist-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--leaf-dark);
  font-weight: 850;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.attention-grid article,
.profit-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attention-grid article.warn,
.profit-row.warn {
  border-color: #e8c76f;
  background: #fffaf0;
}

.attention-grid article.ok,
.profit-row.ok {
  background: #f7fcf8;
}

.attention-grid strong {
  color: var(--berry);
  font-size: 24px;
}

.action-center {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.action-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-center-head div {
  display: grid;
  gap: 3px;
}

.action-center-head strong {
  color: var(--leaf-dark);
  font-size: 18px;
}

.action-center-head span {
  color: var(--muted);
  font-size: 13px;
}

.action-center-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.action-center-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.action-center-grid article.warn {
  border-color: #e8c76f;
  background: #fffaf0;
}

.action-center-grid article.danger {
  border-color: #df9b9b;
  background: #fff4f4;
}

.action-center-grid article.work {
  border-color: #b8d8c2;
  background: #f5fbf7;
}

.action-center-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.action-center-grid strong {
  color: var(--berry);
  font-size: 28px;
}

.action-center-grid small {
  min-height: 34px;
  color: var(--muted);
  line-height: 1.35;
}

.action-center-grid button {
  min-height: 34px;
  color: white;
  background: var(--leaf-dark);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.profit-row span,
.checklist-list small {
  color: var(--muted);
  font-size: 13px;
}

.florist-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.florist-lane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
  padding: 12px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.florist-lane h3 {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.florist-ticket {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.florist-ticket span,
.florist-ticket small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.analytics-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.analytics-panel h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 950;
}

.analytics-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 220px;
  padding-top: 22px;
}

.chart-bar {
  position: relative;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 190px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.chart-bar::before {
  content: "";
  display: block;
  height: var(--height);
  min-height: 4px;
  background: linear-gradient(180deg, var(--berry), var(--leaf-dark));
  border-radius: 8px 8px 3px 3px;
}

.chart-bar span {
  position: absolute;
  inset: 0 auto auto 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90px;
  color: var(--berry);
  font-size: 10px;
}

.chart-bar strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.analytics-rates,
.analytics-list {
  display: grid;
  gap: 10px;
}

.rate-row,
.analytics-list div {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rate-row {
  grid-template-columns: 1fr 130px auto;
  align-items: center;
}

.rate-row span,
.analytics-list span {
  color: var(--muted);
  font-size: 13px;
}

.analytics-list button {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.rate-track {
  height: 8px;
  overflow: hidden;
  background: var(--sage-2);
  border-radius: 999px;
}

.rate-track i {
  display: block;
  height: 100%;
  background: var(--leaf-dark);
  border-radius: inherit;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.orders-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.orders-kanban[hidden] {
  display: none;
}

.kanban-lane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 280px;
  padding: 12px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kanban-lane h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.kanban-lane h3 span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  color: white;
  background: var(--leaf-dark);
  border-radius: 999px;
  font-size: 12px;
}

.kanban-lane > div {
  display: grid;
  gap: 8px;
}

.kanban-order {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: grab;
}

.kanban-order.overdue {
  border-color: #df9b9b;
  background: #fff4f4;
}

.kanban-order span,
.kanban-order small {
  color: var(--muted);
  line-height: 1.35;
}

.kanban-order b {
  color: var(--berry);
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.today-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.today-card > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.today-card > strong {
  color: var(--berry);
  font-size: 32px;
}

.today-card small {
  color: var(--muted);
  line-height: 1.45;
}

.today-wide {
  grid-column: span 2;
}

.today-list {
  display: grid;
  gap: 8px;
}

.today-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.today-list span {
  color: var(--muted);
  font-size: 13px;
}

.orders-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.7fr)) repeat(2, minmax(140px, 0.6fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.orders-toolbar input,
.orders-toolbar select {
  min-height: 42px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.orders-toolbar button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.orders-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.orders-summary span {
  padding: 8px 10px;
  color: var(--muted);
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.orders-summary strong {
  color: var(--leaf-dark);
}

.order-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 18px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-card.overdue {
  border-color: #efb8c4;
  background: #fff8f9;
}

.orders-list.compact {
  gap: 8px;
}

.orders-list.compact .order-card {
  grid-template-columns: 1fr minmax(220px, auto);
  padding: 12px;
}

.orders-list.compact .order-meta span:nth-child(n + 6),
.orders-list.compact .order-items,
.orders-list.compact .payment-admin-link {
  display: none;
}

.orders-list.compact .order-actions input,
.orders-list.compact .order-actions select[data-payment-status],
.orders-list.compact .order-actions select[data-courier-select] {
  display: none;
}

.order-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.order-badges,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-badges span {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.order-badges .today,
.order-badges .new {
  color: var(--leaf-dark);
  background: var(--sage);
}

.order-badges .warn {
  color: #7a4d00;
  background: #fff4d2;
}

.order-badges .danger {
  color: var(--berry);
  background: #ffe5eb;
}

.order-card h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 900;
}

.order-meta,
.order-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.order-items {
  color: var(--ink);
}

.order-editor {
  margin-top: 14px;
  padding: 12px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-editor summary {
  color: var(--leaf-dark);
  cursor: pointer;
  font-weight: 900;
}

.order-item-editor,
.order-editor-actions,
.cancel-box,
.order-events {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-item-edit-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 86px auto;
  gap: 8px;
}

.order-item-edit-row select,
.order-item-edit-row input,
.order-editor-actions select,
.cancel-box input {
  min-height: 38px;
  padding: 0 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-editor-actions {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.cancel-box {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cancel-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.order-editor button,
.cancel-box button,
.order-events button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.cancel-box button {
  color: white;
  background: var(--berry);
}

.order-events article {
  display: grid;
  gap: 3px;
  padding: 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-events span {
  color: var(--muted);
  font-size: 12px;
}

.payment-admin-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  color: var(--berry);
  font-size: 14px;
  font-weight: 850;
}

.order-actions {
  display: grid;
  gap: 10px;
  min-width: 210px;
}

.quick-actions button {
  min-height: 32px;
  padding: 0 9px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 1px solid var(--line);
  font-size: 12px;
}

.order-actions select {
  min-height: 42px;
  padding: 0 12px;
}

.order-actions input {
  min-height: 42px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-editor,
.product-import,
.products-toolbar,
.promocode-editor,
.delivery-editor,
.settings-editor {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.product-editor-v2 {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
  gap: 14px;
}

.product-dialog {
  width: min(1180px, calc(100% - 32px));
  max-height: min(860px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 34px 90px rgba(29, 42, 32, 0.28);
}

.product-dialog::backdrop {
  background: rgba(29, 42, 32, 0.42);
  backdrop-filter: blur(3px);
}

.product-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: #fbfdfb;
  border-bottom: 1px solid var(--line);
}

.product-dialog-head h2 {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 30px;
  line-height: 1;
}

.product-dialog-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-dialog-head button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--leaf-dark);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.product-dialog .product-editor-v2 {
  margin: 0;
  padding: 16px;
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.product-editor-v2 fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-editor-v2 legend {
  padding: 0 6px;
  color: var(--leaf-dark);
  font-weight: 950;
}

.product-form-main,
.product-form-side {
  display: grid;
  gap: 12px;
}

.product-editor-v2 label {
  display: grid;
  gap: 7px;
  color: #435047;
  font-size: 13px;
  font-weight: 850;
}

.product-editor-v2 input,
.product-editor-v2 select,
.product-editor-v2 textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.product-editor-v2 textarea {
  resize: vertical;
}

.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-image-preview {
  display: grid;
  place-items: center;
  min-height: 230px;
  overflow: hidden;
  color: var(--muted);
  background: white;
  border: 1px dashed #b8d2bf;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.file-drop {
  padding: 12px;
  background: white;
  border: 1px dashed #b8d2bf;
  border-radius: 8px;
}

.file-drop input {
  padding: 0;
  background: transparent;
  border: 0;
}

.file-drop span,
.file-drop small {
  display: block;
}

.file-drop small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.product-form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.product-form-actions button {
  min-height: 42px;
  padding: 0 14px;
  color: white;
  background: var(--leaf-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.product-form-actions button[type="button"] {
  color: var(--leaf-dark);
  background: var(--sage-2);
}

.gallery-editor {
  display: grid;
  gap: 10px;
}

.gallery-editor small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-list,
.image-library-grid {
  display: grid;
  gap: 8px;
}

.gallery-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-thumb,
.image-library-grid article {
  display: grid;
  gap: 6px;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-thumb img,
.image-library-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-thumb button,
.image-library-grid button,
.image-library-head button {
  min-height: 30px;
  padding: 0 8px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.image-library {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.image-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.image-library-grid {
  max-height: 360px;
  overflow: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-validation {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-validation strong {
  color: var(--leaf-dark);
}

.product-validation span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.settings-editor {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-editor button {
  min-height: 42px;
  color: white;
  background: var(--leaf-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.settings-editor textarea {
  grid-column: span 2;
  min-height: 76px;
  padding: 12px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  resize: vertical;
}

.site-editor {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-editor textarea {
  grid-column: span 2;
}

.review-editor {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(180px, 1fr) 96px;
  gap: 10px;
  margin: 18px 0;
}

.review-editor input,
.review-editor select,
.review-editor textarea {
  min-height: 42px;
  padding: 10px 12px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.review-editor textarea {
  grid-column: span 3;
  resize: vertical;
}

.review-editor button {
  min-height: 42px;
  padding: 0 14px;
  color: white;
  background: var(--leaf-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.reviews-admin {
  display: grid;
  gap: 10px;
}

.review-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.review-row span,
.review-row p {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.review-row button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.customers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.crm-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.crm-overview article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.crm-overview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crm-overview strong {
  color: var(--leaf-dark);
  font-size: 22px;
}

.crm-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.crm-toolbar input,
.crm-toolbar select,
.crm-toolbar button {
  min-height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.crm-toolbar button {
  color: var(--leaf-dark);
  background: var(--sage-2);
  cursor: pointer;
  font-weight: 850;
}

.crm-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 12px;
  margin-bottom: 14px;
}

.crm-inline-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.customer-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-card strong,
.customer-card span,
.customer-card small {
  display: block;
}

.customer-card span,
.customer-card p,
.customer-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.customer-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-metrics span {
  padding: 6px 8px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border-radius: 8px;
  font-weight: 850;
}

.today-card.warn {
  border-color: #f2d58b;
  background: #fff9e8;
}

.today-card.danger {
  border-color: #efb8c4;
  background: #fff8f9;
}

.maintenance-tools {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.maintenance-tools article {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.maintenance-tools h3 {
  margin: 0;
}

.maintenance-tools p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-actions button,
.admin-link-button {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--leaf-dark);
  border: 0;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.tool-actions button:nth-child(2) {
  color: var(--leaf-dark);
  background: var(--sage-2);
}

.backup-list {
  display: grid;
  gap: 8px;
}

.backup-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.backup-row span {
  color: var(--muted);
  font-size: 13px;
}

.product-import {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.products-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.4fr) minmax(170px, 0.4fr) auto;
}

.products-toolbar input,
.products-toolbar select {
  min-height: 42px;
  padding: 0 12px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.delivery-editor {
  grid-template-columns: 1fr 1.4fr 0.9fr 0.9fr 1.4fr auto auto;
}

.courier-editor {
  grid-template-columns: 1fr 1.2fr 1fr 1.4fr auto auto;
}

.blocked-date-editor {
  grid-template-columns: 180px 1fr auto;
  margin-top: 20px;
}

.product-editor textarea[name="note"],
.product-editor textarea[name="description"],
.product-editor textarea[name="composition"],
.product-editor textarea[name="care"] {
  grid-column: span 2;
  min-height: 42px;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-check input {
  width: auto;
  min-height: auto;
}

.product-editor button[data-reset-product] {
  color: var(--leaf-dark);
  background: var(--sage-2);
}

.admin-mini-link {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.product-import input {
  min-height: 42px;
  padding: 9px 12px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.products-table,
.promocodes-table,
.delivery-table,
.notifications-table,
.diagnostics-grid {
  display: grid;
  gap: 10px;
}

.diagnostics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnostics-summary,
.diagnostic-row {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.diagnostics-summary {
  grid-column: 1 / -1;
}

.diagnostic-row.ok {
  border-color: #cfe6d4;
}

.diagnostic-row.fail,
.diagnostics-summary.warn {
  border-color: #f0c9d1;
  background: #fff8f9;
}

.diagnostic-row span,
.diagnostics-summary span {
  color: var(--muted);
  font-size: 13px;
}

.product-row,
.promocode-row,
.delivery-row,
.notification-row {
  content-visibility: auto;
  contain-intrinsic-size: 92px;
}

.order-card {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}

.product-row,
.promocode-row,
.delivery-row,
.notification-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-row {
  grid-template-columns: 72px minmax(180px, 1fr) auto minmax(150px, 0.5fr) auto auto;
}

.product-row.low {
  border-color: #f0d795;
}

.product-row.out {
  border-color: #efb8c4;
  opacity: 0.78;
}

.product-row-badges {
  display: block;
  margin-top: 4px;
  color: var(--berry);
  font-size: 12px;
  font-weight: 900;
}

.stock-control {
  display: grid;
  gap: 6px;
}

.stock-control input[type="number"] {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

.stock-control label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.promocode-row {
  grid-template-columns: 1fr auto auto auto auto;
}

.delivery-row {
  grid-template-columns: 1.2fr 1fr auto auto auto auto;
}

.blocked-date-row {
  grid-template-columns: 180px 1fr auto;
}

.courier-row {
  grid-template-columns: 1fr 1fr 1.2fr auto auto;
}

.notification-row {
  grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1.5fr) auto auto;
  align-items: start;
}

.notification-row span,
.notification-row strong {
  display: block;
}

.notification-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.notification-status {
  width: max-content;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.notification-status.queued {
  color: var(--berry);
  background: #fff1f4;
}

.notification-status.sent {
  color: var(--leaf-dark);
  background: var(--sage-2);
}

.product-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.product-row strong,
.product-row span {
  display: block;
}

.product-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.edit-product,
.promocode-row button,
.delivery-row button,
.notification-row button,
.notification-preview button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.notification-actions {
  display: grid;
  gap: 8px;
}

.notification-actions button:first-child {
  color: var(--leaf-dark);
  background: var(--sage-2);
}

.notification-preview {
  width: min(960px, calc(100% - 32px));
  padding: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notification-preview::backdrop {
  background: rgb(29 42 32 / 42%);
}

.notification-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.notification-preview iframe {
  display: block;
  width: 100%;
  height: min(720px, 72vh);
  border: 0;
  background: #eef5ef;
}

@media (max-width: 980px) {
  .admin-stats,
  .today-grid,
  .task-plan,
  .task-kpi,
  .task-board,
  .team-kpi,
  .team-editor,
  .team-grid,
  .finance-kpi,
  .crm-overview,
  .crm-workspace,
  .product-editor,
  .products-toolbar,
  .crm-toolbar,
  .promocode-editor,
  .delivery-editor,
  .maintenance-tools,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-editor-v2 {
    grid-template-columns: 1fr;
  }

  .product-dialog .product-editor-v2 {
    max-height: calc(100vh - 142px);
  }

  .attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-center-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-editor textarea {
    grid-column: 1 / -1;
  }

  .settings-editor textarea {
    grid-column: 1 / -1;
  }

  .order-card,
  .orders-list.compact .order-card,
  .product-row,
  .promocode-row,
  .delivery-row,
  .notification-row,
  .order-item-edit-row,
  .order-editor-actions,
  .material-row,
  .recipe-row,
  .forecast-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-header,
  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-stats,
  .today-grid,
  .task-plan,
  .task-kpi,
  .task-board,
  .team-kpi,
  .team-editor,
  .team-grid,
  .finance-kpi,
  .crm-overview,
  .crm-workspace,
  .product-editor,
  .product-import,
  .products-toolbar,
  .crm-toolbar,
  .promocode-editor,
  .delivery-editor,
  .settings-editor,
  .site-editor,
  .review-editor,
  .inventory-layout,
  .customers-grid,
  .maintenance-tools,
  .diagnostics-grid,
  .orders-toolbar,
  .analytics-grid,
  .rate-row {
    grid-template-columns: 1fr;
  }

  .form-pair,
  .product-form-actions {
    grid-template-columns: 1fr;
  }

  .product-dialog {
    width: calc(100% - 18px);
    max-height: calc(100vh - 18px);
  }

  .product-dialog-head {
    padding: 14px;
  }

  .product-dialog-head h2 {
    font-size: 24px;
  }

  .product-dialog-head p {
    font-size: 13px;
  }

  .product-dialog .product-editor-v2 {
    padding: 12px;
    max-height: calc(100vh - 122px);
  }

  .today-wide {
    grid-column: auto;
  }

  .action-center-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-center-grid {
    grid-template-columns: 1fr;
  }
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  width: min(calc(100% - 40px), 520px);
  margin: 0 auto;
  padding: 42px 0;
}

.login-card {
  display: grid;
  gap: 22px;
  width: 100%;
  padding: 30px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: clamp(38px, 8vw, 58px);
  line-height: 0.98;
}

.login-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.login-card .checkout-button {
  margin-top: 0;
}

.login-help {
  font-size: 13px;
}

.pos-shell,
.owner-shell {
  gap: 18px;
}

.pos-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.pos-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pos-connection {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(45, 115, 82, 0.22);
  border-radius: 8px;
  background: rgba(45, 115, 82, 0.1);
  color: #2d7352;
  font-size: 13px;
  font-weight: 800;
}

.pos-connection.offline {
  border-color: rgba(168, 81, 47, 0.28);
  background: rgba(168, 81, 47, 0.12);
  color: #9a4d32;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.pos-product {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.pos-product:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.pos-product img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.pos-product span,
.pos-line span {
  display: grid;
  gap: 5px;
}

.pos-product small,
.pos-line small {
  color: var(--muted);
}

.pos-cart {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pos-cart form {
  display: grid;
  gap: 12px;
}

.pos-cart label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.pos-cart input,
.pos-cart select,
.pos-cart textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.pos-cart-lines {
  display: grid;
  gap: 10px;
}

.pos-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.pos-line div {
  display: flex;
  gap: 6px;
}

.pos-line button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.pos-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pos-total strong {
  font-size: 28px;
}

.pos-offline-list div {
  border-left: 3px solid #9a4d32;
}

.owner-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.owner-access-panel {
  border-color: rgba(33, 56, 46, 0.24);
}

.owner-access-list div:first-child {
  background: #21382e;
  color: #fffaf4;
}

.owner-access-list div:first-child span {
  color: rgba(255, 250, 244, 0.76);
}

.finance-kpi {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.finance-kpi article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finance-kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.finance-kpi strong {
  color: var(--leaf-dark);
  font-size: 24px;
}

.finance-grid {
  align-items: start;
}

.task-plan,
.task-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.task-kpi {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.task-plan article,
.task-kpi article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-plan article.warn {
  background: #fff9e8;
  border-color: #f2d58b;
}

.task-plan article.ok {
  background: #f4fbf5;
  border-color: #bfe1c4;
}

.task-plan span,
.task-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.task-plan strong,
.task-kpi strong {
  color: var(--leaf-dark);
  font-size: 22px;
}

.task-plan small {
  color: var(--muted);
  line-height: 1.4;
}

.task-role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.task-role-tabs button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--leaf-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.task-role-tabs button.active {
  color: #fff;
  background: var(--leaf-dark);
}

.task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.owner-task-board {
  grid-template-columns: 1fr;
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sage);
  border-radius: 8px;
}

.task-card.overdue {
  background: #fff4f1;
  border-color: #efb1a8;
}

.task-card.critical {
  border-left-color: #b42318;
}

.task-card.high {
  border-left-color: #d96c2c;
}

.task-card.medium {
  border-left-color: #d4a72c;
}

.task-card span,
.task-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.task-card strong {
  display: block;
  margin: 4px 0;
}

.task-card p {
  margin: 0;
}

.task-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.task-card-actions {
  display: grid;
  gap: 7px;
}

.task-card button,
.task-card select {
  min-height: 36px;
  padding: 0 10px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.team-kpi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.team-kpi article {
  display: grid;
  gap: 8px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.team-kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.team-kpi strong {
  color: var(--leaf-dark);
  font-size: 24px;
}

.team-editor {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.team-editor input,
.team-editor select,
.team-editor button {
  min-height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.team-editor button {
  color: var(--leaf-dark);
  background: var(--sage-2);
  cursor: pointer;
  font-weight: 850;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-list {
  display: grid;
  gap: 10px;
}

.team-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.team-card span {
  color: var(--muted);
  font-size: 13px;
}

.team-card button {
  justify-self: start;
  min-height: 34px;
  padding: 0 10px;
  color: var(--leaf-dark);
  background: var(--sage-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.quality-check {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.owner-kpi article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.owner-kpi span {
  color: var(--muted);
  font-size: 13px;
}

.owner-kpi strong {
  font-size: 26px;
}

.owner-panel-actions {
  justify-content: flex-start;
  margin: 8px 0 12px;
}

.florist-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.florist-focus-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.florist-focus-grid span {
  color: var(--muted);
  font-size: 13px;
}

.florist-focus-grid strong {
  font-size: 24px;
}

.florist-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.florist-ticket-actions button,
.florist-ticket-actions .florist-upload,
.order-checklist-box button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
}

.florist-photo-strip,
.courier-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.florist-photo-strip img,
.courier-proof-strip img {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f7f2ec;
}

@media (max-width: 980px) {
  .pos-workspace,
  .owner-kpi,
  .florist-focus-grid {
    grid-template-columns: 1fr;
  }

  .pos-cart {
    position: static;
  }
}

/* Флорвояж OS admin/workplace redesign */
.admin-page,
.admin-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, #eef4ef 0%, #f9faf6 42%, #f5edf0 100%);
  color: var(--ink);
}

.admin-header,
.admin-topbar,
.admin-shell {
  width: min(1440px, calc(100% - 28px));
}

.admin-header,
.admin-topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px auto 18px;
  padding: 12px;
  border: 1px solid rgba(24, 44, 37, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(17, 32, 27, 0.08);
  backdrop-filter: blur(18px);
}

.admin-topbar > div,
.admin-header > div {
  display: grid;
  gap: 4px;
}

.admin-topbar p,
.admin-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.admin-actions,
.admin-nav,
.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-refresh,
.product-editor button,
.product-import button,
.products-toolbar button,
.order-card button,
.delivery-editor button,
.delivery-row button,
.notification-row button,
.notification-preview button,
.team-editor button,
.task-card button,
.task-card select,
.florist-ticket-actions button,
.florist-ticket-actions .florist-upload,
.order-checklist-box button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(24, 44, 37, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent),
    var(--leaf-dark);
  color: #fffaf2;
  box-shadow: 0 12px 28px rgba(18, 61, 46, 0.14);
}

.admin-refresh.secondary,
.task-card select,
.florist-ticket-actions .florist-upload,
.order-checklist-box button {
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.admin-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0 auto;
  padding-bottom: 72px;
}

.admin-hero,
.admin-stats {
  grid-column: 1 / -1;
}

.admin-hero,
.admin-stats,
.admin-tabs,
.admin-section,
.analytics-panel,
.pos-cart,
.pos-product,
.owner-kpi article,
.florist-focus-grid article,
.task-card,
.team-card,
.finance-kpi article,
.task-plan article,
.task-kpi article,
.product-dialog,
.products-table,
.delivery-table,
.inventory-editor,
.recipe-editor {
  border-color: rgba(24, 44, 37, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(17, 32, 27, 0.08);
}

.admin-hero {
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(18, 61, 46, 0.94), rgba(35, 78, 58, 0.82)),
    url("https://images.unsplash.com/photo-1526047932273-341f2a7631f9?auto=format&fit=crop&w=1600&q=84") center/cover;
  color: #fffaf2;
}

.admin-hero p,
.admin-hero .admin-section-head p {
  color: rgba(255, 250, 242, 0.76);
}

.admin-hero h1 {
  max-width: 860px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(38px, 5.8vw, 82px);
  font-weight: 900;
  line-height: 0.92;
}

.admin-stats {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.admin-stats article {
  background: transparent;
}

.admin-stats strong,
.owner-kpi strong,
.finance-kpi strong,
.task-plan strong,
.task-kpi strong,
.florist-focus-grid strong,
.pos-total strong {
  color: var(--leaf-dark);
  font-weight: 950;
}

.admin-tabs {
  position: sticky;
  top: 100px;
  z-index: 12;
  grid-column: 1;
  display: grid;
  gap: 6px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 8px;
}

.admin-tabs button {
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  background: transparent;
  color: #45564f;
  text-align: left;
}

.admin-tabs button.active {
  background: var(--leaf-dark);
  color: #fffaf2;
  box-shadow: 0 12px 28px rgba(18, 61, 46, 0.16);
}

.admin-section {
  grid-column: 2;
  padding: clamp(18px, 3vw, 30px);
}

.admin-section h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-section-head {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(24, 44, 37, 0.08);
}

.route-date-input,
.admin-section-head select,
.product-editor input,
.product-editor textarea,
.product-editor select,
.product-import input,
.products-toolbar input,
.products-toolbar select,
.delivery-editor input,
.delivery-editor textarea,
.delivery-editor select,
.team-editor input,
.team-editor select,
.pos-cart input,
.pos-cart select,
.pos-cart textarea {
  border-color: rgba(24, 44, 37, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.analytics-grid {
  gap: 14px;
}

.analytics-panel {
  padding: 18px;
}

.analytics-panel h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
}

.analytics-list div,
.order-card,
.florist-ticket,
.pos-line,
.team-card,
.delivery-row,
.notification-row {
  border-color: rgba(24, 44, 37, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.order-card,
.florist-ticket,
.task-card {
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.order-card:hover,
.florist-ticket:hover,
.task-card:hover,
.pos-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(17, 32, 27, 0.1);
}

.pos-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
}

.pos-product-grid {
  gap: 10px;
}

.pos-product {
  min-height: 96px;
}

.pos-product img {
  border-radius: 8px;
}

.pos-cart {
  top: 100px;
}

.pos-total {
  border-color: rgba(24, 44, 37, 0.1);
}

.task-card {
  border-left-width: 4px;
}

.task-card.critical {
  background: #fff6f5;
}

.task-card.high,
.order-card.overdue {
  background: #fff8f0;
}

.product-dialog::backdrop {
  background: rgba(12, 24, 20, 0.46);
  backdrop-filter: blur(10px);
}

.product-image-preview,
.gallery-list img,
.florist-photo-strip img,
.courier-proof-strip img {
  border-radius: 8px;
}

@media (max-width: 1120px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-tabs,
  .admin-section {
    grid-column: 1;
  }

  .admin-tabs {
    top: 86px;
    display: flex;
    overflow-x: auto;
  }

  .admin-tabs button {
    flex: 0 0 auto;
    width: auto;
  }
}

@media (max-width: 760px) {
  .admin-header,
  .admin-topbar,
  .admin-shell {
    width: min(calc(100% - 16px), 760px);
  }

  .admin-header,
  .admin-topbar,
  .admin-hero,
  .admin-section-head:has(button) {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions,
  .admin-nav,
  .admin-hero-actions {
    justify-content: flex-start;
  }

  .admin-stats,
  .owner-kpi,
  .finance-kpi,
  .task-plan,
  .task-kpi {
    grid-template-columns: 1fr;
  }

  .task-card {
    grid-template-columns: 1fr;
  }
}

/* Owner command center */
.owner-body {
  --owner-bg: #0d1713;
  --owner-panel: rgba(255, 250, 242, 0.08);
  --owner-panel-strong: rgba(255, 250, 242, 0.12);
  --owner-line: rgba(255, 250, 242, 0.13);
  --owner-ink: #fffaf2;
  --owner-muted: rgba(255, 250, 242, 0.66);
  background:
    linear-gradient(135deg, #0d1713 0%, #12271f 54%, #2a1823 100%);
  color: var(--owner-ink);
}

.owner-body .admin-topbar {
  border-color: var(--owner-line);
  background: rgba(13, 23, 19, 0.84);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px);
}

.owner-body .brand,
.owner-body .admin-topbar p,
.owner-body .admin-section h1,
.owner-body .admin-section h2,
.owner-body .analytics-panel h2,
.owner-body .analytics-panel h3 {
  color: var(--owner-ink);
}

.owner-body .admin-topbar p,
.owner-body .admin-section-head p,
.owner-body .analytics-list small,
.owner-body .analytics-list span,
.owner-body .task-card small,
.owner-body .task-card p {
  color: var(--owner-muted);
}

.owner-body .admin-refresh,
.owner-body .owner-panel-actions .admin-refresh {
  border-color: var(--owner-line);
  background: rgba(255, 250, 242, 0.08);
  color: var(--owner-ink);
}

.owner-body .admin-refresh:hover,
.owner-body .owner-panel-actions .admin-refresh:hover {
  background: rgba(255, 250, 242, 0.16);
}

.owner-body .owner-shell {
  width: min(1460px, calc(100% - 24px));
}

.owner-body .admin-section.active {
  position: relative;
  overflow: hidden;
  border-color: var(--owner-line);
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.12), rgba(255, 250, 242, 0.05)),
    linear-gradient(90deg, rgba(13, 23, 19, 0.9), rgba(34, 73, 55, 0.76));
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.24);
}

.owner-body .admin-section.active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 250, 242, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 250, 242, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 76%);
}

.owner-body .admin-section-head {
  position: relative;
  z-index: 1;
  border-color: var(--owner-line);
}

.owner-body .owner-kpi,
.owner-body .analytics-grid {
  position: relative;
  z-index: 1;
}

.owner-body .owner-kpi article,
.owner-body .analytics-panel {
  border: 1px solid var(--owner-line);
  background: var(--owner-panel);
  box-shadow: 0 20px 62px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.owner-body .owner-kpi article {
  min-height: 132px;
}

.owner-body .owner-kpi strong,
.owner-body .finance-kpi strong,
.owner-body .task-kpi strong,
.owner-body .analytics-panel strong {
  color: var(--owner-ink);
}

.owner-body .owner-kpi span,
.owner-body .finance-kpi span,
.owner-body .task-kpi span {
  color: var(--owner-muted);
}

.owner-body .analytics-list div,
.owner-body .order-card,
.owner-body .task-card,
.owner-body .owner-access-list div {
  border-color: var(--owner-line);
  background: rgba(255, 250, 242, 0.07);
  color: var(--owner-ink);
}

.owner-body .analytics-list div:hover,
.owner-body .order-card:hover,
.owner-body .task-card:hover {
  border-color: rgba(255, 250, 242, 0.24);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.2);
}

.owner-body .task-card.critical,
.owner-body .task-card.high,
.owner-body .order-card.overdue {
  background: rgba(155, 31, 79, 0.16);
  border-color: rgba(255, 173, 190, 0.34);
}

.owner-body input,
.owner-body select,
.owner-body textarea {
  border-color: var(--owner-line);
  background: rgba(255, 250, 242, 0.1);
  color: var(--owner-ink);
}

.owner-body .toast {
  background: rgba(255, 250, 242, 0.95);
  color: #13251f;
}

/* Shop staff workplace */
.shop-workspace .admin-section:not(.active) {
  display: none;
}

.shop-work-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(247, 243, 238, 0.94);
  backdrop-filter: blur(14px);
}

.shop-mini-grid,
.shop-form-grid,
.shop-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.shop-mini-grid article {
  border: 1px solid rgba(33, 56, 46, 0.14);
  border-radius: 8px;
  background: #fffaf4;
  padding: 16px;
}

.shop-mini-grid span,
.shop-product-card span {
  display: block;
  color: #69786f;
  font-size: 0.82rem;
  font-weight: 800;
}

.shop-mini-grid strong {
  display: block;
  margin-top: 8px;
  color: #13231c;
  font-size: 1.3rem;
}

.shop-primary-link {
  text-decoration: none;
}

.shop-product-form {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(33, 56, 46, 0.14);
  border-radius: 8px;
  background: #fffaf4;
  padding: 18px;
  margin-bottom: 18px;
}

.shop-product-form[hidden] {
  display: none;
}

.shop-product-form label {
  display: grid;
  gap: 7px;
  color: #35463d;
  font-weight: 800;
}

.shop-product-form input,
.shop-product-form select,
.shop-product-form textarea,
.shop-product-card input,
.shop-inventory-grid input {
  width: 100%;
  border: 1px solid rgba(33, 56, 46, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: #13231c;
  padding: 10px 12px;
  font: inherit;
}

.shop-product-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.shop-product-preview {
  min-height: 160px;
  border: 1px dashed rgba(33, 56, 46, 0.25);
  border-radius: 8px;
  background: #f6f0e8;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #69786f;
  font-weight: 800;
}

.shop-product-preview img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.shop-product-list {
  display: grid;
  gap: 12px;
}

.shop-product-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(33, 56, 46, 0.12);
  border-radius: 8px;
  background: #fffdf9;
  padding: 12px;
}

.shop-product-card.attention {
  border-color: rgba(180, 46, 89, 0.34);
  background: #fff7f8;
}

.shop-product-card img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
}

.shop-product-card strong {
  display: block;
  margin-top: 5px;
  color: #13231c;
}

.shop-product-card p {
  margin: 6px 0 0;
  color: #65746b;
}

.shop-product-controls {
  display: grid;
  gap: 8px;
}

.shop-product-controls button,
.shop-inventory-grid button {
  border: 0;
  border-radius: 8px;
  background: #21382e;
  color: #fffaf4;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.shop-inventory-grid .analytics-list > div {
  align-items: start;
}

.shop-inventory-grid .analytics-list label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .shop-product-card {
    grid-template-columns: 1fr;
  }

  .shop-product-card img {
    width: 100%;
    height: 220px;
  }
}
