:root {
  --ink-strong: #18313f;
  --ink-soft: #667986;
  --line: #d8e2e8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-soft: #f4f8fb;
  --accent: #0f6c78;
  --accent-strong: #0a4f59;
  --accent-soft: #d8f0f1;
  --danger: #b54040;
  --danger-soft: #fde7e4;
  --success: #24704d;
  --success-soft: #e4f4eb;
  --shadow: 0 22px 50px rgba(16, 40, 56, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --page: linear-gradient(180deg, #f3efe2 0%, #edf5f6 48%, #f7fbfc 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink-strong);
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 24px 20px 36px;
}

.global-footer {
  background: #bf0500;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.global-footer-inner {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 20px;
}

.global-footer-meta {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.global-footer-text {
  margin: 0;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.global-footer-logo {
  display: block;
  height: 33px;
  width: auto;
  object-fit: contain;
}

.global-footer-logo-smkt {
  max-width: 74px;
}

.login-shell,
.panel-shell {
  display: grid;
  gap: 14px;
}

.login-shell {
  min-height: 100vh;
  align-items: center;
  margin: -24px -20px -36px;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #c30a04 0%, #bf0500 46%, #990400 100%);
}

.panel-card,
.login-card,
.module-card {
  border: 1px solid rgba(216, 226, 232, 0.95);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.topbar h1,
.panel-heading h2,
.module-card h3 {
  margin: 0;
}

.helper-text,
.detail-list,
.feedback {
  color: var(--ink-soft);
  line-height: 1.6;
}

.login-stage {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 0;
  min-height: 360px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.login-brand-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 20px;
}

.login-brand-art {
  width: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 24px 20px;
}

.login-brand-logo {
  width: min(340px, 100%);
  height: auto;
  object-fit: contain;
  margin-top: auto;
  margin-bottom: auto;
}

.login-owner-lockup {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.login-owner-logo {
  width: min(132px, 48%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(73, 0, 0, 0.18));
  opacity: 0.92;
}

.login-access-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(86, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.login-access-panel .panel-heading h2 {
  color: #bf0500;
}

.login-access-panel .eyebrow {
  color: #bf0500;
}

.login-access-panel .helper-text,
.login-access-panel .feedback {
  color: #8b120d;
}

.login-access-panel .field span {
  color: #8b120d;
}

.login-access-panel .field input,
.login-access-panel .field select,
.login-access-panel .field textarea {
  color: #7f0703;
  border-color: rgba(191, 5, 0, 0.16);
}

.login-access-panel .field input::placeholder,
.login-access-panel .field textarea::placeholder {
  color: rgba(127, 7, 3, 0.5);
}

.login-access-panel .field input:focus,
.login-access-panel .field select:focus,
.login-access-panel .field textarea:focus {
  border-color: rgba(191, 5, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(191, 5, 0, 0.12);
}

.login-access-panel button {
  background: #bf0500;
}

.login-access-panel button:hover {
  box-shadow: 0 10px 24px rgba(191, 5, 0, 0.28);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.compact-form {
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.field-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  cursor: help;
}

.field-tooltip .material-symbols-outlined {
  font-size: 14px;
}

.field-tooltip:focus-visible {
  outline: 2px solid rgba(15, 108, 120, 0.32);
  outline-offset: 2px;
}

.field-inline {
  grid-auto-flow: row;
}

.field-grow {
  min-width: 240px;
}

.field-align-end {
  align-self: end;
}

.field-align-end button {
  width: 100%;
}

.field span,
.checkbox-field span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-strong);
  color: var(--ink-strong);
  outline: none;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(15, 108, 120, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 108, 120, 0.12);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 108, 120, 0.2);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-secondary {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.button-ghost {
  color: var(--ink-strong);
  background: rgba(24, 49, 63, 0.08);
}

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

.icon-button-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.icon-button-active-info {
  color: #7a5800;
  background: #ffe082;
  border: 1px solid rgba(122, 88, 0, 0.22);
  box-shadow: none;
}

.icon-button-active-info:hover {
  background: #ffd54f;
}

.icon-button-active-danger {
  color: #fff;
  background: #c94a4a;
  border: 1px solid rgba(181, 64, 64, 0.4);
  box-shadow: none;
}

.icon-button-active-danger:hover {
  background: #b54040;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.feedback {
  min-height: 24px;
  margin: 0;
}

.feedback[data-tone="error"] {
  color: var(--danger);
}

.feedback[data-tone="success"] {
  color: var(--success);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}

.panel-header-card {
  overflow: hidden;
  padding: 0;
}

.panel-header-divider {
  height: 1px;
  margin: 0 24px;
  background: rgba(216, 226, 232, 0.95);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  width: auto;
  max-width: 260px;
  height: 88px;
  object-fit: contain;
  object-position: left center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-operator {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 108, 120, 0.08);
  border: 1px solid rgba(15, 108, 120, 0.12);
  color: var(--ink-strong);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
}

.topbar-button .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.button-secondary.topbar-button {
  border-color: rgba(15, 108, 120, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.button-ghost.topbar-button {
  border-color: rgba(24, 49, 63, 0.1);
}

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px 18px;
}

.module-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.module-nav-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0 2px;
}

.module-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--ink-strong);
  border: 1px solid rgba(15, 108, 120, 0.08);
  background: linear-gradient(180deg, rgba(15, 108, 120, 0.08) 0%, rgba(15, 108, 120, 0.04) 100%);
  box-shadow: none;
}

.module-nav-button.is-store-scoped {
  border-color: rgba(191, 5, 0, 0.14);
  background: linear-gradient(180deg, rgba(191, 5, 0, 0.10) 0%, rgba(191, 5, 0, 0.05) 100%);
}

.module-nav-button .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(15, 108, 120, 0.12);
}

.module-nav-button.is-store-scoped .material-symbols-outlined {
  background: rgba(191, 5, 0, 0.12);
}

.module-nav-button.is-active {
  color: #fff;
  background: var(--accent);
  border-color: rgba(15, 108, 120, 0.8);
}

.module-nav-button.is-active .material-symbols-outlined {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.toolbar-store {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.store-integration-badge {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.store-integration-badge[data-tone="success"] {
  border-color: rgba(36, 112, 77, 0.22);
  background: var(--success-soft);
  color: var(--success);
}

.store-integration-badge[data-tone="error"] {
  border-color: rgba(181, 64, 64, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
}

.workspace-main {
  display: grid;
  gap: 14px;
}

.panel-feedback {
  padding: 0 6px;
}

.panel-feedback:empty {
  display: none;
}

.module-content {
  display: grid;
  gap: 20px;
}

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

.module-grid-wide {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.module-card {
  padding: 22px;
}

.module-grid > .module-card {
  grid-column: span 6;
}

.module-grid-wide > .module-card:first-child {
  grid-column: span 8;
}

.module-grid-wide > .module-card:last-child {
  grid-column: span 4;
}

.module-card-full {
  grid-column: 1 / -1 !important;
}

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

.terms-form {
  width: 100%;
}

.terms-form textarea {
  width: 100%;
  min-height: 360px;
}

.panel-heading,
.section-heading-inline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.order-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.order-status-pill.status-action-warning {
  background: #fff3cd;
  color: #8a5a00;
}

.order-status-pill.status-action-info {
  background: #dceffd;
  color: #0d5f8b;
}

.order-status-pill.status-action-success {
  background: #d9f7e1;
  color: #207245;
}

.order-status-pill.status-action-danger {
  background: #fde2e2;
  color: #b54040;
}

.module-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.module-subnav-button {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--ink-strong);
  background: rgba(24, 49, 63, 0.08);
  border: 1px solid rgba(24, 49, 63, 0.12);
  box-shadow: none;
}


.module-subnav-button.is-active {
  color: #fff;
  background: var(--accent);
  border-color: rgba(15, 108, 120, 0.8);
}

.grid-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.grid-toolbar .field-inline {
  flex: 0 0 auto;
}

.grid-toolbar .field-grow {
  flex: 1 1 320px;
  min-width: min(420px, 100%);
}

.grid-toolbar .field-grow input,
.grid-toolbar .field-grow select {
  width: 100%;
}

.grid-toolbar > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.section-help {
  margin: -4px 0 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.data-grid-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.catalog-search-results-shell {
  min-height: 420px;
  max-height: 420px;
  overflow-y: auto;
  border-radius: 18px;
}

.catalog-search-results-shell::-webkit-scrollbar {
  width: 10px;
}

.catalog-search-results-shell::-webkit-scrollbar-thumb {
  background: rgba(102, 121, 134, 0.35);
  border-radius: 999px;
}

.data-grid {
  width: 100%;
  min-width: 100%;
}

.data-grid-head,
.data-grid-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}

.data-grid-head {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.data-grid-body {
  display: grid;
}

.data-grid-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(216, 226, 232, 0.8);
  border-radius: 0;
  padding: 16px 18px;
  text-align: left;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

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

.data-grid-row:hover {
  transform: none;
  background: rgba(15, 108, 120, 0.05);
  box-shadow: none;
}

.grid-action-cell {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.report-selector-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.report-selector-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-frame {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface);
  display: grid;
  gap: 14px;
}

.report-action-row {
  justify-content: flex-end;
}

.order-status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.order-status-indicator.status-action-warning {
  color: #9a6700;
  background: #fff1bf;
}

.order-status-indicator.status-action-info {
  color: #0f6c78;
  background: rgba(15, 108, 120, 0.12);
}

.order-status-indicator.status-action-success {
  color: #1c7c43;
  background: rgba(28, 124, 67, 0.14);
}

.order-status-indicator.status-action-danger {
  color: #b54040;
  background: rgba(181, 64, 64, 0.14);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: none;
}

.icon-button:hover {
  transform: none;
  box-shadow: none;
  background: rgba(15, 108, 120, 0.18);
}

.icon-button.icon-button-active-info {
  color: #7a5800;
  background: #ffe082;
  border: 1px solid rgba(122, 88, 0, 0.22);
}

.icon-button.icon-button-active-info:hover {
  background: #ffd54f;
}

.icon-button.icon-button-danger.icon-button-active-danger,
.icon-button.icon-button-active-danger {
  color: #fff;
  background: #c94a4a;
  border: 1px solid rgba(181, 64, 64, 0.4);
}

.icon-button.icon-button-danger.icon-button-active-danger:hover,
.icon-button.icon-button-active-danger:hover {
  background: #b54040;
}

.material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.empty-state-grid,
.empty-state {
  padding: 20px;
  color: var(--ink-soft);
}

.detail-list p,
.list-row p,
.subsection p {
  margin: 0;
}

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

.detail-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.detail-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.modal-state-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-block: 28px;
  text-align: center;
}

.modal-state-card h3,
.modal-state-card p {
  margin: 0;
}

.modal-state-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 28px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.modal-state-card-icon-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.detail-card-full,
.detail-card:last-child {
  grid-column: 1 / -1;
}

.detail-fields {
  display: grid;
  gap: 12px 18px;
}

.detail-fields p {
  min-width: 0;
}

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

.detail-fields-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-subcards {
  display: grid;
  gap: 12px;
}

.detail-subcard {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.detail-subcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.metric-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.metric-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.metric-card-global {
  border-color: rgba(102, 121, 134, 0.22);
}

.metric-card-store {
  border-color: rgba(238, 24, 36, 0.18);
}

.dashboard-filter-field {
  min-width: 160px;
}

.dashboard-chart-shell {
  position: relative;
  min-height: 320px;
  padding: 6px 2px 0;
}

.dashboard-chart-canvas {
  width: 100% !important;
  height: 320px !important;
}

.dashboard-chart-empty {
  margin: 18px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24, 49, 63, 0.08);
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 800;
}

.pill-positive {
  background: var(--success-soft);
  color: var(--success);
}

.pill-muted {
  background: rgba(102, 121, 134, 0.14);
  color: var(--ink-soft);
}

.pill-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.order-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.order-status-pill.status-action-warning {
  background: #fff3cd;
  color: #8a5a00;
}

.order-status-pill.status-action-info {
  background: #dceffd;
  color: #0d5f8b;
}

.order-status-pill.status-action-success {
  background: #d9f7e1;
  color: #207245;
}

.order-status-pill.status-action-danger {
  background: #fde2e2;
  color: #b54040;
}

.pill-warning {
  background: #fff3cd;
  color: #8a5a00;
}

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

.media-upload-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
}

.media-upload-preview-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed rgba(24, 49, 63, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.media-upload-preview {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.media-upload-empty {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.media-upload-actions {
  display: flex;
  justify-content: flex-start;
}

.cause-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 12px;
}

.field-action {
  align-self: end;
}

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

.store-toggle-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.store-toggle-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-strong);
}

.store-toggle-card-title .material-symbols-outlined {
  color: var(--accent);
}

.store-schedule-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
}

.store-schedule-card h4 {
  margin: 0;
}

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

.store-day-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(24, 49, 63, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
}

.store-day-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-strong);
}

.store-time-field {
  gap: 0;
}

.store-time-field input {
  text-align: center;
  font-weight: 700;
}

.field-full,
.form-actions {
  grid-column: 1 / -1;
}

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

.stack-list-compact {
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
}

.list-row-static {
  cursor: default;
}

.subsection {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.operations-switch-block {
  display: grid;
  gap: 16px;
}

.operations-preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px 22px;
}

.operations-preference-switch {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.maintenance-switch {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  width: fit-content;
}

.maintenance-switch-content {
  display: grid;
  gap: 6px;
}

.maintenance-switch.is-pending {
  opacity: 0.78;
}

.switch-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

.switch-loading-icon {
  font-size: 1rem;
  animation: switch-loading-spin 0.9s linear infinite;
}

.maintenance-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.maintenance-switch-slider {
  position: relative;
  width: 82px;
  height: 44px;
  border-radius: 999px;
  background: rgba(102, 121, 134, 0.28);
  transition: background 0.18s ease;
}

.maintenance-switch-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(16, 40, 56, 0.18);
  transition: transform 0.18s ease;
}

.maintenance-switch input:checked + .maintenance-switch-slider {
  background: #d85a5a;
}

.maintenance-switch input:checked + .maintenance-switch-slider::after {
  transform: translateX(38px);
}

@keyframes switch-loading-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.maintenance-switch-label {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-strong);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 18px;
  margin-inline: -6px;
  padding: 14px 6px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.98) 34%, #ffffff 100%);
  border-top: 1px solid rgba(216, 226, 232, 0.95);
  backdrop-filter: blur(8px);
}

.order-modal-footer .action-row {
  justify-content: flex-end;
}

button.is-pending,
.module-nav-button.is-pending,
.module-subnav-button.is-pending,
.topbar-button.is-pending,
.report-selector-button.is-pending,
.icon-button.is-pending {
  opacity: 0.9;
  pointer-events: none;
}

button.is-pending .material-symbols-outlined,
.module-nav-button.is-pending .material-symbols-outlined,
.module-subnav-button.is-pending .material-symbols-outlined,
.topbar-button.is-pending .material-symbols-outlined,
.report-selector-button.is-pending .material-symbols-outlined,
.icon-button.is-pending .material-symbols-outlined {
  animation: switch-loading-spin 0.9s linear infinite;
}

.operator-note-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 14px;
  margin-top: 18px;
}

.operator-note-row .field {
  grid-column: auto;
  margin: 0;
}

.operator-note-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  grid-column: auto;
  padding-bottom: 0;
}

.operator-note-actions button {
  min-height: 44px;
}

.status-action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-action-warning {
  background: #fff3cd;
  color: #8a5a00;
}

.status-action-info {
  background: #dceffd;
  color: #0b5589;
}

.status-action-success {
  background: #e4f4eb;
  color: #24704d;
}

.status-action-danger {
  background: #fde7e4;
  color: #b54040;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 32, 42, 0.45);
  backdrop-filter: blur(4px);
}

.app-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  margin: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-modal-dialog.app-modal-dialog-wide {
  width: min(1460px, calc(100vw - 16px));
}

#userModalBody {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 6px;
}

