:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#071b35;background:#f3f6fa;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}.sidebar{position:fixed;inset:0 auto 0 0;width:255px;background:#081b33;color:#fff;padding:22px 16px;z-index:2}.brand{display:flex;align-items:center;gap:12px;padding:0 8px}.brand strong{display:block;font-size:20px}.brand small{display:block;color:#8fc9e9;margin-top:3px}.logo{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#338bc1;font-size:18px;font-weight:800}.workspace,.policy{border:1px solid #ffffff18;background:#ffffff0d;border-radius:16px;padding:14px}.workspace{margin-top:34px}.workspace small{display:block;color:#75b6d9;letter-spacing:.16em;font-size:10px}.workspace b{display:block;margin-top:8px;font-size:14px}.sidebar nav{display:grid;gap:5px;margin-top:18px}.sidebar nav a{display:flex;gap:12px;padding:12px;border-radius:12px;color:#a9bed2;font-size:14px}.sidebar nav a.active{color:#fff;background:#338bc1;font-weight:700}.policy{position:absolute;bottom:22px;left:16px;right:16px}.policy b{color:#61b5e7;font-size:12px}.policy p{color:#9bb2c7;font-size:12px;line-height:1.6;margin:9px 0 0}main{margin-left:255px}header{height:68px;background:#fff;border-bottom:1px solid #d8e2ec;padding:0 30px;display:flex;align-items:center;justify-content:space-between}header b,header small{display:block}header small{color:#60738b;margin-top:3px}.header-actions{display:flex;align-items:center;gap:12px}button{border:1px solid #ccd9e6;background:#fff;color:#173451;padding:10px 15px;border-radius:11px;font-weight:700}.avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#338bc1;color:#fff;font-weight:800}.page{padding:30px;max-width:1600px;margin:auto}.title-row{display:flex;justify-content:space-between;align-items:end;gap:20px}.eyebrow{color:#247eb3;font!important;font-weight:800;letter-spacing:.16em}.title-row h1{font-size:36px;letter-spacing:-.04em;margin:8px 0}.title-row p,.panel-head p{margin:0;color:#60738b}.status{padding:9px 13px;border-radius:999px;font-size:12px;font-weight:800}.status.loading{background:#eaf4fb;color:#247eb3}.status.ok{background:#e8f8f0;color:#137a56}.status.error{background:#fff0f0;color:#c83e3e}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:25px 0}.kpis article,.panel{background:#fff;border:1px solid #d8e2ec;border-radius:18px;box-shadow:0 6px 20px #071b350a}.kpis article{padding:20px}.kpis span,.kpis small{display:block;color:#60738b}.kpis strong{display:block;font-size:30px;margin:9px 0}.kpis small{font-size:12px}.grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px}.panel{overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid #e3eaf1}.panel-head h2{font-size:18px;margin:0 0 5px}.panel-head>span{color:#718398;font-size:12px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:770px}th{padding:13px 18px;background:#f7f9fc;text-align:left;color:#718398;font-size:11px;letter-spacing:.08em}td{border-top:1px solid #e8edf3;padding:16px 18px;font-size:14px}td b{display:block}td small{display:block;color:#718398;margin-top:5px}.pill,.badge{display:inline-block;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800}.green{background:#e8f8f0;color:#137a56}.amber{background:#fff5df;color:#94610d}.blue{background:#eaf4fb;color:#247eb3}.red{background:#fff0f0;color:#c83e3e}.right-column{display:grid;gap:18px}.alerts article{padding:16px 20px;border-top:1px solid #e8edf3}.alerts article:first-child{border-top:0}.alerts b{font-size:13px}.alerts p{font-size:12px;color:#718398;line-height:1.55;margin:6px 0}.alerts small{color:#98a6b6}.health{background:#081b33;color:#fff;border-radius:18px;padding:20px}.health small{color:#79badf;letter-spacing:.15em}.health b{display:block;font-size:20px;margin:10px 0 18px}.signal{display:flex;justify-content:space-between;border-top:1px solid #ffffff14;padding:12px 0;font-size:13px}.signal span:first-child:before{content:"";display:inline-block;width:8px;height:8px;background:#43ce8b;border-radius:50%;margin-right:8px}.signal span:last-child{color:#91a9bd}.health>p{font-size:11px;color:#91a9bd;margin:12px 0 0}.empty{text-align:center!important;color:#718398;padding:30px!important}@media(max-width:1100px){.grid{grid-template-columns:1fr}.kpis{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.sidebar{display:none}main{margin-left:0}.page{padding:20px}.title-row{align-items:start;flex-direction:column}.title-row h1{font-size:30px}.kpis{grid-template-columns:1fr 1fr}header{padding:0 20px}}@media(max-width:480px){.kpis{grid-template-columns:1fr}}

