:root {
  --bg: #f2f2f2;
  --panel: #ffffff;
  --line: #d7d7d7;
  --line-dark: #c9c9c9;
  --text: #262626;
  --muted: #8b8b8b;
  --green: #18c96b;
  --green-dark: #058b45;
  --orange: #ffa000;
  --red: #f02d2d;
  --blue: #0b5eb8;
  font-family: Ubuntu, Arial, sans-serif;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #ececec;
}

.login-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.login-brand {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-panel h1 {
  margin: 0;
  font-size: 24px;
}

.login-panel p {
  margin: 0;
  color: #666;
  line-height: 1.45;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: #666;
}

.login-panel input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
}

.login-panel button {
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.error-text {
  min-height: 20px;
  color: #b00020;
}

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  overflow: hidden;
}

.side-menu {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  background: #252729;
  color: #d8d8d8;
  border-right: 1px solid #161718;
}

.side-menu__brand {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #3a3c3e;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.side-menu__nav {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0;
}

.side-menu__item {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: #c9c9c9;
  padding: 0 12px 0 10px;
  text-align: left;
}

.side-menu__item:hover,
.side-menu__item.active {
  background: #343638;
  color: #fff;
  border-left-color: var(--orange);
}

.side-menu__item .material-icons {
  font-size: 21px;
  color: inherit;
}

.side-menu__item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.content-shell {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

.admin-app {
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
  background: #f7f7f7;
}

.admin-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: #252729;
  color: #fff;
  border-bottom: 1px solid #161718;
}

.admin-topbar h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 500;
}

.admin-topbar span {
  color: #c9c9c9;
  font-size: 12px;
}

.admin-topbar__actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-date-box {
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #44474a;
  border-radius: 3px;
  background: #fff;
  color: #333;
  padding: 0 10px;
}

.admin-date-box span {
  color: #666;
  font-size: 12px;
}

.admin-date-box input {
  width: 128px;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1b1c1f;
  font-size: 13px;
}

.admin-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.section-view {
  min-width: 0;
  min-height: 0;
  display: none;
}

.section-view.active {
  display: grid;
}

#section-zeroings {
  grid-template-rows: 56px minmax(0, 1fr) 64px;
  overflow: hidden;
}

.section-page {
  min-width: 0;
  min-height: 0;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
  background: #f7f7f7;
}

#section-wallets,
#section-compliance {
  grid-template-rows: auto auto auto;
  align-content: start;
  overflow: auto;
}

.section-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  color: #252525;
  font-size: 18px;
  font-weight: 500;
}

.section-head span {
  color: #666;
  font-size: 12px;
}

.portal-grid {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.portal-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.portal-card--wide {
  grid-column: 1 / -1;
}

.portal-card h3 {
  margin: 0;
  color: #252020;
  font-size: 15px;
  font-weight: 500;
}

.profile-list {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.profile-list dt {
  color: #797b7c;
}

.profile-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-form,
.inline-form {
  display: grid;
  gap: 10px;
}

.portal-form label {
  display: grid;
  gap: 5px;
  color: #555;
  font-size: 12px;
}

.portal-form input,
.portal-form select,
.portal-form textarea,
.inline-form input,
.inline-form select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 0 10px;
  color: #1b1c1f;
  font-size: 13px;
}

.portal-form textarea {
  height: auto;
  padding: 9px 10px;
  resize: vertical;
}

.portal-form button,
.inline-form button {
  height: 36px;
  border: 1px solid #0b9950;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.inline-form {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) 120px;
}

.check-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
}

.check-line input {
  width: 15px;
  height: 15px;
}

.mini-table-wrap {
  min-width: 0;
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
}

.mini-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

.mini-table th,
.mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e4e4e4;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

.mini-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f6f6;
  color: #555;
  font-weight: 500;
}

.big-number {
  font-size: 28px;
  font-weight: 500;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  background: #f6f6f6;
  border: 1px solid var(--line);
  font-size: 13px;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
  background: #f7f7f7;
}

.analytics-kpis div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.analytics-kpis span {
  color: #797b7c;
  font-size: 11px;
}

.analytics-kpis b {
  font-size: 17px;
  font-weight: 500;
}

#section-analytics {
  grid-template-rows: 58px auto minmax(0, 1fr);
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.category-track {
  height: 12px;
  background: #e9e9e9;
  border-radius: 6px;
  overflow: hidden;
}

.category-fill {
  height: 100%;
  background: var(--green);
}

.notice-list {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.notice-item {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #9ca3af;
}

.notice-item.warning {
  border-left-color: var(--orange);
}

.notice-item.info {
  border-left-color: var(--blue);
}

.notice-item b {
  font-size: 14px;
}

.notice-item span,
.notice-item p {
  margin: 0;
  color: #666;
  font-size: 12px;
}

.support-channels {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.support-channel-btn {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: #252525;
  padding: 0 14px;
  text-align: left;
}

.support-channel-btn:hover {
  border-color: var(--green);
  background: #f2fbf6;
}

.support-channel-btn .material-icons {
  color: var(--green-dark);
  font-size: 23px;
}

.support-channel-btn b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
}

.admin-grid {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(360px, 1.3fr);
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.admin-tenant-card .portal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-tenant-card .portal-form label:first-child,
.admin-tenant-card .portal-form button,
.admin-tenant-card .portal-form .check-line {
  grid-column: 1 / -1;
}

.secondary-btn {
  border-color: var(--line) !important;
  background: #fff !important;
  color: #333 !important;
}

.admin-premise-form {
  grid-template-columns: minmax(110px, 0.7fr) repeat(5, minmax(120px, 1fr)) 110px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 48px;
  gap: 10px;
}

.admin-ops-wrap,
.admin-tenants-wrap {
  max-height: 460px;
}

.admin-ops-table {
  min-width: 1180px;
}

.admin-tenants-table {
  min-width: 980px;
}

.admin-premises-table {
  min-width: 920px;
}

.mini-table td > span,
.admin-tenants-table td span {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: #777;
  text-overflow: ellipsis;
  font-size: 11px;
}

.admin-ops-table select,
.admin-ops-table input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 0 8px;
  font-size: 12px;
}

.admin-ops-table input[data-field="multiplier"] {
  width: 74px;
}

.small-action-btn {
  min-width: 46px;
  height: 30px;
  border: 1px solid #0b9950;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.muted-row {
  opacity: 0.58;
}

.admin-tenants-table tbody tr {
  cursor: pointer;
}

.admin-tenants-table tbody tr:hover {
  background: #f2f8f4;
}

.parking-admin {
  height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  background: #f2f2f2;
}

.admin-sidebar {
  min-width: 0;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  background: #252729;
  color: #d8d8d8;
  border-right: 1px solid #161718;
}

.admin-sidebar__brand {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 14px;
  border-bottom: 1px solid #3a3c3e;
}

.admin-sidebar__brand span {
  color: #a6a6a6;
  font-size: 11px;
}

.admin-sidebar__brand b {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.admin-sidebar__nav {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0;
}

.admin-nav-item {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: #c9c9c9;
  padding: 0 12px 0 10px;
  text-align: left;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: #343638;
  color: #fff;
  border-left-color: var(--orange);
}

.admin-nav-item .material-icons {
  font-size: 20px;
}

.admin-nav-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 500;
}

.admin-shell {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
}

.admin-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.admin-header h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 500;
}

