:root {
  --bg: #f5f7f9;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #687584;
  --line: #dfe5ea;
  --primary: #1769aa;
  --primary-dark: #0d4777;
  --accent: #2f8f5b;
  --danger: #b43a3a;
  --warn: #a66a00;
  --shadow: 0 10px 28px rgba(23, 33, 43, 0.08);
}

/* Final 1C-like overrides */
body {
  background: #f2f2f2;
  color: #111;
  font-size: 14px;
}

.layout {
  grid-template-columns: 220px 1fr;
}

.sidebar {
  background: #f7f7f7;
  color: #111;
  border-right: 1px solid #b9b9b9;
  padding: 8px;
}

.sidebar .brand {
  background: #fff7d6;
  border: 1px solid #d9c16b;
  padding: 8px;
  margin-bottom: 8px;
}

.nav {
  gap: 2px;
}

.nav button {
  color: #111;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 7px 9px;
}

.nav button.active,
.nav button:hover {
  background: #ffe889;
  border-color: #d0a900;
  color: #111;
}

.topbar,
.toolbar {
  background: #fbfbfb;
  border-color: #b9b9b9;
}

.page {
  padding: 10px;
}

.btn,
.input,
.select,
.textarea,
.mini-btn,
.card,
.login-card,
.main-panel,
.side-list,
.modal,
.table-wrap,
.badge {
  border-radius: 0;
  box-shadow: none;
}

.btn {
  min-height: 30px;
  padding: 5px 10px;
  background: #e8e8e8;
  border: 1px solid #b9b9b9;
  color: #111;
  font-weight: 500;
}

.btn.primary {
  background: #ffe36d;
  border-color: #c6a000;
  color: #111;
}

.btn.primary:hover {
  background: #ffd83d;
}

.btn.accent {
  background: #dff0df;
  border-color: #6ea96e;
  color: #111;
}

.btn.danger {
  background: #f4dada;
  border-color: #c17272;
  color: #111;
}

.input,
.select,
.textarea {
  padding: 7px 8px;
  border-color: #b9b9b9;
}

.card,
.main-panel,
.side-list,
.table-wrap {
  border-color: #c9c9c9;
}

.card:hover,
.list-row:hover,
tr:hover td {
  background: #fff7d6;
}

.list-row.active,
.selected-row,
.selected-row td,
.card.selected-card {
  background: #ffe889;
  border-color: #d0a900;
}

th {
  background: #efefef;
  color: #333;
  border-bottom: 1px solid #b9b9b9;
}

td {
  border-bottom: 1px solid #dcdcdc;
}

.disabled-line {
  opacity: 0.62;
  background: #f1f1f1;
}

.disabled-line small {
  color: #9b1c1c;
  font-weight: 600;
}

/* 1C-like compact business UI */
:root {
  --bg: #f2f2f2;
  --panel: #ffffff;
  --text: #111;
  --muted: #606975;
  --line: #c9c9c9;
  --primary: #1f6fb2;
  --primary-dark: #15598f;
  --accent: #2c8a55;
  --danger: #b43a3a;
  --warn: #9a6a00;
  --shadow: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: #f2f2f2;
  font-size: 14px;
}

.layout {
  grid-template-columns: 220px 1fr;
}

.sidebar {
  background: #f7f7f7;
  color: #111;
  border-right: 1px solid #b9b9b9;
  padding: 8px;
}

.sidebar .brand {
  background: #fff7d6;
  border: 1px solid #d9c16b;
  padding: 8px;
  margin-bottom: 8px;
}

.sidebar .brand p,
.brand p {
  color: #555;
}

.brand-mark {
  background: #f1c400;
  color: #111;
  border: 1px solid #b99a00;
}

.nav {
  gap: 2px;
}

.nav button {
  color: #111;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 7px 9px;
}

.nav button.active,
.nav button:hover {
  color: #111;
  background: #ffe889;
  border-color: #d0a900;
}

