:root {
  --bg: #f4f7f6;
  --card: #ffffff;
  --text: #2f3a34;
  --muted: #6b756e;
  --muted-soft: #7b8680;
  --border: #d9ded9;
  --accent: #6e8b74;
  --accent-dark: #5e7a65;
  --soft-accent: #e6f0ea;
  --danger: #b65c5c;
  --danger-dark: #9f4f4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #ffffff 0%, var(--bg) 45%);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

.topbar {
  padding: 24px 20px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  position: relative;
}

.topbar h1 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 400;
}

.topbar-main {
  min-width: 0;
  text-align: center;
}

.session-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.user-badge {
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
}

.user-menu {
  position: relative;
}

.user-menu .user-menu-trigger {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
}

.user-menu .user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.24);
}

.user-menu-caret {
  font-size: 0.68rem;
  opacity: 0.9;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 188px;
  background: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(38, 52, 45, 0.16);
  padding: 6px;
  display: grid;
  gap: 2px;
  z-index: 90;
}

.user-menu-dropdown .user-menu-item {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 10px;
}

.user-menu-dropdown .user-menu-item:hover {
  background: #f1f5f3;
  color: var(--text);
}

.layout {
  max-width: 1250px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 16px;
}

.main-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #eff4f1;
  width: fit-content;
}

.main-tab-btn {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  line-height: 1.1;
}

.main-tab-btn:hover {
  border-color: #d4ddd7;
  background: #f8fbf9;
  color: var(--text);
}

.main-tab-btn.active {
  background: #fff;
  border-color: #cfd9d3;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(47, 58, 52, 0.08);
}

.main-tab-view {
  display: grid;
  gap: 16px;
}

.planning-section-title {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.1fr 0.9fr;
}

.right-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(47, 58, 52, 0.08);
  padding: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2f3a33;
  margin: 0 0 16px 0;
  letter-spacing: 0;
}

.store-context-section {
  display: block;
}

.card-content {
  display: block;
}

.store-context-section .card {
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.row-form {
  display: grid;
  grid-template-columns: 1fr 180px 140px;
  gap: 8px;
}

.controls {
  display: grid;
  gap: 10px;
}

.controls > .admin-panel {
  grid-column: 1 / -1;
}

.admin-panel {
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #f8fbf9;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.store-tabs {
  display: block;
  overflow: visible;
  padding: 0;
}

.store-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.store-tabs::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 0;
}

.store-switch-layout {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  gap: 16px;
  align-items: start;
}

.store-primary-slot,
.store-secondary-slot {
  width: 100%;
  min-width: 0;
}

.store-primary-slot {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.store-secondary-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 14px;
  align-items: start;
}

.store-tab-item {
  position: relative;
  display: block;
  min-width: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: store-card-in 0.2s ease;
}

.store-tab-item-primary {
  width: 100%;
}

.store-tab-item-secondary {
  flex: 0 0 104px;
  opacity: 0.72;
}

.store-tab-item-secondary:hover,
.store-tab-item-secondary:focus-within {
  opacity: 0.84;
}

.store-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.12;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: border-color 150ms ease, transform 150ms ease, background-color 150ms ease, opacity 150ms ease, filter 150ms ease;
}

.store-tab-item-primary .store-tab-btn {
  width: 100%;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
}

.store-tab-btn-primary {
  border: 1px solid #cdd7d1;
  border-radius: 14px;
  background: #f4f8f5;
  color: var(--text);
  opacity: 1;
  transform: none;
}

.store-tab-btn-primary:hover {
  border-color: #bcc8c0;
  background: #f8fbf9;
}

.store-tab-btn-secondary {
  width: 104px;
  height: 100px;
  min-width: 104px;
  min-height: 100px;
  padding: 8px;
  border: 1px solid #d0d9d3;
  border-radius: 12px;
  background: #f8faf9;
  color: var(--muted);
}

.store-tab-btn-secondary:hover {
  border-color: #bfcac2;
  background: #fbfdfc;
  color: var(--text);
}

