:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --panel-soft: #eef5f2;
  --ink: #16211d;
  --muted: #66736e;
  --line: #dce7e2;
  --green: #176b57;
  --green-deep: #0f4439;
  --blue: #2f6fab;
  --gold: #b98128;
  --rose: #a9556d;
  --cyan: #188489;
  --danger: #b8473e;
  --shadow: 0 18px 48px rgba(18, 36, 30, 0.12);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef5f2 0, #f8faf8 390px),
    var(--bg);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 111, 171, 0.22);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 28px clamp(18px, 4vw, 46px) 18px;
}

.brand-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.topbar h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.topbar-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.topbar-summary span,
.pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-deep);
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 44, 35, 0.08);
}

.mode-switch button {
  min-height: 42px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.mode-switch .active {
  color: #fff;
  background: var(--green);
}

.layout {
  display: block;
  padding: 0 clamp(18px, 4vw, 46px) 36px;
}

.sidebar,
.workspace,
.phone-shell,
.panel,
.drawer,
.feature-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(18, 36, 30, 0.08);
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 14px;
}

.sidebar::-webkit-scrollbar,
.phone-screen::-webkit-scrollbar,
.admin-main::-webkit-scrollbar {
  width: 0;
}

.sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-title strong {
  font-size: 15px;
}

.sidebar-title span {
  color: var(--muted);
  font-size: 12px;
}

.module-nav {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.module-nav button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: #f7faf8;
  text-align: left;
}

.module-nav button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.module-nav button b {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.25;
}

.module-nav button em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.module-nav .active {
  border-color: rgba(23, 107, 87, 0.45);
  background: #e8f3ef;
}

.module-nav .tone-blue span {
  background: var(--blue);
}

.module-nav .tone-gold span {
  background: var(--gold);
}

.module-nav .tone-rose span {
  background: var(--rose);
}

.module-nav .tone-cyan span {
  background: var(--cyan);
}

.workspace {
  min-width: 0;
  padding: 18px;
}

.mini-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.phone-shell {
  width: min(390px, 100%);
  max-width: 390px;
  flex: 0 0 auto;
  height: min(820px, calc(100vh - 190px));
  min-height: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 12px solid #111917;
  border-radius: 36px;
  background: #111917;
}

.phone-status {
  height: 32px;
  padding: 8px 18px 0;
  display: flex;
  justify-content: space-between;
  color: #ecf5f0;
  font-size: 12px;
}

.phone-nav {
  height: 44px;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  padding: 0 14px;
  color: #fff;
}

.phone-nav b {
  text-align: center;
  font-size: 15px;
}

.phone-dot {
  justify-self: end;
  width: 48px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  position: relative;
}

.phone-dot::before,
.phone-dot::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.phone-dot::before {
  left: 15px;
}

.phone-dot::after {
  left: 28px;
}

.phone-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}

.phone-back::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 11px;
  width: 9px;
  height: 9px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.phone-screen {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #edf4ef;
}

.mini-hero {
  margin: -14px -14px 12px;
  padding: 18px 16px 20px;
  color: #fff;
  background: linear-gradient(135deg, #0f4439 0%, #176b57 58%, #2f6fab 100%);
}

.mini-hero p,
.section-note,
.small-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mini-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.mini-hero h2 {
  margin: 7px 0 8px;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

.search-row input,
.search-row select,
.field-grid input,
.field-grid select,
.field-grid textarea,
.toolbar input,
.toolbar select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

.btn,
.ghost-btn,
.danger-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

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

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

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.stat-grid article,
.mini-card,
.list-card,
.record-card,
.screen-card,
.task-flow,
.config-row,
.report-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stat-grid article {
  padding: 12px 10px;
}

.stat-grid strong {
  display: block;
  color: var(--green-deep);
  font-size: 21px;
  line-height: 1.1;
}

.stat-grid span {
  color: var(--muted);
  font-size: 12px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.quick-grid button {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.quick-grid span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 13px;
}

.mini-section,
.admin-section {
  display: grid;
  gap: 10px;
}

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

.section-head h2,
.section-head h3,
.panel h2,
.panel h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.mini-card,
.list-card,
.record-card,
.screen-card,
.task-flow,
.report-tile {
  padding: 14px;
}

.list-card {
  display: grid;
  gap: 9px;
}

.card-meta,
.inline-actions,
.tag-row,
.data-list li,
.audit-row,
.pagination,
.drawer-actions,
.mini-tabbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--green-deep);
  background: #e5f2ee;
  font-size: 12px;
  font-weight: 700;
}

.tag.gold {
  color: #75500e;
  background: #fff0d5;
}

.tag.blue {
  color: #1f5585;
  background: #e8f1fb;
}

.tag.rose {
  color: #883b53;
  background: #fae9ef;
}

.list-card h3,
.record-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.list-card p,
.record-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mini-tabbar {
  position: sticky;
  bottom: -14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 14px -14px -14px;
  padding: 8px 6px 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mini-tabbar button {
  min-height: 42px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.mini-tabbar .active {
  color: #fff;
  background: var(--green);
}

.portal-shell {
  display: grid;
  gap: 14px;
}

.portal-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.portal-nav button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 6px;
  color: var(--green-deep);
  background: #fff;
  font-weight: 700;
}

.portal-nav .active {
  color: #fff;
  background: var(--green);
}

.portal-home,
.portal-page,
.portal-body {
  display: grid;
  gap: 14px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0f4439 0%, #176b57 58%, #2f6fab 100%);
}

.portal-hero h2 {
  margin: 12px 0 10px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.portal-hero p {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.portal-login-panel {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.portal-login-panel strong {
  font-size: 20px;
}

.portal-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.portal-card strong {
  color: var(--green-deep);
  font-size: 18px;
}

.portal-card p,
.portal-page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.portal-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 14px;
}

.portal-page-head,
.admin-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0f4439 0%, #176b57 58%, #2f6fab 100%);
  box-shadow: 0 14px 34px rgba(18, 64, 53, 0.16);
}

.portal-page-head h2,
.admin-page-head h2 {
  margin: 8px 0 6px;
  font-size: 28px;
  letter-spacing: 0;
}

.portal-page-head p,
.admin-page-head p {
  color: rgba(255, 255, 255, 0.84);
}

.portal-page-head .tag,
.admin-page-head .tag {
  color: #75500e;
  background: #fff0d5;
}

.portal-page-head .ghost-btn,
.admin-page-head .ghost-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.portal-page-head .btn,
.admin-page-head .btn {
  color: var(--green-deep);
  background: #fff;
}

.portal-body .mini-section {
  gap: 14px;
}

.portal-body .quick-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.portal-body .feature-chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.panel {
  padding: 16px;
}

.feature-chip-grid,
.action-grid,
.permission-grid,
.resource-grid,
.metric-wide-grid,
.record-grid,
.screen-grid {
  display: grid;
  gap: 10px;
}

.feature-chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.feature-chip-grid button,
.action-grid button,
.resource-grid button {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-deep);
  background: #f7faf8;
  text-align: left;
}

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

.field-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

.stepper {
  display: grid;
  gap: 8px;
  counter-reset: step;
}

.stepper li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 13px;
}

.stepper li::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 700;
}

