@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --shell-font-ui: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --shell-font-display: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
  --shell-bg: #edf4ff;
  --shell-bg-elevated: #dce9ff;
  --shell-grid-line: rgba(121, 150, 197, 0.08);
  --shell-stage: #ffffff;
  --shell-stage-soft: #f7fbff;
  --shell-stage-tint: rgba(239, 246, 255, 0.96);
  --shell-card: rgba(255, 255, 255, 0.97);
  --shell-card-strong: #ffffff;
  --shell-card-muted: rgba(244, 248, 255, 0.98);
  --shell-line: rgba(121, 150, 197, 0.18);
  --shell-line-strong: rgba(121, 150, 197, 0.28);
  --shell-ink: #23354d;
  --shell-ink-soft: #667a99;
  --shell-ink-dim: #95a7c3;
  --shell-accent: #2f7cf7;
  --shell-accent-soft: rgba(47, 124, 247, 0.12);
  --shell-accent-secondary: #8fd3ff;
  --shell-ok: #1c9d71;
  --shell-warning: #cb8a24;
  --shell-danger: #c4514a;
  --shell-shadow-stage: 0 26px 60px rgba(69, 100, 153, 0.12);
  --shell-shadow-card: 0 14px 30px rgba(69, 100, 153, 0.08);
  --shell-shadow-soft: 0 10px 22px rgba(69, 100, 153, 0.06);
  --shell-radius-2xl: 34px;
  --shell-radius-xl: 26px;
  --shell-radius-lg: 20px;
  --shell-radius-md: 16px;
  --shell-radius-sm: 12px;
  --shell-topbar-height: 76px;
  --shell-sidebar-width: 272px;
  --shell-gap: 18px;
  --shell-max-width: 1540px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

.shared-shell {
  min-height: 100dvh;
  font-family: var(--shell-font-ui);
  color: var(--shell-ink);
  background: linear-gradient(180deg, #edf4ff 0%, #f5f9ff 56%, #f7fbff 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shared-shell::before,
.shared-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.shared-shell::before {
  display: none;
}

.shared-shell::after {
  display: none;
}

.shared-shell a {
  color: inherit;
  text-decoration: none;
}

.shared-shell button,
.shared-shell input,
.shared-shell select,
.shared-shell textarea {
  font: inherit;
}

.shared-shell__frame {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 18px 18px 22px;
}

.shared-shell__topbar {
  position: sticky;
  top: 16px;
  z-index: 30;
  min-height: var(--shell-topbar-height);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(176, 198, 231, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(83, 118, 179, 0.1);
  backdrop-filter: blur(24px) saturate(150%);
}

.shared-shell__layout {
  display: grid;
  grid-template-columns: var(--shell-sidebar-width) minmax(0, 1fr);
  gap: var(--shell-gap);
  align-items: start;
  padding-top: 18px;
}

.shared-shell__sidebar,
.shared-shell__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--shell-radius-2xl);
}

.shared-shell__sidebar {
  color: #e8f1fb;
  background: linear-gradient(180deg, rgba(35, 35, 52, 0.98), rgba(22, 17, 73, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(17, 18, 46, 0.16);
}

.shared-shell__stage {
  min-height: calc(100dvh - 134px);
  padding: 24px;
  border: 1px solid rgba(184, 204, 235, 0.72);
  background: linear-gradient(180deg, var(--shell-stage) 0%, var(--shell-stage-soft) 100%);
  box-shadow: 0 24px 52px rgba(83, 118, 179, 0.09);
}

.shared-shell__sidebar::before,
.shared-shell__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shared-shell__sidebar::before {
  display: none;
}

.shared-shell__stage::before {
  display: none;
}

.shared-shell__sidebar-inner,
.shared-shell__stage-inner {
  position: relative;
  z-index: 1;
}

.shared-brand,
.shared-brand__copy,
.shared-topbar__actions,
.shared-status,
.shared-nav__item,
.shared-field,
.shared-stage-header__meta,
.shared-card__head,
.shared-stat,
.shared-pills {
  display: flex;
  align-items: center;
}

.shared-brand {
  gap: 12px;
  min-width: 0;
}

.shared-brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 124, 247, 0.98), rgba(143, 211, 255, 0.94));
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(47, 124, 247, 0.22);
  font-family: var(--shell-font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.shared-brand__copy {
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.shared-brand__eyebrow,
.shared-sidebar__eyebrow,
.shared-stage-header__eyebrow,
.shared-card__eyebrow {
  margin: 0;
  color: currentColor;
  opacity: 0.66;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shared-brand__title,
.shared-sidebar__title,
.shared-stage-header__title,
.shared-card__title,
.shared-stat strong {
  margin: 0;
  font-family: var(--shell-font-display);
  letter-spacing: -0.04em;
}

.shared-brand__title {
  font-size: 0.96rem;
  color: var(--shell-ink);
}

.shared-brand__subtitle {
  font-size: 0.78rem;
  color: var(--shell-ink-dim);
}

.shared-topbar__search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(180, 200, 232, 0.52);
  border-radius: 999px;
  background: rgba(239, 245, 255, 0.9);
  color: var(--shell-ink-soft);
}

.shared-topbar__search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--shell-ink);
}

.shared-topbar__search input::placeholder {
  color: #94a4bd;
}

.shared-topbar__actions {
  justify-content: flex-end;
  gap: 12px;
}

.shared-status {
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(180, 200, 232, 0.52);
  border-radius: 999px;
  background: rgba(239, 245, 255, 0.88);
  color: var(--shell-ink-soft);
  font-size: 0.82rem;
  white-space: nowrap;
}

.shared-status__dot,
.shared-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.shared-pill::before {
  display: none;
}

.shared-status.is-ok .shared-status__dot,
.shared-pill--ok::before {
  display: block;
  background: var(--shell-ok);
  box-shadow: 0 0 0 4px rgba(28, 157, 113, 0.12);
}

.shared-status.is-warning .shared-status__dot,
.shared-pill--warning::before {
  display: block;
  background: var(--shell-warning);
  box-shadow: 0 0 0 4px rgba(203, 138, 36, 0.12);
}

.shared-status.is-danger .shared-status__dot,
.shared-pill--danger::before {
  display: block;
  background: var(--shell-danger);
  box-shadow: 0 0 0 4px rgba(196, 81, 74, 0.12);
}

.shared-button,
.shared-nav__item,
.shared-pill,
.shared-field,
.shared-card,
.shared-stat {
  border-radius: var(--shell-radius-md);
}

.shared-button,
.shared-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.shared-button:hover,
.shared-chip:hover {
  transform: translateY(-1px);
}

.shared-button--primary {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(47, 124, 247, 0.98), rgba(143, 211, 255, 0.94));
  box-shadow: 0 10px 22px rgba(47, 124, 247, 0.14);
}