.admin-header span {
  color: #777;
  font-size: 12px;
}

.admin-header__tools {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.admin-section {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: none;
  overflow: auto;
  padding: 14px;
}

.admin-section.active {
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-kpi-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-kpi-grid article {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.admin-kpi-grid span {
  color: #777;
  font-size: 11px;
}

.admin-kpi-grid b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 20px;
  font-weight: 500;
}

.admin-board {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 14px;
}

.admin-two-pane {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 14px;
}

.admin-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 14px;
}

.admin-panel--wide {
  grid-column: 1 / -1;
}

.admin-panel header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-panel header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.admin-panel header span {
  color: #777;
  font-size: 12px;
}

.admin-panel__filters {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.9fr) minmax(160px, 0.65fr) minmax(220px, 1fr) 48px;
  align-items: center;
}

.admin-panel__filters h2 {
  white-space: nowrap;
}

.admin-search-input,
.admin-panel select,
.admin-form input,
.admin-form select,
.admin-inline-form input,
.admin-inline-form select,
.admin-table select,
.admin-table input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 0 9px;
  color: #1b1c1f;
  font-size: 13px;
}

.admin-form {
  display: grid;
  gap: 10px;
}

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

.admin-form label {
  display: grid;
  gap: 5px;
  color: #555;
  font-size: 12px;
}

.admin-form .check-line,
.admin-form button {
  grid-column: 1 / -1;
}

.admin-form button,
.admin-inline-form button {
  min-height: 36px;
  border: 1px solid #0b9950;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) repeat(5, minmax(120px, 1fr)) 110px;
  gap: 8px;
}

.admin-table-wrap {
  min-width: 0;
  max-height: 510px;
  overflow: auto;
  border: 1px solid var(--line);
}

.admin-table-wrap--tall {
  max-height: calc(100vh - 190px);
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e4e4e4;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f6f6;
  color: #555;
  font-weight: 500;
}

.admin-table tbody tr:hover,
.admin-table tbody tr.selected-row {
  background: #f2f8f4;
}

.admin-table td span {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: #777;
  text-overflow: ellipsis;
  font-size: 11px;
}

.admin-ops-table {
  min-width: 1220px;
}

.admin-queue {
  display: grid;
  gap: 8px;
}

.queue-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.queue-item:hover {
  border-color: var(--green);
  background: #f2fbf6;
}

.queue-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.queue-item small {
  grid-column: 2;
  overflow: hidden;
  color: #666;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 12px;
  background: #fff7e6;
  color: #9a5b00;
  font-size: 11px;
  white-space: nowrap;
}

