:root {
  color-scheme: dark;
  --bg: #070a11;
  --panel: rgba(16, 23, 37, 0.82);
  --panel-strong: rgba(22, 31, 49, 0.94);
  --line: rgba(148, 163, 184, 0.16);
  --text: #eef4ff;
  --muted: #91a0b8;
  --soft: #c6d3e6;
  --blue: #2f72ff;
  --cyan: #20c7e8;
  --green: #22c55e;
  --amber: #f59e0b;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft JhengHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(47, 114, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(32, 199, 232, 0.12), transparent 28rem),
    linear-gradient(145deg, #05070c 0%, #09101a 44%, #070a11 100%);
  letter-spacing: 0;
}

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

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

a.primary-button,
a.ghost-button,
a.text-button {
  color: inherit;
  text-decoration: none;
}

.platform-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  overflow: hidden;
}

.platform-shell.is-collapsed {
  grid-template-columns: 86px minmax(0, 1fr);
}

.platform-shell.is-collapsed .sidebar {
  padding: 16px 12px;
}

.platform-shell.is-collapsed .brand {
  justify-content: center;
}

.platform-shell.is-collapsed .brand div,
.platform-shell.is-collapsed .nav-item span,
.platform-shell.is-collapsed .collapse-button span,
.platform-shell.is-collapsed .sidebar-footer .mini-label,
.platform-shell.is-collapsed .sidebar-footer .storage-row span,
.platform-shell.is-collapsed .sidebar-footer .bar {
  display: none;
}

.platform-shell.is-collapsed .nav-item {
  display: flex;
  justify-content: center;
  padding: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(4, 8, 15, 0.78);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(47, 114, 255, 0.28);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 19px;
  line-height: 1.25;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.collapse-button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  gap: 12px;
  width: 100%;
  padding: 0 16px;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  text-align: left;
}

.nav-item:hover,
.collapse-button:hover {
  background: rgba(148, 163, 184, 0.08);
}

.nav-item.active {
  background: linear-gradient(135deg, #1e6dff, #174ac6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 30px rgba(31, 99, 255, 0.26);
  color: #fff;
}

.nav-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-chevron {
  font-size: 26px;
  line-height: 1;
}

.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 0 6px;
}

.mini-label {
  color: var(--soft);
  font-size: 13px;
}

.storage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
}

.bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f72ff, #35d1f4);
}

.collapse-button {
  grid-template-columns: 26px minmax(0, 1fr);
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-top: 18px;
  min-height: 48px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 88px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 16, 0.76);
  backdrop-filter: blur(24px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 100%);
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(17, 25, 40, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #8190a9;
}

.search-box span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  color: #9aa8bd;
  font-size: 12px;
}

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

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  color: #c8d6ea;
  background: rgba(7, 12, 21, 0.58);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-button,
.ghost-button,
.text-button,
.table-action,
.launch-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  padding: 0 18px;
  background: linear-gradient(135deg, #2f72ff, #1856d8);
  box-shadow: 0 14px 32px rgba(47, 114, 255, 0.28);
  font-weight: 700;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.launch-button:hover,
.table-action:hover {
  transform: translateY(-1px);
}

.ghost-button {
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 36, 0.7);
}

.text-button {
  min-height: 34px;
  padding: 0 4px;
  color: #77a7ff;
  background: transparent;
}

.icon-button {
  position: relative;
  width: 42px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 36, 0.7);
}

.notify i {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-style: normal;
  line-height: 20px;
}

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

.primary-stack,
.right-rail {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.panel,
.rail-panel,
.hero-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.88), rgba(12, 18, 30, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.25fr);
  min-height: 276px;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 31, 54, 0.5), rgba(9, 13, 23, 0.05)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.04) 0 1px, transparent 1px 78px);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 40px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #82aaff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(31px, 3vw, 43px);
  line-height: 1.12;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.hero-text,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  font-size: 18px;
}

.hero-checks {
  display: grid;
  gap: 13px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
  color: var(--soft);
}

