/* Ecom Manager PWA visual refresh: shared presentation only. */
:root {
  --ecm-ink: #172b4d;
  --ecm-muted: #718096;
  --ecm-brand: #2563eb;
  --ecm-line: #e6ebf2;
  --ecm-canvas: #f4f7fb;
  --ecm-soft: #f8fafd;
  --ecm-radius: 18px;
}

body:not(.dark-mode-active) {
  color: var(--ecm-ink);
  background: var(--ecm-canvas);
}

body.bg-white:not(.dark-mode-active) {
  background: radial-gradient(ellipse at 50% 0%, #eaf2ff 0, #f4f7fb 48%, #f4f7fb 100%) !important;
}

body:not(.dark-mode-active) .appHeader,
body:not(.dark-mode-active) .appHeader.bg-primary,
body:not(.dark-mode-active) .appHeader.scrolled.bg-primary {
  min-height: 60px;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--ecm-ink);
  border-bottom: 1px solid rgba(230, 235, 242, .9);
  box-shadow: 0 5px 20px rgba(23, 43, 77, .055);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

body:not(.dark-mode-active) .appHeader:before {
  background: #fff;
}

body:not(.dark-mode-active) .appHeader .pageTitle,
body:not(.dark-mode-active) .appHeader .headerButton,
body:not(.dark-mode-active) .appHeader.scrolled.bg-primary .headerButton {
  color: var(--ecm-ink);
}

body:not(.dark-mode-active) .appHeader.scrolled .pageTitle {
  opacity: 1;
}

body:not(.dark-mode-active) #appCapsule {
  width: 100%;
  max-width: 1120px;
  margin: env(safe-area-inset-top) auto 0;
  padding: 76px 0 36px;
}

body:not(.dark-mode-active) .section {
  padding-right: 16px;
  padding-left: 16px;
}

body:not(.dark-mode-active) .card {
  overflow: hidden;
  border: 1px solid var(--ecm-line);
  border-radius: var(--ecm-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 43, 77, .045);
}

body:not(.dark-mode-active) .card .card-body {
  padding: 22px;
  line-height: 1.5;
}

