* {
  box-sizing: border-box;
}

:root {
  --maroon: #7b1621;
  --orange: #d73516;
  --orange-red: #c82716;
  --amber: #ffbd2e;
  --ink: #273342;
  --muted: #566474;
  --royal: #173f87;
  --line: rgba(255, 255, 255, .44);
  --panel: rgba(255, 255, 255, .82);
  --steel: rgba(76, 85, 96, .68);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding-bottom: 28px;
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(70, 43, 42, .9), rgba(132, 85, 76, .56)),
    url("chemical-mandi-steel-lab.png") center / cover fixed;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 189, 46, .34), transparent 24%),
    linear-gradient(115deg, rgba(200, 39, 22, .34), rgba(255, 189, 46, .18) 45%, transparent 72%);
  mix-blend-mode: screen;
}

body::after {
  content: "© 2026 Chemical-Mandi. All rights reserved.";
  position: fixed;
  left: 50%;
  bottom: 8px;
  z-index: 5;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 520;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .38);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  min-height: calc(100vh - 28px);
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(360px, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: stretch;
  padding: clamp(18px, 3vw, 34px);
}

.auth-shell::after {
  content: "";
  position: absolute;
  left: clamp(130px, 24vw, 430px);
  top: calc(50% + 72px);
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  box-shadow:
    20px 0 rgba(255, 255, 255, .72),
    40px 0 rgba(255, 255, 255, .42);
  animation: cmStatusDots 1.35s ease-in-out infinite;
}

.auth-shell::before {
  content: "Chemical-Mandi\A ....Loading\A Enterprise B2B\A Chemical Procurement Platform";
  white-space: pre-line;
  display: grid;
  place-items: center;
  min-height: calc(100vh - clamp(36px, 6vw, 68px));
  border: 1px solid var(--line);
  border-radius: 28px;
  color: rgba(255, 255, 255, .94);
  text-align: center;
  font-size: clamp(20px, 3.05vw, 42px);
  font-weight: 300;
  line-height: 1.22;
  text-shadow: 0 16px 46px rgba(0, 0, 0, .34);
  background:
    linear-gradient(135deg, rgba(215, 53, 22, .42), rgba(255, 189, 46, .13)),
    url("hero-diagonal-science.png") center / cover,
    rgba(91, 70, 68, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48), 0 24px 70px rgba(13, 19, 27, .35);
  backdrop-filter: blur(12px) saturate(1.2);
  animation: cmHeartbeat 1.8s ease-in-out infinite;
}

@keyframes cmStatusDots {
  0% {
    opacity: .44;
    box-shadow:
      20px 0 rgba(255, 255, 255, .72),
      40px 0 rgba(255, 255, 255, .42);
  }

  38% {
    opacity: 1;
    box-shadow:
      20px 0 rgba(255, 255, 255, .96),
      40px 0 rgba(255, 255, 255, .62);
  }

  72% {
    opacity: .76;
    box-shadow:
      20px 0 rgba(255, 255, 255, .52),
      40px 0 rgba(255, 255, 255, .96);
  }
}

@keyframes cmHeartbeat {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  18% {
    transform: scale(1.012);
    filter: brightness(1.12);
  }

  32% {
    transform: scale(.998);
  }

  46% {
    transform: scale(1.018);
    filter: brightness(1.18);
  }

  62% {
    transform: scale(1);
  }
}

.auth-card {
  align-self: center;
  justify-self: center;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 26px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 26px 70px rgba(17, 28, 43, .28);
  backdrop-filter: blur(18px) saturate(1.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 22, 33, .45) rgba(255, 255, 255, .34);
}

.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(91, 102, 116, .16);
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  color: var(--maroon);
  font-size: 22px;
  font-weight: 560;
}

.brand small {
  color: var(--royal);
  font-size: 13px;
  font-weight: 450;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #b82918, #7b1621);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(123, 22, 33, .28);
}

