.admin-error-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  min-width: 360px;
  max-width: min(92vw, 900px);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(153, 27, 27, 0.18);
}

.crm-sidebar {
  z-index: 80;
  gap: 0;
  background: #ffffff;
}

.crm-sidebar-brand {
  padding: 24px 24px 18px;
}

.crm-sidebar-scroll {
  min-height: 0;
  padding: 8px 8px 12px;
  overflow-x: hidden;
}

.crm-sidebar-footer {
  background: #ffffff;
}

.sidebar-header {
  display: none;
}

.nav {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-right: 2px;
}

.nav-group {
  display: grid;
  gap: 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav-label {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
}

.nav-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item,
.nav-subitem {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.nav-item:hover,
.nav-subitem:hover {
  background: #f3f4f6;
  color: #111827;
  transform: none;
}

.nav-item.has-submenu {
  justify-content: space-between;
}

.nav-item.active {
  color: #4338ca;
  background: #eef2ff;
  border-color: #c7d2fe;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.08);
}

.nav-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-group.open .nav-arrow {
  color: #4f46e5;
  transform: rotate(90deg);
}

.nav-submenu {
  display: grid;
  gap: 6px;
  max-height: 0;
  margin-left: 18px;
  padding-left: 12px;
  overflow: hidden;
  border-left: 1px dashed #e5e7eb;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 0.24s ease,
    opacity 0.18s ease,
    transform 0.18s ease,
    padding-top 0.18s ease;
}

.nav-group.open .nav-submenu {
  max-height: 520px;
  padding-top: 6px;
  opacity: 1;
  transform: translateY(0);
}

.nav-subitem {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.nav-subitem span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-subitem.active {
  color: #4338ca;
  background: #eef2ff;
  border-color: #c7d2fe;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.07);
}

.nav-item.is-disabled,
.nav-subitem.is-disabled {
  cursor: default;
  opacity: 0.52;
  transform: none;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.menu-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.crm-sidebar-toggle {
  display: none;
}

.crm-page-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.sidebar-backdrop {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .nav-subitem,
  .nav-arrow,
  .nav-submenu,
  .menu-btn,
  .crm-sidebar,
  .sidebar-backdrop {
    transition: none;
  }
}

@media (max-width: 960px) {
  .crm-sidebar {
    width: min(86vw, 320px);
    max-width: 100vw;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
  }

  .sidebar-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 14px 0;
    background: #ffffff;
  }

  .crm-sidebar-brand {
    padding: 18px 20px 12px;
  }

  .crm-sidebar-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .crm-main {
    margin-left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.sidebar-open,
  html.sidebar-open body {
    overflow: hidden;
  }

  body.sidebar-open .crm-sidebar,
  html.sidebar-open .crm-sidebar,
  .crm-sidebar.is-open {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop,
  html.sidebar-open .sidebar-backdrop,
  .sidebar-backdrop.is-active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 720px) {
  .crm-page-heading {
    align-items: flex-start;
  }
}

.app-hub-page {
  display: grid;
  gap: 24px;
}

.shipping-page {
  display: grid;
}

.shipping-card {
  display: grid;
  gap: 18px;
}

.shipping-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto;
  gap: 14px;
  align-items: end;
}

.shipping-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.shipping-select,
.shipping-input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #d4dbe7;
  border-radius: 12px;
  background: #fff;
  padding: 0 14px;
  color: #0f172a;
  font-size: 14px;
}

.shipping-product-picker {
  position: relative;
}

.shipping-product-input {
  padding-right: 40px;
}

.shipping-product-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #d4dbe7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.shipping-product-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  color: #0f172a;
  font-size: 14px;
  cursor: pointer;
}

.shipping-product-option:hover,
.shipping-product-option.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.shipping-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #475569;
  font-size: 14px;
}

.shipping-table-card {
  overflow: visible;
}

.shipping-table-card .table-ui-scroll {
  overflow: visible;
}

.shipping-add-line-wrap {
  display: flex;
  justify-content: flex-start;
  padding: 14px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, #f8fafc 100%);
}

.shipping-add-line-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-style: dashed;
  border-width: 1px;
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.shipping-add-line-btn:hover {
  background: #dbeafe;
}

.shipping-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.shipping-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.shipping-summary {
  margin-left: auto;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .shipping-grid {
    grid-template-columns: 1fr;
  }

  .shipping-footer {
    align-items: stretch;
  }

  .shipping-summary {
    margin-left: 0;
  }
}

.app-hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff8ef 0%, #eef7ff 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.app-hub-hero-copy h2 {
  margin: 8px 0 10px;
  color: #111827;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
}

.app-hub-hero-copy p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.6;
}

.app-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-hub-hero-side {
  display: grid;
  gap: 12px;
}

