:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --ink: #102033;
  --muted: #65758b;
  --line: #dce6f1;
  --blue: #1a73e8;
  --blue-deep: #1557b7;
  --green: #17a05d;
  --orange: #e9701d;
  --red: #d6293a;
  --purple: #7c3aed;
  --nav: #111827;
  --shadow: 0 18px 48px rgba(17, 24, 39, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1280px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(26, 115, 232, .12), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #eef3f8 48%, #e8eef6 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.auth-mode .app-shell {
  display: none;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #0e1524);
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a73e8, #16a34a);
  box-shadow: 0 14px 28px rgba(26, 115, 232, .35);
}

.brand h1 {
  margin: 0;
  color: #fff;
  font-size: 19px;
}

.brand p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.nav {
  flex: 1;
  overflow: auto;
  padding: 12px 10px;
}

.nav::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 8px;
}

.nav::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .5);
  border-radius: 999px;
}

.nav-group {
  margin: 12px 0 6px;
  padding: 0 12px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.nav-item {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 3px 0;
  padding: 11px 12px;
  color: #cbd5e1;
  text-align: left;
  border: 0;
  border-radius: 14px;
  background: transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.nav-item:hover {
  color: #fff;
  background: #1f2937;
  transform: translateX(3px);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #1a73e8);
  box-shadow: 0 12px 24px rgba(26, 115, 232, .25);
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 11px;
  background: rgba(255, 255, 255, .12);
}

.nav-item strong {
  display: block;
  font-size: 14px;
}

.nav-item small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
}

.nav-item.active small {
  color: rgba(255, 255, 255, .78);
}

.sidebar-foot {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.ghost-btn,
.primary-btn,
.light-btn,
.danger-btn,
.icon-btn,
.small-btn {
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.ghost-btn {
  padding: 10px 12px;
  color: #dbeafe;
  border: 1px solid #334155;
  background: #0f172a;
}

.primary-btn {
  padding: 11px 15px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(26, 115, 232, .24);
}

.light-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  color: var(--blue);
  background: #eaf2ff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
}

.danger-btn {
  padding: 10px 13px;
  color: #fff;
  background: var(--red);
}

.small-btn {
  padding: 7px 10px;
  color: var(--blue);
  background: #eaf2ff;
}

.small-btn.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.small-btn.ghost {
  margin-top: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
}

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


.icon-btn {
  width: 38px;
  height: 38px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 22px;
}

.ghost-btn:hover,
.primary-btn:hover,
.light-btn:hover,
.danger-btn:hover,
.icon-btn:hover,
.small-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: 82px minmax(0, 1fr);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, .24);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-chip {
  min-width: 118px;
  padding: 8px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.user-chip strong,
.user-chip span {
  display: block;
  white-space: nowrap;
}

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

.user-chip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 330px;
  padding: 9px 12px;
  color: #64748b;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.search-box span {
  font-size: 12px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.content {
  overflow: auto;
  padding: 26px 30px 42px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.panel {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf2f7;
}

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

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

.panel-body {
  padding: 18px 20px 20px;
}

.metric-card {
  position: relative;
  min-height: 128px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff, #fff);
  transition: transform .2s ease, border-color .2s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
}

.metric-card.green {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.metric-card.orange {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #fff);
}

.metric-card.red {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2, #fff);
}

.metric-card b {
  display: block;
  font-size: 32px;
  color: var(--blue);
}

.metric-card.green b {
  color: var(--green);
}

.metric-card.orange b {
  color: var(--orange);
}

.metric-card.red b {
  color: var(--red);
}

.metric-card span {
  display: block;
  margin-top: 5px;
  color: #334155;
  font-weight: 900;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.table-wrap {
  overflow: auto;
}

.compact-table table {
  min-width: 760px;
}

.compact-table th,
.compact-table td {
  padding: 10px 11px;
}

.admin-order-table {
  min-width: 1100px;
}

.stage-select {
  display: block;
  width: 150px;
  margin-top: 8px;
}

.row-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  padding: 12px 12px;
  color: #64748b;
  text-align: left;
  font-size: 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

tr:hover td {
  background: #fbfdff;
}

.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #12346d, #2377ea);
  box-shadow: 0 16px 36px rgba(37, 99, 235, .22);
}

.detail-hero strong {
  display: block;
  font-size: 24px;
  letter-spacing: .02em;
}

.detail-hero p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .86);
  font-weight: 700;
}

.detail-hero .pill {
  color: #0f172a;
  background: rgba(255, 255, 255, .88);
}

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

.detail-grid.four .detail-cell strong {
  font-size: 18px;
}

.detail-cell {
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.detail-cell span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.detail-cell strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.detail-cell.blue strong { color: var(--blue); }
.detail-cell.green strong { color: var(--green); }
.detail-cell.orange strong { color: var(--orange); }
.detail-cell.red strong { color: var(--red); }

.detail-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

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

.detail-section-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.record-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr minmax(150px, auto);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #edf2f7;
}

.record-card:first-of-type {
  border-top: 0;
}

.record-card strong {
  color: #0f172a;
}

.record-card em {
  color: #64748b;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.empty.small {
  padding: 14px;
  margin: 0;
  border-radius: 12px;
  background: #f8fafc;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #1a73e8;
  font-size: 12px;
  font-weight: 900;
  background: #eaf2ff;
}

.pill.green {
  color: #15803d;
  background: #dcfce7;
}

.pill.orange {
  color: #c2410c;
  background: #ffedd5;
}

.pill.red {
  color: #b91c1c;
  background: #fee2e2;
}

.pill.gray {
  color: #475569;
  background: #f1f5f9;
}

.pill.purple {
  color: #7e22ce;
  background: #f3e8ff;
}

.flow-line {
  display: grid;
  grid-template-columns: repeat(11, minmax(90px, 1fr));
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}

.stage-node {
  position: relative;
  min-height: 78px;
  padding: 12px 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
}

.stage-node:before {
  content: "";
  position: absolute;
  left: -8px;
  top: 34px;
  width: 8px;
  height: 2px;
  background: #bfdbfe;
}

.stage-node:first-child:before {
  display: none;
}

.stage-node strong {
  display: block;
  font-size: 13px;
}

.stage-node span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.role-card,
.org-card,
.dict-card,
.page-card,
.dealer-card,
.log-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.role-card:hover,
.org-card:hover,
.dict-card:hover,
.page-card:hover,
.dealer-card:hover,
.log-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
  transform: translateY(-2px);
}

.deploy-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #15345f, #1a73e8);
  box-shadow: 0 18px 42px rgba(26, 115, 232, .18);
}

