/*!***********************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/shell.css ***!
  \***********************************************************************************************************************************************************************************************************************************************************/
/* ===== All — Plant cost dashboard (Streamlit screenshot) ===== */
.all-dash {
  max-width: 100%;
}

.all-dash__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.all-dash__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-family: var(--font);
}

.all-dash__sub {
  margin: 0.3rem 0 0;
  color: #475569;
  font-size: 0.9rem;
}

.all-dash__updated {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
}

.all-dash__filters {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  justify-items: end;
  min-width: 200px;
}

.all-dash__select {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #94a3b8;
  background: #eef2f7;
  color: #0f172a;
  min-width: 160px;
}

.all-dash__meta {
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 600;
}

.all-dash__range {
  font-size: 0.8rem;
  color: #2563eb;
}

.all-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.all-kpi.etp-kpi {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px;
  padding: 0.85rem 0.95rem 0.55rem;
  min-height: 6.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  margin: 0;
  border-top: none;
}

.all-kpi.etp-kpi::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.07);
  pointer-events: none;
}

.all-kpi .lbl {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #475569;
}

.all-kpi .val {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.all-kpi .sub {
  margin: 0.2rem 0 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
}

.etp-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.9rem 1rem 0.85rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  margin-bottom: 0.65rem;
}

.etp-panel h3 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.etp-panel .hint {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  color: #64748b;
}

.all-dash__charts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.all-donut-wrap {
  position: relative;
}

.all-donut-center {
  position: absolute;
  left: 28%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.all-donut-center strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.all-donut-center span {
  font-size: 0.75rem;
  color: #64748b;
}

.all-dash__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 0.5rem;
}

.all-dash__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  min-height: 2.5rem;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.all-dash__radio:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.all-dash__radio input {
  accent-color: #2563eb;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .all-kpi-row,
  .all-dash__charts {
    grid-template-columns: 1fr 1fr;
  }
  .all-dash__filters {
    justify-items: start;
  }
}

@media (max-width: 700px) {
  .all-kpi-row,
  .all-dash__charts {
    grid-template-columns: 1fr;
  }
}

/* hide older stacked-card styles if present */
.all-cost-stack {
  display: none;
}

.st-layout {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
  font-family: var(--font);
}

.st-sidebar {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 0.5rem 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  flex: 0 0 252px;
  width: 252px;
  max-width: 252px;
  box-sizing: border-box;
  position: relative;
  transition: margin-left 0.28s ease, box-shadow 0.28s ease;
}

.st-layout--nav-collapsed .st-sidebar {
  margin-left: -252px;
  pointer-events: none;
}

.st-sidebar-backdrop {
  display: none;
}

.st-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  line-height: 1;
}

.st-nav-toggle:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.st-nav-toggle__chev {
  font-size: 1.35rem;
  font-weight: 600;
  transform: translateY(-1px);
}

.st-nav-toggle__bars {
  font-size: 1.05rem;
}

.st-nav-toggle--in {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-color: #e5e7eb;
  box-shadow: none;
}

.st-nav-toggle--edge {
  position: fixed;
  top: 0.8rem;
  left: 0.7rem;
  z-index: 60;
  width: 38px;
  height: 38px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .st-sidebar {
    transition: none;
  }
}

.st-brandbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.15rem 0.6rem;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0.55rem;
}

.st-brand {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

.st-brand__logo,
.st-brand img {
  display: block;
  width: 100%;
  max-width: 152px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: transparent;
}

.st-section-title {
  margin: 0.85rem 0 0.55rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font);
}

.form-grid.cols-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  max-width: 100%;
}
.form-grid.cols-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  max-width: 100%;
}
.form-grid.cols-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 0.65rem;
  gap: 0.65rem;
  max-width: 100%;
}
.form-grid.cols-8 {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-gap: 0.55rem;
  gap: 0.55rem;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .form-grid.cols-8,
  .form-grid.cols-6,
  .form-grid.cols-5,
  .form-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.st-company-brand {
  padding: 0 0.4rem 0.45rem;
  margin: 0 0 0.15rem;
  background: transparent;
}

.st-company-brand__title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-company-brand__sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.st-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.15rem 0.35rem 0.7rem;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0.4rem;
  background: transparent;
}

