@font-face { font-family: Inter; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ms-green: #008B3C;
  --ms-green-deep: #065C2E;
  --ms-green-ink: #064E28;
  --ms-green-light: #E9F7EE;
  --ms-green-mid: #CDEAD8;
  --ms-red: #E21C2A;
  --ms-red-ink: #9F1220;
  --ms-red-light: #FDECEE;
  --ms-bg: #F6F8FA;
  --ms-surface: #FFFFFF;
  --ms-text: #172B24;
  --ms-muted: #51645C;
  --ms-border: #E3EAE6;
  --ms-sidebar: 248px;
  --ms-sidebar-collapsed: 72px;
  --ms-top: 56px;
  --ms-status: 30px;
  --ms-shadow: 0 8px 24px rgba(23, 43, 36, 0.08);
  --ms-radius: 10px;
  --ms-font: Inter, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--ms-font);
  color: var(--ms-text);
  background: var(--ms-bg);
  font-size: 14px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
a { color: var(--ms-green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ms-green); outline-offset: 2px; }
.ms-skip {
  position: absolute; left: 12px; top: -40px; background: #fff; padding: 6px 10px; z-index: 100;
}
.ms-skip:focus { top: 8px; }

.ms-app { min-height: 100%; display: flex; }
.ms-sidebar {
  width: var(--ms-sidebar);
  background: var(--ms-surface);
  border-right: 1px solid var(--ms-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  flex: none;
}
.ms-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--ms-border);
}
.ms-brand picture { display: flex; flex: none; align-items: center; }
.ms-brand img { width: auto; height: 40px; max-width: 64px; object-fit: contain; }
.ms-brand strong { display: block; letter-spacing: .04em; font-size: 15px; color: var(--ms-green-ink); }
.ms-brand span { display: block; color: var(--ms-muted); font-size: 12px; }
.ms-nav { overflow: auto; padding: 10px 8px 16px; flex: 1; }
.ms-nav-group { margin-bottom: 4px; }
.ms-nav a, .ms-nav button.ms-nav-parent {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: 0; background: transparent;
  color: var(--ms-text);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  min-height: 36px;
}
.ms-nav a:hover, .ms-nav button.ms-nav-parent:hover { background: #F3F7F5; text-decoration: none; }
.ms-nav a.is-active {
  background: var(--ms-green-light);
  color: var(--ms-green-ink);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--ms-green);
}
.ms-nav .ms-ico { width: 18px; height: 18px; flex: none; }
.ms-nav .sub { margin-left: 28px; }
.ms-nav .sub a { min-height: 32px; font-size: 13px; color: var(--ms-muted); }
.ms-nav .sub a.is-active { color: var(--ms-green-ink); }
.ms-lock { margin-left: auto; font-size: 11px; color: var(--ms-muted); border: 1px solid var(--ms-border); border-radius: 999px; padding: 1px 6px; }
.ms-sidebar-foot { padding: 10px 14px 14px; color: var(--ms-muted); font-size: 11px; border-top: 1px solid var(--ms-border); }
body.is-collapsed .ms-sidebar { width: var(--ms-sidebar-collapsed); }
body.is-collapsed .ms-brand { justify-content: center; padding-left: 8px; padding-right: 8px; }
body.is-collapsed .ms-brand img { height: 34px; max-width: 52px; }
body.is-collapsed .ms-brand-text, body.is-collapsed .ms-nav span.label, body.is-collapsed .ms-lock, body.is-collapsed .ms-sidebar-foot, body.is-collapsed .sub { display: none; }
body.is-collapsed .ms-nav a, body.is-collapsed .ms-nav button.ms-nav-parent { justify-content: center; }
.ms-backdrop { display: none; }