.app-hub-stat {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.app-hub-stat strong {
  display: block;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.app-hub-stat span {
  display: block;
  margin-top: 8px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.4;
}

.app-hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.app-hub-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.production-connect-page {
  display: grid;
  gap: 16px;
}

.production-connect-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
}

.production-connect-copy {
  min-width: 0;
}

.production-connect-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.production-connect-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.production-connect-copy h2 {
  margin: 8px 0 6px;
  color: #111827;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
}

.production-connect-copy p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.55;
}

.production-connect-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.production-connect-meta span {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-connect-actions {
  display: flex;
  justify-content: flex-end;
}

.production-open-btn {
  min-width: 210px;
}

.production-app-runtime {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f2f2f7;
  box-shadow: none;
}

.production-app-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #f2f2f7;
}

.crm-main-production {
  background: #f2f2f7;
}

.administration-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.administration-status-active {
  background: #dcfce7;
  color: #166534;
}

.administration-status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.production-page-shell {
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}

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

.production-menu-card {
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.05);
}

.production-menu-card h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.production-menu-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.production-menu-card-action {
  align-self: end;
  justify-self: start;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.production-target-missing {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
  font-size: 14px;
  line-height: 1.45;
}

.production-target-missing strong,
.production-target-missing span {
  display: block;
}

.production-live-frame-wrap {
  min-height: 620px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
}

.production-live-frame {
  display: block;
  width: 100%;
  min-height: 620px;
  border: 0;
  background: #ffffff;
}

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

.app-admin-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.app-admin-card h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.app-admin-card p {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.55;
}

.app-hub-note {
  padding: 20px 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #4b5563;
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .app-hub-hero,
  .app-admin-grid {
    grid-template-columns: 1fr;
  }

  .production-connect-panel {
    grid-template-columns: 1fr;
  }

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

  .production-connect-actions {
    justify-content: flex-start;
  }
}

.admin-success-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  min-width: 360px;
  max-width: min(92vw, 900px);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(22, 101, 52, 0.18);
}

.admin-login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  background: #f3f4f6;
  padding: 20px;
}

.admin-login-card {
  width: min(420px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.admin-login-logo-wrap {
  display: flex;
  justify-content: center;
}

.admin-login-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.24);
}

.admin-login-title {
  margin: 14px 0 0;
  text-align: center;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0;
}

.admin-login-subtitle {
  margin: 8px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 15px;
  line-height: 1.35;
}

.admin-login-form {
  margin-top: 20px;
}

.admin-login-label {
  display: block;
  margin: 0 0 6px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}

.admin-login-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 11px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  margin-bottom: 14px;
}

.admin-login-input-wrap:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.admin-login-input-icon {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}

.admin-login-input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.25;
  background: transparent;
  min-width: 0;
}

.admin-login-input::placeholder {
  color: #94a3b8;
}

.admin-login-input-password {
  padding-right: 8px;
}

.admin-login-password-toggle {
  border: 0;
  background: transparent;
  color: #9ca3af;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.admin-login-password-toggle:hover {
  color: #6366f1;
}

.admin-login-toggle-icon {
  width: 16px;
  height: 16px;
}

.admin-login-submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  background: linear-gradient(90deg, #4f46e5, #4f46e5);
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.admin-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.25);
}

.admin-login-submit:active {
  transform: translateY(0);
}

.admin-login-submit.is-loading,
.admin-login-submit:disabled {
  cursor: wait;
  opacity: 0.78;
  box-shadow: none;
  transform: none;
}

.admin-login-footer {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}


@media (max-width: 1200px) {
  .admin-login-card {
    width: min(400px, calc(100vw - 32px));
    padding: 22px;
  }

  .admin-login-title {
    font-size: 27px;
  }

  .admin-login-subtitle {
    font-size: 15px;
  }

  .admin-login-label {
    font-size: 14px;
  }

  .admin-login-input {
    font-size: 14px;
  }

  .admin-login-submit {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .admin-error-banner {
    min-width: auto;
    width: calc(100vw - 24px);
    top: 12px;
  }

  .admin-success-banner {
    min-width: auto;
    width: calc(100vw - 24px);
    top: 12px;
  }

  .admin-login-page {
    gap: 16px;
    padding: 12px;
  }

  .admin-login-card {
    width: 100%;
    border-radius: 12px;
    padding: 20px 16px;
  }

  .admin-login-logo {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 23px;
  }

  .admin-login-title {
    margin-top: 12px;
    font-size: 26px;
  }

  .admin-login-subtitle {
    font-size: 14px;
    margin-top: 8px;
  }

  .admin-login-form {
    margin-top: 18px;
  }

  .admin-login-label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .admin-login-input-wrap {
    min-height: 42px;
    margin-bottom: 12px;
  }

  .admin-login-input {
    font-size: 14px;
  }

  .admin-login-submit {
    min-height: 44px;
    font-size: 15px;
  }

}