.admin-rules-list {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.admin-rules-list dt {
  color: #777;
}

.admin-rules-list dd {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #d0d0d0;
  border-radius: 11px;
  background: #f7f7f7;
  color: #4b5563;
  font-size: 12px;
  white-space: nowrap;
}

.status-pill.ok {
  border-color: #a7e7c3;
  background: #edfdf4;
  color: #057a3d;
}

.status-pill.warn {
  border-color: #ffd796;
  background: #fff7e6;
  color: #9a5b00;
}

.status-pill.muted {
  color: #7a7a7a;
}

.empty-card {
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  background: #fafafa;
  color: #777;
  font-size: 13px;
  text-align: center;
}

.limit-overview-panel {
  position: relative;
  gap: 10px;
  padding: 12px;
}

.limit-overview-header {
  align-items: end !important;
}

.limit-overview-controls {
  min-width: min(360px, 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.limit-overview-controls span {
  min-width: 0;
  max-width: 520px;
  overflow: hidden;
  color: #666;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.limit-overview-controls button,
.limit-filter-actions button {
  min-height: 34px;
  border: 1px solid #0b9950;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.limit-filter-panel {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 20;
  width: min(740px, calc(100% - 24px));
  display: grid;
  gap: 12px;
  border: 1px solid #cfd7df;
  border-radius: 5px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.limit-filter-panel__head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.limit-filter-panel__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.limit-filter-panel__head .icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 19px;
}

.limit-filter-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.limit-filter-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #666;
  font-size: 11px;
}

.limit-filter-grid select,
.limit-filter-grid input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 0 9px;
  color: #252525;
}

.limit-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.limit-overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #666;
  font-size: 11px;
}

.limit-overview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.limit-overview-legend i {
  width: 12px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
}

.legend-client {
  background: #2f8f6f;
}

.legend-work {
  background: #c7583f;
}

.legend-foreign {
  background: #ff5aa5;
}

.legend-courier {
  background: #7a6ff0;
}

.legend-replacement {
  background: #d97706;
}

.legend-long-work {
  background: #92400e;
}

.legend-long-client {
  background: #2563eb;
}

.legend-gray {
  background: #8a8f98;
}

.legend-current-line,
.legend-calculated-line {
  width: 18px !important;
  height: 0 !important;
  border-radius: 0 !important;
  background: transparent;
}

.legend-current-line {
  border-top: 2px solid #111827;
}

.legend-calculated-line {
  border-top: 2px dashed #0f5f3f;
}

.limit-overview-board {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.limit-zone-block {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.limit-zone-block > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 0 2px;
}

.limit-zone-block h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.limit-zone-block > header span {
  color: #777;
  font-size: 12px;
}

.limit-zone-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.limit-zone-empty {
  min-height: 94px;
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  background: #fafafa;
  color: #777;
  font-size: 12px;
}

.limit-tenant-card {
  min-width: 0;
  min-height: 134px;
  display: grid;
  grid-template-rows: auto auto minmax(58px, 1fr) auto;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 8px;
  color: #252525;
  text-align: left;
}

.limit-tenant-card:hover {
  border-color: var(--green);
  background: #f7fdf9;
}

.limit-tenant-card.limit-status-ok {
  border-color: #8fd3ad;
  background: #f2fbf6;
  box-shadow: inset 4px 0 0 #2f8f6f;
}

.limit-tenant-card.limit-status-service_only {
  border-color: #f3b85f;
  background: #fff7e8;
  box-shadow: inset 4px 0 0 #d97706;
}

.limit-tenant-card.limit-status-client_over {
  border-color: #f08a8a;
  background: #fff1f1;
  box-shadow: inset 4px 0 0 #c7583f;
}

.limit-tenant-card.limit-status-no_calculated_limit {
  border-color: #cfd4dc;
  background: #f8fafc;
  box-shadow: inset 4px 0 0 #8a8f98;
}

.limit-tenant-card.limit-status-ok:hover {
  background: #eaf8f0;
}

.limit-tenant-card.limit-status-service_only:hover {
  background: #fff0d8;
}

.limit-tenant-card.limit-status-client_over:hover {
  background: #ffe8e8;
}

.limit-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.92fr);
  gap: 7px;
  align-items: start;
}

.limit-card-title {
  min-width: 0;
  overflow: hidden;
  color: #1f2937;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.limit-card-activity-list {
  min-width: 0;
  max-height: 34px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.limit-card-activity {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #d8dee6;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #4b5563;
  padding: 2px 6px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
}

.limit-card-activity.muted {
  color: #8a8f98;
}

.limit-card-subtitle,
.limit-card-footer {
  min-width: 0;
  overflow: hidden;
  color: #6b7280;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}

.limit-card-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.limit-card-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.limit-card-chart {
  min-width: 0;
  position: relative;
  display: block;
  height: 60px;
  border-bottom: 1px solid #dcdcdc;
  background: linear-gradient(to top, #f3f4f6 1px, transparent 1px) 0 0 / 100% 20px;
}

.limit-bars {
  position: absolute;
  inset: 0 2px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
}

.limit-bar {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 11px;
  align-items: end;
  gap: 2px;
}

.limit-bar-stack {
  width: 100%;
  height: 45px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 2px 2px 0 0;
}

.limit-segment {
  display: block;
  width: 100%;
  min-height: 1px;
}

.cat-client {
  background: #2f8f6f;
}

.cat-work {
  background: #c7583f;
}

.cat-foreign_work {
  background: #ff5aa5;
}

.cat-courier {
  background: #7a6ff0;
}

.cat-work_replacement {
  background: #d97706;
}

.cat-long_work {
  background: #92400e;
}

.cat-long_client {
  background: #2563eb;
}

.cat-gray {
  background: #8a8f98;
}

.cat-data_error {
  background: #b7892f;
}

.limit-bar-label {
  overflow: hidden;
  color: #777;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1;
}

.limit-waterline {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: block;
}

.limit-waterline.current {
  border-top: 2px solid #111827;
}

.limit-waterline.calculated {
  border-top: 2px dashed #0f5f3f;
}

.tenant-analytics-panel {
  gap: 12px;
}

.tenant-analytics-header {
  align-items: end !important;
}

.tenant-analytics-header select {
  width: min(420px, 46vw);
  min-width: 240px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 0 9px;
  color: #1b1c1f;
  font-size: 13px;
}

.tenant-analytics-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.tenant-analytics-kpis {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tenant-analytics-kpis article {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fafafa;
  padding: 10px;
}

.tenant-analytics-kpis span {
  overflow: hidden;
  color: #777;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.tenant-analytics-kpis b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 500;
}

.tenant-analytics-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-panel {
  min-height: 0;
}

.analytics-panel--wide {
  grid-column: 1 / -1;
}

.tenant-analytics-chart {
  position: relative;
  min-width: 0;
  height: 238px;
  padding: 8px 0 0;
  border-bottom: 1px solid #dcdcdc;
  background: linear-gradient(to top, #f3f4f6 1px, transparent 1px) 0 0 / 100% 47px;
}

.tenant-analytics-bars {
  position: absolute;
  inset: 8px 4px 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  gap: 7px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
}

.tenant-analytics-bar {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 16px;
  gap: 4px;
  align-items: end;
}

.tenant-analytics-stack {
  width: 100%;
  height: 190px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
}

.tenant-analytics-bar > span {
  overflow: hidden;
  color: #777;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 10px;
}

.analytics-waterline {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: block;
}

.analytics-waterline.current {
  border-top: 2px solid #111827;
}

.analytics-waterline.calculated {
  border-top: 2px dashed #0f5f3f;
}

.analytics-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #777;
  font-size: 13px;
}

.analytics-breakdown {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.analytics-breakdown-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 1.4fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.analytics-breakdown-row b,
.analytics-breakdown-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-breakdown-row b {
  font-weight: 500;
}

.analytics-breakdown-row em {
  color: #666;
  font-style: normal;
  text-align: right;
}

.analytics-breakdown-row > span {
  min-width: 0;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #eceff1;
}

.analytics-breakdown-row i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: #276e9f;
}

.duration-fill {
  background: #276e9f !important;
}

.analytics-table-wrap {
  max-height: 360px;
}

.formula-settings-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
  gap: 14px;
}

.formula-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.formula-actions span {
  max-width: 220px;
  overflow: hidden;
  color: #666;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.formula-actions button {
  min-height: 34px;
  border: 1px solid #0b9950;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.formula-actions button:disabled {
  opacity: 0.65;
  cursor: default;
}

.formula-settings-grid section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.formula-settings-grid h3 {
  margin: 0;
  color: #444;
  font-size: 13px;
  font-weight: 600;
}

.formula-rule-list {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.formula-rule-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(76px, 0.8fr) minmax(90px, 1fr) 100px 46px;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fafafa;
  padding: 8px;
}

.formula-rule-row--default {
  grid-template-columns: minmax(100px, 0.8fr) minmax(140px, 1fr) 100px 46px;
}

.formula-rule-row b,
.formula-rule-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.formula-rule-row span {
  color: #777;
  font-size: 11px;
}

.formula-rule-row input[type="number"],
.formula-rules-table input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 0 7px;
  font-size: 12px;
}

.formula-rule-row button {
  height: 30px;
  border: 1px solid #0b9950;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.formula-check {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #555;
  font-size: 11px;
  white-space: nowrap;
}

.formula-check input {
  width: 14px;
  height: 14px;
}

.formula-table-wrap {
  max-height: 430px;
}

.formula-rules-table {
  min-width: 860px;
}

.topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.tenant-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 14px;
}

.tenant-title h1 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

#tenantSelect {
  width: 34px;
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: transparent;
  background: #fff;
}

