@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --navy: #071b38;
  --navy-2: #0b2a55;
  --blue: #1769e0;
  --blue-2: #0e55c6;
  --cyan: #2eb8f3;
  --green: #18a873;
  --amber: #f2a93b;
  --red: #e94c58;
  --violet: #7155d9;
  --ink: #152238;
  --muted: #708099;
  --line: #e6ebf2;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --shadow: 0 12px 30px rgba(16, 45, 83, 0.08);
  --radius: 16px;
  --sidebar: 254px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #071e3f 0%, #051832 100%);
  color: #cbd8ea;
  transition: width .25s ease, transform .25s ease;
}

.brand {
  height: 88px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(145deg, #30c5f4, #1769e0);
  box-shadow: 0 8px 22px rgba(29, 126, 230, .35);
  font: 800 20px "Manrope", sans-serif;
}

.brand-copy strong {
  display: block;
  color: #fff;
  font: 700 16px "Manrope", sans-serif;
  letter-spacing: -.2px;
}

.brand-copy small { color: #88a4c6; font-size: 10px; }

.sidebar nav {
  flex: 1;
  padding: 22px 14px;
  overflow-y: auto;
}

.nav-label {
  margin: 10px 13px 8px;
  color: #627d9f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  margin: 4px 0;
  padding: 0 14px;
  border-radius: 10px;
  color: #bdcce0;
  font-weight: 500;
  transition: .2s ease;
}

.nav-link:hover { color: white; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.active { color: white; background: linear-gradient(90deg, #1769e0, #1676e7); box-shadow: 0 8px 20px rgba(5, 89, 201, .3); }
.nav-link svg { width: 19px; height: 19px; flex: 0 0 19px; }
.nav-link .chevron { width: 14px; margin-left: auto; opacity: .6; }
.nav-link .nav-badge { margin-left: auto; }

.sidebar-footer {
  padding: 15px 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 50%;
  color: #0c59bd;
  background: #e8f2ff;
  font-weight: 800;
}

.sidebar-user strong { display: block; color: #fff; font-size: 12px; }
.sidebar-user small { color: #7893b4; font-size: 10px; }

.main { min-height: 100vh; margin-left: var(--sidebar); transition: margin .25s ease; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(255,255,255,.91);
  border-bottom: 1px solid rgba(225,231,240,.9);
  backdrop-filter: blur(16px);
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-title { display: none; font-weight: 800; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #53657d;
  background: white;
  cursor: pointer;
  transition: .2s ease;
}

.icon-btn:hover { color: var(--blue); border-color: #bfd5f5; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(21,81,160,.1); }
.icon-btn svg { width: 19px; height: 19px; }
.menu-btn { display: none; }

.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--red);
}

.top-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}

.top-profile strong { display: block; font-size: 12px; }
.top-profile small { color: var(--muted); font-size: 10px; }

.content { max-width: 1680px; margin: 0 auto; padding: 28px 30px 44px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  animation: rise .45s ease both;
}

.eyebrow { margin-bottom: 6px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font: 800 clamp(24px, 3vw, 31px) "Manrope", sans-serif; letter-spacing: -.8px; }
h2 { margin-bottom: 4px; font: 800 18px "Manrope", sans-serif; letter-spacing: -.3px; }
h3 { margin-bottom: 4px; font: 700 14px "Manrope", sans-serif; }
.subtext { margin-bottom: 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #40516a;
  background: white;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: .2s ease;
}

.btn:hover { transform: translateY(-1px); border-color: #c5d2e3; box-shadow: 0 7px 18px rgba(20,48,83,.09); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { color: white; border-color: var(--blue); background: linear-gradient(135deg, #2478ea, #0e5acb); box-shadow: 0 8px 16px rgba(23,105,224,.2); }
.btn-primary:hover { border-color: var(--blue); box-shadow: 0 10px 22px rgba(23,105,224,.28); }
.btn-success { color: white; border-color: var(--green); background: var(--green); }
.btn-danger { color: white; border-color: var(--red); background: var(--red); }
.btn-soft { color: var(--blue); border-color: #d8e7fb; background: #eef6ff; }
.btn-sm { min-height: 34px; padding: 0 11px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(225,232,241,.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(28,58,97,.04);
  animation: rise .5s ease both;
}

.stat-card:nth-child(2) { animation-delay: .06s; }
.stat-card:nth-child(3) { animation-delay: .12s; }
.stat-card:nth-child(4) { animation-delay: .18s; }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -35px; bottom: -45px; border-radius: 50%; background: currentColor; opacity: .045; }
.stat-label { margin-bottom: 8px; color: #5d6c80; font-size: 11px; font-weight: 700; }
.stat-value { font: 800 26px "Manrope", sans-serif; letter-spacing: -.5px; }
.stat-note { margin-top: 4px; color: var(--muted); font-size: 10px; }

.stat-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--blue);
  background: #e9f3ff;
}

.stat-icon svg { width: 25px; height: 25px; }
.stat-card.green .stat-icon { color: var(--green); background: #e8f8f1; }
.stat-card.amber .stat-icon { color: var(--amber); background: #fff6e7; }
.stat-card.red .stat-icon { color: var(--red); background: #ffedef; }
.stat-card.violet .stat-icon { color: var(--violet); background: #f0edff; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
.grid-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 5px 18px rgba(25,55,92,.045);
  animation: rise .5s .08s ease both;
}

.card-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}

.card-header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 19px; }
.card-body.flush { padding: 0; }
.text-link { color: var(--blue); font-size: 11px; font-weight: 700; cursor: pointer; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.tabs { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  color: #718097;
  background: none;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.tab.active { color: var(--blue); }
.tab.active::after { content: ""; position: absolute; height: 2px; left: 11px; right: 11px; bottom: -14px; border-radius: 3px; background: var(--blue); }

.search-wrap { position: relative; min-width: 240px; }
.search-wrap svg { position: absolute; width: 16px; height: 16px; left: 12px; top: 50%; color: #9aa8ba; transform: translateY(-50%); pointer-events: none; }
.search-input, .field input, .field select, .field textarea {
  width: 100%;
  min-height: 41px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: .2s ease;
}
.search-input { padding: 0 13px 0 38px; font-size: 12px; }
.search-input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #79aef2; box-shadow: 0 0 0 3px rgba(23,105,224,.09); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 15px;
  color: #7b899b;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .35px;
  white-space: nowrap;
}
td {
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f6;
  color: #35445a;
  font-size: 11px;
  vertical-align: middle;
  white-space: nowrap;
}
tbody tr { transition: .16s ease; }
tbody tr:hover { background: #f8fbff; }
tbody tr:last-child td { border-bottom: 0; }
.strong-cell { color: #172338; font-weight: 700; }
.muted-cell { color: #8290a4; }

.badge, .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 20px;
  color: #526278;
  background: #eef2f7;
  font-size: 9px;
  font-weight: 800;
}
.nav-badge { min-width: 21px; min-height: 21px; padding: 0 6px; color: white; background: var(--red); }
.badge.success { color: #098359; background: #e7f8f1; }
.badge.warning { color: #b07109; background: #fff3dd; }
.badge.danger { color: #c73544; background: #ffeaed; }
.badge.info { color: #135dbf; background: #e9f3ff; }
.badge.violet { color: #6043bf; background: #efebff; }

.table-actions { display: flex; align-items: center; gap: 5px; }
.action-btn { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #e3e9f1; border-radius: 8px; color: #66809f; background: white; cursor: pointer; transition: .2s ease; }
.action-btn:hover { color: var(--blue); border-color: #bed4f2; background: #f2f7ff; }
.action-btn svg { width: 14px; height: 14px; }

.pagination { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.page-numbers { display: flex; gap: 5px; }
.page-number { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #617085; cursor: pointer; }
.page-number.active { color: white; border-color: var(--blue); background: var(--blue); }

.detail-list { display: grid; gap: 11px; }
.detail-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; font-size: 11px; }
.detail-row span { color: var(--muted); }
.detail-row strong { color: #26354b; font-weight: 700; }
.divider { height: 1px; margin: 18px 0; background: var(--line); }

.mini-items { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.mini-item { display: grid; grid-template-columns: 1fr 60px 70px; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 10px; }
.mini-item:first-child { color: var(--muted); background: #f8fafc; font-weight: 800; text-transform: uppercase; }
.mini-item:last-child { border-bottom: 0; }

.form-card { max-width: 1100px; margin: 0 auto; }
.form-section { padding: 21px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 19px; }
.step-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--blue); font-size: 11px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field label { display: block; margin-bottom: 7px; color: #435269; font-size: 11px; font-weight: 700; }
.field label .required { color: var(--red); }
.field input, .field select { padding: 0 12px; font-size: 12px; }
.field textarea { min-height: 95px; padding: 11px 12px; resize: vertical; font-size: 12px; }
.field.full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 19px 21px; background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); }

.line-builder { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.line-row { min-width: 750px; display: grid; grid-template-columns: 2fr .8fr 1fr 1fr 36px; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.line-row.header { color: var(--muted); background: #f8fafc; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.line-row:last-child { border-bottom: 0; }
.line-row input, .line-row select { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid #dfe6ef; border-radius: 8px; outline: none; font-size: 11px; }
.remove-line { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--red); background: #ffedef; cursor: pointer; }
.add-line { margin-top: 12px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.quick-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; transition: .22s ease; }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick-card .stat-icon { width: 43px; height: 43px; margin-bottom: 14px; border-radius: 12px; }
.quick-card p { min-height: 34px; margin: 4px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.chart {
  height: 210px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 8px 0;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 49px, #eef2f7 50px);
}
.bar-group { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.bar { width: min(22px, 35%); border-radius: 5px 5px 0 0; transform-origin: bottom; animation: grow .8s ease both; }
.bar.in { background: linear-gradient(#31c693, #18a873); }
.bar.out { background: linear-gradient(#ff8b91, #ef5662); }
.chart-labels { display: flex; justify-content: space-around; padding: 10px 0; color: var(--muted); font-size: 9px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 10px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 3px; background: var(--green); }
.legend span:last-child::before { background: var(--red); }

.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 220px; padding: 20px; }
.donut { position: relative; width: 138px; height: 138px; flex: 0 0 138px; border-radius: 50%; background: conic-gradient(var(--green) 0 78%, #f8c74e 78% 95%, var(--red) 95%); }
.donut::after { content: "2,450\A Items"; white-space: pre; position: absolute; inset: 27px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: white; font-weight: 800; text-align: center; line-height: 1.4; }
.donut-legend { display: grid; gap: 14px; color: var(--muted); font-size: 10px; }
.donut-legend b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 11px; }
.dot { width: 9px; height: 9px; display: inline-block; margin-right: 6px; border-radius: 50%; }

.activity-list { display: grid; }
.activity { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.activity:last-child { border-bottom: 0; }
.activity-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #e9f3ff; }
.activity-icon.green { color: var(--green); background: #e7f8f1; }
.activity-icon.red { color: var(--red); background: #ffeaed; }
.activity-icon svg { width: 16px; height: 16px; }
.activity p { margin: 0 0 3px; color: #35455a; font-size: 11px; }
.activity small { color: var(--muted); font-size: 9px; }

.alert-row { background: #fffafb; }
.stock-meter { width: 86px; height: 5px; border-radius: 5px; background: #edf1f6; overflow: hidden; }
.stock-meter span { display: block; height: 100%; border-radius: inherit; background: var(--red); }

.empty-state { display: none; padding: 44px 20px; color: var(--muted); text-align: center; }
.empty-state.show { display: block; }
.empty-state svg { width: 34px; height: 34px; margin-bottom: 8px; color: #9eb0c7; }

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 290px;
  padding: 14px 16px;
  border: 1px solid #cceee0;
  border-radius: 12px;
  color: #176548;
  background: white;
  box-shadow: 0 16px 40px rgba(14,54,89,.16);
  transform: translateY(120%);
  opacity: 0;
  transition: .35s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(480px, .9fr);
  background: white;
}
.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 52px;
  color: white;
  background: radial-gradient(circle at 75% 20%, rgba(39,164,238,.36), transparent 27%), linear-gradient(145deg, #061b38, #0b3470);
}
.login-showcase::before, .login-showcase::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-showcase::before { width: 460px; height: 460px; right: -170px; top: 60px; }
.login-showcase::after { width: 320px; height: 320px; right: -60px; top: 130px; }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.login-brand .brand-mark { width: 48px; height: 48px; }
.login-brand strong { display: block; font: 800 19px "Manrope"; }
.login-brand small { color: #91aed2; }
.showcase-copy { position: relative; z-index: 2; max-width: 620px; }
.showcase-copy .pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 30px; color: #b9d5f4; background: rgba(255,255,255,.06); font-size: 11px; }
.showcase-copy h1 { max-width: 560px; margin-bottom: 17px; font-size: clamp(34px, 4.5vw, 60px); line-height: 1.08; letter-spacing: -2.5px; }
.showcase-copy p { max-width: 530px; color: #a9c0dd; font-size: 15px; line-height: 1.7; }
.login-metrics { position: relative; z-index: 2; display: flex; gap: 42px; }
.login-metrics strong { display: block; font: 800 22px "Manrope"; }
.login-metrics span { color: #8ea8c9; font-size: 10px; }
.login-panel { display: grid; place-items: center; padding: 50px; }
.login-box { width: min(100%, 430px); animation: rise .6s ease both; }
.login-box h2 { margin-bottom: 8px; font-size: 28px; }
.login-box > p { margin-bottom: 32px; color: var(--muted); }
.login-box .field { margin-bottom: 17px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 45px; }
.password-toggle { position: absolute; right: 8px; top: 50%; width: 32px; height: 32px; display: grid; place-items: center; border: 0; color: #8594a7; background: none; transform: translateY(-50%); cursor: pointer; }
.password-toggle svg { width: 17px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 24px; font-size: 11px; }
.check-wrap { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.login-submit { width: 100%; min-height: 48px; font-size: 13px; }
.demo-note { margin-top: 22px; padding: 13px; border-radius: 10px; color: #62748b; background: #f4f7fb; font-size: 10px; line-height: 1.6; text-align: center; }
.login-footer { margin-top: 24px; color: #98a5b5; font-size: 10px; text-align: center; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-equal { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar-title { display: block; }
  .content { padding: 23px 20px 40px; }
  .topbar { padding: 0 20px; }
  .login-page { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .login-panel { min-height: 100vh; padding: 30px; }
}

@media (max-width: 650px) {
  .stats-grid, .quick-grid, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .head-actions { width: 100%; justify-content: flex-start; }
  .head-actions .btn { flex: 1; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-wrap { min-width: 0; width: 100%; }
  .tab.active::after { bottom: 0; }
  .top-profile .profile-copy { display: none; }
  .content { padding-inline: 14px; }
  .topbar { height: 66px; padding-inline: 14px; }
  .card-header { align-items: flex-start; }
  .detail-row { grid-template-columns: 100px 1fr; }
  .donut-wrap { flex-direction: column; }
  .pagination > span { display: none; }
  .login-panel { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