.store-thumb {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.store-thumb-primary {
  width: 100%;
  height: 132px;
  flex: 0 0 132px;
  justify-content: center;
}

.store-thumb-secondary {
  width: 100%;
  height: 52px;
  flex: 0 0 auto;
  justify-content: center;
}

.store-logo,
.shop-logo-card {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.store-tab-btn-primary .store-logo {
  max-width: 96%;
  max-height: 142px;
  filter: none;
  opacity: 1;
}

.store-tab-btn-secondary .store-logo {
  max-width: 78px;
  max-height: 40px;
  filter: none;
  opacity: 0.95;
}

.store-name {
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.store-name-primary {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.store-name-secondary {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.store-logo-fallback-mini {
  border: 1px dashed #d0dad4;
  border-radius: 8px;
  background: #f6faf7;
  color: #4f5e56;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1.1;
  padding: 4px 8px;
  text-align: center;
  text-transform: uppercase;
}

.store-tab-btn-secondary .store-logo-fallback-mini {
  font-size: 0.6rem;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  padding: 0 4px;
}

.store-tab-btn-primary .store-logo-fallback-mini {
  font-size: 0.82rem;
  border-color: #c2cec6;
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
}

.store-tab-add {
  color: var(--muted);
  border-style: solid !important;
  background: rgba(255, 255, 255, 0.6) !important;
  opacity: 1;
}

.store-tab-add:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.82) !important;
}

.store-add-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #b8c6bb;
  font-size: 0.96rem;
  font-weight: 700;
}

.store-tab-btn.dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.store-tab-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  border: 1px solid #e2c0c0;
  background: rgba(255, 245, 245, 0.98);
  color: #b65c5c;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 0.64rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
  z-index: 3;
}

.store-tab-item:hover .store-tab-remove,
.store-tab-item:focus-within .store-tab-remove {
  opacity: 1;
  pointer-events: auto;
}

.store-tab-item.active .store-tab-remove {
  opacity: 0.7;
  pointer-events: auto;
}

.store-tab-remove:hover {
  background: #f6e7e7;
  border-color: #d3aaaa;
  color: #a95353;
}

.store-tab-remove:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

@keyframes store-card-in {
  from {
    opacity: 0.86;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

input,
button,
.file-btn {
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-family: inherit;
}

input {
  padding: 9px 11px;
  background: var(--card);
}

input:focus {
  border-color: var(--accent);
  outline: 1px solid rgba(110, 139, 116, 0.32);
}

button,
.file-btn {
  padding: 9px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

button:hover,
.file-btn:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: var(--soft-accent);
  color: var(--accent-dark);
  border: 1px solid #c8d8cd;
}

button.secondary:hover {
  background: #d8e8de;
}

button.danger {
  background: var(--danger);
  color: #fff;
}

button.danger:hover {
  background: var(--danger-dark);
}

button.warning {
  background: var(--soft-accent);
  color: var(--text);
  border: 1px solid var(--border);
}

button.warning:hover {
  background: #d8e8de;
}

.clear-tier-text-btn {
  background: #f5f8f6;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 10px;
  min-height: 38px;
  min-width: 186px;
}

.clear-tier-text-btn:hover {
  background: #edf2ef;
  color: var(--text);
}

.clear-tier-text-btn:disabled,
.clear-tier-text-btn[aria-disabled="true"] {
  opacity: 0.56;
  cursor: not-allowed;
  background: #f3f6f4;
  color: #8c9791;
  border-color: #dbe3dd;
  pointer-events: none;
}

.clear-tier-text-btn:disabled:hover,
.clear-tier-text-btn[aria-disabled="true"]:hover {
  background: #f3f6f4;
  color: #8c9791;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.search-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 140px;
}

.list-search-row {
  margin-bottom: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.list-search-row input {
  width: 100%;
  font-size: 0.99rem;
  font-weight: 600;
  padding: 11px 13px;
  background: var(--card);
}

.search-add-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.search-add-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.pill {
  background: #edf3ef;
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.list {
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  max-height: 62vh;
  overflow-y: auto;
}

.list-head {
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f0f5f2;
  color: var(--muted);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px 150px;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.store-context-banner {
  border: 0;
  border-radius: 0;
  background: transparent;
  display: block;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.store-tabs.store-tabs-context {
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
}

.details-card {
  padding: 12px;
  border-left: 0;
}

.list-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px 150px;
  gap: 8px;
  padding: 10px 12px;
  text-align: left;
  background: var(--card);
  color: inherit;
  cursor: pointer;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row:hover {
  background: #edf3ef;
}

.list-row.active {
  background: #dde8e1;
}

.product-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-main {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.24;
}

.product-sub {
  font-size: 0.72rem;
  color: var(--muted-soft);
  line-height: 1.2;
}

.product-meta {
  color: var(--muted-soft);
  font-size: 0.78rem;
  white-space: nowrap;
}

.list-row.tiered {
  background: var(--tier-bg);
  border-left: 4px solid var(--tier-border);
  padding-left: 8px;
}

.list-row.tiered:hover {
  background: var(--tier-bg-hover, var(--tier-bg));
}

.list-row.tiered.active {
  background: var(--tier-bg-active, var(--soft-accent));
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 10px 0 4px;
}

#editorEmpty {
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #f8fbfa;
  padding: 34px 18px;
  line-height: 1.45;
  font-size: 0.96rem;
}

#productNameValue {
  font-size: 1rem;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.editor {
  display: grid;
  gap: 9px;
}

.editor-top-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px 42px;
  gap: 8px;
  align-items: baseline;
  color: var(--muted-soft);
  font-size: 0.77rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.15;
}

.editor-top-head span:nth-child(3) {
  text-align: center;
}

.editor-top-head-spacer {
  opacity: 0;
}

.editor-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px 42px;
  gap: 8px;
  align-items: baseline;
}

.editor-static-field {
  min-height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: baseline;
  padding: 0;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.3;
  cursor: default;
}

.editor-static-price {
  justify-content: flex-start;
  text-align: left;
  font-weight: 600;
}

.editor-social-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.editor-social-top .tiers {
  margin: 0;
  flex: 1 1 auto;
}

.info-icon-btn {
  justify-self: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7faf8;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.info-icon-btn:hover {
  background: #eef3f0;
  color: var(--accent-dark);
  border-color: #c2cec6;
}

.info-icon-btn.active,
.info-icon-btn[aria-expanded="true"] {
  background: var(--soft-accent);
  color: var(--accent-dark);
  border-color: #c6d3c9;
}

.product-info {
  padding: 2px 0 0;
  background: transparent;
}

.product-info-panel {
  border: 1px solid #e2e8e4;
  border-radius: 10px;
  background: #fbfdfc;
  padding: 10px;
}

.product-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.product-info-head h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334038;
}

.product-info-edit-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
}

.product-info-edit-btn:hover {
  background: #eef3f0;
  color: var(--text);
}

.product-info-editing-label {
  font-size: 0.73rem;
  color: var(--muted-soft);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.product-info-grid {
  display: grid;
  gap: 6px;
}

.product-info-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.product-info-label {
  color: var(--muted-soft);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}

.product-info-value {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.3;
}

.product-info-row-edit input,
.product-info-row-edit select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.84rem;
  padding: 7px 9px;
}

.product-info-row-edit input:focus,
.product-info-row-edit select:focus {
  outline: none;
  border-color: #bac8bf;
  box-shadow: 0 0 0 2px rgba(110, 139, 116, 0.14);
}

.product-info-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.product-info-save-btn,
.product-info-cancel-btn {
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 10px;
}

.product-info-save-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.product-info-save-btn:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.product-info-cancel-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.product-info-cancel-btn:hover {
  background: #f5f8f6;
  color: var(--text);
}

.product-info-save-btn:disabled,
.product-info-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.suggestion {
  border: 1px solid #e3e9e5;
  background: #fbfdfc;
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--muted-soft);
  font-size: 0.84rem;
}

.suggestion strong {
  color: #55615a;
  font-weight: 600;
}

.editor-remove-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 6px;
}

.tier-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7faf8;
  color: var(--muted);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 700;
}