.top-metrics {
  height: 100%;
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--line);
}

.metric,
.icon-btn {
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  color: #777;
}

.metric.balance {
  min-width: 260px;
  font-size: 16px;
}

.metric .icon {
  font-size: 20px;
  color: #777;
}

.metric.occupancy {
  width: 200px;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
}

.occupancy-bar {
  width: 150px;
  height: 14px;
  background: #0cce6b;
  border-radius: 7px;
  overflow: hidden;
}

.occupancy-bar div {
  height: 100%;
  width: 0;
  background: var(--red);
  border-radius: 7px;
}

.icon-btn {
  width: 58px;
  font-size: 21px;
}

.filterbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) 48px minmax(250px, 420px) 136px 48px;
  gap: 12px;
  align-items: center;
  padding: 7px 10px;
  background: #f7f7f7;
  border-bottom: 1px solid var(--line);
}

.add-btn {
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.search-box,
.date-box {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  color: #b8b8b8;
}

.search-box span,
.date-box span {
  font-size: 22px;
  color: #b8b8b8;
}

.search-box input,
.date-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14px;
  background: transparent;
}

.date-box input {
  text-align: center;
}

.date-box .dash {
  font-size: 14px;
  color: #333;
}

.filter-btn,
.export-btn,
.refresh-btn {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #777;
  font-size: 18px;
  font-weight: 700;
}

.export-btn {
  font-size: 14px;
  letter-spacing: 0;
}

.table-shell {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.ops-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ops-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 56px;
  padding: 0 14px;
  background: #fff;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.ops-table th small {
  display: block;
  margin-top: 3px;
  color: #9c9c9c;
  font-size: 11px;
}

.ops-table td {
  height: 48px;
  padding: 6px 14px;
  border-bottom: 1px solid #eeeeee;
  vertical-align: middle;
  font-size: 13px;
}

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

.ops-table tbody tr:hover {
  background: #f2f8f4;
}

.type-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
}

.percent-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.date-two-lines {
  line-height: 1.18;
}

.arrow-in {
  color: var(--green);
  font-size: 20px;
  margin-right: 8px;
}

.arrow-out {
  color: var(--red);
  font-size: 20px;
  margin-right: 8px;
}

.amount-cell b {
  display: block;
  font-weight: 500;
}

.amount-cell span {
  display: block;
  color: #9a9a9a;
  font-size: 11px;
  margin-top: 3px;
}

.empty-row td {
  height: 140px;
  text-align: center;
  color: #777;
}

.summarybar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(180px, 1.08fr) minmax(150px, 1fr) minmax(260px, 1.55fr) minmax(230px, 1.35fr);
  background: #fff;
  border-top: 1px solid var(--line);
}

.summarybar div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 13px;
  border-right: 1px solid var(--line);
}

.summarybar b {
  font-size: 11px;
  line-height: 13px;
}

.summarybar span {
  font-size: 16px;
  line-height: 19px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.68);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(54vw, 980px);
  min-width: 660px;
  height: 100vh;
  background: #efefef;
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.16);
  display: grid;
  grid-template-rows: 56px 64px minmax(0, 1fr);
}

.drawer-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.drawer-tabs button {
  border: 0;
  background: #fff;
  color: #888;
  font-size: 14px;
  font-weight: 800;
}

.drawer-tabs .active {
  color: var(--orange);
  border-bottom: 4px solid var(--orange);
}

.drawer-tabs .drawer-close {
  color: #777;
  font-size: 34px;
  font-weight: 300;
}