.topbar {
  background: #fbfbfb;
  border-bottom: 1px solid #b9b9b9;
  padding: 8px 12px;
}

.topbar h2 {
  font-size: 18px;
}

.page {
  padding: 10px;
}

.toolbar,
.filters,
.tabs {
  gap: 6px;
}

.toolbar {
  background: #fbfbfb;
  border: 1px solid #c9c9c9;
  padding: 8px;
  margin-bottom: 8px;
}

.btn,
.input,
.select,
.textarea,
.mini-btn {
  border-radius: 0;
}

.btn {
  min-height: 30px;
  padding: 5px 10px;
  background: #e8e8e8;
  border: 1px solid #b9b9b9;
  color: #111;
  font-weight: 500;
}

.btn.primary {
  background: #ffe36d;
  border-color: #c6a000;
  color: #111;
}

.btn.primary:hover {
  background: #ffd83d;
}

.btn.accent {
  background: #dff0df;
  border-color: #6ea96e;
  color: #111;
}

.btn.danger {
  background: #f4dada;
  border-color: #c17272;
  color: #111;
}

.input,
.select,
.textarea {
  padding: 7px 8px;
  border-color: #b9b9b9;
}

.card,
.login-card,
.main-panel,
.side-list,
.modal,
.table-wrap {
  border-radius: 0;
  box-shadow: none;
  border-color: #c9c9c9;
}

.card {
  padding: 10px;
}

.card:hover,
.list-row:hover {
  background: #fff7d6;
}

.list-row.active,
.selected-row,
.card.selected-card {
  background: #ffe889;
  border-color: #d0a900;
}

table {
  font-size: 13px;
}

th {
  background: #efefef;
  color: #333;
  border-bottom: 1px solid #b9b9b9;
}

td {
  border-bottom: 1px solid #dcdcdc;
}

tr:hover td {
  background: #fff7d6;
}

.badge {
  border-radius: 0;
  border: 1px solid #c9c9c9;
  background: #f5f5f5;
}

.badge.ok {
  background: #e2f2df;
  color: #145c26;
  border-color: #82b77d;
}

.badge.warn {
  background: #fff1bd;
  color: #6b4b00;
  border-color: #d7b64b;
}

.badge.danger {
  background: #f5d6d6;
  color: #7a1c1c;
  border-color: #c17272;
}

.modal-backdrop {
  background: rgba(120, 128, 135, 0.55);
}

