:root {
  --auth-bg-1: #f2f7ff;
  --auth-bg-2: #fff8ef;
  --auth-card: #ffffff;
  --auth-text: #1b2a3a;
  --auth-sub: #5c6e80;
  --auth-brand: #0969da;
  --auth-brand-2: #ff8f3f;
  --auth-line: #dce6f5;

  --erp-bg: #f5f7fb;
  --erp-surface: #ffffff;
  --erp-surface-soft: #f8fbff;
  --erp-text: #12243a;
  --erp-sub: #5f738a;
  --erp-line: #d7e2f1;
  --erp-brand: #0e5fd8;
  --erp-brand-2: #ff8a3d;
  --erp-good: #19a46b;
  --erp-warn: #e09f1f;
  --erp-danger: #d64545;
  --erp-shadow: 0 16px 40px rgba(16, 47, 90, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  color: var(--auth-text);
}

/* auth pages */
body.auth-body {
  background:
    radial-gradient(1200px 500px at -10% -10%, #dbeaff 0%, transparent 60%),
    radial-gradient(900px 400px at 110% 0%, #ffe6cc 0%, transparent 55%),
    linear-gradient(135deg, var(--auth-bg-1), var(--auth-bg-2));
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--auth-card);
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 12px 40px rgba(13, 45, 91, 0.08);
}

.brand {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sub {
  margin: 0 0 20px;
  color: var(--auth-sub);
  font-size: 14px;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--auth-sub);
}

input,
select,
button {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--auth-line);
  padding: 10px 12px;
  font-size: 14px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
}

button {
  background: linear-gradient(90deg, var(--auth-brand), #2d83df);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--auth-brand);
  border: 1px solid var(--auth-brand);
}

button.warn {
  background: linear-gradient(90deg, var(--auth-brand-2), #ff6b6b);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.msg {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}

.msg.ok {
  display: block;
  color: #0d5f35;
  background: #d8f5e5;
  border: 1px solid #b7e8ce;
}

.msg.err {
  display: block;
  color: #7d0f39;
  background: #ffe0ee;
  border: 1px solid #ffc2dc;
}

.links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.links a {
  color: var(--auth-brand);
  text-decoration: none;
  font-size: 13px;
}

.links a:hover {
  text-decoration: underline;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 18px;
  padding: 20px;
}

.auth-hero {
  border-radius: 18px;
  background:
    radial-gradient(600px 280px at 20% 0%, rgba(113, 177, 255, 0.45), transparent 60%),
    radial-gradient(700px 320px at 80% 100%, rgba(255, 168, 95, 0.35), transparent 60%),
    linear-gradient(160deg, #153f6f, #1b568f 52%, #1d6da7 100%);
  color: #ecf4ff;
  padding: 26px 26px 22px;
  box-shadow: 0 18px 40px rgba(21, 54, 95, 0.24);
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  position: relative;
}

.auth-hero h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.5px;
}

.auth-hero p {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(236, 244, 255, 0.86);
  max-width: 560px;
}

.auth-tag-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-tag {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #f3f8ff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

.auth-metric {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px;
}

.auth-metric span {
  display: block;
  font-size: 12px;
  color: rgba(235, 244, 255, 0.8);
}

.auth-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.auth-panel {
  display: grid;
  place-items: center;
}

/* erp shell */
body.erp-body {
  background: var(--erp-bg);
  color: var(--erp-text);
}

.erp-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px 1fr;
}

.erp-sidebar {
  position: relative;
  background:
    linear-gradient(170deg, #102540, #142f54 48%, #1f4b75 100%);
  color: #f5faff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 14px 16px;
  overflow-y: auto;
}

.erp-logo {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.erp-logo h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.4px;
}

.erp-logo p {
  margin: 0;
  color: rgba(233, 244, 255, 0.78);
  font-size: 12px;
}

.erp-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 14px;
}

.erp-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f7b861, #ff845d);
  color: #1f2a3d;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.erp-user .meta {
  min-width: 0;
}

.erp-user .meta strong,
.erp-user .meta span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-user .meta strong {
  font-size: 13px;
}

.erp-user .meta span {
  color: rgba(234, 244, 255, 0.72);
  font-size: 12px;
}

.menu-search {
  margin-bottom: 10px;
}

.menu-search input {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
}

.menu-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.menu-group {
  margin-bottom: 12px;
}

.menu-group h3 {
  margin: 10px 8px 8px;
  color: rgba(220, 236, 255, 0.7);
  font-size: 11px;
  letter-spacing: 1.3px;
}

.menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #eaf2ff;
  padding: 9px 10px;
  text-align: left;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.25;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(14, 95, 216, 0.95), rgba(41, 121, 230, 0.92));
  box-shadow: 0 8px 18px rgba(9, 69, 161, 0.4);
}

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

.erp-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(245, 247, 251, 0.9);
  border-bottom: 1px solid var(--erp-line);
  backdrop-filter: blur(10px);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.erp-header .left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle {
  display: none;
  width: 38px;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--erp-line);
  background: #fff;
  color: var(--erp-text);
  font-weight: 700;
}

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