.stepper {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.stepper button {
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #888;
  font-size: 14px;
  font-weight: 700;
}

.stepper button.active {
  color: var(--orange);
}

.drawer-step {
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.drawer-search {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0 13px;
  margin-bottom: 16px;
}

.drawer-search span {
  color: #c5c5c5;
  font-size: 22px;
}

.drawer-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.session-results {
  display: grid;
  gap: 14px;
}

.session-card,
.mode-card,
.review-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  padding: 18px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.session-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.session-card .card-icon {
  font-size: 24px;
  line-height: 1;
}

.session-card h3,
.mode-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.session-card p,
.mode-card p {
  margin: 3px 0;
  color: #333;
  font-size: 15px;
}

.session-card .session-source {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 3px;
  background: #e9f3ed;
  color: #28613f;
  font-size: 12px;
  font-weight: 700;
}

.session-card .session-status {
  color: #8b1e1e;
  font-weight: 700;
}

.session-card .select-btn,
.mode-actions button,
.write-btn {
  height: 58px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #f8f8f8;
  color: #252525;
  font-size: 14px;
  font-weight: 700;
}

.session-card .select-btn:disabled {
  border: 0;
  background: transparent;
  color: #555;
  cursor: not-allowed;
  font-size: 17px;
  line-height: 1.2;
}

.session-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  margin: -10px -10px 18px;
  background: #f7f7f7;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

.session-header b {
  font-size: 26px;
  font-weight: 500;
}

.session-header span {
  color: #444;
  font-size: 13px;
  font-weight: 700;
}

.mode-card {
  min-height: 132px;
}

.mode-actions {
  display: grid;
  gap: 10px;
}

.mode-actions button:first-child,
.write-btn {
  background: var(--green);
  color: #fff;
  border-color: var(--green-dark);
}

.custom-amount {
  display: grid;
  gap: 7px;
  color: #666;
  font-weight: 700;
  margin-top: 10px;
  font-size: 13px;
}

.custom-amount input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
}

.review-block {
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.review-block h3 {
  margin: 0;
  font-size: 20px;
}

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

.review-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f8f8f8;
  border: 1px solid #e3e3e3;
}

.review-grid span {
  color: #777;
  font-size: 12px;
}

.review-grid b {
  font-size: 14px;
}

.write-result {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #a7e7c3;
  background: #edfdf4;
}

.write-result span {
  color: #057a3d;
  font-size: 12px;
}

.write-result b {
  color: #164f2d;
  font-size: 14px;
}

.write-btn {
  width: 170px;
  float: right;
}

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

.readonly-note {
  clear: both;
  padding-top: 10px;
  font-size: 13px;
  color: #777;
  text-align: right;
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 158px minmax(0, 1fr);
  }

  .side-menu__item {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-left: 8px;
  }

  .side-menu__item b {
    font-size: 12px;
  }

  .filterbar {
    grid-template-columns: 150px minmax(180px, 1fr) 42px minmax(210px, 300px) 116px 42px;
    gap: 8px;
  }

  .metric.balance {
    min-width: 210px;
  }

  .drawer {
    width: 68vw;
    min-width: 620px;
  }
}