.tier-btn.active {
  border-color: var(--accent);
  background: var(--soft-accent);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(110, 139, 116, 0.14);
}

.tier-btn:disabled,
.tier-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: wait;
}

.tier-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.24);
  flex: 0 0 12px;
}

.tier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fbf9;
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 700;
}

.tier-pill-colored {
  border-color: var(--tier-pill-border);
  background: var(--tier-pill-bg);
}

.tier-pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex: 0 0 9px;
}

.tier-pill-muted {
  color: var(--muted);
  border-color: #e1e6e2;
  background: #f7f9f8;
}

.history-toggle-btn {
  margin-top: 6px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7faf8;
  color: #3b4640;
  padding: 9px 11px;
  font-family: "DM Serif Display", serif;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.1;
}

.history-toggle-btn:hover {
  background: #eff4f1;
  color: #2f3a34;
  border-color: #cfd8d1;
}

.history-toggle-btn.open {
  background: #f1f6f3;
  border-color: #cfd8d1;
}

.history-toggle-arrow {
  font-size: 0.74rem;
  color: var(--muted);
  transition: transform 240ms ease;
}

.history-toggle-btn.open .history-toggle-arrow {
  transform: rotate(180deg);
}

.history-collapsible {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 240ms ease, opacity 220ms ease;
}

.history-collapsible.open {
  opacity: 1;
}

.history-collapsible-inner {
  padding-top: 9px;
}

.history-header {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(120px, 1fr) minmax(130px, 1fr) minmax(86px, 0.65fr);
  gap: 8px;
  color: var(--muted-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-transform: uppercase;
  border-bottom: 1px solid #e6ece8;
  padding: 0 2px 6px;
}

.history {
  display: grid;
  gap: 4px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(120px, 1fr) minmax(130px, 1fr) minmax(86px, 0.65fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
  padding: 2px 2px;
}

.history-col {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-col-product {
  color: #3b4640;
  font-weight: 500;
}

.history-col-action-price-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-price-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex: 0 0 9px;
}

.history-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
}

.history-clear-btn {
  background: #f6f8f7;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.77rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 9px;
}

.history-clear-btn:hover {
  background: #edf1ef;
  color: var(--text);
}

.history-clear-btn:disabled,
.history-clear-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f7f9f8;
  color: #88938d;
}

.history-clear-btn:disabled:hover,
.history-clear-btn[aria-disabled="true"]:hover {
  background: #f7f9f8;
  color: #88938d;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  padding: 10px 13px;
  background: var(--accent-dark);
  color: #fff;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(47, 58, 52, 0.16);
}

.toast.error {
  background: var(--danger-dark);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.15fr minmax(320px, 420px);
  gap: 18px;
  align-items: stretch;
}

.auth-shell-landing {
  width: min(1120px, 100%);
  grid-template-columns: 1fr;
  gap: 14px;
}