.permission-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.permission-grid article {
  min-height: 112px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.permission-grid strong {
  display: block;
  margin-bottom: 8px;
}

.task-flow {
  display: grid;
  gap: 10px;
}

.flow-line {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.flow-line span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--green-deep);
  background: #e5f2ee;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.admin-side {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.admin-side button {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.admin-side .active {
  color: #fff;
  background: var(--green);
}

.admin-main {
  max-height: calc(100vh - 205px);
  min-height: 650px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px auto;
  gap: 10px;
  align-items: end;
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.metric-wide-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-card strong {
  display: block;
  color: var(--green-deep);
  font-size: 24px;
}

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

.action-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.record-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.record-card strong {
  display: block;
  margin-bottom: 5px;
}

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

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

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

th {
  color: var(--muted);
  background: #f6faf8;
  font-weight: 800;
}

td button {
  color: var(--green);
  background: transparent;
  font-weight: 700;
}

.screen-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.screen-card h3 {
  margin: 0 0 10px;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bar-chart i {
  flex: 1;
  min-width: 42px;
  display: grid;
  align-items: end;
  font-style: normal;
}

.bar-chart b {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--blue), var(--green));
}

.bar-chart span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.data-list {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.data-list li {
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 13px;
}

.data-list b {
  color: var(--ink);
}

.config-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
}

.switch {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #c9d8d1;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.switch.on {
  background: var(--green);
}

.switch.on::after {
  left: 24px;
}

.feature-table-wrap {
  overflow: hidden;
}

.feature-list-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.feature-list-head h2 {
  margin: 0 0 6px;
}

.feature-list-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 24px;
  background: rgba(12, 20, 18, 0.38);
}

.drawer {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 18px;
}

.drawer h2 {
  margin: 0 0 8px;
}

.drawer p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.drawer-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.file-list,
.drawer-rows,
.message-list,
.drawer-steps {
  display: grid;
  gap: 8px;
}

.file-list button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.file-list b,
.drawer-rows b,
.drawer-steps span {
  color: var(--green);
  font-size: 12px;
}

.drawer-rows div {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff;
}

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

.drawer-rows b {
  color: var(--ink);
  text-align: right;
}

.drawer-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer-steps li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
}

.drawer-steps strong {
  font-size: 13px;
}

.message-list article {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green-deep);
}

.message-list p {
  margin: 0 0 6px;
  color: var(--ink);
}

.message-list span {
  color: var(--muted);
  font-size: 12px;
}

.drawer-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 48px));
  padding: 13px 15px;
  border-radius: 8px;
  color: #fff;
  background: var(--green-deep);
  box-shadow: var(--shadow);
  font-size: 14px;
}

@media (max-width: 1160px) {
  .topbar,
  .layout,
  .mini-grid,
  .admin-shell,
  .portal-hero,
  .portal-two-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .module-nav {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .phone-shell {
    width: min(390px, 100%);
    justify-self: center;
  }

  .admin-main {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-top: 20px;
  }

  .mode-switch,
  .stat-grid,
  .quick-grid,
  .metric-wide-grid,
  .field-grid,
  .toolbar,
  .screen-grid,
  .portal-module-grid,
  .portal-page-head,
  .admin-page-head,
  .portal-body .quick-grid {
    grid-template-columns: 1fr;
  }

  .layout,
  .workspace {
    padding-left: 12px;
    padding-right: 12px;
  }

  .workspace {
    padding-top: 12px;
  }

  .phone-screen {
    min-height: 0;
  }

  .flow-line {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-list-head {
    grid-template-columns: 1fr;
  }

  .drawer-mask {
    padding: 10px;
  }
}