.deploy-hero h3 {
  margin: 0;
  font-size: 24px;
}

.deploy-hero p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .78);
}

.deploy-status b {
  min-height: 42px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.25;
}

.mini-title {
  margin: 18px 0 10px;
  font-size: 14px;
}

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

.deploy-list div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.deploy-list span {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--blue);
}

.deploy-list p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.deploy-list.green div {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.deploy-list.green span {
  background: var(--green);
}

.deploy-list.orange div {
  border-color: #fed7aa;
  background: #fff7ed;
}

.deploy-list.orange span {
  background: var(--orange);
}

.deploy-list.red div {
  border-color: #fecaca;
  background: #fef2f2;
}

.deploy-list.red span {
  background: var(--red);
}

.command-card {
  margin-bottom: 10px;
  padding: 13px 14px;
  color: #1e293b;
  font-family: Consolas, "SFMono-Regular", monospace;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.role-top,
.org-top,
.dealer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 14px;
  background: var(--blue);
}

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

.desc {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
}

.toggle {
  position: relative;
  width: 48px;
  height: 27px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
}

.toggle:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: left .18s ease;
}

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

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

.tree {
  display: grid;
  gap: 12px;
}

.tree-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.tree-parent {
  padding: 14px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #174ea6, #1a73e8);
}

.tree-children {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}

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

.field label {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea,
.table-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  outline: 0;
  background: #f8fafc;
}

.table-input {
  min-width: 92px;
  padding: 8px 10px;
  background: #fff;
}

.table-input.short {
  width: 96px;
}

.approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
  min-width: 300px;
}

.approval-grid label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

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

.approval-grid .table-input {
  min-width: 0;
}

#loginRoot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-panel {
  width: min(960px, 94vw);
  display: grid;
  grid-template-columns: .85fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 38px 90px rgba(15, 23, 42, .18);
}

.login-brand {
  min-height: 460px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(26, 115, 232, .86)),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.22), transparent 28%);
}

.login-brand h1 {
  margin: 0;
  font-size: 28px;
}

.login-brand p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.78);
}

.login-body {
  padding: 38px;
}

.login-body h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.login-body > p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.login-submit {
  width: 100%;
  margin-top: 16px;
}

.login-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #edf2f7;
}

.login-samples strong {
  width: 100%;
  color: #334155;
}

.login-samples button {
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 900;
  background: #eaf2ff;
}

.login-samples.online-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.login-samples.online-note strong {
  width: auto;
  color: var(--blue);
}

.login-samples.online-note span {
  color: var(--muted);
  line-height: 1.55;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 24px;
}

.timeline:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: #dbe5ef;
}

.timeline-item {
  position: relative;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #fff;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: -23px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
}

.timeline-item.done:before {
  border-color: var(--green);
  background: var(--green);
}

.timeline-item.current:before {
  left: -25px;
  top: 14px;
  width: 18px;
  height: 18px;
  border: 5px solid var(--blue);
  background: #fff;
}

.timeline-item strong {
  display: block;
}

.timeline-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.page-card code {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  color: #475569;
  border-radius: 10px;
  background: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(15, 23, 42, .45);
}

.modal-mask.show {
  display: flex;
}

.modal {
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 38px 90px rgba(15, 23, 42, .35);
}

.modal.modal-wide {
  width: min(1120px, 96vw);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #edf2f7;
}

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

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid #edf2f7;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 80;
  padding: 12px 16px;
  color: #fff;
  border-radius: 14px;
  background: #0f172a;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
}

@media (max-width: 1400px) {
  .grid.four,
  .module-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