#userModalBody::-webkit-scrollbar {
  width: 10px;
}

#userModalBody::-webkit-scrollbar-thumb {
  background: rgba(102, 121, 134, 0.35);
  border-radius: 999px;
}

@media (max-width: 1199px) {
  .detail-fields-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid-wide > .module-card:first-child,
  .module-grid-wide > .module-card:last-child,
  .module-grid > .module-card {
    grid-column: span 12;
  }

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

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

@media (max-width: 991px) {
  .operations-top-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding-inline: 14px;
  }

  .topbar,
  .module-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: flex-end;
  }

  .topbar-operator {
    width: 100%;
    justify-content: center;
  }

  .toolbar-store {
    justify-content: space-between;
  }

  .grid-toolbar .field-inline,
  .grid-toolbar .field-grow,
  .grid-toolbar > button {
    flex: 1 1 100%;
    min-width: 0;
  }

  .login-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-panel {
    min-height: 220px;
    padding: 8px 0;
  }

  .login-brand-logo {
    width: min(280px, 100%);
  }

  .login-access-panel {
    padding: 24px;
  }
}

@media (max-width: 767px) {
  .detail-fields-2,
  .detail-fields-4,
  .metric-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .store-toggle-groups,
  .store-schedule-grid {
    grid-template-columns: 1fr;
  }

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

  .order-modal-footer {
    margin-inline: -2px;
    padding-inline: 2px;
  }

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

  .data-grid-head div:nth-child(n + 3),
  .data-grid-row div:nth-child(n + 3) {
    display: none;
  }

  .data-grid-head div:last-child,
  .data-grid-row div:last-child {
    display: flex;
    justify-content: flex-end;
  }

  .module-card,
  .topbar,
  .module-toolbar,
  .login-card {
    border-radius: 22px;
  }

  .app-modal-dialog {
    width: min(860px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    padding: 18px;
  }

  .app-modal-dialog.app-modal-dialog-wide {
    width: calc(100vw - 16px);
  }

  #userModalBody {
    max-height: calc(100vh - 150px);
  }

  .global-footer-inner {
    min-height: 50px;
    padding: 6px 14px;
    gap: 12px;
  }

  .global-footer-logo {
    height: 29px;
  }

  .global-footer-text {
    font-size: 0.68rem;
  }
}