.eyebrow {
  margin: 22px 0 4px;
  color: var(--orange-red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 22px;
  color: #32404f;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 320;
}

form {
  display: grid;
  gap: 2px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  color: #313d4d;
  font-size: 13px;
  font-weight: 560;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid rgba(117, 132, 152, .5);
  border-radius: 13px;
  font: inherit;
  color: #203047;
  background: rgba(255, 255, 255, .88);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(230, 75, 22, .7);
  box-shadow: 0 0 0 4px rgba(249, 191, 45, .18);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.captcha-view {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
}

.captcha-view img {
  width: 158px;
  height: 52px;
  border: 1px solid rgba(117, 132, 152, .55);
  border-radius: 12px;
  background: #fff;
}

.actions,
.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.links {
  justify-content: space-between;
  margin-top: 16px;
}

.primary,
.secondary {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 11px 17px;
  font-weight: 720;
  cursor: pointer;
  text-decoration: none;
}

.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--orange-red), var(--orange) 48%, var(--amber));
  box-shadow: 0 14px 28px rgba(200, 39, 22, .28);
}

.secondary {
  color: #273342;
  background: rgba(232, 237, 245, .9);
  border: 1px solid rgba(117, 132, 152, .26);
}

.links a {
  color: var(--royal);
  text-decoration: none;
  font-weight: 650;
}

.message {
  min-height: 24px;
  margin: 2px 0 12px;
  font-weight: 680;
}

.success {
  color: #137333;
}

.error {
  color: #b42318;
}

.hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #4f5d6e;
}

.choice {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}

.choice label {
  flex-direction: row;
  align-items: center;
  margin: 0;
}

.choice input {
  width: auto;
  min-height: auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 44px);
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(255, 255, 255, .54);
  backdrop-filter: blur(18px);
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .62)),
    url("chemical-mandi-steel-lab.png") center / cover fixed;
}

.app-shell::after {
  color: rgba(39, 51, 66, .72);
  text-shadow: none;
}

.workspace {
  width: min(1120px, calc(100% - 36px));
  margin: 34px auto;
  display: grid;
  gap: 18px;
}

.workspace-card {
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 20px 55px rgba(35, 48, 64, .16);
  backdrop-filter: blur(16px);
}

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

.metric {
  min-height: 120px;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(200, 39, 22, .14), rgba(255, 189, 46, .18), rgba(255, 255, 255, .78));
  border: 1px solid rgba(200, 39, 22, .18);
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: var(--maroon);
  font-size: 28px;
  font-weight: 560;
}

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

  .auth-shell::before {
    min-height: 220px;
    font-size: clamp(18px, 5.4vw, 30px);
  }

  .auth-shell::after {
    left: calc(50% - 24px);
    top: 148px;
  }

  .auth-card {
    max-height: none;
  }

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

@media (max-width: 680px) {
  .grid,
  .captcha-row {
    grid-template-columns: 1fr;
  }

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

  .auth-shell {
    padding: 14px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 22px;
  }
}

.reference-login {
  background:
    linear-gradient(90deg, rgba(220, 49, 20, .94) 0%, rgba(238, 83, 28, .74) 28%, rgba(255, 188, 74, .42) 58%, rgba(255, 246, 218, .9) 100%),
    url("chemical-mandi-steel-lab.png") center / cover fixed;
  color: #233041;
}

.reference-login::before {
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 210, 82, .34), transparent 27%),
    linear-gradient(90deg, rgba(185, 27, 18, .38), rgba(255, 189, 46, .16) 54%, rgba(255, 255, 255, .08));
  mix-blend-mode: soft-light;
}

.reference-login::after {
  content: "\00A9\20 2026 Chemical-Mandi. All rights reserved.";
  color: rgba(77, 57, 49, .78);
  text-shadow: none;
}

.site-header {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
  padding: 14px clamp(18px, 4vw, 46px);
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 14px 38px rgba(120, 67, 41, .12);
  backdrop-filter: blur(18px) saturate(1.2);
}

.site-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 258px;
  text-decoration: none;
}

.site-brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.site-brand strong {
  color: var(--maroon);
  font-size: 21px;
  font-weight: 620;
  line-height: 1.05;
}

.site-brand small {
  color: var(--royal);
  font-size: 12px;
  line-height: 1.18;
  font-weight: 450;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  color: #344052;
  text-decoration: none;
  font-size: 13px;
  font-weight: 560;
  background: rgba(255, 255, 255, .48);
  border: 1px solid rgba(200, 39, 22, .08);
}