.st-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.st-user__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-user__role {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.st-user__company {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1d4ed8;
  margin-top: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-user__company--muted {
  color: #64748b;
  font-weight: 500;
}

.st-user__company--warn {
  color: #b45309;
  font-weight: 600;
}

.st-section-label {
  font-size: 0.92rem;
  color: #0f172a;
  font-weight: 700;
  margin: 0.9rem 0.55rem 0.3rem;
}

.st-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.58rem 0.7rem;
  margin: 1px 0;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  line-height: 1.25;
  position: relative;
}

.st-nav:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.st-nav--on {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

/* The active marker sits flush with the sidebar edge, like the reference nav. */
.st-nav--on::before {
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2563eb;
}

.st-nav__ico {
  width: 20px;
  height: 20px;
  color: #64748b;
  flex-shrink: 0;
}

.st-nav--on .st-nav__ico {
  color: #2563eb;
}

.st-nav__chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.st-nav__chev--open {
  transform: rotate(180deg);
}

.st-navrow {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.st-navrow .st-nav {
  flex: 1 1 auto;
  width: auto;
}

.st-navrow__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 6px;
  padding: 0.35rem;
  cursor: pointer;
}

.st-navrow__chev:hover {
  background: #f1f5f9;
  color: #334155;
}

.st-navrow__chev .st-nav__chev {
  margin-left: 0;
}

.st-subnav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0.1rem 0 0.4rem;
  padding-left: 1.9rem;
}

.st-subnav__item {
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: #64748b;
  padding: 0.42rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.st-subnav__item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.st-subnav__item--on {
  color: #1d4ed8;
  font-weight: 700;
}

.st-sidebar__foot {
  margin-top: auto;
  padding: 0.6rem 0.15rem 0.15rem;
  border-top: 1px solid #eef2f7;
}

.st-logout {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  background: transparent;
  border: none;
  color: #334155;
  text-align: left;
  padding: 0.15rem 0.4rem;
  line-height: 1.2;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.st-logout:hover {
  color: #2563eb;
}

.st-logout .st-nav__ico {
  color: inherit;
}

.st-main {
  padding: 1.1rem 1.15rem 2rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  flex: 1 1 auto;
  background: #f1f5f9;
  font-family: var(--font);
}

.st-layout--nav-collapsed .st-main {
  padding-left: 3.5rem;
}

.st-h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-family: var(--font);
  line-height: 1.25;
}

.st-sub {
  margin: 0.25rem 0 0.85rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.4;
}

.st-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  margin-bottom: 0.85rem;
}

.etp-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.85rem 0.95rem 0.55rem;
  min-height: 6.5rem;
  border-left: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  margin: 0 0 0.65rem;
}

.etp-kpi .lbl {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.etp-kpi .val {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.etp-kpi .sub {
  margin: 0.2rem 0 0.15rem;
  font-size: 0.72rem;
  color: #475569;
}

.etp-kpi-grid {
  display: grid;
  grid-gap: 0.65rem;
  gap: 0.65rem;
  margin: 0.35rem 0 0.85rem;
}

@media (max-width: 1100px) {
  .etp-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 1100px) {
  .st-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    height: 100vh;
    margin-left: 0;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.16);
  }

  .st-layout--nav-collapsed .st-sidebar {
    margin-left: -252px;
    box-shadow: none;
  }

  .st-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.38);
    cursor: pointer;
  }
}

.page-head {
  margin-bottom: 0.85rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--heading);
}

.page-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sa-section-title {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
}

.sa-section-cap {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 52rem;
}

.sa-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
}

.sa-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: -1px;
  border-radius: 0;
  white-space: nowrap;
}

.sa-tab:hover {
  color: var(--primary);
}

.sa-tab--on {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.sa-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
}

.sa-card h4 {
  margin: 0 0 0.35rem;
  color: var(--heading);
  font-size: 1rem;
}

.sa-card > p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.sa-table-wrap {
  overflow: auto;
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--text);
}

.sa-table th {
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.sa-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sa-id {
  font-size: 0.72rem;
  opacity: 0.7;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sa-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 700;
}

.sa-pill--bad {
  background: rgba(239, 68, 68, 0.15);
  color: var(--bad);
}

.sa-pill--warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warn);
}

.btn--block {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}