@media (max-width: 900px) {
  .parking-admin {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .admin-sidebar__brand {
    padding: 0 8px;
  }

  .admin-sidebar__brand span {
    display: none;
  }

  .admin-sidebar__brand b {
    font-size: 11px;
    text-align: center;
  }

  .admin-nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 7px 4px;
  }

  .admin-nav-item b {
    font-size: 10px;
    text-align: center;
  }

  .admin-kpi-grid,
  .admin-kpi-grid--compact,
  .admin-board,
  .admin-two-pane,
  .formula-settings-grid,
  .tenant-analytics-kpis,
  .tenant-analytics-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel__filters {
    grid-template-columns: 1fr 1fr;
  }

  .admin-panel__filters h2 {
    grid-column: 1 / -1;
  }

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

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

  .admin-inline-form button {
    grid-column: 1 / -1;
  }

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

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

  .admin-premise-form button {
    grid-column: 1 / -1;
  }

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

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

  .inline-form button {
    grid-column: 1 / -1;
  }

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

  .support-channels {
    grid-template-columns: 1fr;
  }

  .drawer {
    width: 86vw;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  body {
    overflow: hidden;
  }

  .parking-admin {
    height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 64px;
  }

  .admin-sidebar {
    grid-row: 2;
    height: 64px;
    grid-template-rows: 1fr;
    border-top: 1px solid #161718;
    border-right: 0;
  }

  .admin-sidebar__brand {
    display: none;
  }

  .admin-sidebar__nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(64px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
  }

  .admin-nav-item {
    min-height: 64px;
    grid-template-rows: 26px 22px;
    border-left: 0;
    border-top: 3px solid transparent;
  }

  .admin-nav-item.active {
    border-top-color: var(--orange);
    border-left-color: transparent;
  }

  .admin-shell {
    grid-row: 1;
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .admin-header h1 {
    font-size: 17px;
  }

  .admin-header__tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 46px;
  }

  .admin-date-box {
    height: auto;
    min-height: 40px;
    flex-wrap: wrap;
    padding: 6px 8px;
  }

  .admin-date-box input {
    width: 118px;
  }

  .admin-section {
    padding: 10px;
  }

  .admin-form--two,
  .admin-inline-form,
  .admin-panel__filters {
    grid-template-columns: 1fr;
  }

  .tenant-analytics-header {
    align-items: stretch !important;
    flex-direction: column;
  }

  .tenant-analytics-header select {
    width: 100%;
    min-width: 0;
  }

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

  .formula-rule-row,
  .formula-rule-row--default {
    grid-template-columns: 1fr;
  }

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

  .formula-actions button {
    width: 100%;
  }

  .analytics-breakdown-row {
    grid-template-columns: 1fr;
  }

  .analytics-breakdown-row em {
    text-align: left;
  }

  .limit-overview-header,
  .limit-overview-controls {
    grid-template-columns: 1fr;
  }

  .limit-overview-header {
    align-items: stretch !important;
    flex-direction: column;
  }

  .limit-overview-controls {
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
  }

  .limit-overview-controls span {
    max-width: none;
    text-align: left;
  }

  .limit-filter-panel {
    position: fixed;
    inset: 10px;
    width: auto;
    max-height: calc(100dvh - 20px);
    overflow: auto;
  }

  .limit-filter-grid {
    grid-template-columns: 1fr;
  }

  .limit-zone-grid {
    grid-template-columns: 1fr;
  }

  .queue-item {
    grid-template-columns: 1fr;
  }

  .queue-item small {
    grid-column: 1;
  }

  .login-screen {
    padding: 14px;
  }

  .login-panel {
    padding: 20px;
  }

  .app {
    height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 64px;
  }

  .side-menu {
    grid-row: 2;
    height: 64px;
    grid-template-rows: 1fr;
    border-top: 1px solid #161718;
    border-right: 0;
  }

  .side-menu__brand {
    display: none;
  }

  .side-menu__nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(62px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
  }

  .side-menu__item {
    min-height: 64px;
    grid-template-columns: 1fr;
    grid-template-rows: 26px 22px;
    justify-items: center;
    align-content: center;
    gap: 2px;
    border-left: 0;
    border-top: 3px solid transparent;
    padding: 6px 5px 4px;
    text-align: center;
  }

  .side-menu__item:hover,
  .side-menu__item.active {
    border-left-color: transparent;
    border-top-color: var(--orange);
  }

  .side-menu__item .material-icons {
    font-size: 22px;
  }

  .side-menu__item b {
    width: 100%;
    font-size: 9px;
    line-height: 1.12;
    white-space: normal;
  }

  .content-shell {
    grid-row: 1;
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tenant-title {
    min-height: 48px;
    padding: 0 10px;
  }

  .tenant-title h1 {
    font-size: 13px;
  }

  #tenantSelect {
    flex: 0 0 34px;
  }

  .top-metrics {
    height: 42px;
    min-width: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric.balance {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 0 10px;
    font-size: 13px;
  }

  .metric .icon {
    font-size: 18px;
  }

  .icon-btn {
    width: 46px;
    min-width: 46px;
    font-size: 18px;
  }

  #section-zeroings {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .filterbar {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 8px;
  }

  .filterbar .add-btn {
    grid-column: 1;
  }

  .filterbar .refresh-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .filterbar .search-box,
  .filterbar .date-box,
  .filterbar .export-btn {
    grid-column: 1 / -1;
  }

  .filterbar .filter-btn {
    display: none;
  }

  .add-btn,
  .search-box,
  .date-box,
  .filter-btn,
  .export-btn,
  .refresh-btn {
    height: 40px;
  }

  .date-box {
    padding: 0 8px;
  }

  .date-box input {
    font-size: 12px;
  }

  .ops-table {
    min-width: 1040px;
  }

  .ops-table th {
    height: 48px;
    padding: 0 10px;
    font-size: 12px;
  }

  .ops-table td {
    padding: 6px 10px;
    font-size: 12px;
  }

  .summarybar {
    display: flex;
    min-height: 58px;
    overflow-x: auto;
  }

  .summarybar div {
    min-width: 180px;
    padding: 7px 10px;
  }

  .summarybar span {
    font-size: 12px;
    line-height: 1.25;
  }

  .section-page {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .section-head {
    min-height: 54px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 8px 12px;
  }

  .section-head h2 {
    font-size: 16px;
  }

  .section-head span {
    font-size: 11px;
  }

  .portal-grid {
    gap: 10px;
    padding: 10px;
  }

  .portal-card {
    padding: 12px;
  }

  .profile-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-list dt {
    margin-top: 4px;
  }

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

  .admin-grid {
    gap: 10px;
    padding: 10px;
  }

  .admin-app {
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .admin-topbar h1 {
    font-size: 17px;
  }

  .admin-topbar__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .admin-date-box {
    height: auto;
    min-height: 40px;
    flex-wrap: wrap;
    padding: 6px 8px;
  }

  .admin-date-box input {
    width: 118px;
  }

  .admin-tenant-card .portal-form,
  .admin-premise-form {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    grid-template-columns: 1fr 44px;
  }

  .admin-ops-table {
    min-width: 1100px;
  }

  .admin-tenants-table {
    min-width: 880px;
  }

  .portal-form input,
  .portal-form select,
  .portal-form textarea,
  .inline-form input,
  .inline-form select,
  .portal-form button,
  .inline-form button {
    min-height: 40px;
  }

  .mini-table {
    min-width: 620px;
  }

  .mini-table th,
  .mini-table td {
    padding: 8px;
    font-size: 12px;
  }

  .big-number {
    font-size: 24px;
  }

  .calc-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .analytics-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .analytics-kpis div {
    padding: 10px;
  }

  .analytics-kpis b {
    font-size: 14px;
  }

  .category-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .notice-list {
    padding: 10px;
  }

  .support-channel-btn {
    min-height: 48px;
  }

  .drawer {
    inset: 0;
    width: 100vw;
    min-width: 0;
    height: 100dvh;
    grid-template-rows: 50px auto minmax(0, 1fr);
  }

  .drawer-tabs {
    grid-template-columns: 1fr 1fr 50px;
  }

  .drawer-tabs button {
    font-size: 12px;
  }

  .drawer-tabs .drawer-close {
    font-size: 30px;
  }

  .stepper {
    grid-template-columns: repeat(3, minmax(118px, 1fr));
    overflow-x: auto;
  }

  .stepper button {
    min-height: 50px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 1.2;
  }

  .drawer-step {
    padding: 8px;
  }

  .drawer-search {
    height: 44px;
    margin-bottom: 10px;
  }

  .session-card,
  .mode-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .session-card h3,
  .mode-card h3 {
    font-size: 18px;
  }

  .session-card p,
  .mode-card p {
    font-size: 13px;
  }

  .session-card .select-btn,
  .mode-actions button,
  .write-btn {
    width: 100%;
    height: 44px;
  }

  .session-header {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    padding: 10px 12px;
    margin: -8px -8px 12px;
  }

  .session-header b {
    font-size: 20px;
  }

  .session-header span {
    font-size: 12px;
  }

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

  .review-block {
    padding: 14px;
  }

  .readonly-note {
    text-align: left;
  }
}

@media (max-width: 390px) {
  .side-menu__nav {
    grid-auto-columns: minmax(58px, 1fr);
  }

  .side-menu__item b {
    font-size: 8.5px;
  }

  .metric.balance {
    font-size: 12px;
  }

  .analytics-kpis {
    grid-template-columns: 1fr;
  }
}


.wallets-page .section-head,
#section-vehicles .section-head,
#section-compliance .section-head {
  margin-bottom: 0;
}

.wallet-card-grid {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(180px, 1.5fr));
  grid-auto-flow: dense;
  grid-auto-rows: minmax(132px, auto);
  gap: 12px;
  padding: 14px 14px 0;
  margin-bottom: 0;
}

.wallet-card {
  --wallet-color: #0b5eb8;
  --wallet-soft: #e9f2ff;
  --wallet-contrast: #ffffff;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line, #d9dee7);
  border-top: 4px solid var(--wallet-color);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-card--client {
  --wallet-color: #0f5132;
  --wallet-soft: #e6f4ed;
  grid-row: span 2;
  min-height: 276px;
}

.wallet-card--service {
  --wallet-color: #d97706;
  --wallet-soft: #fff1dc;
}

.wallet-card--personal {
  --wallet-color: #7c3aed;
  --wallet-soft: #f1e9ff;
}

.wallet-card--courier {
  --wallet-color: #0b5eb8;
  --wallet-soft: #e9f2ff;
}

.wallet-card--employee {
  --wallet-color: #8a5a2b;
  --wallet-soft: #f4eadf;
}

.wallet-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 38px;
}

.wallet-card__head span {
  font-weight: 700;
  color: #1d2530;
}

.wallet-card__head b {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  background: var(--wallet-soft);
  color: var(--wallet-color);
}

.bridge-status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  background: #e7f4ed;
  color: #1b6d3a;
}