.auth-brand {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbf9;
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.auth-brand h1 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.52rem, 2.6vw, 2.05rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

.auth-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.auth-card {
  align-self: center;
}

.auth-entry-area {
  display: grid;
  gap: 12px;
}

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

.auth-entry-card {
  width: 100%;
  max-width: none;
  align-self: stretch;
}

.entry-login-form {
  display: grid;
  gap: 8px;
}

.auth-register-toggle-row {
  display: flex;
  justify-content: flex-end;
}

.register-panel {
  width: 100%;
  max-width: none;
  box-shadow: 0 4px 14px rgba(47, 58, 52, 0.1);
}

.register-panel-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.auth-status {
  margin: 0 0 10px;
  border: 1px solid #cbdacb;
  border-radius: 10px;
  background: #eff7f1;
  color: #45624f;
  padding: 8px 10px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.auth-status.error {
  border-color: #e2c6c6;
  background: #f8eeee;
  color: #8e5050;
}

.auth-note {
  margin: 2px 1px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.auth-rotator-wrap {
  grid-column: 1 / -1;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.auth-rotating-message {
  margin: 0;
  max-width: 880px;
  min-height: 2.5em;
  color: #5f675f;
  font-size: clamp(1rem, 1.65vw, 1.18rem);
  font-weight: 560;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.008em;
  opacity: 1;
  transition: opacity 520ms ease-in-out;
}

.auth-rotating-message.is-fading {
  opacity: 0;
}

.login-card {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(47, 58, 52, 0.2);
  padding: 20px;
}

.login-card h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-size: 1.4rem;
}

.login-card p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.auth-hint {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.83rem;
}

.auth-link-btn {
  margin-top: 10px;
  background: transparent;
  border: 0;
  color: var(--accent-dark);
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-link-btn:hover {
  color: var(--accent);
  background: transparent;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 24, 0.52);
  display: grid;
  place-items: center;
  z-index: 540;
  padding: 16px;
}

.confirm-modal {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(47, 58, 52, 0.2);
  padding: 18px;
}

.confirm-modal h3 {
  margin: 0 0 8px;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-size: 1.32rem;
  color: var(--text);
}

.confirm-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.session-timeout-modal {
  width: min(430px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(47, 58, 52, 0.2);
  padding: 20px 18px;
  text-align: center;
}

.session-timeout-modal h3 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
}

.session-timeout-modal p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.session-timeout-countdown {
  margin-top: 10px !important;
  color: #4f5e56 !important;
  font-size: 0.88rem !important;
  font-weight: 600;
}

.session-timeout-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.session-timeout-actions button {
  min-width: 210px;
}

.confirm-store-line {
  margin-top: 10px !important;
  color: var(--text) !important;
  font-size: 0.86rem !important;
}

.confirm-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-cancel-btn {
  background: #f5f8f6;
  color: var(--muted);
  border: 1px solid var(--border);
}

.modal-cancel-btn:hover {
  background: #edf2ef;
  color: var(--text);
}

.modal-backup-btn {
  background: var(--soft-accent);
  color: var(--accent-dark);
  border: 1px solid #c8d8cd;
}

.modal-backup-btn:hover {
  background: #d8e8de;
}

.modal-delete-btn {
  background: #f8efef;
  color: #935757;
  border: 1px solid #dcbcbc;
}

.modal-delete-btn:hover {
  background: #f4e5e5;
  color: #864f4f;
  border-color: #cea9a9;
}

.account-modal {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(47, 58, 52, 0.2);
  padding: 16px;
}

.account-modal h3 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-size: 1.26rem;
  color: var(--text);
}

.account-status {
  margin-top: 10px;
  border: 1px solid #d9e7de;
  background: #f4faf6;
  color: #3f5648;
  border-radius: 9px;
  font-size: 0.84rem;
  padding: 8px 10px;
}

.account-status.error {
  border-color: #e8c8c8;
  background: #fbf1f1;
  color: #8f4f4f;
}

.account-settings-form {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.account-section-title {
  margin: 6px 0 0;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-soft);
  font-weight: 600;
}

.account-field {
  display: grid;
  gap: 5px;
}

.account-field span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.account-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.account-meta {
  margin: 10px 2px 0;
  color: var(--muted-soft);
  font-size: 0.76rem;
}

.store-logo-modal {
  width: min(500px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(47, 58, 52, 0.2);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.store-logo-modal h3 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: 1.24rem;
  font-weight: 400;
  color: var(--text);
}

.store-logo-store-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.store-logo-drop {
  position: relative;
  display: grid;
  gap: 4px;
  border: 1px dashed #b9c6be;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  background: #f8fbf9;
  color: var(--muted);
  cursor: pointer;
}

.store-logo-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.store-logo-drop.drag-active {
  border-color: #95a89d;
  background: #eff5f1;
}

.store-logo-drop-main {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4f5e56;
}

.store-logo-drop-sub {
  font-size: 0.8rem;
}

.store-logo-drop-hint {
  font-size: 0.74rem;
  color: #7a867f;
}

.store-logo-preview-wrap {
  border: 1px solid #dee5e1;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  min-height: 120px;
  padding: 0;
  margin: 0 auto;
}

.store-logo-preview-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  object-position: center;
}

.store-logo-status {
  margin: 0;
  border: 1px solid #d9e7de;
  border-radius: 9px;
  background: #f4faf6;
  color: #3f5648;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 8px 10px;
}

.store-logo-status.error {
  border-color: #e8c8c8;
  background: #fbf1f1;
  color: #8f4f4f;
}

.import-preview-modal {
  width: min(1080px, 100%);
  max-height: min(88vh, 880px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(47, 58, 52, 0.22);
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
}

.import-preview-head h3 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: 1.28rem;
  font-weight: 400;
  color: var(--text);
}

.import-preview-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.import-context-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #e1e8e4;
  border-radius: 9px;
  background: #f8fbf9;
}

.import-context-field {
  display: grid;
  gap: 4px;
  min-width: 230px;
}

.import-context-field span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.import-context-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  padding: 7px 8px;
}

.import-context-field select:focus {
  outline: none;
  border-color: #bac8bf;
  box-shadow: 0 0 0 2px rgba(110, 139, 116, 0.14);
}

.import-context-file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.import-file-name {
  color: var(--muted);
  font-size: 0.82rem;
}

.import-preview-summary {
  border: 1px solid #e1e8e4;
  border-radius: 9px;
  background: #f8fbf9;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 8px 10px;
  line-height: 1.3;
}

.import-preview-summary strong {
  color: var(--text);
  font-weight: 700;
}

.import-preview-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.import-platform-notice {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d9ded9;
  border-radius: 9px;
  background: #f8fbf9;
  color: #4f5e56;
  font-size: 0.8rem;
  line-height: 1.35;
}

.import-preview-mapping {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #e1e8e4;
  border-radius: 9px;
  background: #f8fbf9;
}

.import-preview-mapping-field {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.import-preview-mapping-field span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.import-preview-mapping-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  padding: 7px 8px;
}

.import-preview-mapping-field select:focus {
  outline: none;
  border-color: #bac8bf;
  box-shadow: 0 0 0 2px rgba(110, 139, 116, 0.14);
}

.import-preview-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: auto;
}

.import-preview-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.import-preview-table th,
.import-preview-table td {
  border-bottom: 1px solid #e7ece8;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.import-preview-table th {
  background: #f6faf8;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.import-preview-table td {
  font-size: 0.82rem;
  color: var(--text);
}

.import-preview-table tbody tr.import-row-invalid {
  background: #fcf2f2;
}

.import-preview-table tbody tr:last-child td {
  border-bottom: 0;
}

.import-row-check {
  width: 42px;
  text-align: center;
}

.import-row-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.import-row-main {
  display: grid;
  gap: 5px;
}

.import-row-main input[type="text"],
.import-row-price input[type="text"],
.import-row-weight input[type="text"],
.import-row-message select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  padding: 7px 8px;
}

.import-row-main input[type="text"]:focus,
.import-row-price input[type="text"]:focus,
.import-row-weight input[type="text"]:focus,
.import-row-message select:focus {
  outline: none;
  border-color: #bac8bf;
  box-shadow: 0 0 0 2px rgba(110, 139, 116, 0.14);
}

.import-row-brand {
  font-size: 0.76rem !important;
}