body:not(.dark-mode-active) .card .card-title {
  margin-bottom: 8px;
  color: var(--ecm-ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.025em;
}

body:not(.dark-mode-active) .card .card-subtitle {
  margin-bottom: 6px;
  color: var(--ecm-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
}

body:not(.dark-mode-active) .form-control,
body:not(.dark-mode-active) textarea,
body:not(.dark-mode-active) select.form-control {
  min-height: 48px;
  border: 1px solid var(--ecm-line);
  border-radius: 12px;
  background-color: var(--ecm-soft);
  color: var(--ecm-ink);
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

body:not(.dark-mode-active) .form-label,
body:not(.dark-mode-active) .form-group .form-label {
  margin-bottom: 7px;
  color: #53657f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

body:not(.dark-mode-active) .form-control::placeholder,
body:not(.dark-mode-active) textarea::placeholder {
  color: #98a5b7;
  opacity: 1;
}

body:not(.dark-mode-active) .form-select {
  min-height: 48px;
  border-color: var(--ecm-line);
  border-radius: 12px;
  background-color: var(--ecm-soft);
  color: var(--ecm-ink);
}

body:not(.dark-mode-active) .form-control:focus,
body:not(.dark-mode-active) textarea:focus,
body:not(.dark-mode-active) select.form-control:focus {
  border-color: #8bb4ff;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

body:not(.dark-mode-active) .btn-primary {
  border-color: var(--ecm-brand);
  border-radius: 12px;
  background: var(--ecm-brand);
  box-shadow: 0 5px 12px rgba(37, 99, 235, .16);
  font-weight: 650;
}

body:not(.dark-mode-active) .btn-primary:hover,
body:not(.dark-mode-active) .btn-primary:focus {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

body:not(.dark-mode-active) .btn:not(.btn-primary) {
  border-radius: 12px;
  font-weight: 600;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

body:not(.dark-mode-active) .btn-outline-primary {
  border-color: #b9cdf1;
  color: var(--ecm-brand);
}

body:not(.dark-mode-active) .btn-outline-primary:hover,
body:not(.dark-mode-active) .btn-outline-primary:focus {
  border-color: var(--ecm-brand);
  background: #eef4ff;
  color: #1d4ed8;
}

body:not(.dark-mode-active) .form-check-input:checked {
  border-color: var(--ecm-brand);
  background-color: var(--ecm-brand);
}

body:not(.dark-mode-active) input[type="checkbox"],
body:not(.dark-mode-active) input[type="radio"] {
  accent-color: var(--ecm-brand);
}

body:not(.dark-mode-active) .table {
  color: var(--ecm-ink);
}

body:not(.dark-mode-active) .table thead th {
  border-bottom-color: var(--ecm-line);
  color: var(--ecm-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body:not(.dark-mode-active) .table-responsive {
  border-radius: 12px;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

body:not(.dark-mode-active) .table-responsive::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

body:not(.dark-mode-active) .table-responsive::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #cbd5e1;
}

body:not(.dark-mode-active) .table tbody td {
  vertical-align: middle;
  border-bottom-color: #edf1f6;
}

body:not(.dark-mode-active) .listview > li:not(:last-child) {
  border-bottom-color: #edf1f6;
}

body:not(.dark-mode-active) .form-button-group {
  border-top: 1px solid rgba(230, 235, 242, .9);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -6px 20px rgba(23, 43, 77, .045);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

body:not(.dark-mode-active) .form-button-group .btn {
  min-height: 50px;
  border-radius: 12px;
}

body:not(.dark-mode-active) .appFooter {
  border-top: 1px solid var(--ecm-line);
  background: transparent;
}

body:not(.dark-mode-active) .appFooter .footer-title {
  color: #8793a5;
}

/* Login */
body.bg-white:not(.dark-mode-active) #appCapsule {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 560px;
  min-height: 100vh;
  padding: 28px 16px;
}

body.bg-white:not(.dark-mode-active) .login-form {
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 28px 28px 24px;
  border: 1px solid rgba(230, 235, 242, .95);
  border-radius: 26px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 70px rgba(23, 43, 77, .1);
}

body.bg-white:not(.dark-mode-active) .login-form > .section:first-of-type {
  margin: 0 0 18px !important;
  padding: 0;
}

body.bg-white:not(.dark-mode-active) .login-form .form-image {
  width: 176px;
  max-width: 66%;
}

body.bg-white:not(.dark-mode-active) .login-form h1 {
  margin: 0 0 8px;
  color: var(--ecm-ink);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.04em;
}

body.bg-white:not(.dark-mode-active) .login-form h4 {
  max-width: 330px;
  margin: 0 auto 20px;
  color: var(--ecm-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

body.bg-white:not(.dark-mode-active) .login-form .form-group {
  margin-bottom: 12px;
}

body.bg-white:not(.dark-mode-active) .login-form .form-control {
  min-height: 52px;
  padding: 0 15px;
  border-radius: 13px;
  background: #f8fafd;
}

body.bg-white:not(.dark-mode-active) .form-button-group {
  position: static;
  min-height: 0;
  margin-top: 18px;
  padding: 0;
  background: transparent;
}

body.bg-white:not(.dark-mode-active) .form-button-group .btn {
  min-height: 52px;
  border-radius: 13px;
  font-size: 15px;
}

/* Dashboard order summary */
body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card-text {
  display: none;
}

body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--ecm-line);
  border-radius: 14px;
  background: var(--ecm-soft);
  text-align: center;
}

body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col > div > span {
  display: inline-block;
  margin-bottom: 4px;
  font-size: clamp(30px, 7vw, 42px) !important;
  font-weight: 750 !important;
  line-height: 1.1;
}

body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col strong,
body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col {
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 575.98px) {
  body:not(.dark-mode-active) #appCapsule {
    padding-top: 72px;
  }

  body.bg-white:not(.dark-mode-active) #appCapsule {
    padding: 20px 14px;
  }

  body.bg-white:not(.dark-mode-active) .login-form {
    padding: 24px 20px 22px;
    border-radius: 22px;
  }

  body:not(.dark-mode-active) .card .card-body {
    padding: 18px;
  }

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

  .asc-seg {
    margin-top: 8px;
  }

  body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
  }

  body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col {
    flex: 0 0 auto;
    width: 100%;
    padding: 12px 14px !important;
    text-align: left;
  }

  body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col > div {
    min-height: 38px;
    text-align: left;
  }

  body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col > div > span {
    float: left;
    width: 48px;
    margin: 0 12px 0 0;
    text-align: left;
  }

  body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col br {
    display: none;
  }

  body.ecm-dashboard:not(.dark-mode-active) #appCapsule > .section:first-of-type .card .card-body > .row > .col:first-child strong {
    margin-right: 4px;
  }
}

body.bg-white:not(.dark-mode-active) #appCapsule {
  display: grid;
  place-items: center;
}

body.bg-white:not(.dark-mode-active) .login-form > .section:first-of-type br {
  display: none;
}