.wallet-card__head b {
  margin-left: auto;
  max-width: 150px;
}

.wallet-card--low .wallet-card__head b {
  background: var(--wallet-soft);
  color: var(--wallet-color);
}

.bridge-status.locked {
  background: #fff4d7;
  color: #8a5b00;
}

.wallet-card--overrun .wallet-card__head b {
  background: var(--wallet-soft);
  color: var(--wallet-color);
}

.bridge-status.debt {
  background: #ffe4e4;
  color: #a52727;
}

.wallet-card__amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--wallet-color);
}

.wallet-track {
  height: 8px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}

.wallet-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--wallet-color);
}

.wallet-card--low .wallet-track i {
  background: var(--wallet-color);
}

.wallet-card--overrun .wallet-track i {
  background: var(--wallet-color);
}

.wallet-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.wallet-action-btn {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-weight: 800;
  background: var(--wallet-color);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.14);
}

.wallet-action-btn .material-icons {
  font-size: 19px;
  line-height: 1;
}

.wallet-plus-icon {
  position: relative;
  width: 24px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.wallet-plus-icon > .material-icons:first-child {
  font-size: 20px;
}

.wallet-plus-icon__plus {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px !important;
}

.wallet-action-btn--topup {
  background: #0b8f49;
}

.wallet-action-btn--convert {
  background: #0b5eb8;
}

.wallet-card--client .wallet-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-card:not(.wallet-card--client) .wallet-action-btn {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.wallet-card:not(.wallet-card--client) .wallet-action-label {
  display: none;
}

.wallet-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0;
  font-size: 13px;
}

.wallet-card dt {
  color: #687386;
}

.wallet-card dd {
  margin: 0;
  font-weight: 700;
  color: #202938;
}

.wallet-card p,
.bridge-panel p {
  margin: auto 0 0;
  color: #667085;
  line-height: 1.45;
  font-size: 13px;
}

.wallet-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr);
  gap: 16px;
  padding: 14px;
}

.bridge-panel {
  min-height: 250px;
}

.bridge-panel h3 {
  margin-bottom: 12px;
}

.bridge-panel button[disabled] {
  width: 100%;
  margin-top: 14px;
  opacity: 0.62;
  cursor: not-allowed;
}

.settings-limits-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.vehicle-inline-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#employeeForm.vehicle-inline-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.permission-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 12px;
  align-items: center;
}

.vehicle-inline-form .form-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.vehicle-inline-form .form-actions button {
  min-width: 120px;
}

.ghost-btn {
  border: 1px solid var(--line, #d9dee7);
  background: #fff;
  color: #344054;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  border: 1px solid var(--line, #d9dee7);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
  cursor: pointer;
}

.row-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.muted-line {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.25;
}

.access-list {
  display: block;
  min-width: 180px;
  max-width: 440px;
  line-height: 1.35;
}

.compliance-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  padding: 14px 14px 0;
  margin-bottom: 0;
}

.compliance-kpis div {
  border: 1px solid var(--line, #d9dee7);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.compliance-kpis span {
  display: block;
  color: #687386;
  font-size: 13px;
  margin-bottom: 8px;
}

.compliance-kpis b {
  color: #111827;
  font-size: 24px;
}

.zeroing-wallet {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #536174;
  font-size: 13px;
  font-weight: 700;
}

.zeroing-wallet select {
  min-height: 38px;
  border: 1px solid var(--line, #d9dee7);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: #111827;
}

@media (max-width: 1320px) {
  .wallet-card-grid {
    grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(170px, 1.5fr));
  }

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

  .vehicle-inline-form,
  #employeeForm.vehicle-inline-form,
  .settings-limits-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .vehicle-inline-form .form-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .wallet-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-card--client {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 160px;
  }
}

@media (max-width: 760px) {
  .wallet-card-grid,
  .compliance-kpis,
  .vehicle-inline-form,
  #employeeForm.vehicle-inline-form,
  .settings-limits-form {
    grid-template-columns: 1fr;
  }

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

  .vehicle-inline-form .form-actions {
    flex-direction: column;
  }

  .wallet-card__head {
    min-height: auto;
    flex-direction: column;
  }
}

@media (max-width: 960px) {
  .content-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
  }

  .tenant-title {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
  }

  .top-metrics {
    width: 100%;
    height: 42px;
    min-width: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric.balance {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 0 10px;
    font-size: 13px;
  }

  .filterbar {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 8px;
  }

  .filterbar .add-btn {
    grid-column: 1;
  }

  .filterbar .refresh-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .filterbar .search-box,
  .filterbar .date-box,
  .filterbar .export-btn {
    grid-column: 1 / -1;
  }

  .filterbar .filter-btn {
    display: none;
  }
}

@media (max-width: 680px) {
  .side-menu__nav {
    grid-auto-columns: minmax(84px, 1fr);
  }

  .side-menu__item b {
    font-size: 10px;
    line-height: 1.12;
  }
}

/* Employee self-service shell */
.employee-body {
  background: #eef1f3;
}

.employee-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  color: #1f2529;
}