.shared-button--ghost,
.shared-chip {
  color: var(--shell-ink);
  border-color: var(--shell-line);
  background: rgba(255, 255, 255, 0.84);
}

.shared-button--dark {
  color: #294572;
  border-color: rgba(180, 200, 232, 0.56);
  background: rgba(232, 240, 255, 0.9);
}

.shared-button--toolbox {
  gap: 8px;
  color: #1f4f97;
  border-color: rgba(47, 124, 247, 0.22);
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.98), rgba(219, 234, 255, 0.98));
  box-shadow:
    0 12px 26px rgba(47, 124, 247, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.shared-button--toolbox:hover {
  border-color: rgba(47, 124, 247, 0.34);
  box-shadow:
    0 16px 28px rgba(47, 124, 247, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

.shared-file-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(47, 124, 247, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: var(--shell-shadow-soft);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.shared-file-card:hover,
.shared-file-card.is-loaded,
.shared-file-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(47, 124, 247, 0.42);
  box-shadow: var(--shell-shadow-card);
}

.shared-file-card input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.shared-file-card__icon,
.shared-file-badge {
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-family: var(--shell-font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.shared-file-card__icon {
  width: 48px;
  height: 52px;
  border-radius: 16px;
  font-size: 0.72rem;
  box-shadow: 0 12px 24px rgba(69, 100, 153, 0.14);
}

.shared-file-badge {
  min-width: 42px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 0.68rem;
  box-shadow: 0 10px 22px rgba(69, 100, 153, 0.16);
}

.shared-file-card__icon.is-pdf,
.shared-file-badge.is-pdf {
  background: linear-gradient(180deg, #ff6b61, #c4514a);
}

.shared-file-card__icon.is-image,
.shared-file-badge.is-image {
  background: linear-gradient(180deg, #31b0b4, #1c8c90);
}

.shared-file-card__icon.is-text,
.shared-file-badge.is-text {
  background: linear-gradient(180deg, #5a8cff, #2f61d5);
}

.shared-file-card__icon.is-doc,
.shared-file-badge.is-doc {
  background: linear-gradient(180deg, #7f8ea8, #5f708d);
}

.shared-file-card__preview {
  width: 48px;
  height: 52px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(121, 150, 197, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(69, 100, 153, 0.12);
}

.shared-file-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shared-file-card__body,
.shared-file-inline__body {
  min-width: 0;
}

.shared-file-card__name,
.shared-file-inline__body strong {
  display: block;
  margin: 0;
  color: var(--shell-ink);
  font-weight: 700;
}

.shared-file-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-file-card__meta,
.shared-file-inline__body small {
  display: block;
  margin-top: 4px;
  color: var(--shell-ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.shared-file-card__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-file-card__action {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 124, 247, 0.1);
  color: var(--shell-accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.shared-file-card.is-empty .shared-file-card__name {
  color: var(--shell-ink-soft);
}

.shared-file-card.is-empty .shared-file-card__meta {
  color: var(--shell-ink-dim);
}

.shared-file-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shared-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  font-size: 0.8rem;
  line-height: 1;
}

.shared-module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(180, 200, 232, 0.56);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 30px rgba(83, 118, 179, 0.08);
  backdrop-filter: blur(18px) saturate(135%);
}

.shared-module-link {
  flex: 1 1 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(185, 204, 235, 0.7);
  border-radius: 999px;
  background: rgba(241, 246, 255, 0.96);
  color: var(--shell-ink-soft);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.shared-module-link strong {
  font-size: 0.9rem;
  color: var(--shell-ink);
}

.shared-module-link span {
  color: var(--shell-ink-dim);
  font-size: 0.76rem;
}

.shared-module-link.is-active {
  border-color: rgba(47, 124, 247, 0.18);
  background: linear-gradient(135deg, rgba(47, 124, 247, 0.14), rgba(143, 211, 255, 0.26));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.shared-module-link:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 124, 247, 0.18);
  box-shadow: 0 10px 24px rgba(83, 118, 179, 0.08);
}

.shared-sidebar__inner {
  display: grid;
  gap: 18px;
  padding: 22px 20px 20px;
}

.shared-sidebar__section {
  display: grid;
  gap: 12px;
}

.shared-sidebar__copy {
  display: grid;
  gap: 4px;
}

.shared-sidebar__title {
  font-size: 1.06rem;
  color: #f8fbff;
}

.shared-sidebar__description {
  color: rgba(226, 238, 249, 0.66);
  font-size: 0.82rem;
  line-height: 1.6;
}

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

.shared-nav__item {
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.035);
  color: #eef5fd;
}

.shared-nav__item strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.shared-nav__item span {
  color: rgba(226, 238, 249, 0.58);
  font-size: 0.76rem;
}

.shared-nav__item.is-active {
  border-color: rgba(143, 211, 255, 0.18);
  background: linear-gradient(135deg, rgba(47, 124, 247, 0.36), rgba(143, 211, 255, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.shared-nav__item:hover {
  border-color: rgba(143, 211, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.shared-pills {
  flex-wrap: wrap;
  gap: 10px;
}

.shared-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--shell-line);
  background: rgba(245, 249, 255, 0.92);
  color: var(--shell-ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.shared-stage-header {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--shell-line);
}

.shared-stage-header__copy {
  display: grid;
  gap: 8px;
}

.shared-stage-header__eyebrow {
  color: var(--shell-ink-dim);
}

.shared-stage-header__title {
  font-size: clamp(1.46rem, 1.65vw, 1.92rem);
  color: var(--shell-ink);
}

.shared-stage-header__description {
  margin: 0;
  max-width: 76ch;
  color: var(--shell-ink-soft);
  line-height: 1.7;
}

.shared-stage-header__meta {
  flex-wrap: wrap;
  gap: 10px;
}

.shared-stage {
  display: grid;
  gap: 18px;
  padding-top: 20px;
}

.shared-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.toolbox-page .shared-shell__layout,
.sd-page .shared-shell__layout,
.da-page .shared-shell__layout {
  grid-template-columns: minmax(0, 1fr);
}

.toolbox-page .shared-shell__sidebar,
.sd-page .shared-shell__sidebar,
.da-page .shared-shell__sidebar {
  display: none;
}

.shared-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--shell-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(253, 254, 255, 0.98)),
    var(--shell-card);
  box-shadow: 0 10px 24px rgba(25, 37, 61, 0.05);
}

.shared-card--muted {
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.9), rgba(243, 247, 255, 0.98)),
    var(--shell-card-muted);
}

.shared-card__head {
  justify-content: space-between;
  gap: 12px;
}

.shared-card__title {
  font-size: 1rem;
  color: var(--shell-ink);
}

.shared-card__description,
.shared-card p,
.shared-card li {
  margin: 0;
  color: var(--shell-ink-soft);
  line-height: 1.65;
}

.shared-stat {
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--shell-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 254, 0.98)),
    var(--shell-card);
  box-shadow: 0 8px 18px rgba(25, 37, 61, 0.04);
}

.shared-stat__copy {
  display: grid;
  gap: 6px;
}

.shared-stat span {
  color: var(--shell-ink-dim);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shared-stat strong {
  font-size: 1.1rem;
  color: var(--shell-ink);
}

.shared-stat small {
  color: var(--shell-ink-soft);
  font-size: 0.82rem;
}

.shared-field {
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--shell-line);
  background: rgba(250, 252, 255, 0.96);
  color: var(--shell-ink);
}

.shared-shell :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(47, 124, 247, 0.22);
  outline-offset: 2px;
}

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

  .shared-topbar__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .shared-shell__layout {
    grid-template-columns: 1fr;
  }

  .shared-shell__sidebar {
    order: -1;
  }

  .shared-shell__stage {
    min-height: auto;
  }
}

@media (max-width: 780px) {
  .shared-module-strip {
    padding: 12px;
    border-radius: 20px;
  }

  .shared-module-link {
    flex-basis: 100%;
  }

  .shared-shell__frame {
    padding: 12px 12px 18px;
  }

  .shared-shell__topbar {
    top: 10px;
    padding: 14px;
    border-radius: 26px;
  }

  .shared-shell__stage {
    padding: 18px;
  }

  .shared-card-grid {
    grid-template-columns: 1fr;
  }
}