.view-title h2 {
  margin: 0;
  font-size: 20px;
}

.view-title p {
  margin: 3px 0 0;
  color: var(--erp-sub);
  font-size: 12px;
}

.erp-header .right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.erp-header .right select,
.erp-header .right button {
  width: auto;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 13px;
}

.erp-header .right button.primary {
  background: linear-gradient(90deg, var(--erp-brand), #2f7be0);
}

.erp-header .right button.outline {
  color: var(--erp-brand);
  background: #fff;
  border: 1px solid var(--erp-brand);
}

.erp-header .right button.danger {
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, #ff985a, #ef5e62);
}

.notice {
  margin: 14px 18px 0;
  background: linear-gradient(90deg, #fff5e8, #fffaf5);
  border: 1px solid #ffd7ac;
  color: #7a4d1a;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.notice.hidden {
  display: none;
}

.erp-view {
  padding: 14px 18px 20px;
}

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

.panel {
  background: var(--erp-surface);
  border: 1px solid var(--erp-line);
  border-radius: 14px;
  box-shadow: var(--erp-shadow);
}

.panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--erp-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--erp-sub);
  font-size: 12px;
}

.panel-body {
  padding: 14px 16px 16px;
}

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

.metric-card {
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  padding: 12px;
}

.metric-card span {
  display: block;
  color: var(--erp-sub);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  letter-spacing: 0.4px;
}

.metric-card i {
  display: inline-block;
  margin-top: 5px;
  color: var(--erp-good);
  font-style: normal;
  font-size: 12px;
}

.chart-bars {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  gap: 8px;
  align-items: center;
}

.bar-row b {
  font-size: 12px;
  color: var(--erp-sub);
}

.bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #eef3fa;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7be0, #58a7ff);
}

.bar-row span {
  font-size: 12px;
  color: var(--erp-sub);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
}

.toolbar .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar .actions button {
  width: auto;
  min-height: 34px;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.toolbar input {
  min-height: 36px;
  font-size: 13px;
  border-radius: 8px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
}

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

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

.erp-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
  color: #28405a;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.erp-table tr:hover td {
  background: #f8fbff;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  border: 1px solid transparent;
}

.status-pill.good {
  color: #0e6a46;
  background: #dcf5ea;
  border-color: #b7ebd3;
}

.status-pill.warn {
  color: #895c11;
  background: #fff1d8;
  border-color: #ffdba0;
}

.status-pill.bad {
  color: #8a2836;
  background: #ffe0e6;
  border-color: #ffc1cb;
}

.side-card {
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: var(--erp-surface-soft);
  padding: 12px;
  margin-bottom: 10px;
}

.side-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.side-card p,
.side-card li {
  color: var(--erp-sub);
  font-size: 12px;
  line-height: 1.6;
}

.side-card ul {
  margin: 0;
  padding-left: 16px;
}

.ref-image {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--erp-line);
  background: #fff;
}

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