.import-row-message {
  display: grid;
  gap: 6px;
}

.import-row-error {
  color: #9a5555;
  font-size: 0.76rem;
  line-height: 1.3;
}

.import-row-warning {
  color: #6f5e3d;
  font-size: 0.75rem;
  line-height: 1.3;
}

.import-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#confirmImportPreviewBtn:disabled,
#confirmImportPreviewBtn[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  background: #9aab9f;
}

#confirmImportPreviewBtn:disabled:hover,
#confirmImportPreviewBtn[aria-disabled="true"]:hover {
  background: #9aab9f;
}

.admin-layout {
  max-width: 1320px;
}

.admin-main-card {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.admin-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.admin-nav-btn {
  background: #f4f8f6;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-nav-btn:hover {
  background: #e9efeb;
  color: var(--text);
}

.admin-nav-btn.active {
  background: #fff;
  color: var(--text);
  border-bottom-color: #fff;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.admin-tab-panel {
  display: grid;
  gap: 12px;
}

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

.admin-kpi-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf9;
  padding: 11px 12px;
}

.admin-kpi-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.admin-kpi-value {
  margin: 8px 0 0;
  font-size: 1.42rem;
  color: var(--text);
  font-weight: 700;
}

.admin-table-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 10px;
}

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-inline-btn {
  padding: 7px 9px;
  font-size: 0.76rem;
  border-radius: 8px;
  line-height: 1.2;
}

.admin-inline-btn.secondary {
  background: #f4f8f6;
  color: var(--muted);
  border: 1px solid var(--border);
}

.admin-inline-btn.secondary:hover {
  background: #e9efeb;
  color: var(--text);
}

.admin-inline-btn.modal-delete-btn {
  font-size: 0.76rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.admin-table th,
.admin-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #e9edea;
  text-align: left;
  font-size: 0.8rem;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.71rem;
  background: #f7faf8;
}

.admin-table tbody tr:hover {
  background: #f8fbf9;
}

.admin-empty-row {
  color: var(--muted);
  text-align: center;
  padding: 14px !important;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-row-input,
.admin-row-select {
  width: 100%;
  min-width: 130px;
  background: #fff;
}

.admin-store-logo-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-store-logo-box {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  border: 1px solid #d6ddd8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 120px;
  overflow: hidden;
}

.admin-store-logo-thumb {
  display: block;
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  object-position: center;
}

.admin-store-logo-btn {
  min-width: 112px;
}

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

.admin-filter-field {
  display: grid;
  gap: 4px;
}

.admin-filter-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-filter-actions {
  align-self: end;
  display: flex;
  gap: 6px;
}

.admin-filter-field.compact {
  min-width: 190px;
}

.admin-danger-btn {
  padding: 8px 10px;
}

.admin-compact-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-columns-control {
  position: relative;
}

.admin-columns-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(42, 52, 46, 0.12);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 30;
}

.admin-columns-menu label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.79rem;
}

.admin-product-filters {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbf9;
  padding: 10px;
  display: grid;
  gap: 10px;
}

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

.admin-product-filters select[multiple] {
  min-height: 108px;
}

.admin-filter-field-checkbox .admin-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
}

.admin-product-toolbar {
  display: grid;
  gap: 8px;
}

.admin-product-scope-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-archive-scope-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #d9e2dc;
  background: #f8fbf9;
  border-radius: 999px;
}

.admin-archive-scope-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.admin-archive-scope-btn:hover {
  color: var(--text);
  background: #eef3ef;
}

.admin-archive-scope-btn.active {
  color: var(--text);
  border-color: #ccd8d1;
  background: #ffffff;
}

.admin-archive-checkbox {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-archive-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #d7e0da;
  background: #f7faf8;
  color: #4b5a52;
  font-size: 0.76rem;
  font-weight: 600;
}

.admin-product-selection-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.79rem;
  font-weight: 600;
}

.admin-selection-summary {
  color: var(--muted);
  font-size: 0.78rem;
}

#productSelectAllFilteredBtn.active {
  background: #e7f0ea;
  color: #3e5347;
  border-color: #cad8cf;
}

.admin-product-bulk-controls {
  align-items: flex-end;
}

.admin-product-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid #e6ece8;
  border-radius: 10px;
}

.admin-product-table {
  min-width: 1180px;
}

.admin-product-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-product-table tbody td {
  vertical-align: middle;
}

.admin-social-price-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #37443d;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-social-price-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  flex: 0 0 9px;
}

.admin-social-price-none {
  color: #7b8680;
  font-size: 0.78rem;
  line-height: 1.2;
}

.admin-product-row-archived td {
  color: #6f7a73;
  background: #f8faf9;
}

.admin-status-badge.archived {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d4ddd7;
  background: #eef3f0;
  color: #5f6c65;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pc-col-actions {
  min-width: 190px;
}

.admin-product-table-wrap.compact .admin-product-table th,
.admin-product-table-wrap.compact .admin-product-table td {
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 0.76rem;
}

.admin-check-col {
  width: 34px;
}

.admin-sort-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.admin-sort-btn:hover {
  color: var(--text);
}

.admin-sort-btn.active {
  color: #3b4640;
}

.admin-sort-btn::after {
  content: attr(data-sort-indicator);
  font-size: 0.7rem;
  opacity: 0.75;
}

.admin-sort-btn[data-sort-indicator=""]::after {
  content: "";
}

.admin-product-table .is-hidden {
  display: none;
}

.admin-product-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-paging-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-page-indicator {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

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

.admin-backup-schedule {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbf9;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.admin-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text);
}

.admin-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.84rem;
}

.admin-file-btn {
  background: #f4f8f6;
  color: var(--muted);
  border: 1px solid var(--border);
}

.admin-file-btn:hover {
  background: #e9efeb;
  color: var(--text);
}

.planning-card {
  display: grid;
  gap: 12px;
}