/* =====================================================
   DeciNexa AgriTrade identity and access experience
   ===================================================== */

.session-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 18px;
  border-left: 1px solid #dbe3ef;
}

.session-identity {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.session-identity small {
  color: #8491a7;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.session-identity strong {
  margin-top: 2px;
  color: #142039;
  font-size: 12px;
}

.logout-button {
  min-height: 34px;
  padding: 0 13px;
  color: #34415a;
  background: #fff;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.logout-button:hover {
  color: #fff;
  background: #193fb9;
  border-color: #193fb9;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(420px, 1fr);
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 60px max(5vw, 30px);
  color: #f8fbff;
  background:
    radial-gradient(circle at 78% 30%, rgba(43, 129, 255, .28), transparent 30%),
    radial-gradient(circle at 90% 70%, rgba(104, 70, 246, .22), transparent 30%),
    linear-gradient(125deg, #020918, #071a37 54%, #111744);
}

.auth-card {
  padding: 54px;
  color: #111b31;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 22px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .46);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 56px;
}

.auth-brand-mark {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #22c7f4, #286df1 52%, #6545f5);
  border-radius: 12px;
  font-size: 25px;
  font-weight: 900;
}

.auth-brand div {
  display: flex;
  flex-direction: column;
}

.auth-brand strong {
  font-size: 22px;
  letter-spacing: -.03em;
}

.auth-brand small {
  margin-top: 3px;
  color: #65718a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .19em;
}

.auth-code {
  display: inline-flex;
  padding: 7px 11px;
  color: #255dd4;
  background: #eaf2ff;
  border: 1px solid #ccddfb;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
}

.auth-card h1 {
  max-width: 510px;
  margin: 22px 0 15px;
  color: #101a30;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.auth-card > p {
  max-width: 530px;
  margin: 0;
  color: #65718a;
  font-size: 16px;
  line-height: 1.65;
}

.auth-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 34px 0;
}

.auth-details div {
  padding: 14px;
  background: #f4f7fc;
  border: 1px solid #e0e6f0;
  border-radius: 10px;
}

.auth-details dt {
  color: #75829a;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-details dd {
  margin: 7px 0 0;
  color: #15223d;
  font-size: 12px;
  font-weight: 750;
}

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

.auth-actions a,
.auth-actions button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.auth-actions a {
  color: white;
  background: linear-gradient(110deg, #275fe8, #6749f6);
}

.auth-actions button {
  color: #33415d;
  background: #fff;
  border: 1px solid #d5deeb;
}

.auth-reference {
  display: block;
  margin-top: 28px;
  color: #8994a8;
}

.auth-visual {
  max-width: 580px;
  margin: auto;
  text-align: center;
}

.auth-shield {
  display: grid;
  width: 220px;
  height: 260px;
  margin: auto;
  place-items: center;
  background:
    linear-gradient(150deg, rgba(37, 170, 255, .86), rgba(79, 61, 222, .9));
  border: 2px solid rgba(106, 215, 255, .78);
  border-radius: 48% 48% 45% 45% / 30% 30% 60% 60%;
  box-shadow: 0 0 90px rgba(53, 112, 255, .42);
}

.auth-shield span {
  font-size: 92px;
  font-weight: 200;
}

.auth-visual h2 {
  margin: 36px 0 12px;
  font-size: 30px;
}

.auth-visual p {
  max-width: 480px;
  margin: auto;
  color: #adbad1;
  line-height: 1.65;
}

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

  .auth-visual {
    display: none;
  }

  .session-identity {
    display: none;
  }
}

@media (max-width: 600px) {
  .auth-screen {
    padding: 0;
  }

  .auth-card {
    min-height: 100vh;
    padding: 38px 24px;
    border-radius: 0;
  }

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

  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* AgriTrade enterprise error pages */

.workspace-error .auth-card {
  position: relative;
  overflow: hidden;
}

.workspace-error .auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 190px;
  height: 190px;
  background: radial-gradient(
    circle at 100% 0,
    rgba(40, 112, 244, 0.13),
    transparent 70%
  );
  pointer-events: none;
}

.requested-resource {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -15px 0 30px;
  padding: 14px 16px;
  background: #f4f7fc;
  border: 1px solid #e0e7f1;
  border-radius: 9px;
}

.requested-resource small {
  color: #78869e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.requested-resource code {
  overflow-wrap: anywhere;
  color: #1b2c50;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.auth-actions .error-primary {
  color: #fff;
  background: linear-gradient(110deg, #2868ed, #6549f5);
  border: 0;
  box-shadow: 0 10px 25px rgba(43, 83, 215, 0.25);
}

.error-shield.error-403 {
  background: linear-gradient(150deg, #218bdc, #543bd7);
}

.error-shield.error-404 {
  background: linear-gradient(150deg, #218fda, #345be2);
}

.error-shield.error-503 {
  background: linear-gradient(150deg, #1a87c9, #6045db);
}

/* =====================================================
   Error-page viewport isolation
   Prevent dashboard main/sidebar rules from affecting
   enterprise 403, 404 and 503 pages.
   ===================================================== */

body:has(> .auth-screen) {
  overflow-x: hidden !important;
}

main.auth-screen {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 48px clamp(30px, 5vw, 88px) !important;
  overflow: hidden !important;
}

main.auth-screen > .auth-card,
main.auth-screen > .auth-visual {
  min-width: 0 !important;
}

main.auth-screen > .auth-card {
  width: 100% !important;
  max-width: 700px !important;
  margin: 0 !important;
}

main.auth-screen > .auth-visual {
  width: 100% !important;
  max-width: 580px !important;
}

main.auth-screen .auth-visual h2,
main.auth-screen .auth-visual p {
  max-width: 100% !important;
  overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
  main.auth-screen {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr) !important;
    gap: 42px !important;
    padding: 40px !important;
  }

  main.auth-screen .auth-card {
    padding: 42px !important;
  }

  main.auth-screen .auth-shield {
    width: 180px !important;
    height: 215px !important;
  }

  main.auth-screen .auth-visual h2 {
    font-size: 26px !important;
  }
}

@media (max-width: 900px) {
  main.auth-screen {
    display: flex !important;
    width: 100% !important;
    min-height: 100vh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 28px !important;
  }

  main.auth-screen > .auth-card {
    max-width: 680px !important;
  }

  main.auth-screen > .auth-visual {
    display: none !important;
  }
}

@media (max-width: 600px) {
  main.auth-screen {
    display: block !important;
    padding: 0 !important;
  }

  main.auth-screen > .auth-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    padding: 34px 22px !important;
    border-radius: 0 !important;
  }

  main.auth-screen .auth-brand {
    margin-bottom: 38px !important;
  }

  main.auth-screen .auth-card h1 {
    font-size: 38px !important;
  }
}

/* =====================================================
   Shared DeciNexa authenticated workspace treatment
   ===================================================== */

.portal-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 184px;
  margin: 34px 36px 0;
  padding: 34px 36px;
  color: #ffffff;
  background:
    linear-gradient(
      110deg,
      #153760 0%,
      #1c4d9b 48%,
      #2168e8 100%
    );
  border: 1px solid rgba(81, 153, 255, .34);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(26, 78, 173, .18);
}

.portal-welcome > div {
  min-width: 0;
}

.portal-welcome small {
  display: block;
  margin-bottom: 11px;
  color: #55a9ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
}

.portal-welcome h2 {
  margin: 0;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.portal-welcome p {
  max-width: 830px;
  margin: 19px 0 0;
  color: #e6efff;
  font-size: 15px;
  line-height: 1.55;
}

.portal-authenticated {
  flex: 0 0 auto;
  padding: 11px 16px;
  color: #e4fff3;
  background: rgba(10, 130, 103, .72);
  border: 1px solid rgba(82, 220, 173, .7);
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.portal-authenticated::before {
  content: "✓";
  margin-right: 7px;
  font-weight: 850;
}

/* Match the Financial Services primary Sign out action */

.header-actions .logout-button {
  min-height: 46px;
  padding: 0 19px;
  color: #ffffff;
  background: #2167e8;
  border: 1px solid #2167e8;
  border-radius: 9px;
  box-shadow: 0 9px 22px rgba(33, 103, 232, .2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.header-actions .logout-button:hover {
  color: #ffffff;
  background: #1858ce;
  border-color: #1858ce;
  filter: none;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .portal-welcome {
    align-items: flex-start;
    flex-direction: column;
    margin: 24px 22px 0;
    padding: 28px;
  }

  .portal-authenticated {
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  .portal-welcome {
    min-height: 0;
    margin: 18px 15px 0;
    padding: 23px 20px;
    border-radius: 14px;
  }

  .portal-welcome h2 {
    font-size: 21px;
  }

  .portal-welcome p {
    margin-top: 13px;
    font-size: 14px;
  }
}

.portal-welcome + .page {
  padding-top: 32px;
}