.ms-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.ms-top {
  height: var(--ms-top);
  background: var(--ms-surface);
  border-bottom: 1px solid var(--ms-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  position: sticky; top: 0; z-index: 20;
}
.ms-top::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--ms-green) 0 92%, var(--ms-red) 92% 100%);
}
.ms-icon-btn, .btn.ms-icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--ms-border); background: #fff; color: var(--ms-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.ms-icon-btn:hover { background: var(--ms-green-light); }
.ms-search {
  flex: 1; max-width: 460px; position: relative;
}
.ms-search input {
  width: 100%; height: 36px; border: 1px solid var(--ms-border); border-radius: 8px;
  padding: 0 70px 0 34px; background: #FBFCFC;
}
.ms-search svg { position: absolute; left: 10px; top: 9px; color: var(--ms-muted); }
.ms-kbd { position: absolute; right: 8px; top: 8px; font-size: 11px; color: var(--ms-muted); border: 1px solid var(--ms-border); border-radius: 4px; padding: 1px 5px; background: #fff; }
.ms-top-title { font-weight: 650; font-size: 15px; }
.ms-branch { margin: 0; flex: 0 1 220px; min-width: 0; }
.ms-branch-select { max-width: 220px; width: 100%; height: 36px; }
.ms-top-spacer { flex: 1; }
.ms-user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px; }
.ms-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ms-green-light); color: var(--ms-green-ink); display: grid; place-items: center; font-weight: 700; }
.ms-user-meta { text-align: left; line-height: 1.15; }
.ms-user-meta small { color: var(--ms-muted); }
.ms-badge {
  position: absolute; top: -4px; right: -4px; background: var(--ms-red); color: #fff;
  border-radius: 99px; min-width: 16px; height: 16px; font-size: 10px; display: grid; place-items: center; padding: 0 4px;
}
.ms-workspace { padding: 16px 18px 24px; flex: 1; }
.ms-status {
  height: var(--ms-status); border-top: 1px solid var(--ms-border); background: #fff;
  display: flex; align-items: center; gap: 16px; padding: 0 14px; color: var(--ms-muted); font-size: 12px;
}
.ms-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ms-green); display: inline-block; }
.ms-status .dot.off { background: var(--ms-red); }