.planning-month-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e3eae5;
  border-radius: 10px;
  background: #f8fbf9;
  padding: 10px 12px;
}

.planning-month-header-main {
  min-width: 0;
}

.planning-month-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.planning-month-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.planning-edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.planning-header {
  align-items: flex-start;
}

.planning-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.planning-period-controls {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.planning-month-field {
  min-width: 180px;
}

.planning-year-field {
  width: 120px;
}

.planning-nav-btn {
  min-width: 42px;
  padding-inline: 10px;
}

.planning-status-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.3;
}

.planning-status-text.error {
  color: #9c5a5a;
}

.planning-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #e1e8e4;
  border-radius: 10px;
  background: #f5f9f7;
  width: fit-content;
}

.planning-view-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.79rem;
  font-weight: 600;
}

.planning-view-tab.active {
  background: #fff;
  border-color: #d4ddd7;
  color: var(--text);
}

.planning-view-panel {
  display: grid;
  gap: 10px;
}

.planning-day-sections {
  display: grid;
  gap: 12px;
}

.planning-day-section {
  --planning-day-header-bg: #f2f7f4;
  --planning-day-divider: #d1ddd4;
  --planning-row-odd: #ffffff;
  --planning-row-even: #f8fbf9;
  border: 1px solid #dfe6e1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.planning-day-section.day-wednesday {
  --planning-day-header-bg: #edf3fb;
  --planning-day-divider: #cfdcee;
  --planning-row-even: #f5f9ff;
}

.planning-day-section.day-thursday {
  --planning-day-header-bg: #eef7f1;
  --planning-day-divider: #d1e0d6;
  --planning-row-even: #f7fcf9;
}

.planning-day-section.day-friday {
  --planning-day-header-bg: #fbf3eb;
  --planning-day-divider: #ecd8c5;
  --planning-row-even: #fffbf6;
}

.planning-day-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: var(--planning-day-header-bg);
  border-bottom: 3px solid var(--planning-day-divider);
  padding: 10px 12px;
  text-align: left;
}

.planning-day-section-title {
  color: #2f3a34;
  font-size: 0.92rem;
  font-weight: 700;
}

.planning-day-section-arrow {
  color: #5f6b64;
  font-size: 0.75rem;
  transition: transform 0.16s ease;
}

.planning-day-section.collapsed .planning-day-section-arrow {
  transform: rotate(-90deg);
}

.planning-day-table-wrap {
  overflow: auto;
}

.planning-day-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.planning-day-table th,
.planning-day-table td {
  border-right: 1px solid #e6ede8;
  border-bottom: 1px solid #e6ede8;
  padding: 8px 10px;
  vertical-align: top;
}

.planning-day-table th:first-child,
.planning-day-table td:first-child {
  border-left: 1px solid #e6ede8;
}

.planning-day-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fbf9;
  color: #6a746f;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.planning-day-table thead th:nth-child(1) {
  width: 132px;
  min-width: 132px;
}

.planning-day-table thead th:nth-child(2) {
  width: 300px;
  min-width: 300px;
}

.planning-day-table thead th:nth-child(n + 3) {
  width: 170px;
  min-width: 170px;
}

.planning-day-table tbody tr:nth-child(odd) td {
  background: var(--planning-row-odd);
}

.planning-day-table tbody tr:nth-child(even) td {
  background: var(--planning-row-even);
}

.planning-day-table th:nth-child(1),
.planning-day-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 4;
}

.planning-day-table th:nth-child(2),
.planning-day-table td:nth-child(2) {
  position: sticky;
  left: 132px;
  z-index: 3;
}

.planning-day-table tbody tr:nth-child(odd) td:nth-child(1),
.planning-day-table tbody tr:nth-child(odd) td:nth-child(2) {
  background: var(--planning-row-odd);
}

.planning-day-table tbody tr:nth-child(even) td:nth-child(1),
.planning-day-table tbody tr:nth-child(even) td:nth-child(2) {
  background: var(--planning-row-even);
}

.planning-time-cell {
  color: #34443c;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.planning-task-cell-main {
  color: #2f3a34;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-task-cell-meta {
  margin-top: 4px;
  color: #728078;
  font-size: 0.73rem;
  line-height: 1.25;
}

.planning-task-edit-btn {
  margin-top: 7px;
  border: 1px solid #d6e0d9;
  background: #fff;
  color: #4f5d55;
  border-radius: 7px;
  font-size: 0.72rem;
  padding: 4px 8px;
}

.planning-task-edit-btn:hover {
  border-color: #c3d0c8;
  color: #33433a;
  background: #f5faf7;
}

.planning-assignment-cell {
  min-height: 62px;
  display: grid;
  gap: 6px;
  align-content: start;
  border-radius: 8px;
  padding: 6px 8px;
  transition: box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  border: 1px dashed transparent;
}

.planning-assignment-cell-empty {
  background: #fff3ea;
  border-color: #f4d8c5;
}

.planning-assignment-cell.is-drop-target {
  border-color: #6e8b74;
  box-shadow: inset 0 0 0 1px rgba(110, 139, 116, 0.35);
  background: #f3f9f5;
}

.planning-assignment-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.planning-assignment-label {
  color: #73827a;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.planning-person-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d5dfd9;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-person-pill-primary {
  background: #edf5ef;
  color: #2f3f36;
  font-weight: 700;
}

.planning-person-pill-assist {
  background: #f4f7f5;
  color: #3f4f46;
  font-weight: 600;
}

.planning-person-pill-backup {
  background: #f8f9f8;
  color: #6f7b74;
  font-weight: 500;
}

.planning-assignment-empty {
  color: #9aa69f;
  font-size: 0.73rem;
}

.planning-slot-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d5dfd9;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f2f6f3;
  color: #2f3f36;
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.planning-slot-pill:active {
  cursor: grabbing;
}

