:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --panel: #ffffff;
  --panel-2: #f9faf7;
  --line: #dcded8;
  --text: #20231f;
  --muted: #6f766d;
  --soft: #eef1ea;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn: #b45309;
  --danger: #b42318;
  --ok: #157347;
  --focus: rgba(15, 118, 110, .18);
  --shadow: 0 10px 30px rgba(32, 35, 31, .08);
  --radius: 8px;
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  color: var(--muted);
  text-align: center;
}

.boot-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  background: var(--panel);
}

.login-panel {
  padding: 48px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.login-aside {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 56px;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, .08), rgba(180, 83, 9, .08)),
    var(--panel-2);
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.login-copy {
  color: var(--muted);
  line-height: 1.7;
  max-width: 680px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-highlight {
  padding: 10px;
  border: 1px solid #f1d89a;
  border-radius: 8px;
  background: #fff9ea;
}

.field-highlight .label {
  color: #8b6418;
}

.field-highlight .input,
.field-highlight .select {
  border-color: #e9c46a;
  background: #fffef8;
}

.label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.input,
.select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: white;
  color: var(--text);
  outline: none;
}

.textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: white;
  color: var(--text);
  resize: vertical;
  outline: none;
}

.select-small {
  width: auto;
  min-width: 116px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.input-small {
  width: 132px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.btn {
  min-height: 40px;
  border-radius: 7px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--soft);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(.98);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

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

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

.btn-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: var(--soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.alert {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff5e6;
  color: #7c3e04;
  border: 1px solid #f4d4a5;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
  width: 100%;
  overflow-x: hidden;
}

.sidebar {
  background: #272a25;
  color: #f7f8f3;
  min-height: 100vh;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar .brand {
  padding: 6px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar .brand-subtitle {
  color: rgba(247, 248, 243, .62);
}

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

.nav-button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: rgba(247, 248, 243, .76);
  text-align: left;
}

.nav-level-1 {
  padding-left: 24px;
}

.nav-level-2 {
  padding-left: 38px;
}

.nav-level-3 {
  padding-left: 52px;
}

.nav-level-1 .nav-label::before,
.nav-level-2 .nav-label::before,
.nav-level-3 .nav-label::before {
  content: ">";
  flex: 0 0 auto;
  margin-right: 2px;
  color: rgba(247, 248, 243, .42);
  font-size: 11px;
  font-weight: 800;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, .1);
  color: white;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  font-size: 11px;
  font-weight: 800;
}

.nav-label {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.main {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  max-width: 100%;
}

.topbar-title {
  font-weight: 800;
  font-size: 17px;
  min-width: 160px;
}

.topbar-spacer {
  flex: 1;
}

.admin-chip {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: white;
  color: var(--muted);
}

.content {
  padding: 22px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar .input {
  max-width: 300px;
}

.filter-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-chip strong {
  color: var(--text);
}

.filter-form {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-form .select {
  min-width: 118px;
}

.filter-form .input {
  min-width: 132px;
}

.filter-date-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.filter-date-field .input {
  min-width: 132px;
}

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

.detail-item {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}

.detail-item-wide {
  grid-column: 1 / -1;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.readonly-box {
  min-height: 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}

.json-block {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.raw-snapshot {
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.raw-snapshot:last-child {
  margin-bottom: 0;
}

.raw-snapshot summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.raw-snapshot .json-block {
  max-height: 320px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0 0 7px 7px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric-button {
  width: 100%;
  color: inherit;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.metric-button:hover,
.metric-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 12px 34px rgba(15, 118, 110, .14);
  transform: translateY(-1px);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 800;
}

.metric-note {
  min-height: 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel {
  min-width: 0;
  max-width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-weight: 800;
}

.panel-compact {
  margin-bottom: 14px;
}

.time-bucket-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}

.time-bucket {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.time-bucket strong {
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.pagination-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.pagination-info {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination-actions .btn:disabled {
  opacity: .55;
  cursor: default;
  filter: none;
}

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

th,
td {
  height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 800;
}

td {
  color: #2e322d;
}

.empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.empty-compact {
  min-height: 56px;
}

.destination-table {
  min-width: 560px;
}

.destination-table .destination-input {
  width: min(360px, 100%);
  min-width: 220px;
}

.status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--soft);
  color: var(--muted);
}

.status.ACTIVE,
.status.APPROVED,
.status.PAID,
.status.SUCCESS {
  background: #e5f4ec;
  color: var(--ok);
}

.status.CATCHED,
.status.ACCEPTED_STOPPED {
  background: #d9f8f2;
  color: #04756f;
  border: 1px solid #8edfd5;
}

.status.PENDING,
.status.TEST,
.status.REGISTERED {
  background: #fff4d8;
  color: var(--warn);
}

.status.BLOCKED,
.status.DISABLED,
.status.REJECTED,
.status.EXPIRED,
.status.DELETED {
  background: #fae8e6;
  color: var(--danger);
}

.status.PAUSED,
.status.INACTIVE,
.status.LOST {
  background: #eceff3;
  color: #516070;
}

.status.monitoring-session-status.STARTED {
  background: #e8f1ff;
  color: #1d4ed8;
  border: 1px solid #b8d3ff;
}

.status.monitoring-session-status.STOPPED {
  background: #eef2f6;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status.monitoring-session-status.CATCHED,
.status.monitoring-session-status.ACCEPTED_STOPPED {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status.monitoring-session-status.BLOCKED {
  background: #fff1db;
  color: #b45309;
  border: 1px solid #f8c878;
}

.status.monitoring-session-status.INTERRUPTED {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

.status.monitoring-session-status.ERROR {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.mono {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
}

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

.status-stack {
  display: inline-grid;
  gap: 5px;
  justify-items: start;
}

.status-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.log-id-cell {
  color: var(--muted);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.log-time-cell {
  min-width: 104px;
  display: grid;
  gap: 3px;
}

.log-time-cell strong {
  color: #20251f;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
  line-height: 1.2;
}

.log-time-cell span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.log-time-cell em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.log-target-td,
.log-type-td,
.log-content-td {
  white-space: normal;
}

.log-target-td {
  min-width: 220px;
}

.text-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.log-target-filter {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}

.text-link.log-target-filter:hover .log-primary-line,
.text-link.log-target-filter:hover .mono {
  color: var(--primary);
  text-decoration: underline;
}

.log-type-td {
  min-width: 170px;
}

.log-content-td {
  min-width: 360px;
  max-width: 620px;
}

.log-stack-cell,
.log-content-cell {
  display: grid;
  gap: 5px;
  align-content: center;
}

.log-primary-line {
  color: #20251f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.log-secondary-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.log-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.log-meta-chip {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-snippet {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.user-summary-cell {
  min-width: 520px;
  max-width: 760px;
  white-space: normal;
}

.user-profile-stack {
  display: grid;
  gap: 8px;
}

.user-profile-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.user-uid-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #cbdcc7;
  border-radius: 999px;
  background: #f3f8f1;
  color: #40533f;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.user-uid-badge strong {
  color: var(--text);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
}

.user-uid-badge:hover {
  border-color: var(--accent);
  background: #e9f3e5;
}

.user-uid-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.user-phone-subscription-list {
  display: grid;
  gap: 4px;
}

.user-subscription-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.65;
}

.user-summary-bullet,
.user-summary-chip {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.user-summary-bullet {
  min-width: 20px;
  justify-content: center;
  color: #40533f;
}

.user-service-name {
  font-weight: 700;
}

.days-highlight {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #e5f4ec;
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.days-highlight.days-warning {
  background: #fff4d8;
  color: var(--warn);
}

.days-highlight.days-critical {
  background: #fae8e6;
  color: var(--danger);
}

.days-highlight.days-expired {
  background: #fae8e6;
  color: var(--danger);
}

.days-highlight.days-muted {
  background: var(--soft);
  color: var(--muted);
}

.user-summary-empty,
.user-summary-more {
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-height: 42px;
  max-width: min(380px, calc(100vw - 36px));
  padding: 11px 14px;
  background: #242821;
  color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 50;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 20, 17, .48);
}

.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}

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

.modal-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

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

.field-wide {
  grid-column: 1 / -1;
}

.check-row {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

@media (max-width: 980px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-aside {
    display: none;
  }

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

  .sidebar {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px;
  }

  .app-layout,
  .sidebar,
  .main,
  .topbar,
  .content {
    width: 100%;
    max-width: 100vw;
  }

  .sidebar .brand {
    padding: 0 4px 10px;
  }

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

  .topbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px;
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar .select {
    width: min(100%, 360px);
  }

  .admin-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toolbar .input {
    max-width: none;
    flex: 1 1 260px;
  }

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

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

@media (max-width: 560px) {
  .login-panel {
    padding: 28px 20px;
  }

  .login-title {
    font-size: 24px;
  }

  .sidebar {
    gap: 10px;
  }

  .nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 94px;
    padding: 0 9px;
    justify-content: center;
  }

  .nav-icon {
    display: none;
  }

  .topbar {
    align-items: stretch;
    gap: 8px;
  }

  .topbar-title,
  .topbar .select,
  .topbar .btn,
  .admin-chip {
    width: 100%;
    max-width: calc(100vw - 24px);
  }

  .topbar-title {
    font-size: 16px;
  }

  .topbar-spacer {
    display: none;
  }

  .content {
    padding: 12px;
  }

  .toolbar {
    align-items: stretch;
    max-width: 100%;
    overflow-x: hidden;
  }

  .toolbar .input,
  .filter-strip,
  .filter-form {
    width: 100%;
  }

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

  .filter-form .select,
  .filter-form .input,
  .filter-form .input-small,
  .filter-form .btn {
    width: 100%;
    min-width: 0;
  }

  .filter-form .filter-date-field {
    width: 100%;
  }

  .filter-form .filter-date-field .input {
    width: 100%;
    min-width: 0;
  }

  .filter-chip {
    max-width: 100%;
  }

  .panel-head {
    height: auto;
    min-height: 48px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
  }

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

  .pagination-actions {
    justify-content: flex-start;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 8px 10px;
  }

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

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

  .modal-backdrop {
    align-items: start;
    padding: 8px;
  }

  .modal {
    max-height: calc(100dvh - 16px);
  }

  .modal-head {
    padding: 0 12px;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-actions {
    flex-wrap: wrap;
    padding: 12px;
  }

  .modal-actions .btn {
    flex: 1 1 120px;
  }
}

@media (max-width: 380px) {
  .filter-form {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0 10px;
  }
}