.hero-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-checks .icon {
  color: #61a7ff;
}

.hero-visual {
  position: relative;
  min-height: 276px;
  perspective: 900px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 22px;
  width: 64%;
  height: 150px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  transform: rotateX(64deg) rotateZ(-8deg);
  background:
    linear-gradient(90deg, rgba(47, 114, 255, 0.2), transparent),
    repeating-linear-gradient(90deg, rgba(96, 165, 250, 0.16) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(96, 165, 250, 0.12) 0 1px, transparent 1px 32px);
}

.hero-visual img {
  position: absolute;
  right: 31%;
  top: 56px;
  z-index: 2;
  width: min(210px, 34vw);
  aspect-ratio: 1;
  border-radius: 28px;
  object-fit: cover;
  filter: drop-shadow(0 34px 55px rgba(25, 93, 255, 0.38));
}

.hero-platform {
  position: absolute;
  right: 26%;
  bottom: 44px;
  z-index: 1;
  width: 260px;
  height: 48px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(47, 114, 255, 0.36), transparent 68%);
  filter: blur(1px);
}

.orbital-card {
  position: absolute;
  z-index: 3;
  width: 128px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 8px;
  background: rgba(13, 24, 46, 0.72);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.orbital-card span {
  display: block;
  height: 8px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f72ff, #35d1f4);
}

.orbital-card b {
  color: #cfe1ff;
  font-size: 13px;
}

.card-a {
  top: 54px;
  left: 10%;
  transform: rotateY(-18deg) rotateZ(-3deg);
}

.card-b {
  top: 80px;
  right: 13%;
  transform: rotateY(18deg) rotateZ(4deg);
}

.panel {
  padding: 18px;
}

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

.panel-heading.large {
  align-items: flex-end;
  margin-bottom: 20px;
}

.heading-actions,
.settings-actions,
.drawer-actions,
.table-actions,
.row-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.drawer-actions.top {
  margin-bottom: 16px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.app-grid.compact {
  grid-template-columns: repeat(6, minmax(138px, 1fr));
}

.app-card {
  display: grid;
  min-height: 208px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(14, 24, 40, 0.82);
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 154px;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.36);
  color: var(--muted);
  text-align: center;
}

.empty-state > div {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 12px;
  color: #93c5fd;
  background: rgba(47, 114, 255, 0.14);
}

.empty-state h3 {
  margin-bottom: 6px;
  color: var(--soft);
}

.empty-state p {
  max-width: 420px;
  margin-bottom: 0;
}

.app-icon,
.market-icon,
.package-icon,
.task-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 84%, white 8%), color-mix(in srgb, var(--accent) 52%, black 22%));
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 30px color-mix(in srgb, var(--accent) 28%, transparent);
}

.app-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.app-icon.large {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
}

.app-card-body {
  min-height: 80px;
  margin-top: 14px;
}

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

.app-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #8fa0ba;
  font-size: 12px;
}

.app-meta span:last-child {
  color: #fbbf24;
}

.app-meta .ready {
  color: #4ade80;
}

.launch-button {
  width: 100%;
  min-height: 34px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, white 6%), color-mix(in srgb, var(--accent) 68%, black 20%));
  color: white;
  font-weight: 800;
}

.card-actions {
  justify-content: space-between;
  margin-top: 10px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 36, 0.72);
  color: #b7c5dc;
}

.tool-button:hover {
  color: #fff;
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(47, 114, 255, 0.15);
}

.tool-button.danger:hover,
.danger-button:hover {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.14);
  color: #fecdd3;
}

.tool-button:disabled,
.ghost-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
}

.icon-button.compact {
  width: 34px;
  min-height: 34px;
}

.icon-button.is-on {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(47, 114, 255, 0.18);
}

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

.status-strip div,
.file-stats div,
.overview-grid div,
.settings-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.5);
}

.status-strip b,
.overview-grid b,
.file-stats b {
  display: block;
  font-size: 23px;
}

.status-strip span,
.overview-grid span,
.file-stats span,
.settings-grid span {
  color: var(--muted);
  font-size: 12px;
}

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