.planning-side-panels {
  position: fixed;
  right: 18px;
  top: 124px;
  width: 220px;
  max-height: calc(100vh - 146px);
  display: grid;
  grid-template-rows: minmax(220px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  z-index: 70;
}

.planning-people-panel,
.planning-tasks-panel {
  min-height: 0;
  padding: 12px;
  border: 1px solid #d9ded9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(47, 58, 52, 0.12);
}

.planning-people-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px;
}

.planning-tasks-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.planning-people-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2f3a34;
}

.planning-people-list {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.planning-tasks-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  align-content: start;
}

.planning-people-empty {
  margin: 0;
  color: #85918b;
  font-size: 0.82rem;
}

.planning-panel-person-pill {
  border: 1px solid #d5dfd9;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eef4f0;
  color: #2f3f36;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.planning-panel-person-pill:active {
  cursor: grabbing;
}

.planning-panel-task-item {
  border: 1px solid #d5dfd9;
  border-radius: 10px;
  background: #f4f8f5;
  color: #2f3f36;
  display: grid;
  gap: 2px;
  padding: 8px;
  text-align: left;
  cursor: grab;
  user-select: none;
}

.planning-panel-task-item:active {
  cursor: grabbing;
}

.planning-panel-task-item.is-dragging {
  opacity: 0.55;
}

.planning-panel-task-title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.planning-panel-task-meta {
  font-size: 0.7rem;
  color: #74827a;
}

.planning-person-add-btn {
  width: 100%;
  border: 1px solid #d6ddd8;
  border-radius: 10px;
  background: #f7faf8;
  color: #516057;
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 34px;
  padding: 6px 8px;
  text-align: center;
}

.planning-person-add-btn:hover {
  border-color: #c8d3cd;
  background: #f2f7f4;
}

.planning-people-trash {
  width: 100%;
  border: 1px solid #d8ddd8;
  border-radius: 10px;
  background: #f6f8f7;
  color: #6f7b74;
  font-size: 1.1rem;
  line-height: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.planning-people-trash.is-drop-target {
  background: #fde9e9;
  border-color: #d8a4a4;
  color: #9e4545;
}

.planning-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 120;
  border: 1px solid #c8d7cc;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #2f3a34;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 6px 14px rgba(47, 58, 52, 0.14);
}

.planning-person-popup {
  position: fixed;
  z-index: 130;
  width: min(320px, calc(100vw - 24px));
}