.site-nav a:hover {
  color: var(--orange-red);
  border-color: rgba(200, 39, 22, .22);
  background: rgba(255, 255, 255, .82);
}

.region-control {
  margin: 0;
  display: grid;
  grid-template-columns: auto 74px;
  gap: 8px;
  align-items: center;
  color: #4a5665;
  font-size: 12px;
  font-weight: 620;
}

.region-control select {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  color: var(--royal);
  font-size: 12px;
  font-weight: 720;
}

.reference-auth-page {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
}

.reference-auth-shell {
  position: relative;
  width: min(1050px, 100%);
  min-height: min(620px, calc(100vh - 150px));
  display: grid;
  grid-template-columns: minmax(280px, .88fr) minmax(360px, .92fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: stretch;
  padding: clamp(18px, 2.8vw, 34px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, .56);
  background:
    linear-gradient(115deg, rgba(190, 31, 18, .42), rgba(255, 156, 53, .24) 46%, rgba(255, 247, 224, .3)),
    linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .08)),
    rgba(88, 94, 104, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    0 30px 88px rgba(91, 43, 28, .24);
  backdrop-filter: blur(18px) saturate(1.18);
  overflow: hidden;
}

.reference-auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .22), transparent 22%),
    linear-gradient(100deg, rgba(255, 255, 255, .22), transparent 34%, rgba(200, 39, 22, .1) 68%, transparent);
}

.reference-auth-shell > * {
  position: relative;
  z-index: 1;
}

.account-brand-loader {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 24px;
  color: rgba(255, 255, 255, .96);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(200, 39, 22, .58), rgba(255, 189, 46, .17)),
    url("hero-diagonal-science.png") center / cover,
    rgba(96, 77, 74, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .44), 0 18px 46px rgba(111, 53, 35, .18);
  backdrop-filter: blur(14px) saturate(1.2);
  animation: cmHeartbeat 1.8s ease-in-out infinite;
}

.account-brand-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .28), transparent 36%, rgba(255, 255, 255, .1) 70%, transparent),
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .2), transparent 28%);
  pointer-events: none;
}

.loader-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #b82918, #7b1621);
  font-size: 22px;
  font-weight: 850;
  box-shadow: 0 18px 32px rgba(58, 22, 15, .3);
}

.account-brand-loader h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, .98);
  font-size: clamp(25px, 3vw, 40px);
  font-weight: 340;
  text-shadow: 0 12px 34px rgba(0, 0, 0, .34);
}

.account-brand-loader p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(18px, 2vw, 27px);
  font-weight: 320;
}

.loading-dots {
  display: inline-block;
  min-width: 38px;
  text-align: left;
  animation: cmLoadingOpacity 1.2s ease-in-out infinite;
}

@keyframes cmLoadingOpacity {
  0%,
  100% {
    opacity: .36;
    letter-spacing: 0;
  }

  46% {
    opacity: 1;
    letter-spacing: 2px;
  }
}

.account-formulas {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.account-formulas span {
  padding: 9px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 16px;
  font-weight: 520;
  backdrop-filter: blur(8px);
}

.account-form-panel {
  align-self: center;
  width: min(470px, 100%);
  justify-self: center;
  padding: clamp(24px, 3vw, 34px);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 18px 48px rgba(111, 53, 35, .16);
  backdrop-filter: blur(18px) saturate(1.1);
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  color: #32404f;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 330;
}

.captcha-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.captcha-challenge {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
}

.captcha-challenge img {
  width: 144px;
  height: 50px;
  border: 1px solid rgba(117, 132, 152, .48);
  border-radius: 12px;
  background: #fff;
}

.form-actions,
.auth-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.auth-help-actions {
  justify-content: space-between;
  margin-top: 16px;
}

.auth-help-actions a {
  color: var(--royal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.reference-login .message {
  margin-top: 0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-brand,
  .site-nav {
    justify-content: center;
  }

  .region-control {
    justify-self: center;
  }

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

  .account-brand-loader {
    min-height: 250px;
  }
}

@media (max-width: 680px) {
  .captcha-field {
    grid-template-columns: 1fr;
  }

  .captcha-challenge {
    justify-content: space-between;
  }

  .account-form-panel {
    padding: 22px;
  }

  .site-nav a {
    font-size: 12px;
    min-height: 32px;
  }
}