table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  color: var(--soft);
}

th,
td {
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #8fa0ba;
  font-size: 12px;
  font-weight: 600;
}

td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-icon {
  width: 23px;
  height: 23px;
  border-radius: 6px;
}

.task-icon .icon {
  width: 14px;
  height: 14px;
}

.progress-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-cell .bar {
  width: 140px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(47, 114, 255, 0.18);
  color: #78aaff;
}

.status.done {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.table-action {
  min-height: 31px;
  padding: 0 14px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(47, 114, 255, 0.14);
  color: #9dc0ff;
  font-weight: 700;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(251, 113, 133, 0.24);
  border-radius: 8px;
  background: rgba(251, 113, 133, 0.1);
  color: #fda4af;
  font-weight: 700;
}

.right-rail {
  min-width: 0;
}

.rail-panel {
  padding: 16px;
}

.online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4ade80;
  font-size: 12px;
  font-weight: 800;
}

.online::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

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

.ring {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}

.ring div {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #111a2a 0 52%, transparent 54%),
    conic-gradient(var(--ring) var(--value), rgba(148, 163, 184, 0.14) 0);
}

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

.storage-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.storage-list div {
  display: grid;
  gap: 8px;
}

.storage-list span,
.storage-list b {
  font-size: 13px;
}

.storage-list span {
  color: var(--soft);
}

.storage-list b {
  justify-self: end;
  margin-top: -23px;
  color: #b9c7dc;
  font-weight: 500;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.overview-grid div {
  text-align: center;
}

.overview-grid b {
  margin: 7px 0 3px;
  font-size: 18px;
}

.overview-grid small {
  color: #4ade80;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.activity-item > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #8ec5ff;
  background: rgba(47, 114, 255, 0.16);
}

.activity-item .icon {
  width: 15px;
  height: 15px;
}

.activity-item p {
  overflow: hidden;
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item time {
  color: var(--muted);
  font-size: 12px;
}

.active-app {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-app p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.package-list {
  display: grid;
  gap: 10px;
}

.package-row {
  display: grid;
  grid-template-columns: 50px minmax(180px, 1fr) minmax(180px, 0.7fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.46);
}

.package-icon {
  --accent: #20c7e8;
}

.package-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

code {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  color: #d1e4ff;
  background: rgba(0, 0, 0, 0.24);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #f8d98a;
  background: rgba(245, 158, 11, 0.16);
  font-size: 12px;
}

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

.market-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.46);
}

.market-card p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.market-card span {
  color: #fbbf24;
  font-size: 12px;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.portable-note {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.48);
}

.portable-note p {
  margin-bottom: 0;
  color: var(--soft);
  line-height: 1.7;
}

.file-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 12px;
}

.settings-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

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

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

.template-stats div,
.requirement-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.5);
}

.template-stats b {
  display: block;
  font-size: 22px;
}

.template-stats span,
.requirement-grid span {
  color: var(--muted);
  font-size: 13px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.template-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(8, 16, 28, 0.72);
}

.template-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.template-links,
.doc-list,
.permission-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-links .primary-button,
.template-links .ghost-button {
  min-height: 38px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 8px;
  color: #9fc2ff;
  background: rgba(47, 114, 255, 0.08);
  text-decoration: none;
  font-size: 13px;
}

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

.permission-strip {
  margin-top: 14px;
}

.validation-result {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.5);
}

.validation-result.success {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

.validation-result.error {
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.08);
}

.validation-result p {
  color: var(--soft);
}

.validation-result ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--soft);
}

.validation-result li.error {
  color: #fecdd3;
}

.validation-result li.warning {
  color: #fde68a;
}

.settings-grid div {
  display: grid;
  gap: 9px;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 13px;
}

.settings-form input,
.settings-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  outline: 0;
  background: rgba(7, 12, 21, 0.72);
  color: var(--text);
}

.settings-actions {
  margin-top: 16px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
}