.planning-person-popup-card {
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(47, 58, 52, 0.18);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.planning-person-popup-card h4 {
  margin: 0 0 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2f3a34;
}

.planning-person-popup-card p {
  margin: 0;
  color: #4f5f56;
  font-size: 0.8rem;
}

.planning-person-popup-field {
  display: grid;
  gap: 4px;
}

.planning-person-popup-field span {
  color: #6c7871;
  font-size: 0.73rem;
  font-weight: 600;
}

.planning-person-popup-field input {
  border: 1px solid #d7dfda;
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 0.84rem;
  color: #2f3a34;
  background: #fff;
}

.planning-person-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.planning-person-popup-actions button {
  border: 1px solid #d4ddd7;
  border-radius: 8px;
  background: #f4f8f5;
  color: #44544b;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 10px;
}

.planning-person-popup-actions button.secondary {
  background: #fff;
}

.planning-person-popup-actions button.danger {
  border-color: #dfc2c2;
  background: #fff4f4;
  color: #8a4a4a;
}

@media (min-width: 1260px) {
  body.planning-people-panel-open .layout {
    padding-right: 260px;
  }
}

@media (max-width: 1100px) {
  .planning-side-panels {
    right: 10px;
    top: 108px;
    width: 190px;
  }
}

.planning-task-drop-slot {
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.planning-task-drop-slot.is-task-drop-target {
  border-color: #b9ccc1;
  background: #edf4ef;
}

.planning-time-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.planning-time-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
}

.planning-time-value.editable {
  cursor: pointer;
}

.planning-time-value.editable:hover {
  border-color: #d5ddd8;
  background: #f6faf7;
}

.planning-time-value.is-editing {
  border-color: #c5d6ca;
  background: #fff;
}

.planning-time-input {
  width: 84px;
  border: 1px solid #c5d6ca;
  border-radius: 8px;
  min-height: 30px;
  padding: 4px 8px;
  background: #fff;
  color: #2f3a34;
  font: inherit;
}

.planning-time-sep {
  color: #8a9790;
}

.planning-row-actions-head {
  width: 52px;
}

.planning-row-actions-cell {
  text-align: center;
  vertical-align: middle;
}

.planning-row-trash {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #d8dfda;
  background: #f6f9f7;
  color: #8a9790;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.planning-row-trash.is-drop-target {
  border-color: #d7a3a3;
  background: #fbe7e7;
  color: #b14f4f;
}

.planning-row-trash.explode {
  animation: planningTrashExplode 0.46s ease forwards;
}

@keyframes planningTrashExplode {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  20% { transform: scale(1.08) rotate(-10deg); opacity: 1; }
  38% { transform: scale(1.15) rotate(12deg); opacity: 1; }
  55% { transform: scale(1.22) rotate(-8deg); opacity: 0.9; }
  100% { transform: scale(1.7) rotate(0deg); opacity: 0; }
}

.planning-person-table-wrap {
  border: 1px solid #e1e8e4;
  border-radius: 10px;
  background: #fff;
  overflow: auto;
}

.planning-person-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.planning-person-table th,
.planning-person-table td {
  border-right: 1px solid #e6ede8;
  border-bottom: 1px solid #e6ede8;
  padding: 8px 10px;
  text-align: left;
}

.planning-person-table th:first-child,
.planning-person-table td:first-child {
  border-left: 1px solid #e6ede8;
}

.planning-person-table thead th {
  background: #f8fbf9;
  color: #69746f;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.planning-person-table tbody tr {
  cursor: pointer;
}

.planning-person-table tbody tr:hover td {
  background: #f2f7f4;
}

.planning-person-table tbody tr.is-selected td {
  background: #eaf2ee;
}

.planning-person-details {
  border: 1px solid #dfe7e2;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.planning-person-details h4 {
  margin: 0;
  font-size: 0.86rem;
  color: #34433b;
}

.planning-person-details-list {
  margin: 0;
  padding-left: 16px;
  color: #46544d;
  font-size: 0.78rem;
  line-height: 1.35;
}

.planning-task-modal {
  width: min(860px, calc(100% - 24px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 14px 30px rgba(27, 36, 31, 0.22);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.planning-task-modal-head h3 {
  margin: 0;
  color: #2f3a34;
  font-size: 0.98rem;
}

.planning-task-form {
  display: grid;
  gap: 10px;
}

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

.planning-task-assignments-wrap {
  border: 1px solid #e1e8e4;
  border-radius: 9px;
  overflow: auto;
}

.planning-task-assignments-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
}

.planning-task-assignments-table th,
.planning-task-assignments-table td {
  border-right: 1px solid #e6ede8;
  border-bottom: 1px solid #e6ede8;
  padding: 7px 8px;
}

.planning-task-assignments-table th:first-child,
.planning-task-assignments-table td:first-child {
  border-left: 1px solid #e6ede8;
}

.planning-task-assignments-table thead th {
  background: #f8fbf9;
  color: #6a746f;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.planning-task-assignments-table td:first-child {
  white-space: nowrap;
  color: #55625b;
  font-size: 0.77rem;
  font-weight: 700;
}

.planning-task-status {
  margin: 0;
  border: 1px solid #d9e7de;
  background: #f4faf6;
  color: #3f5648;
  border-radius: 9px;
  font-size: 0.8rem;
  padding: 7px 9px;
}

.planning-task-status.error {
  border-color: #e8c8c8;
  background: #fbf1f1;
  color: #8f4f4f;
}

.planning-task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.planning-recipients-card {
  border: 1px solid #e3eae5;
  border-radius: 10px;
  background: #f8fbf9;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.planning-recipients-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.planning-recipients-header h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.planning-recipients-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.planning-recipients-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.planning-recipient-input-wrap {
  flex: 1 1 320px;
  min-width: 220px;
}

.planning-recipients-status {
  margin: 0;
  border: 1px solid #d9e7de;
  background: #f4faf6;
  color: #3f5648;
  border-radius: 9px;
  font-size: 0.8rem;
  padding: 7px 9px;
}

.planning-recipients-status.error {
  border-color: #e8c8c8;
  background: #fbf1f1;
  color: #8f4f4f;
}

.planning-recipients-list {
  display: grid;
  gap: 6px;
}

.planning-recipients-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.planning-recipient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 1px solid #e1e8e4;
  border-radius: 8px;
  padding: 6px 8px;
}

.planning-recipient-email {
  font-size: 0.82rem;
  color: #36443c;
  overflow-wrap: anywhere;
}

.planning-recipient-remove {
  flex: 0 0 auto;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .auth-shell-landing {
    max-width: 860px;
  }

  .auth-brand {
    padding: 20px;
  }

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

  .store-switch-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .store-secondary-grid {
    gap: 12px;
  }

  .store-context-banner {
    padding: 20px;
  }

  .store-tab-item-secondary {
    flex-basis: 96px;
  }

  .store-tab-btn-secondary {
    width: 96px;
    height: 92px;
    min-width: 96px;
    min-height: 92px;
  }

  .store-thumb-primary {
    width: 136px;
    height: 136px;
    flex: 0 0 136px;
  }

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

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

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

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

  .planning-month-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .list {
    max-height: 45vh;
  }
}

@media (max-width: 720px) {
  .auth-page {
    padding: 14px;
  }

  .auth-brand {
    padding: 16px;
  }

  .auth-entry-grid {
    grid-template-columns: 1fr;
  }

  .auth-register-toggle-row {
    justify-content: flex-start;
  }

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

  .topbar {
    padding-bottom: 16px;
  }

  .session-controls {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .editor-top-row {
    grid-template-columns: minmax(0, 1fr) 92px 42px;
  }

  .editor-top-head {
    grid-template-columns: minmax(0, 1fr) 92px 42px;
  }

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

  .planning-day-table {
    min-width: 760px;
  }

  .planning-day-table thead th:nth-child(2) {
    min-width: 240px;
  }

  .planning-day-table thead th:nth-child(n + 3) {
    min-width: 140px;
  }

  .info-icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.95rem;
  }

  .product-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .login-form {
    grid-template-columns: 1fr;
  }

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

  .controls {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    gap: 5px;
  }

  .admin-nav-btn {
    border-radius: 9px;
  }

  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .admin-filters {
    grid-template-columns: 1fr;
  }

  .admin-product-filters-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-actions {
    width: 100%;
  }

  .admin-filter-actions button {
    flex: 1;
  }

  .admin-product-selection-controls,
  .admin-product-bulk-controls {
    width: 100%;
  }

  .admin-product-pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-product-table-wrap {
    max-height: 56vh;
  }

  .planning-toolbar {
    align-items: flex-start;
  }

  .planning-period-controls {
    width: 100%;
  }

  .planning-month-field,
  .planning-year-field {
    min-width: 0;
    width: auto;
    flex: 1 1 140px;
  }

  .planning-recipients-form {
    width: 100%;
  }

  .planning-recipient-input-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }

  .planning-recipients-form > button {
    width: 100%;
  }

  .list-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .list-head {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .history-header {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .history-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .history-col {
    white-space: normal;
  }

  .import-preview-modal {
    width: 100%;
    max-height: 92vh;
    padding: 10px;
  }

  .import-preview-table {
    min-width: 760px;
  }
}