.quick-btn {
  min-height: 72px;
  border-radius: 12px;
  border: 1px solid var(--erp-line);
  background: linear-gradient(180deg, #fff, #f7fbff);
  padding: 10px;
  text-align: left;
  color: var(--erp-text);
  cursor: pointer;
}

.quick-btn b {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.quick-btn span {
  font-size: 12px;
  color: var(--erp-sub);
}

.embed-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.embed-tools a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--erp-line);
  background: #fff;
  color: var(--erp-text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.overview-stack {
  display: grid;
  gap: 14px;
}

.overview-hero {
  background:
    radial-gradient(580px 280px at 10% 0%, rgba(90, 149, 255, 0.28), transparent 60%),
    radial-gradient(520px 240px at 100% 100%, rgba(255, 164, 102, 0.22), transparent 60%),
    linear-gradient(150deg, #ffffff, #f5faff 58%, #eef6ff 100%);
}

.overview-hero .panel-body,
.overview-hero {
  padding: 0;
}

.overview-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  border-radius: 18px;
  overflow: hidden;
}

.overview-hero-main {
  padding: 26px;
}

.hero-kicker {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(14, 95, 216, 0.12);
  color: var(--erp-brand);
  font-size: 12px;
  font-weight: 700;
}

.overview-hero-main h3 {
  margin: 14px 0 8px;
  font-size: 30px;
  letter-spacing: 0.2px;
}

.overview-hero-main p {
  margin: 0;
  max-width: 620px;
  color: var(--erp-sub);
  font-size: 14px;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions button {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
}

.overview-highlight-grid {
  padding: 18px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
}

.highlight-card {
  min-height: 112px;
  border-radius: 16px;
  border: 1px solid rgba(14, 95, 216, 0.12);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 36px rgba(19, 55, 96, 0.08);
  padding: 16px;
}

.highlight-card span {
  display: block;
  color: var(--erp-sub);
  font-size: 12px;
}

.highlight-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  letter-spacing: 0.3px;
}

.highlight-card i {
  display: block;
  margin-top: 10px;
  color: #35618e;
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
}

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

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

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

.todo-card {
  border: 1px solid var(--erp-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  padding: 14px;
}

.todo-card strong,
.todo-card b,
.todo-card span {
  display: block;
}

.todo-card strong {
  font-size: 14px;
}

.todo-card b {
  margin-top: 10px;
  font-size: 28px;
  color: var(--erp-brand);
}

.todo-card span {
  margin-top: 8px;
  color: var(--erp-sub);
  font-size: 12px;
  line-height: 1.6;
}

.table-wrap.mini {
  min-height: 220px;
}

.mini-table {
  min-width: 100%;
}

.mini-table th,
.mini-table td {
  white-space: normal;
}

.empty-state {
  border: 1px dashed #cbd9ec;
  border-radius: 16px;
  background:
    radial-gradient(240px 120px at 0 0, rgba(77, 145, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #fbfdff, #f5faff);
  padding: 28px 20px;
  text-align: center;
}

.empty-state.compact {
  padding: 20px 16px;
}

.empty-state strong {
  display: block;
  font-size: 18px;
}

.empty-state p {
  margin: 10px auto 0;
  max-width: 520px;
  color: var(--erp-sub);
  font-size: 13px;
  line-height: 1.8;
}

.empty-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-actions button {
  width: auto;
  min-height: 40px;
  padding: 0 16px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(12, 26, 44, 0.36);
  backdrop-filter: blur(4px);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 41;
  width: min(560px, 100%);
}

.drawer.mode-wide {
  width: min(980px, 100%);
}

.drawer.hidden,
.drawer-backdrop.hidden {
  display: none;
}

.drawer-panel {
  margin-left: auto;
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 32px rgba(11, 35, 66, 0.16);
  display: grid;
  grid-template-rows: auto 1fr;
}

.drawer-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--erp-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.drawer-head h3 {
  margin: 0;
  font-size: 20px;
}

.drawer-head p {
  margin: 6px 0 0;
  color: var(--erp-sub);
  font-size: 13px;
}

.drawer-close {
  width: 42px;
  min-height: 42px;
  border-radius: 12px;
  background: #f6f9fd;
  border: 1px solid var(--erp-line);
  color: var(--erp-text);
  font-size: 22px;
  line-height: 1;
}

.drawer-body {
  padding: 20px;
  overflow: auto;
}

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

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

.form-note {
  margin: 0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--erp-line);
  color: var(--erp-sub);
  font-size: 12px;
  line-height: 1.7;
}

.auth-status-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--erp-line);
  border-radius: 14px;
  background: #f8fbff;
  padding: 14px;
}

.auth-status-card.ok {
  background: #ebfaf2;
  border-color: #bde6cf;
}

.auth-status-card.err {
  background: #fff0f3;
  border-color: #f3c5cf;
}

.auth-status-card strong {
  font-size: 14px;
}

.auth-status-card span {
  color: var(--erp-sub);
  font-size: 12px;
  line-height: 1.6;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-actions button {
  width: auto;
  min-height: 42px;
  padding: 0 18px;
}

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

.setup-main,
.setup-side {
  display: grid;
  gap: 14px;
}

.setup-card,
.setup-preview {
  border: 1px solid var(--erp-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 16px;
}

.setup-card-head h4 {
  margin: 0;
  font-size: 16px;
}

.setup-card-head p {
  margin: 6px 0 0;
  color: var(--erp-sub);
  font-size: 12px;
}

.setup-preview p {
  margin: 12px 0 0;
  color: var(--erp-sub);
  font-size: 12px;
  line-height: 1.7;
}

.step-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.step-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.step-chip b {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0e5fd8, #58a7ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.step-chip span {
  font-size: 13px;
  color: var(--erp-text);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.switch-row span {
  font-size: 13px;
  color: var(--erp-text);
}

body.drawer-open {
  overflow: hidden;
}

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

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

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

  .overview-grid,
  .overview-grid.wide {
    grid-template-columns: 1fr;
  }

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

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

  .erp-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .erp-shell.sidebar-open .erp-sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: inline-grid;
    place-items: center;
  }

  .erp-header {
    padding: 10px 12px;
  }

  .erp-header .right {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .erp-view {
    padding: 10px 12px 14px;
  }

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

  .overview-highlight-grid,
  .todo-grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand {
    font-size: 24px;
  }

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

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

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

  .hero-actions,
  .empty-actions,
  .drawer-actions {
    flex-direction: column;
  }

  .hero-actions button,
  .empty-actions button,
  .drawer-actions button {
    width: 100%;
  }

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

@media (max-width: 1060px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .auth-hero {
    min-height: 280px;
  }
}