.drawer {
  width: min(460px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: #0b111d;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.42);
}

.drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.app-form {
  display: grid;
  gap: 14px;
}

.form-toolbar {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: -24px;
  z-index: 1;
  padding: 0 0 8px;
  background: linear-gradient(180deg, #0b111d 72%, rgba(11, 17, 29, 0));
}

.app-form label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 13px;
}

.app-form input,
.app-form textarea,
.app-form select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  outline: 0;
  background: rgba(7, 12, 21, 0.72);
  color: var(--text);
}

.app-form input,
.app-form select {
  min-height: 42px;
  padding: 0 12px;
}

.app-form textarea {
  min-height: 88px;
  resize: vertical;
  padding: 11px 12px;
}

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

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

.checkbox-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  min-height: 0;
}

.detail-card {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.42);
}

.detail-card p {
  margin-bottom: 0;
  color: var(--soft);
  line-height: 1.65;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.36);
}

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

.detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.42);
}

.notification-item.unread {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(47, 114, 255, 0.1);
}

.notification-item > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #93c5fd;
  background: rgba(47, 114, 255, 0.16);
}

.notification-item h3 {
  margin-bottom: 4px;
}

.notification-item p {
  margin-bottom: 6px;
  color: var(--soft);
  line-height: 1.5;
}

.notification-item time {
  color: var(--muted);
  font-size: 12px;
}

.full {
  width: 100%;
  margin-top: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 8px;
  background: rgba(12, 19, 32, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.hidden-input {
  display: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(5, 7, 12, 0.92), rgba(9, 16, 26, 0.94)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.05) 0 1px, transparent 1px 72px);
}

.login-panel {
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.96), rgba(11, 17, 29, 0.94));
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.login-brand img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
}

.login-brand h1 {
  margin-bottom: 6px;
  font-size: 26px;
}

.login-brand p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 13px;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  background: rgba(7, 12, 21, 0.78);
}

.login-error {
  min-height: 20px;
  margin-bottom: 0;
  color: #fda4af;
  font-size: 13px;
  font-weight: 700;
}

.access-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.account-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.44);
}

.account-row strong,
.account-row span {
  display: block;
}

.account-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.permission-table-wrap {
  overflow-x: auto;
}

.permission-table {
  min-width: 680px;
}

.permission-table td:first-child {
  display: table-cell;
}

.permission-table strong,
.permission-table small {
  display: block;
}

.permission-table small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.permission-select {
  min-width: 150px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(7, 12, 21, 0.78);
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.small {
  min-height: 38px;
  padding: 0 14px;
}

.tiny {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

@media (max-width: 1320px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

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

  .app-grid.compact {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 960px) {
  .platform-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 12px;
  }

  .brand {
    justify-content: center;
  }

  .brand div,
  .nav-item span,
  .collapse-button span,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    display: flex;
    justify-content: center;
    padding: 0;
  }

  .topbar {
    height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    flex-wrap: wrap;
  }

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

  .hero-visual {
    min-height: 220px;
  }

  .right-rail,
  .market-grid,
  .settings-grid,
  .template-stats,
  .requirement-grid,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .package-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .package-row code,
  .package-row .pill,
  .package-row .row-actions {
    grid-column: 2;
    justify-self: start;
  }

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

@media (max-width: 640px) {
  .platform-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    min-width: 58px;
  }

  .nav-list {
    display: flex;
    min-width: max-content;
  }

  .nav-item {
    width: 54px;
  }

  .workspace-grid {
    padding: 10px;
  }

  .topbar {
    padding: 12px;
  }

  .primary-button,
  .ghost-button {
    flex: 1 1 138px;
  }

  .hero-copy {
    padding: 26px;
  }

  .hero-visual img {
    right: 50%;
    transform: translateX(50%);
  }

  .card-a,
  .card-b {
    display: none;
  }

  .app-grid,
  .app-grid.compact,
  .status-strip,
  .overview-grid,
  .file-stats {
    grid-template-columns: 1fr;
  }

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

  .activity-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .activity-item time {
    grid-column: 2;
  }
}