.modal-header,
.modal-footer {
  background: #fbfbfb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100svh;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-x: hidden;
  background: linear-gradient(135deg, #eef5f9, #f7f7f2);
}

.login-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.director-login {
  background: radial-gradient(circle at top, #1c3044, #071019 68%);
}

.director-login .login-card {
  border-color: rgba(255, 255, 255, 0.18);
  color: #eef6ff;
  background: rgba(10, 20, 31, 0.92);
}

.director-login .input {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 6px;
  background: #e9eef2;
  color: var(--text);
  font-weight: 600;
}

.btn.primary {
  color: #fff;
  background: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.btn.accent {
  color: #fff;
  background: var(--accent);
}

.btn.danger {
  color: #fff;
  background: var(--danger);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.demo-users {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  background: #f1f5f8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #1e2b36;
  color: #e9eef2;
  padding: 16px 12px;
}

.sidebar .brand {
  margin-bottom: 18px;
}

.sidebar .brand p {
  color: #b8c3cc;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  background: transparent;
  color: #e9eef2;
}

.nav button.active,
.nav button:hover {
  background: #2c3b47;
}

.content {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.topbar h2 {
  margin: 0;
  font-size: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page {
  padding: 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.split-page {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}

.side-list,
.main-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.side-list h3,
.main-panel h3 {
  margin: 0 0 10px;
}

.list-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.list-row:hover,
.list-row.active {
  background: #eef5ff;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(23, 33, 43, 0.04);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card.selected-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 143, 91, 0.12);
}

.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 12px;
}

.section-title h3 {
  margin: 0;
}

.stack {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f6f8fa;
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.product {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
}

.product-img {
  width: 74px;
  height: 74px;
  border-radius: 7px;
  object-fit: cover;
  background: #edf2f5;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  color: #176043;
  background: #e6f4ed;
}

.badge.warn {
  color: #7a4e00;
  background: #fff3d8;
}

.badge.danger {
  color: #8a2929;
  background: #fbe7e7;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.week-tabs {
  display: grid;
  gap: 8px;
}

.tabs button {
  white-space: nowrap;
}

.map-box {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #dce8e5;
  position: relative;
}

.map-box.large {
  height: 340px;
}

.map-box.territory-map {
  height: 620px;
}

.map-box.fullscreen-map {
  height: calc(100vh - 68px);
  border-radius: 0;
  border: 0;
}

.map-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(35deg, transparent 45%, rgba(255, 255, 255, 0.7) 46%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    linear-gradient(135deg, transparent 35%, rgba(255, 255, 255, 0.45) 36%, rgba(255, 255, 255, 0.45) 40%, transparent 41%);
  background-size: 140px 140px, 180px 180px;
}

.map-box.real-map::before {
  display: none;
}

.real-map {
  z-index: 1;
}

.leaflet-container {
  font: inherit;
}

.leaflet-popup-content button {
  margin-top: 8px;
  border: 0;
  border-radius: 5px;
  padding: 7px 9px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

.pin {
  position: absolute;
  left: 54%;
  top: 45%;
  transform: translate(-50%, -100%);
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  background: var(--danger);
  rotate: -45deg;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.pin::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  left: 7px;
  top: 7px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 33, 43, 0.42);
}

.modal {
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.modal.product-preview-modal {
  width: min(100vw, 980px);
  max-height: 100vh;
  border-radius: 0;
}

.modal.document-modal {
  width: min(1180px, 100vw);
  min-height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-body {
  padding: 16px;
}

.product-preview {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #0f1720;
}

.product-preview img {
  width: 100%;
  height: 100%;
  min-height: 56vh;
  object-fit: contain;
  background: #0f1720;
}

.product-preview-info {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: #fff;
}

.product-preview-info h3 {
  margin: 0;
}

.notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 33, 43, 0.42);
}

.notice-box {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.notice-box h3,
.notice-box p {
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.route-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.route-list {
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.supervisor-route-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.route-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.route-summary span {
  color: var(--muted);
  font-size: 13px;
}

.visit-row {
  width: 100%;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.visit-row:hover,
.visit-row.active {
  background: #eef5ff;
}

.visit-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.visit-row-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--line);
  cursor: grab;
}

.visit-row-wrap:active {
  cursor: grabbing;
}

.visit-row-wrap .visit-row {
  border-bottom: 0;
}

.visit-row-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
}

.mini-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: #edf2f5;
  color: var(--text);
  font-weight: 700;
}

.mini-btn:disabled {
  cursor: default;
  opacity: 0.35;
}

.mini-btn.danger {
  color: #fff;
  background: var(--danger);
}

.visit-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--primary);
  border-radius: 50%;
}

.visit-row.active .visit-dot {
  background: var(--primary);
}

.visit-panel {
  background: #fff;
}

.visit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.visit-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.visit-action-list {
  display: grid;
  padding: 8px 0;
}

.visit-action {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: #fff;
  color: var(--text);
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.visit-action:hover {
  background: #f6f9fb;
}

.visit-action.primary {
  color: var(--primary-dark);
  font-weight: 700;
}

.action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #edf2f5;
  color: var(--primary);
  font-weight: 700;
}

.empty-route {
  padding: 18px;
  color: var(--muted);
}

.client-tabs {
  display: flex;
  gap: 8px;
}

.product-group {
  display: grid;
  gap: 10px;
}

.product-group h3 {
  margin: 0;
  padding: 10px 0 0;
}

.product-scroll {
  max-height: calc(100svh - 190px);
  overflow-y: auto;
  padding-right: 4px;
}

.product-photo-grid .card {
  min-height: 100%;
}

.product-photo-grid .product {
  grid-template-columns: 110px 1fr;
}

.product-photo-grid .product-img {
  width: 110px;
  height: 110px;
}

.product-list-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  text-align: left;
}

.product-list-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.product-list-row > span:last-child {
  text-align: right;
  white-space: nowrap;
}

.product-group-select {
  max-width: 260px;
}

.product-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  scroll-snap-type: y mandatory;
}

.product-showcase .card {
  width: 100%;
  min-height: calc(100svh - 230px);
  display: grid;
  align-content: space-between;
  scroll-snap-align: start;
  padding: 16px;
}

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

.product-showcase .product-img {
  width: 100%;
  height: min(62svh, 560px);
  border-radius: 14px;
  object-fit: contain;
}

.product-showcase .product h3 {
  font-size: 24px;
}

.product-showcase .row {
  align-items: stretch;
  flex-direction: column;
}

.product-showcase .btn {
  width: 100%;
}

@media (max-width: 680px) {
  .product-showcase .card {
    min-height: calc(100svh - 210px);
    padding: 14px;
  }

  .product-showcase .product-img {
    height: min(56svh, 460px);
  }
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.qty {
  width: 76px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
}

.total {
  font-size: 18px;
  font-weight: 700;
}

.order-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.order-products,
.order-cart {
  display: grid;
  gap: 12px;
}

.order-cart {
  position: sticky;
  top: 78px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.cart-line {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cart-img {
  width: 62px;
  height: 62px;
  border-radius: 7px;
  object-fit: cover;
  background: #edf2f5;
}

.order-list-page {
  max-width: 920px;
}

.order-cart-full {
  position: static;
}

.product-picker-page {
  padding-bottom: 108px;
}

.draft-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.route-selection-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fa;
  color: var(--muted);
  font-size: 13px;
}

.agent-card {
  display: grid;
  gap: 16px;
}

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

.agent-stats div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.agent-stats b {
  font-size: 22px;
}

.agent-stats span {
  color: var(--muted);
  font-size: 13px;
}

.history-list {
  max-height: calc(100svh - 230px);
  overflow-y: auto;
  padding-right: 4px;
}

.history-card {
  padding: 0;
  overflow: hidden;
}

.history-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.history-head.static {
  cursor: default;
}

.history-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.history-details {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.history-event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding-top: 10px;
}

.calendar-input {
  max-width: 190px;
}

.message-thread {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.message-card {
  max-width: 760px;
}

.message-card.own {
  margin-left: auto;
  border-color: rgba(47, 143, 91, 0.35);
  background: #f4fbf7;
}

.message-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.stock-1c {
  background: #f3f0df;
}

.stock-toolbar {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(220px, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.stock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 8px;
}

.stock-side {
  display: grid;
  gap: 8px;
}

.stock-cart-panel,
.stock-groups,
.stock-photo {
  border: 1px solid #c9c2a3;
  background: #fff7cf;
  padding: 10px;
}

.stock-groups {
  min-height: 340px;
}

.stock-photo img {
  display: block;
  width: min(180px, 100%);
  margin: 12px auto;
  border: 1px solid var(--line);
  cursor: pointer;
}

.selected-row td {
  background: #fff0a8;
  outline: 1px solid #e0bd00;
}

.stock-action-menu {
  display: grid;
  gap: 0;
  padding: 8px;
}

.stock-action-menu button {
  min-height: 32px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff7cf;
  text-align: left;
}

.barcode-input {
  border-color: #e0bd00;
  box-shadow: inset 0 0 0 1px #e0bd00;
}

.invoice-sheet {
  color: #111;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.invoice-sheet h3 {
  font-size: 24px;
  margin: 14px 0;
}

.invoice-bank-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  border: 2px solid #111;
  margin-bottom: 18px;
}

.invoice-bank-grid > div {
  min-height: 44px;
  padding: 6px;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
}

.invoice-parties {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
}

.invoice-total {
  margin-left: auto;
  width: min(420px, 100%);
  padding: 12px 0;
  text-align: right;
  font-size: 18px;
}

.invoice-qr-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}

.invoice-qr {
  width: 160px;
  padding: 10px;
  border: 1px solid var(--line);
  text-align: center;
}

.invoice-qr img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-top: 8px;
}

.invoice-sign {
  display: grid;
  grid-template-columns: 140px 1fr 140px 1fr;
  gap: 16px;
  margin-top: 28px;
  align-items: end;
}

.invoice-sign span {
  border-bottom: 1px solid #111;
  min-height: 28px;
}

.recon-sheet {
  background: #fff;
  color: #000;
}

.recon-sheet h3,
.recon-sheet h4 {
  margin: 4px 0;
  text-align: center;
}

.recon-sheet table th,
.recon-sheet table td {
  border: 1px solid #111;
  color: #000;
}

.recon-total {
  margin: 18px 0;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 780px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 10px;
  }

  .sidebar .brand {
    margin-bottom: 8px;
  }

  .nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }

  .nav button {
    white-space: nowrap;
  }

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

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

  .calendar-input {
    max-width: none;
  }

  .message-form {
    grid-template-columns: 1fr;
  }

  .stock-toolbar,
  .stock-layout {
    grid-template-columns: 1fr;
  }

  .invoice-bank-grid,
  .invoice-sign {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .split-page {
    grid-template-columns: 1fr;
  }

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

  .route-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .visit-row-wrap {
    grid-template-columns: 1fr;
  }

  .visit-row-tools {
    justify-content: flex-end;
    padding: 6px 8px 8px;
  }

  .map-box.large {
    height: 280px;
  }

  .map-box.territory-map {
    height: 440px;
  }

  .product {
    grid-template-columns: 62px 1fr;
  }

  .order-page {
    grid-template-columns: 1fr;
  }

  .order-cart {
    position: static;
  }

  .draft-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-stats {
    grid-template-columns: 1fr;
  }

  .product-img {
    width: 62px;
    height: 62px;
  }
}

/* Final 1C-like overrides */
body {
  background: #f2f2f2;
  color: #111;
  font-size: 14px;
}

.layout {
  grid-template-columns: 220px 1fr;
}

.sidebar {
  background: #f7f7f7;
  color: #111;
  border-right: 1px solid #b9b9b9;
  padding: 8px;
}

.sidebar .brand {
  background: #fff7d6;
  border: 1px solid #d9c16b;
  padding: 8px;
  margin-bottom: 8px;
}

.nav {
  gap: 2px;
}

.nav button {
  color: #111;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 7px 9px;
}

.nav button.active,
.nav button:hover {
  background: #ffe889;
  border-color: #d0a900;
  color: #111;
}

.topbar,
.toolbar {
  background: #fbfbfb;
  border-color: #b9b9b9;
}

.page {
  padding: 10px;
}

.btn,
.input,
.select,
.textarea,
.mini-btn,
.card,
.login-card,
.main-panel,
.side-list,
.modal,
.table-wrap,
.badge {
  border-radius: 0;
  box-shadow: none;
}

.btn {
  min-height: 30px;
  padding: 5px 10px;
  background: #e8e8e8;
  border: 1px solid #b9b9b9;
  color: #111;
  font-weight: 500;
}

.btn.primary {
  background: #ffe36d;
  border-color: #c6a000;
  color: #111;
}

.btn.primary:hover {
  background: #ffd83d;
}

.btn.accent {
  background: #dff0df;
  border-color: #6ea96e;
  color: #111;
}

.btn.danger {
  background: #f4dada;
  border-color: #c17272;
  color: #111;
}

.input,
.select,
.textarea {
  padding: 7px 8px;
  border-color: #b9b9b9;
}

.card,
.main-panel,
.side-list,
.table-wrap {
  border-color: #c9c9c9;
}

.card:hover,
.list-row:hover,
tr:hover td {
  background: #fff7d6;
}

.list-row.active,
.selected-row,
.selected-row td,
.card.selected-card {
  background: #ffe889;
  border-color: #d0a900;
}

th {
  background: #efefef;
  color: #333;
  border-bottom: 1px solid #b9b9b9;
}

td {
  border-bottom: 1px solid #dcdcdc;
}
.receipt-img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid #bdbdbd;
  background: #fff;
}

.blocked-box {
  border: 2px solid #8d1f1f;
}

.blocked-box h3 {
  color: #8d1f1f;
}

@media (max-width: 1024px) {
  body {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid #b9b9b9;
  }

  .sidebar .brand {
    margin: 0;
  }

  .sidebar .brand h1 {
    font-size: 18px;
  }

  .sidebar .brand p {
    font-size: 12px;
  }

  .nav {
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav button,
  .btn {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 16px;
  }

  .content {
    min-width: 0;
  }

  .topbar {
    display: none;
  }

  .page {
    padding: 8px;
  }

  .toolbar,
  .tabs,
  .filters {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .toolbar .input,
  .toolbar .select {
    min-width: 220px;
  }

  .route-workspace {
    grid-template-columns: minmax(300px, 42%) 1fr;
    min-height: calc(100vh - 170px);
  }

  .visit-row,
  .visit-action {
    min-height: 64px;
    font-size: 17px;
  }

  .visit-action-list {
    gap: 10px;
  }

  .action-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

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

  .sidebar .brand {
    display: flex;
    align-items: center;
  }

  .nav button {
    min-width: max-content;
  }

  .route-workspace,
  .split-page,
  .two-col,
  .grid,
  .cards {
    grid-template-columns: 1fr !important;
  }

  .route-list {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid #b9b9b9;
  }

  .visit-panel {
    min-height: 320px;
  }

  .visit-head,
  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .visit-action {
    grid-template-columns: 52px 1fr;
    padding: 12px;
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .modal-body {
    max-height: calc(100vh - 150px);
    overflow: auto;
  }

  table {
    min-width: 680px;
  }

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

  .draft-bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}

/* Mobile/tablet fixes for field roles */
.day-tabs-wrap {
  min-width: 260px;
}

@media (max-width: 1024px) {
  .layout {
    display: block;
    min-height: 100svh;
  }

  .sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 6px 8px;
    overflow: hidden;
  }

  .sidebar .brand {
    flex: 0 0 auto;
    width: auto;
    max-width: 210px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
  }

  .sidebar .brand .brand-mark {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .sidebar .brand h1 {
    font-size: 14px;
    line-height: 1.15;
  }

  .sidebar .brand p {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
  }

  .nav {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 4px;
    scrollbar-width: thin;
  }

  .nav button,
  .btn {
    flex: 0 0 auto;
    min-height: 34px;
    width: auto;
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .nav button.active,
  .nav button:hover {
    min-height: 34px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .toolbar,
  .filters,
  .tabs {
    min-width: 0;
  }

  .filters,
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .day-tabs-wrap {
    width: 100%;
    min-width: 0;
  }

  .week-tabs {
    gap: 6px;
  }

  .route-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .route-list {
    border-right: 0;
    border-bottom: 1px solid #b9b9b9;
  }

  .visit-panel {
    min-height: 300px;
  }

  .split-page {
    grid-template-columns: 1fr;
  }

  .map-box.territory-map {
    height: min(520px, 62svh);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .sidebar {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .sidebar .brand {
    max-width: none;
    width: 100%;
    min-height: 40px;
  }

  .sidebar .brand p {
    max-width: none;
  }

  .nav {
    width: 100%;
  }

  .nav button,
  .btn {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .page {
    padding: 6px;
  }

  .toolbar {
    padding: 6px;
  }

  .route-summary,
  .visit-row,
  .empty-route {
    padding: 10px 12px;
  }

  .visit-row,
  .visit-action {
    min-height: 48px;
    font-size: 14px;
  }

  .map-box.territory-map {
    height: min(420px, 58svh);
  }
}

/* Modern mobile/tablet shell */
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 1024px) {
  :root {
    --mobile-bg: #eef3f7;
    --mobile-surface: #ffffff;
    --mobile-soft: #f7fafc;
    --mobile-line: #dbe5ee;
    --mobile-text: #17212b;
    --mobile-muted: #6b7785;
  }

  body {
    background: var(--mobile-bg);
    color: var(--mobile-text);
  }

  .layout {
    background: var(--mobile-bg);
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid rgba(23, 33, 43, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(23, 33, 43, 0.08);
    backdrop-filter: blur(12px);
  }

  .sidebar .brand {
    min-width: 0;
    max-width: none;
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .sidebar .brand .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #1769aa, #24936b);
    box-shadow: 0 6px 14px rgba(23, 105, 170, 0.22);
  }

  .sidebar .brand h1 {
    font-size: 16px;
    letter-spacing: 0;
  }

  .sidebar .brand p {
    max-width: none;
    color: var(--mobile-muted);
    font-size: 11px;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    grid-template-columns: 18px auto;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--mobile-line);
    border-radius: 12px;
    color: var(--mobile-text);
    background: var(--mobile-soft);
    font-weight: 700;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    grid-column: 1;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-nav-toggle b {
    grid-column: 2;
    grid-row: 1 / 4;
    font-size: 13px;
  }

  .nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 8px;
    width: 100%;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.18s ease;
  }

  .sidebar.nav-open .nav {
    max-height: 440px;
    padding-top: 8px;
    overflow-y: auto;
    opacity: 1;
  }

  .nav button,
  .nav button.active,
  .nav button:hover {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid var(--mobile-line);
    border-radius: 14px;
    color: var(--mobile-text);
    background: var(--mobile-surface);
    box-shadow: 0 4px 12px rgba(23, 33, 43, 0.04);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    white-space: normal;
  }

  .nav button.active {
    color: #0d4777;
    border-color: rgba(23, 105, 170, 0.24);
    background: #eaf4ff;
    box-shadow: inset 0 0 0 1px rgba(23, 105, 170, 0.08);
  }

  .page {
    padding: 12px;
  }

  .toolbar,
  .card,
  .main-panel,
  .side-list,
  .table-wrap,
  .route-workspace,
  .supervisor-route-list {
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: var(--mobile-surface);
    box-shadow: 0 8px 22px rgba(23, 33, 43, 0.05);
  }

  .toolbar {
    padding: 10px;
    margin-bottom: 12px;
  }

  .filters,
  .tabs {
    gap: 8px;
    padding-bottom: 2px;
  }

  .btn,
  .mini-btn,
  .input,
  .select,
  .textarea {
    border-radius: 12px;
  }

  .btn {
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid var(--mobile-line);
    color: var(--mobile-text);
    background: var(--mobile-soft);
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
  }

  .btn.primary {
    color: #083f68;
    border-color: #b8d8f1;
    background: #dff0ff;
  }

  .btn.accent {
    color: #145c36;
    border-color: #bde4c9;
    background: #e8f8ed;
  }

  .btn.danger {
    color: #8a2929;
    border-color: #f0c0c0;
    background: #fff0f0;
  }

  .badge {
    min-height: 30px;
    border-radius: 999px;
    border: 1px solid var(--mobile-line);
    background: var(--mobile-soft);
  }

  .route-workspace {
    overflow: hidden;
  }

  .route-summary {
    background: var(--mobile-soft);
  }

  .visit-row,
  .visit-action,
  .list-row {
    border-radius: 12px;
  }

  .visit-row:hover,
  .visit-row.active,
  .list-row:hover,
  .list-row.active,
  .card:hover,
  .card.selected-card {
    background: #eaf4ff;
  }

  .map-box {
    border-radius: 16px;
  }
}

@media (min-width: 681px) and (max-width: 1024px) {
  .sidebar.nav-open .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .route-workspace {
    grid-template-columns: minmax(280px, 38%) 1fr;
  }
}

@media (max-width: 680px) {
  .sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .mobile-nav-toggle b {
    display: none;
  }

  .mobile-nav-toggle {
    grid-template-columns: 18px;
    width: 44px;
    padding: 0;
    place-content: center;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav button,
  .btn {
    min-height: 42px;
    font-size: 13px;
  }

  .toolbar,
  .filters,
  .tabs {
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .filters .btn,
  .tabs .btn {
    flex: 1 1 calc(50% - 8px);
  }

  .tabs .badge {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* Collapsible controls: keep mobile screens clean */
.collapse-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .route-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-collapse {
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(23, 33, 43, 0.05);
    overflow: hidden;
  }

  .collapse-toggle {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    color: var(--mobile-text);
    background: transparent;
    text-align: left;
  }

  .collapse-toggle::after {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-right: 2px solid #6b7785;
    border-bottom: 2px solid #6b7785;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
  }

  .mobile-collapse.open .collapse-toggle::after {
    transform: rotate(225deg);
  }

  .collapse-toggle span {
    display: block;
    color: var(--mobile-muted);
    font-size: 12px;
    font-weight: 700;
  }

  .collapse-toggle b {
    margin-left: auto;
    color: #0d4777;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
  }

  .collapse-content {
    max-height: 0;
    padding: 0 10px;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.18s ease;
  }

  .mobile-collapse.open .collapse-content {
    max-height: 520px;
    padding: 0 10px 10px;
    opacity: 1;
  }

  .mobile-collapse .filters,
  .mobile-collapse .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
  }

  .mobile-collapse .filters .btn,
  .mobile-collapse .tabs .btn,
  .mobile-collapse .tabs .badge {
    flex: 0 1 auto;
    min-height: 38px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .action-picker .filters .btn:first-child {
    flex: 1 1 100%;
  }

  .day-picker .tabs:first-child .btn {
    flex: 1 1 calc(50% - 8px);
  }

  .day-picker .tabs:first-child .badge {
    flex: 1 1 100%;
    justify-content: center;
    order: -1;
  }

  .route-workspace {
    margin-top: 12px;
  }
}

@media (min-width: 1025px) {
  .collapse-content {
    max-height: none;
    overflow: visible;
    opacity: 1;
  }
}

@media (max-width: 680px) {
  .page {
    padding: 10px;
  }

  .route-toolbar {
    gap: 8px;
  }

  .collapse-toggle {
    min-height: 50px;
    padding: 11px 12px;
  }

  .collapse-toggle b {
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-collapse.open .collapse-content {
    max-height: 640px;
  }

  .mobile-collapse .filters .btn,
  .mobile-collapse .tabs .btn,
  .mobile-collapse .tabs .badge {
    flex: 1 1 auto;
    width: auto;
    min-width: min(145px, 100%);
  }

  .day-picker .tabs:last-child .btn {
    flex: 1 1 calc(50% - 8px);
  }

  .day-picker .tabs:last-child .btn:last-child {
    flex-basis: 100%;
  }
}

@media (max-width: 680px) {
  .login-shell {
    padding: 12px;
    justify-items: center;
  }

  .login-card {
    width: calc(100vw - 24px) !important;
    max-width: 416px !important;
    padding: 26px !important;
  }

  .login-card .input,
  .login-card .btn,
  .login-card .demo-users {
    max-width: 100%;
  }
}
