:root {
  --sidebar: #102329;
  --sidebar-deep: #0a171c;
  --sidebar-line: rgba(255, 255, 255, 0.1);
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #111827;
  --muted: #667085;
  --line: #dce3e8;
  --green: #0b7a53;
  --green-2: #13a16e;
  --green-soft: #dff6eb;
  --blue: #2563eb;
  --blue-soft: #e6f0ff;
  --red: #dc3545;
  --red-soft: #ffe4e8;
  --amber: #f0a51a;
  --amber-soft: #fff2cc;
  --purple: #7c3aed;
  --shadow: 0 14px 34px rgba(16, 35, 41, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-layout {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 18px;
  padding: 18px 12px;
  color: #e6f0ed;
  background:
    linear-gradient(160deg, rgba(18, 93, 70, 0.22), transparent 46%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 0 12px 16px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(209, 181, 108, 0.78);
  color: #f1dc98;
  font-size: 1.35rem;
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: rgba(230, 240, 237, 0.78);
  font-weight: 700;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.nav-item span {
  font-size: 1.1rem;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, var(--green), rgba(11, 122, 83, 0.68));
}

.sidebar-card {
  margin: 0 8px;
  padding: 18px;
  border: 1px solid var(--sidebar-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-card strong,
.sidebar-card span,
.sidebar-footer span {
  display: block;
}

.sidebar-card span,
.sidebar-footer {
  color: rgba(230, 240, 237, 0.72);
  font-size: 0.88rem;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}

.main-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(360px, 820px) auto;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.global-search {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
}

.global-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

kbd {
  min-width: 42px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-family: inherit;
}

.topbar-actions,
.user-chip,
.button-row,
.quick-actions,
.tabs,
.form-actions,
.pager {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 18px;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.2rem;
}

.icon-btn b {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 0.72rem;
  line-height: 18px;
}

.user-chip {
  gap: 10px;
}

.user-chip > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.user-chip strong,
.user-chip small {
  display: block;
}

.user-chip small {
  color: var(--muted);
}

.content {
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-head {
  margin-bottom: 22px;
}

.page-head.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.crumb {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-head p:not(.crumb) {
  margin-bottom: 0;
  color: var(--muted);
}

.date-panel {
  display: grid;
  gap: 4px;
  min-width: 260px;
  padding-left: 22px;
  border-left: 4px solid var(--green);
  color: var(--muted);
}

.date-panel strong {
  color: var(--ink);
}

.dashboard-grid,
.work-grid,
.detail-grid,
.new-case-layout,
.tool-layout {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.cases-grid,
.detail-grid,
.new-case-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.tool-layout {
  grid-template-columns: 330px minmax(0, 1fr) 420px;
}

.report-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  gap: 18px;
}

.main-stack,
.right-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

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

.metric-card,
.panel,
.profile-card,
.form-card,
.filter-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 116px;
  padding: 20px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 1.55rem;
  font-weight: 900;
}

.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-icon.dark { color: #114e4e; background: #e5eff0; }

.metric-card small,
.metric-card strong,
.metric-card em {
  display: block;
}

.metric-card small {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1.1;
}

.metric-card em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.quick-actions {
  gap: 14px;
}

.quick-actions button,
.button-row button,
.panel button,
.form-actions button,
.pager button,
.report-toolbar button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.quick-actions button {
  flex: 1;
  min-height: 60px;
  font-size: 1.05rem;
}

.primary-action,
button.primary-action {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.danger-action,
button.danger-action {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.panel {
  padding: 18px;
}

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

.panel-head a,
.link-btn {
  color: var(--green);
  border: 0;
  background: transparent;
  font-weight: 900;
}

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

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 8px 16px;
  align-items: center;
  padding-left: 18px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.timeline time {
  color: var(--ink);
  font-weight: 800;
}

.timeline span {
  grid-column: 2;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.tag.good { color: var(--green); background: var(--green-soft); }
.tag.warn { color: #9a6500; background: var(--amber-soft); }
.tag.danger { color: var(--red); background: var(--red-soft); }
.tag.neutral { color: #53606c; background: #eef2f4; }
.tag.info { color: var(--blue); background: var(--blue-soft); }
.tag.purple { color: var(--purple); background: #f0e8ff; }

.mini-table,
.notice-list,
.report-todo,
.saved-views {
  display: grid;
  gap: 10px;
}

.mini-row {
  display: grid;
  grid-template-columns: 1fr 110px 90px;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
}

.mini-row:last-child {
  border-bottom: 0;
}

.mini-row strong,
.mini-row small {
  display: block;
}

.mini-row small {
  color: var(--muted);
}

.notice-list p {
  display: grid;
  grid-template-columns: 20px 180px 1fr;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.ok { background: var(--green); }
.dot.info { background: var(--blue); }
.dot.danger { background: var(--red); }

.subscription .plan-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
}

.subscription .plan-row > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #8a5a00;
  background: #ffe7a8;
  font-size: 1.4rem;
}

.usage-bar {
  display: block;
  height: 12px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf1;
}

.usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-2));
}

.subscription ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--muted);
}

.report-todo label {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: start;
}

.report-todo b {
  color: var(--red);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd8df;
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 122, 83, 0.12);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel .panel-head {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

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

.data-table th {
  color: #344054;
  background: #f4f7f8;
  font-weight: 900;
}

.data-table td small {
  color: var(--muted);
}

.pager {
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
}

.pager b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
}

.saved-views button {
  display: flex;
  justify-content: space-between;
  border: 0;
  background: transparent;
}

.big-number {
  display: block;
  font-size: 2rem;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: center;
}

.stepper b {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.stepper b::before {
  content: attr(class);
  display: none;
}

.stepper b {
  font-size: 1.1rem;
}

.stepper b::after {
  content: "";
  position: absolute;
  left: 60px;
  right: -20px;
  top: 24px;
  height: 2px;
  background: var(--line);
}

.stepper b:last-child::after {
  display: none;
}

.stepper b {
  counter-increment: step;
}

.stepper b {
  --circle-bg: #e6ebef;
}

.stepper b.active {
  color: var(--green);
  --circle-bg: var(--green);
}

.stepper b::first-letter {
  color: transparent;
}

.stepper b > span {
  display: block;
  color: inherit;
}

.form-card {
  padding: 22px;
}

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

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

.module-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.module-picker label {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
}

.module-picker span {
  color: var(--muted);
  font-size: 0.85rem;
}

.form-actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.preview-pane dl,
.profile-card dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.preview-pane dt,
.profile-card dt {
  color: var(--muted);
  font-weight: 900;
}

.preview-pane dd,
.profile-card dd {
  margin: 0;
}

.profile-card {
  display: grid;
  grid-template-columns: 112px minmax(240px, 1fr) minmax(260px, 0.9fr) minmax(260px, 0.9fr);
  gap: 22px;
  padding: 22px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #c0b8ad, #817a72);
  font-size: 2.6rem;
  font-weight: 900;
}

.id-badge,
.version {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #53606c;
  background: #eef2f4;
  font-size: 0.92rem;
}

.tabs {
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  min-height: 54px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 28px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.tabs button.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.related p {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.related p span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 900;
}

.activity {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.tool-card {
  min-height: 100%;
}

.bazi-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr;
  gap: 16px;
}

.chart-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.chart-table th,
.chart-table td {
  border: 1px solid var(--line);
  padding: 12px;
}

.chart-table th {
  background: #f4f7f8;
}

.chart-table .big {
  font-size: 2rem;
  font-weight: 900;
}

.wood { color: #178b52; }
.fire { color: #d73838; }
.earth { color: #9a5d1c; }
.metal { color: #bc841b; }
.water { color: #1d6fd1; }

.donut {
  width: 190px;
  height: 190px;
  margin: 12px auto;
  border-radius: 50%;
  background: conic-gradient(#178b52 0 17%, #d73838 17% 50%, #9a5d1c 50% 75%, #bc841b 75% 92%, #1d6fd1 92% 100%);
  display: grid;
  place-items: center;
}

.donut span {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

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

.bar-chart {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
  align-items: end;
  height: 190px;
  padding-top: 20px;
}

.bar-chart div {
  display: grid;
  align-items: end;
  gap: 4px;
  height: 100%;
}

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

.detail-card {
  border: 1px solid #b7e4cf;
  background: #f5fffa;
}

.score {
  color: var(--green);
  font-size: 2rem;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line);
}

.calendar div {
  min-height: 72px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  background: #fff;
}

.calendar div:nth-child(7n) {
  border-right: 0;
}

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

.calendar .good-day {
  background: #ecfbf3;
}

.calendar .bad-day {
  background: #fff0f2;
}

.report-toolbar {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.report-page {
  width: min(520px, 100%);
  min-height: 730px;
  margin: 26px auto;
  padding: 44px;
  border: 1px solid #b7b7b7;
  background:
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
    radial-gradient(circle at 50% 82%, rgba(82, 120, 100, 0.16), transparent 34%);
  text-align: center;
  box-shadow: var(--shadow);
}

.report-page h2 {
  margin-top: 130px;
  font-size: 2.25rem;
}

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

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 22px;
  min-height: calc(100vh - 130px);
}

.login-hero,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-hero {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(32px, 6vw, 72px);
  color: #eef8f4;
  background:
    linear-gradient(135deg, rgba(11, 122, 83, 0.86), rgba(16, 35, 41, 0.94)),
    radial-gradient(circle at 70% 25%, rgba(241, 220, 152, 0.2), transparent 36%);
}

.login-hero .brand {
  border-bottom: 0;
  padding: 0;
}

.login-hero h1 {
  max-width: 720px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.login-hero p {
  max-width: 680px;
  color: rgba(238, 248, 244, 0.82);
  font-size: 1.12rem;
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-points span {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 46px);
}

.plan-cards {
  display: grid;
  gap: 12px;
}

.plan-cards article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.plan-cards .featured {
  border-color: rgba(11, 122, 83, 0.45);
  background: var(--green-soft);
}

.notice-box {
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 900;
}

.notice-box.warn {
  color: #9a6500;
  background: var(--amber-soft);
}

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

.ziwei-grid article {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.ziwei-grid article.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.ziwei-grid strong {
  font-size: 1.2rem;
  color: var(--green);
}

.ziwei-grid small {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 900;
}

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

  .dashboard-grid,
  .cases-grid,
  .detail-grid,
  .new-case-layout,
  .candidate-grid,
  .tool-layout,
  .report-layout,
  .login-view {
    grid-template-columns: 1fr;
  }

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

  .filter-bar,
  .module-picker,
  .settings-grid,
  .ziwei-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card,
  .bazi-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .topbar,
  .page-head.split,
  .two-col,
  .metric-grid,
  .filter-bar,
  .module-picker,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .page-head.split {
    display: grid;
  }

  .content {
    padding: 18px;
  }

  .data-table {
    min-width: 980px;
  }

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