.ms-page-head, .ms-toolbar, .ms-card, .ms-kpi {
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
}
.ms-page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 12px; }
.ms-page-head h1 { font-size: 20px; margin: 0; font-weight: 650; }
.ms-page-head p { margin: 2px 0 0; color: var(--ms-muted); }
.ms-page-actions, .ms-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ms-toolbar { padding: 8px; margin-bottom: 12px; }
.ms-toolbar input, .ms-toolbar select, .form-control, .form-select {
  height: 36px; border-color: var(--ms-border); border-radius: 8px;
}
textarea.form-control { height: auto; min-height: 72px; }
.ms-toolbar input { min-width: 220px; }
.btn { border-radius: 8px; font-weight: 600; font-size: 13px; min-height: 36px; }
.btn-primary { background: var(--ms-green-deep); border-color: var(--ms-green-deep); }
.btn-primary:hover, .btn-primary:focus { background: #054C26; border-color: #054C26; }
.btn-outline-secondary { border-color: var(--ms-border); color: var(--ms-text); }
.btn-outline-secondary:hover { background: var(--ms-green-light); color: var(--ms-green-ink); border-color: var(--ms-green-mid); }
.ms-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ms-kpi { padding: 10px 12px; min-height: 78px; }
.ms-kpi span { display: block; color: var(--ms-muted); font-size: 12px; }
.ms-kpi strong { display: block; margin-top: 4px; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ms-kpi em { font-style: normal; color: var(--ms-muted); font-size: 12px; }
.ms-kpi.alert { box-shadow: inset 0 3px 0 var(--ms-red); }
.ms-kpi.good { box-shadow: inset 0 3px 0 var(--ms-green); }
a.ms-kpi { color: inherit; text-decoration: none; }
.ms-kpis-logistics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-kpis-cylinders { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-kpis-accounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-account-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ms-account-tabs .btn { min-height: 36px; }
.ms-driver-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #065C2E; color: #fff; }
.ms-driver-top a { color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.ms-driver-top span { font-size: 12px; opacity: .85; }
.ms-driver-body { padding: 16px; max-width: 760px; margin: 0 auto; }
.ms-driver-list { display: flex; flex-direction: column; gap: 12px; }
.ms-driver-card { display: block; background: #fff; border: 1px solid #E3EAE6; border-radius: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.ms-driver-card h2 { margin: 0 0 4px; font-size: 18px; color: #065C2E; }
.ms-driver-meta { margin: 0 0 6px; color: #51645C; }
.ms-driver-foot { text-align: center; color: #51645C; font-size: 12px; padding: 8px 16px 24px; }
.ms-driver-app { background: #F4F7F5; }
.ms-grid-wrap { background: #fff; border: 1px solid var(--ms-border); border-radius: var(--ms-radius); overflow: hidden; }
.ms-split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.ms-split > * { min-width: 0; }
.table-responsive { max-width: 100%; }
.ms-card { padding: 14px; }
.ms-card h2 { font-size: 15px; margin: 0 0 10px; }
.ms-list { list-style: none; margin: 0; padding: 0; }
.ms-list li { padding: 8px 0; border-bottom: 1px solid var(--ms-border); }
.ms-list li:last-child { border-bottom: 0; }
.ms-muted { color: var(--ms-muted); }
.ms-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; background: var(--ms-green-light); color: var(--ms-green-ink); }
.ms-pill.off { background: #EEF1F0; color: var(--ms-muted); }
.ms-pill.bad { background: var(--ms-red-light); color: var(--ms-red-ink); }
.ms-banner { background: #FFF8E8; border: 1px solid #F0E0B2; color: #6A5314; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.ms-empty { padding: 28px 16px; text-align: center; color: var(--ms-muted); }
.ms-section { margin-top: 16px; }
.ms-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ms-form-grid .full { grid-column: 1 / -1; }
label.form-label { font-size: 12px; font-weight: 600; color: var(--ms-muted); margin-bottom: 4px; }
.modal-content { border-radius: 12px; border-color: var(--ms-border); border-top: 4px solid #008B3C; box-shadow: 0 18px 50px rgba(23, 43, 36, .16); }
.modal-header { border-bottom-color: var(--ms-border); align-items: flex-start; }
.modal-title { font-size: 16px; font-weight: 650; }
.ms-modal-kicker { color: #006F35; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.ms-modal-sub { margin: 2px 0 0; color: var(--ms-muted); font-size: 13px; }
.ms-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ms-totals div { background: var(--ms-green-light); border-radius: 8px; padding: 8px 10px; }
.ms-totals span { display: block; color: var(--ms-muted); font-size: 12px; }
.ms-totals strong { font-variant-numeric: tabular-nums; }
.ms-lines th:first-child, .ms-lines td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 220px; }
.ms-stock-warn { box-shadow: inset 3px 0 0 var(--ms-red); }
.nav-tabs { flex-wrap: nowrap; overflow-x: auto; }
@media (min-width: 992px) {
  .modal-dialog.ms-modal-sm { max-width: 480px; }
  .modal-dialog.ms-modal-md { max-width: 720px; }
  .modal-dialog.ms-modal-lg { max-width: 960px; }
  .modal-dialog.ms-modal-xl { max-width: min(1100px, calc(100vw - 2rem)); }
}
.nav-tabs .nav-link { color: var(--ms-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--ms-green-ink); border-color: var(--ms-border) var(--ms-border) #fff; }
.ms-dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 10px; margin: 0; }
.ms-dl dt { color: var(--ms-muted); }
.ms-dl dd { margin: 0; }
.ms-profile-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ms-money { font-variant-numeric: tabular-nums; font-weight: 700; }
.table { font-size: 13px; }
.table th { color: var(--ms-muted); font-weight: 600; }
.ms-check { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.ms-savebar {
  position: sticky; bottom: 0; background: #fff; border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius); padding: 10px; display: flex; justify-content: space-between; gap: 8px; margin-top: 12px;
}
.tabulator { border: 0; background: #fff; font-size: 13px; }
.tabulator .tabulator-header { background: #F3F7F5; border-bottom: 1px solid var(--ms-border); font-weight: 600; color: var(--ms-muted); }
.tabulator-row { border-bottom: 1px solid #EEF3F0; min-height: 36px; }
.tabulator-row.tabulator-row-even { background: #FCFDFC; }
.tabulator-row:hover { background: #F4FBF6 !important; }
.tabulator .tabulator-footer { background: #fff; border-top: 1px solid var(--ms-border); }
.ms-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--ms-green); z-index: 80; }
body.is-loading .ms-progress { width: 70%; transition: width .4s ease; }
.ms-toast-stack { position: fixed; right: 16px; bottom: 42px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.ms-toast { background: #12352A; color: #fff; border-radius: 8px; padding: 10px 12px; min-width: 240px; max-width: 360px; box-shadow: var(--ms-shadow); }
.ms-toast.warn { background: #6A5314; }
.ms-toast.bad { background: var(--ms-red-ink); }
.ms-search-results { max-height: 360px; overflow: auto; }
.ms-search-results a { display: block; padding: 8px 4px; border-bottom: 1px solid var(--ms-border); color: inherit; }
.ms-search-results a:hover { background: var(--ms-green-light); text-decoration: none; }
.ms-search-results small { color: var(--ms-muted); }

.ms-auth-body {
  --auth-deep: #054F32;
  --auth-green: #087D42;
  --auth-emerald: #009447;
  --auth-mint: #E7F6ED;
  --auth-soft: #BCE8CE;
  --auth-red: #E21B2D;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--auth-deep);
}
html:has(.ms-auth-body) { background: #054F32; }
.ms-auth-body::before,
.ms-auth-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.ms-auth-body::before {
  z-index: 0;
  background-color: #054F32;
  background-image: url("../branding/login-bg.jpg");
  background-image: -webkit-image-set(url("../branding/login-bg.webp") type("image/webp"), url("../branding/login-bg.jpg") type("image/jpeg"));
  background-image: image-set(url("../branding/login-bg.webp") type("image/webp"), url("../branding/login-bg.jpg") type("image/jpeg"));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
}
.ms-auth-body::after {
  z-index: 0;
  background:
    radial-gradient(ellipse 48% 56% at 74% 42%, rgba(231, 246, 237, .5), rgba(231, 246, 237, 0) 70%),
    radial-gradient(ellipse 130% 100% at 50% 48%, rgba(5, 79, 50, 0) 32%, rgba(5, 79, 50, .62) 100%),
    linear-gradient(102deg, rgba(8, 125, 66, .2) 0%, rgba(5, 79, 50, .18) 34%, rgba(5, 79, 50, .62) 100%),
    linear-gradient(180deg, rgba(5, 79, 50, .4) 0%, rgba(8, 125, 66, .1) 40%, rgba(5, 79, 50, .52) 100%);
}
.ms-company-mark {
  background: #fff; border: 1px solid var(--ms-border); border-radius: 12px;
  padding: 16px; margin-bottom: 16px; max-width: 560px;
}
.ms-company-mark img { display: block; width: 100%; height: auto; }
.ms-print-brand { display: none; }
.ms-auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 40px 8vw; background: #fff; }
.ms-auth-panel h2 { margin: 0 0 6px; font-size: 24px; }
.ms-dev { margin-top: 28px; color: var(--ms-muted); font-size: 12px; }
.ms-alert { border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
.ms-alert.bad { background: var(--ms-red-light); color: var(--ms-red-ink); }
.ms-alert.good { background: var(--ms-green-light); color: var(--ms-green-ink); }

@media (max-width: 1200px) {
  .ms-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ms-split { grid-template-columns: 1fr; }
}
@media (max-width: 991.98px) {
  .ms-sidebar { position: fixed; transform: translateX(-105%); transition: transform .2s ease; width: min(86vw, 320px); }
  body.nav-open .ms-sidebar { transform: none; }
  body.nav-open .ms-backdrop { display: block; position: fixed; inset: 0; background: rgba(23, 43, 36, .35); z-index: 25; }
  body.is-collapsed .ms-sidebar { width: min(86vw, 320px); }
  body.is-collapsed .ms-brand-text, body.is-collapsed .ms-nav span.label, body.is-collapsed .ms-lock, body.is-collapsed .ms-sidebar-foot, body.is-collapsed .sub { display: initial; }
  body.is-collapsed .ms-brand { justify-content: flex-start; padding-left: 16px; padding-right: 16px; }
  body.is-collapsed .ms-brand img { height: 40px; max-width: 64px; }
  .ms-user-meta, .ms-kbd, .ms-top-title { display: none; }
  .ms-top { flex-wrap: wrap; height: auto; min-height: var(--ms-top); padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  .ms-branch { order: 10; flex: 1 1 100%; max-width: none; }
  .ms-branch-select { max-width: none; width: 100%; min-height: 44px; height: 44px; }
  .ms-kpis, .ms-kpis-logistics, .ms-kpis-cylinders, .ms-kpis-accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal .form-control, .modal .form-select, .modal .btn { min-height: 44px; }
  .ms-form-grid { grid-template-columns: 1fr; }
  .modal-dialog { margin: 0; max-width: 100%; height: 100%; }
  .modal-content { min-height: 100%; height: 100%; border-radius: 0; display: flex; flex-direction: column; }
  .modal-body { overflow: auto; flex: 1 1 auto; }
  .modal-header, .ms-savebar { position: sticky; background: #fff; z-index: 3; }
  .modal-header { top: 0; }
  .ms-savebar { bottom: 0; }
  .ms-totals { grid-template-columns: 1fr 1fr; }
  .btn, .form-control, .form-select, .ms-nav a { min-height: 44px; }
  .ms-page-head { flex-direction: column; }
  .ms-status { height: auto; min-height: var(--ms-status); flex-wrap: wrap; row-gap: 2px; padding-top: 4px; padding-bottom: 4px; }
  .ms-workspace { padding: 12px 12px 20px; }
  .ms-card { overflow-x: auto; }
  .ms-kpi span { overflow-wrap: anywhere; }
  .ms-dl { grid-template-columns: 1fr; }
}
@media print {
  .ms-sidebar, .ms-top, .ms-status, .ms-page-actions, .ms-toolbar, .btn { display: none !important; }
  .ms-workspace { padding: 0; }
  body { background: #fff; }
  .ms-print-brand {
    display: flex; align-items: center; gap: 16px;
    margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid #E3EAE6;
  }
  .ms-print-brand img { height: 52px; width: auto; max-width: 280px; object-fit: contain; }
  .ms-print-brand strong, .ms-print-brand span { display: block; }
  .ms-print-brand span { color: #51645C; font-size: 12px; }
}

.ms-auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.ms-auth-main {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  min-width: 0;
}
.ms-auth-brand {
  position: absolute;
  left: max(40px, env(safe-area-inset-left));
  bottom: 70px;
  z-index: 3;
  padding: 0;
  margin: 0;
  max-width: min(380px, 40%);
}
.ms-auth-logo {
  display: inline-block;
  max-width: min(380px, 100%);
  background: rgba(255, 255, 255, .96);
  border-radius: 16px;
  padding: 16px 18px 12px;
  box-shadow: 0 12px 32px rgba(5, 79, 50, .18);
}
.ms-auth-logo img { display: block; width: 100%; height: auto; }
.ms-auth-kicker {
  margin: 10px 0 0;
  color: #054F32;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  text-align: center;
}
.ms-auth-stage {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 40px 28px 16px;
  min-width: 0;
}
.ms-logo-loader {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(231, 246, 237, .92);
  backdrop-filter: blur(12px);
  transition: opacity .35s ease, visibility .35s ease;
}
.ms-logo-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.ms-logo-loader-stage { position: relative; width: 168px; height: 128px; display: grid; place-items: center; }
.ms-logo-loader img { width: 124px; height: auto; position: relative; z-index: 1; animation: ms-logo-pulse 1.4s ease-in-out infinite; }
.ms-logo-loader-ring {
  position: absolute; inset: -18px -8px;
  border-radius: 50%;
  border: 3px solid rgba(8, 125, 66, .18);
  border-top-color: #009447;
  border-right-color: #E21B2D;
  animation: ms-logo-spin 1s linear infinite;
}
.ms-logo-loader p { margin: 0; color: #054F32; font-weight: 700; letter-spacing: .04em; }
@keyframes ms-logo-spin { to { transform: rotate(360deg); } }
@keyframes ms-logo-pulse { 50% { transform: scale(1.04); } }
.ms-auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #BCE8CE;
  border-radius: 20px;
  box-shadow: 0 22px 48px rgba(5, 79, 50, .2), 0 2px 8px rgba(5, 79, 50, .06);
  padding: 34px 32px 22px;
  position: relative;
  overflow: hidden;
}
.ms-auth-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #087D42 0 74%, #E21B2D 74% 100%);
}
.ms-auth-card h1, .ms-auth-card h2 { margin: 10px 0 8px; font-size: 28px; letter-spacing: -.02em; color: #123528; }
.ms-auth-card .ms-muted { color: #3E5C4E; line-height: 1.5; }
.ms-auth-card .form-label { color: #054F32; margin-bottom: 6px; }
.ms-auth-mark img { display: block; width: 42px; height: 42px; object-fit: contain; }
.ms-auth-form, .ms-auth-card form { margin-top: 18px; }
.ms-field { margin-bottom: 16px; }
.ms-input { position: relative; }
.ms-input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #087D42; display: flex; pointer-events: none;
}
.ms-auth-card .form-control {
  border-color: #BCE8CE;
  background: #fff;
  border-radius: 12px;
  min-height: 48px;
}
.ms-input .form-control { padding-left: 40px; }
.ms-input:has(.ms-reveal) .form-control { padding-right: 72px; }
.ms-auth-card .form-control:focus {
  border-color: #009447;
  box-shadow: 0 0 0 3px rgba(0, 148, 71, .18);
}
.ms-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #054F32; font-weight: 600;
  min-width: 44px; min-height: 44px; border-radius: 8px;
}
.ms-auth-card .btn-primary,
.ms-pin-card .btn-primary {
  background: #087D42; border-color: #087D42; min-height: 48px; border-radius: 12px; font-weight: 700;
}
.ms-auth-card .btn-primary:hover, .ms-auth-card .btn-primary:focus-visible,
.ms-pin-card .btn-primary:hover, .ms-pin-card .btn-primary:focus-visible {
  background: #054F32; border-color: #054F32;
}
.ms-auth-card .btn-outline-secondary {
  border-color: #BCE8CE; color: #054F32; min-height: 44px; border-radius: 12px;
}
.ms-auth-card .btn-outline-secondary:hover {
  background: #E7F6ED; color: #054F32; border-color: #087D42;
}
.ms-auth-submit[aria-busy="true"] { opacity: .85; }
.ms-auth-links { margin: 16px 0 0; }
.ms-auth-card a { color: #087D42; font-weight: 600; }
.ms-dev { margin: 22px 0 0; color: #51645C; font-size: 12px; }
.ms-auth-signage {
  position: relative;
  flex: 0 0 auto;
  background: rgba(5, 79, 50, .88);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ms-auth-signage::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #087D42 0 76%, #E21B2D 76% 100%);
}
.ms-auth-signage ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 4px 16px calc(4px + env(safe-area-inset-bottom));
}
.ms-auth-signage li {
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-left: 1px solid rgba(255, 255, 255, .4);
}
.ms-auth-signage li:first-child { border-left: 0; }
.ms-session-notice { display: flex; flex-direction: column; gap: 2px; }
.ms-pin-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(5, 79, 50, .46);
  backdrop-filter: blur(8px);
}
.ms-pin-modal {
  position: fixed; inset: 0; z-index: 41; display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: auto;
}
.ms-pin-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  border: 1px solid #BCE8CE;
  box-shadow: 0 24px 60px rgba(5, 79, 50, .28);
  padding: 28px 26px 20px;
  animation: ms-pin-in .22s ease-out;
}
@keyframes ms-pin-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.ms-pin-card h1 { font-size: 24px; color: #123528; }
.ms-pin-group { margin: 16px 0; }
.ms-pin-label { display: block; font-weight: 600; margin-bottom: 8px; color: #054F32; }
.ms-pin-boxes { display: flex; gap: 10px; }
.ms-pin-digit {
  flex: 1 1 0; min-width: 0; max-width: 72px; height: 64px;
  border: 1px solid #BCE8CE; border-radius: 14px; text-align: center;
  font-size: 28px; background: #E7F6ED; color: #054F32;
}
.ms-pin-digit:focus { outline: none; border-color: #009447; box-shadow: 0 0 0 3px rgba(0, 148, 71, .18); background: #fff; }
.ms-pin-progress { margin: 8px 0 0; color: #51645C; font-size: 12px; }
.ms-pin-progress.is-complete { color: #087D42; font-weight: 700; }
.ms-pin-error { color: var(--ms-red-ink); background: var(--ms-red-light); border-radius: 8px; padding: 8px 10px; }
.ms-pin-forgot { margin: 10px 0; text-align: center; }
.ms-text-btn { border: 0; background: transparent; color: #087D42; font-weight: 700; min-height: 44px; }
.ms-pin-admin { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ms-border); }
.ms-pin-admin h3 { font-size: 16px; margin: 0 0 6px; }
.ms-pin-events { margin: 8px 0 12px; padding-left: 18px; color: var(--ms-muted); font-size: 12px; }
.ms-pin-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-pin-admin-actions form { margin: 0; }
@media (max-width: 1023.98px) {
  .ms-auth-brand { left: max(28px, env(safe-area-inset-left)); bottom: 56px; max-width: min(260px, 36%); }
  .ms-auth-logo { max-width: 100%; }
  .ms-auth-card { width: min(390px, 100%); }
  .ms-auth-stage { padding: 20px 20px 20px 8px; }
  .ms-auth-signage li { letter-spacing: .12em; font-size: 12px; padding: 12px 14px; }
}
@media (max-width: 767.98px) {
  .ms-auth-main { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
  .ms-auth-brand {
    position: static; left: auto; bottom: auto; max-width: none; z-index: auto;
    align-self: center; text-align: center; width: 100%;
    padding: max(16px, env(safe-area-inset-top)) 16px 0;
  }
  .ms-auth-stage { grid-column: auto; }
  .ms-auth-logo { max-width: min(280px, 92%); }
  .ms-auth-stage { width: 100%; padding: 14px 12px 20px; align-items: stretch; }
  .ms-auth-card { width: 100%; padding: 22px 16px 16px; border-radius: 18px; }
  .ms-auth-card h1, .ms-auth-card h2 { font-size: 24px; }
  .ms-pin-digit { height: 56px; font-size: 24px; }
  .ms-pin-card { padding: 20px 14px 14px; }
  .ms-auth-signage li {
    width: 100%;
    text-align: center;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .28);
    letter-spacing: .12em;
    font-size: 12px;
    padding: 9px 12px;
  }
  .ms-auth-signage li:first-child { border-top: 0; }
}
@media (max-width: 767.98px) and (max-height: 700px) {
  .ms-auth-logo { max-width: min(200px, 84%); padding: 6px 8px 4px; }
  .ms-auth-kicker { margin-top: 4px; font-size: 12px; }
  .ms-auth-card { padding: 14px 12px 10px; }
  .ms-auth-card h1, .ms-auth-card h2 { font-size: 22px; margin: 4px 0; }
  .ms-auth-mark img { width: 32px; height: 32px; }
  .ms-auth-form, .ms-auth-card form { margin-top: 10px; }
  .ms-field { margin-bottom: 8px; }
  .ms-auth-card .form-control, .ms-auth-card .btn-primary { min-height: 44px; }
  .ms-auth-stage { padding-top: 8px; padding-bottom: 8px; }
  .ms-auth-links, .ms-dev { margin-top: 8px; }
  .ms-auth-signage li {
    width: auto;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, .4);
    font-size: 10px;
    letter-spacing: .08em;
    padding: 5px 7px;
  }
  .ms-auth-signage li:first-child { border-left: 0; border-top: 0; }
}
@media (max-height: 520px) {
  .ms-auth-brand { padding-top: 8px; padding-bottom: 4px; }
  .ms-auth-logo { max-width: min(220px, 46vw); padding: 6px 8px 4px; }
  .ms-auth-kicker { margin-top: 4px; font-size: 12px; }
  .ms-auth-stage { padding: 8px 12px; }
  .ms-auth-card { padding: 12px 14px 8px; }
  .ms-auth-card h1, .ms-auth-card h2 { font-size: 20px; margin: 4px 0; }
  .ms-auth-mark img { width: 28px; height: 28px; }
  .ms-auth-form, .ms-auth-card form { margin-top: 8px; }
  .ms-field { margin-bottom: 6px; }
  .ms-auth-card .form-control, .ms-auth-card .btn-primary, .ms-pin-card .btn-primary { min-height: 40px; }
  .ms-auth-links, .ms-dev { margin-top: 6px; }
  .ms-auth-signage li { padding: 7px 10px; font-size: 11px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-pin-card, .ms-logo-loader img, .ms-logo-loader-ring { animation: none; }
}

.report-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.report-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ms-muted); }
.report-search { flex: 1 1 220px; scroll-margin-top: 72px; }
.report-search .form-control { width: 100%; }
.report-scope { color: var(--ms-muted); font-size: 13px; margin-bottom: 12px; }
.report-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.report-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
.report-cats { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 12px; align-self: start; }
.report-cats a { color: var(--ms-text); text-decoration: none; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--ms-border); }
.report-cats a:hover { background: var(--ms-green-light); }
.report-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.report-shortcuts section, .report-group { background: #fff; border: 1px solid var(--ms-border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.report-shortcuts h2, .report-group h2, .report-charts h2 { font-size: 16px; margin: 0 0 8px; }
.report-shortcuts ul { margin: 0; padding-left: 18px; }
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.report-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--ms-border); border-radius: 12px; padding: 12px; color: inherit; text-decoration: none; min-height: 96px; }
.report-card:hover { border-color: var(--ms-green-mid); background: #F8FCFA; }
.report-card span { color: var(--ms-muted); font-size: 13px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-export-note { flex-basis: 100%; margin: 0; color: var(--ms-muted); font-size: 12px; }
.report-crumb { margin: 0 0 4px; color: var(--ms-muted); font-size: 13px; }
.report-crumb a { color: var(--ms-green-deep); }
.report-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--ms-border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.report-table { width: max-content; min-width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { padding: 10px 12px; border-bottom: 1px solid var(--ms-border); font-size: 14px; vertical-align: top; }
.report-table th { position: sticky; top: 0; background: #fff; z-index: 2; text-align: left; }
.report-table td.num, .report-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table tbody tr:nth-child(even) { background: #FAFBFC; }
.report-table tfoot td { font-weight: 700; background: #F6F8FA; }
.report-empty { background: #fff; border: 1px solid var(--ms-border); border-radius: 12px; padding: 16px; }
.report-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.report-pager a { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ms-border); border-radius: 8px; text-decoration: none; color: var(--ms-text); background: #fff; }
.report-pager a.is-current { background: var(--ms-green-deep); color: #fff; border-color: var(--ms-green-deep); }
.report-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.report-filter-toggle { display: none; }
.report-charts { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.report-charts section { background: #fff; border: 1px solid var(--ms-border); border-radius: 12px; padding: 12px 14px; }
.report-charts p { color: var(--ms-muted); font-size: 13px; }
.report-bars { display: flex; align-items: end; gap: 6px; height: 140px; overflow-x: auto; }
.report-col { display: flex; flex-direction: column; align-items: center; justify-content: end; min-width: 28px; height: 100%; gap: 4px; }
.report-col span { display: block; width: 16px; background: #008B3C; border-radius: 4px 4px 0 0; min-height: 2px; }
.report-col small { font-size: 10px; color: var(--ms-muted); white-space: nowrap; }
@media (max-width: 991.98px) {
  .report-layout, .report-charts, .report-shortcuts { grid-template-columns: 1fr; }
  .report-cats { position: static; flex-direction: row; overflow-x: auto; }
  .report-filter-toggle { display: inline-flex; }
  .report-filters { display: none; }
  .report-filters.is-open { display: flex; flex-direction: column; position: static; width: 100%; background: #fff; padding: 12px; border: 1px solid var(--ms-border); border-radius: 12px; }
  .report-search { position: relative; z-index: 2; background: #fff; }
  .report-filters label, .report-filters .form-control, .report-filters .form-select, .report-filters .btn { width: 100%; }
  .report-search { display: block; }
}
@media print {
  .report-bar, .report-actions, .report-pager, .report-cats, .ms-sidebar, .ms-top, .ms-status { display: none !important; }
  .report-scroll { overflow: visible; border: 0; }
  .report-table { width: 100%; }
  .report-table th { position: static; }
}