.btn--sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn--ghost {
  background: #fff;
  color: var(--primary, #2563eb);
  border: 1px solid var(--primary, #2563eb);
}

.sa-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sa-card__row h4 {
  margin: 0 0 0.35rem;
}

.sa-card__row > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sa-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.sa-modal {
  width: min(520px, 100%);
  max-height: min(90vh, 840px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.sa-modal--wide {
  width: min(640px, 100%);
}

.sa-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.sa-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--heading, #0f172a);
}

.sa-modal__x {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.sa-modal__body {
  padding: 1rem 1.1rem 1.15rem;
}

.sa-modal__hint {
  margin: 0 0 0.85rem;
  color: var(--muted, #64748b);
  font-size: 0.85rem;
}

.sa-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.sa-radio-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.35rem;
  font-weight: 500;
  color: var(--text, #0f172a);
}

.sa-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.kpi__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.kpi__value {
  font-size: 1.55rem;
  font-weight: 800;
  margin-top: 0.2rem;
  color: var(--primary);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--heading);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border);
  color: var(--body);
}

table.data th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn {
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  background: #2563eb;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font);
  line-height: 1.4;
}

.btn:hover {
  background: #1d4ed8;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--ghost {
  background: #ffffff;
  color: #334155 !important;
  border: 1px solid #94a3b8;
  width: auto;
}

.btn--ghost:hover {
  background: #f8fafc;
  border-color: #2563eb;
  color: #2563eb !important;
}

.form-grid {
  display: grid;
  grid-gap: 0.75rem;
  gap: 0.75rem;
  max-width: 100%;
  align-items: start;
}

.form-grid.wide {
  max-width: 100%;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

/* Select + action button on one baseline (Edit Tower, etc.) */
.edit-tower-pick {
  display: grid;
  grid-template-columns: minmax(0, 220px) auto;
  grid-gap: 0.75rem;
  gap: 0.75rem;
  align-items: end;
  max-width: 420px;
  margin-bottom: 12px;
}

.edit-tower-pick label {
  display: grid;
  grid-gap: 0.3rem;
  gap: 0.3rem;
  font-size: 0.875rem;
  color: #475569;
  font-weight: 600;
  font-family: var(--font);
  margin: 0;
}

.edit-tower-pick select {
  font: inherit;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #94a3b8;
  background: #eef2f7;
  color: #0f172a;
  min-height: 2.4rem;
  height: 2.4rem;
  width: 100%;
  box-sizing: border-box;
}

.edit-tower-pick .btn {
  height: 2.4rem;
  min-height: 2.4rem;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.form-grid label {
  display: grid;
  grid-gap: 0.3rem;
  gap: 0.3rem;
  align-content: start;
  font-size: 0.875rem;
  color: #475569;
  font-weight: 600;
  font-family: var(--font);
}

.form-grid input:not([type="radio"]):not([type="checkbox"]),
.form-grid select,
.form-grid textarea,
.st-main input:not([type="radio"]):not([type="checkbox"]),
.st-main select,
.st-main textarea {
  font: inherit;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #94a3b8;
  background: #eef2f7;
  color: #0f172a;
  min-height: 2.4rem;
  height: 2.4rem;
  width: 100%;
  box-sizing: border-box;
}

/* India DD/MM/YYYY date field (ISO value kept in React state) */
.ao-date-input {
  position: relative;
  display: block;
  width: 100%;
}

.ao-date-input > input[type="text"] {
  width: 100%;
  padding-right: 2.4rem;
  box-sizing: border-box;
}

.ao-date-input__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.ao-date-input__cal {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  border-radius: 0.35rem;
  padding: 0;
}

.ao-date-input__cal:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.25);
  color: #0f172a;
}

.ao-date-input__cal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-grid select[multiple],
.st-main select[multiple],
.product-desc-select {
  height: auto;
  min-height: 7.2rem;
  max-height: 7.2rem;
  padding: 0.35rem 0.45rem;
}

/* Streamlit Product.py: 3 columns [1,2,1] */
.product-create-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-create-cols {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  align-items: start;
}

.product-create-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.product-create-col label {
  display: grid;
  grid-gap: 0.3rem;
  gap: 0.3rem;
  align-content: start;
  font-size: 0.875rem;
  color: #475569;
  font-weight: 600;
  font-family: var(--font);
}

.product-create-col input,
.product-create-col select {
  font: inherit;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #94a3b8;
  background: #eef2f7;
  color: #0f172a;
  min-height: 2.4rem;
  height: 2.4rem;
  width: 100%;
  box-sizing: border-box;
}

.product-create-col select[multiple],
.product-create-col .product-desc-select {
  height: 7.2rem;
  min-height: 7.2rem;
  max-height: 7.2rem;
}

.product-create-submit {
  width: 100%;
}

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

.form-grid input:not([type="radio"]):not([type="checkbox"]):focus,
.form-grid select:focus,
.form-grid textarea:focus,
.st-main input:not([type="radio"]):not([type="checkbox"]):focus,
.st-main select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
  border-color: #2563eb;
  background: #ffffff;
}

.sa-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.sa-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #475569;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: -1px;
  border-radius: 0;
  white-space: nowrap;
  font-family: var(--font);
}

.sa-tab:hover {
  color: #2563eb;
}

.sa-tab--on {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: #0f172a;
  font-family: var(--font);
}

.sa-table th {
  text-align: left;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.sa-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.sa-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.sa-table tbody tr.sa-row-click {
  cursor: pointer;
}

.sa-table tbody tr.sa-row-click:hover {
  background: #eff6ff;
}

.sa-table tbody tr.sa-row-click--on {
  background: #dbeafe;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.tab--on {
  color: var(--primary);
  border-color: var(--primary);
  background: #eff6ff;
}

.err {
  color: var(--bad);
  margin: 0.5rem 0;
}

.ok {
  color: var(--ok);
}

.muted {
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  background: linear-gradient(145deg, #0c4a6e 0%, #075985 40%, #0ea5e9 100%);
}

.login-hero {
  padding: 3rem;
  color: #e0f2fe;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.75rem;
  color: #fff;
  line-height: 1.15;
}

.login-hero h1 .grad {
  background: linear-gradient(90deg, #7dd3fc, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-hero p {
  max-width: 28rem;
  opacity: 0.9;
}

.login-card-wrap {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: #f8fafc;
}

.login-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  color: #0f172a;
}

.login-card .lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.chat-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2rem);
  max-width: 920px;
}

.chat-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-gap: 0.55rem;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.chat-chip {
  text-align: left;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.chat-chip:hover:not(:disabled) {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.chat-chip:disabled {
  opacity: 0.6;
  cursor: wait;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 360px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 520px;
}

.chat-log {
  flex: 1 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  min-height: 280px;
  max-height: min(52vh, 480px);
  background: #f8fafc;
}

.chat-composer {
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 0.9rem;
  display: grid;
  grid-gap: 0.55rem;
  gap: 0.55rem;
  background: #fff;
}

.chat-form {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.chat-form input {
  flex: 1 1;
}

.chat-send {
  border-radius: 999px !important;
  min-width: 2.6rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.bubble--typing {
  opacity: 0.75;
  font-style: italic;
}

.bubble code {
  background: #e2e8f0;
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  font-size: 0.85em;
}

.admin-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.admin-new-thread {
  display: grid;
  grid-gap: 0.65rem;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.admin-new-thread label {
  display: grid;
  grid-gap: 0.3rem;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

.admin-new-thread textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  resize: vertical;
}

.admin-chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  grid-gap: 0.75rem;
  gap: 0.75rem;
  min-height: 420px;
  align-items: stretch;
}

.admin-chat-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: auto;
  max-height: min(70vh, 640px);
}

.admin-chat-list__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #94a3b8;
  padding: 0.7rem 0.85rem 0.35rem;
}

.admin-thread {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}

.admin-thread:hover {
  background: #f8fafc;
}

.admin-thread--on {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.admin-thread__sub {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
}

.admin-thread__meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.admin-thread__preview {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-thread__time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.admin-chat-pane {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
}

.admin-chat-pane__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.admin-chat-pane__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-chat-pane__head p {
  margin: 0.2rem 0 0;
}

.admin-chat-empty {
  flex: 1 1;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
  color: #475569;
}

.admin-chat-log {
  max-height: min(48vh, 420px);
}

.admin-bubble {
  max-width: 92%;
}

.admin-bubble__who {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.admin-bubble__who span {
  margin-left: auto;
}

.admin-bubble__body {
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .admin-chat-layout {
    grid-template-columns: 1fr;
  }
  .admin-chat-list {
    max-height: 220px;
  }
}

.bubble {
  max-width: 85%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.bubble--user {
  align-self: flex-end;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.bubble--bot {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--body);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.report-page {
  max-width: 1100px;
}

.report-filters {
  margin-bottom: 1.25rem;
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section__title {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.report-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem 0.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.report-panel--donut {
  min-height: 320px;
}

.report-donut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.report-donut-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem 0.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.report-donut-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #334155;
}

.report-donut-wrap {
  position: relative;
}

.report-donut-center {
  position: absolute;
  inset: 0 0 42px;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.report-donut-center strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.report-donut-center span {
  font-size: 0.75rem;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-hero {
    display: none;
  }
  .form-grid.wide {
    grid-template-columns: 1fr;
  }
  .report-donut-grid {
    grid-template-columns: 1fr;
  }
}