.employee-sidebar {
  min-width: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  background: #20262a;
  color: #eef3f5;
}

.employee-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid #333b40;
}

.employee-brand .material-icons {
  color: var(--green);
}

.employee-nav {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding: 10px 0;
}

.employee-nav__item {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: #cdd5d9;
  padding: 0 16px 0 14px;
  text-align: left;
}

.employee-nav__item:hover,
.employee-nav__item.active {
  background: #30383d;
  color: #fff;
  border-left-color: var(--green);
}

.employee-nav__item .material-icons {
  font-size: 21px;
}

.employee-nav__item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
}

.employee-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  min-height: 100vh;
}

.employee-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.employee-topbar span {
  display: block;
  color: #68747b;
  font-size: 12px;
  font-weight: 700;
}

.employee-topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.employee-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.employee-topbar__actions .icon-btn {
  display: grid;
  place-items: center;
}

.employee-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 28px;
}

.employee-view {
  display: none;
}

.employee-view.active {
  display: block;
}

.employee-kpi-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.8fr));
  gap: 12px;
  margin-bottom: 14px;
}

.employee-kpi,
.employee-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.employee-kpi {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.employee-kpi span,
.employee-kpi small {
  color: #68747b;
  font-size: 13px;
}

.employee-kpi b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 27px;
  line-height: 1.05;
}

.employee-kpi--primary {
  background: #163f31;
  color: #fff;
  border-color: #163f31;
}

.employee-kpi--primary span,
.employee-kpi--primary small {
  color: #d9eee6;
}

.employee-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.employee-card {
  padding: 18px;
}

.employee-card header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.employee-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.employee-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  border-radius: 999px;
  background: #e8f4ee;
  color: #17623f;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.employee-pill.muted {
  background: #edf0f2;
  color: #69757c;
}

.employee-profile-list {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.employee-profile-list.compact {
  grid-template-columns: minmax(92px, 0.5fr) minmax(0, 1fr);
}

.employee-profile-list dt {
  color: #68747b;
  font-size: 13px;
}

.employee-profile-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.employee-action-stack {
  display: grid;
  gap: 10px;
}

.employee-action-stack button,
.employee-form-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: var(--green-dark);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
}

.employee-form-actions button.secondary {
  background: #e8ecef;
  color: #2b3338;
}

.employee-form {
  display: grid;
  gap: 12px;
}

.employee-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #68747b;
  font-size: 13px;
  font-weight: 700;
}

.employee-form input,
.employee-form select,
.employee-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: #1f2529;
}

.employee-form textarea {
  resize: vertical;
}

.employee-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.employee-topup-form {
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.7fr);
}

.employee-topup-preview,
.employee-form-actions {
  grid-column: 1 / -1;
}

.employee-topup-preview {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d6e6dd;
  border-radius: 6px;
  background: #f3fbf7;
  padding: 0 12px;
}

.employee-big-number {
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 8px 0 18px;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.05;
}

.employee-list {
  display: grid;
  gap: 8px;
}

.employee-list-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.employee-list-item b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.employee-list-item span,
.employee-empty,
.employee-empty-cell {
  color: #68747b;
}

.employee-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.employee-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.employee-table th,
.employee-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}

.employee-table th {
  color: #68747b;
  font-size: 12px;
  text-transform: uppercase;
}

.employee-empty-cell {
  text-align: center !important;
}

@media (max-width: 980px) {
  .employee-app {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .employee-brand b,
  .employee-nav__item b {
    display: none;
  }

  .employee-brand {
    justify-content: center;
    padding: 0;
  }

  .employee-nav__item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .employee-kpi-grid,
  .employee-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .employee-app {
    display: block;
    padding-bottom: 66px;
  }

  .employee-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    height: 66px;
    display: block;
    border-top: 1px solid #333b40;
  }

  .employee-brand {
    display: none;
  }

  .employee-nav {
    height: 66px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    padding: 0;
  }

  .employee-nav__item {
    min-height: 66px;
    border-left: 0;
    border-top: 4px solid transparent;
  }

  .employee-nav__item.active {
    border-top-color: var(--green);
  }

  .employee-shell {
    min-height: 100vh;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .employee-topbar {
    align-items: flex-start;
    padding: 14px 14px 12px;
  }

  .employee-topbar h1 {
    font-size: 20px;
  }

  .employee-main {
    padding: 14px;
  }

  .employee-kpi-grid {
    gap: 10px;
    margin-bottom: 10px;
  }

  .employee-kpi {
    min-height: 96px;
    padding: 14px;
  }

  .employee-kpi b,
  .employee-big-number {
    font-size: 24px;
  }

  .employee-card {
    padding: 14px;
  }

  .employee-card header {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-profile-list,
  .employee-profile-list.compact,
  .employee-topup-form {
    grid-template-columns: 1fr;
  }

  .employee-form-actions button {
    width: 100%;
  }

  .employee-table {
    min-width: 480px;
  }
}
