* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% -8%, rgba(255, 47, 86, 0.18), transparent 32rem),
    radial-gradient(circle at 5% 18%, rgba(255, 171, 186, 0.18), transparent 26rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 54%, var(--bg) 100%);
  color: var(--text);
}

:root[data-mode="dark"] body {
  background:
    radial-gradient(circle at 82% -8%, rgba(255, 74, 102, 0.28), transparent 32rem),
    radial-gradient(circle at 5% 18%, rgba(108, 36, 58, 0.34), transparent 26rem),
    linear-gradient(180deg, #17070d 0%, var(--bg) 52%, #080507 100%);
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
}

.user-sidebar {
  display: none;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  backdrop-filter: blur(24px);
}

:root[data-mode="dark"] .topbar {
  background: rgba(17, 7, 11, 0.86);
}

.brand,
.desktop-nav button,
.mobile-nav button,
.theme-toggle {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.26em;
}

.brand i {
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.desktop-nav {
  display: flex;
  gap: 34px;
}

.desktop-nav button {
  padding: 27px 2px;
  border-bottom: 2px solid transparent;
  font-weight: 700;
}

.desktop-nav button.active {
  border-color: var(--accent);
  color: var(--accent);
}

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

.sidebar-brand,
.sidebar-nav button {
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
}

.sidebar-brand i {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.sidebar-brand span {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.24em;
}

.sidebar-brand small,
.sidebar-status small,
.sidebar-nav small {
  color: var(--muted);
}

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

.sidebar-nav button {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.sidebar-nav button:hover {
  transform: translateX(2px);
  border-color: var(--line);
  background: var(--bg-soft);
}

.sidebar-nav button.active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, var(--accent-soft), var(--panel-solid));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.sidebar-nav span,
.sidebar-nav small {
  display: block;
}

.sidebar-nav span {
  color: var(--text-strong);
  font-weight: 900;
}

.sidebar-nav button.active span {
  color: var(--accent);
}

.sidebar-nav small {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-status {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

.sidebar-status span,
.sidebar-status small {
  display: block;
}

.sidebar-status span {
  color: var(--accent);
  font-weight: 900;
}

.theme-toggle,
.account-action,
.primary,
.secondary {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.theme-toggle,
.secondary {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 78%, transparent);
  color: var(--text);
}

.account-action,
.primary {
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(255, 47, 86, 0.22);
}

.theme-toggle:hover,
.account-action:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  padding-bottom: 110px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 70px;
  min-height: 660px;
  padding: 90px 0;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.hero h1,
.page-head h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(50px, 7vw, 86px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.lead,
.page-head > p:last-child {
  max-width: 700px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, var(--accent-soft), color-mix(in srgb, var(--panel-solid) 78%, transparent)),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-card > span,
.hero-card > strong {
  grid-column: 1 / -1;
}

.hero-card > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.hero-card > strong {
  margin-bottom: 22px;
  color: var(--text-strong);
  font-size: 19px;
}

.hero-card div {
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel-solid) 72%, transparent);
  text-align: center;
}

.hero-card b,
.hero-card small {
  display: block;
}

.hero-card b {
  color: var(--accent);
  font-size: 26px;
}

.hero-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.content-section {
  padding: 84px 0;
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  padding: 34px 0 0;
}

.home-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.home-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.home-panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 25px;
  letter-spacing: -0.04em;
}

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

.home-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.home-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.home-row-copy {
  min-width: 0;
}

.home-row strong,
.home-row small,
.home-empty strong,
.home-empty p {
  display: block;
}

.home-row strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-row small {
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-row b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
}

.home-empty {
  min-height: 170px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--bg-soft);
}

.home-empty strong {
  color: var(--text-strong);
  font-size: 17px;
}

.home-empty p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.delivery-readiness {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
  margin-top: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 52%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.delivery-readiness h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.delivery-readiness p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.delivery-readiness ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.delivery-readiness li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent);
}

.delivery-readiness strong,
.delivery-readiness span {
  display: block;
}

.delivery-readiness strong {
  flex: 0 0 92px;
  color: var(--text-strong);
}

.delivery-readiness span {
  color: var(--muted);
  line-height: 1.55;
}

.visual-acceptance-checklist {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--panel-solid) 76%, transparent);
}

.visual-acceptance-checklist h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.visual-acceptance-checklist p {
  margin: 8px 0 14px;
}

.visual-acceptance-checklist ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.visual-acceptance-checklist li {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  padding: 13px;
}

.visual-acceptance-checklist b {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.ghost-link {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.ghost-link.solid {
  background: var(--accent);
  color: white;
}

.section-title,
.catalog-head,
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.section-title h2,
.catalog-head h2,
.panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 30px;
  letter-spacing: -0.04em;
}

.section-title > p,
.catalog-head span,
.panel-head span {
  margin: 0;
  color: var(--muted);
}

.section-title > p {
  max-width: 380px;
  text-align: right;
}

.product-grid,
.tool-grid,
.works-grid {
  display: grid;
  gap: 14px;
}

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

.product-card,
.tool-card,
.panel,
.work-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.product-card {
  position: relative;
  min-height: 236px;
  padding: 26px;
  border-radius: var(--radius-lg);
}

.published {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.product-card h3 {
  max-width: 72%;
  margin: 22px 0 24px;
  color: var(--text-strong);
  font-size: 19px;
}

.product-card strong {
  color: var(--accent);
  font-size: 29px;
}

.product-card p {
  color: var(--muted);
  line-height: 1.65;
}

.product-card small,
.tool-card > small,
.work-card p,
.work-card small {
  color: var(--muted-2);
}

.page-head {
  padding: 88px 0 62px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(48px, 6vw, 74px);
}

.catalog,
.data-area {
  padding-top: 42px;
}

.filter-toolbar {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-group > span {
  min-width: 40px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--panel-solid) 72%, transparent);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--line-strong);
  background: var(--accent);
  color: white;
}

.catalog-section {
  padding: 30px 0;
}

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

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 132px;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.tool-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.tool-card:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

.tool-icon {
  display: grid;
  flex: 0 0 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
}

.tool-copy {
  min-width: 0;
  flex: 1;
}

.tool-copy h3,
.work-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
}

.tool-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.panel {
  padding: 26px;
  border-radius: var(--radius-lg);
}

.panel:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.identity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent);
}

.identity-profile-card {
  align-items: center;
}

.web-avatar,
.profile-dialog-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8f2539);
  font-weight: 950;
}

.web-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 28px;
}

.web-avatar img,
.profile-dialog-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity-copy {
  min-width: 0;
  flex: 1;
}

.identity-copy strong,
.identity-copy p {
  display: block;
}

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

.identity-card p,
.panel-note {
  color: var(--muted);
}

.profile-dialog-form {
  justify-items: stretch;
}

.profile-dialog-avatar {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  font-size: 34px;
}

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

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent);
}

.metric span,
.metric strong,
.metric small {
  display: block;
}

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

.metric strong {
  margin: 12px 0 8px;
  color: var(--accent);
  font-size: 25px;
}

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

.service-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.service-action:hover,
.service-action.active {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.service-copy {
  display: grid;
  gap: 7px;
}

.service-copy strong {
  color: var(--text-strong);
  font-size: 16px;
}

.service-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.service-action b {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 13px;
}

.distribution-detail {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel-solid) 74%, transparent);
}

.distribution-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.distribution-detail-head strong,
.distribution-detail-head small {
  display: block;
}

.distribution-detail-head strong {
  color: var(--text-strong);
  font-size: 18px;
}

.distribution-detail-head small {
  margin-top: 6px;
  color: var(--muted);
}

.detail-status {
  flex-shrink: 0;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

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

.detail-action {
  width: fit-content;
  min-width: 160px;
}

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

.poster-template-card {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--poster-accent, var(--accent)) 38%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--poster-accent, var(--accent)) 12%, transparent), transparent 70%),
    var(--bg-soft);
}

.poster-template-card strong,
.poster-template-card small {
  display: block;
}

.poster-template-card strong {
  color: var(--text-strong);
}

.poster-template-card small {
  margin-top: 8px;
  color: var(--muted);
}

.row-list {
  border-top: 1px solid var(--line);
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.data-row strong,
.data-row small {
  display: block;
}

.data-row small {
  margin-top: 6px;
  color: var(--muted);
}

.data-row > span {
  color: var(--accent);
  font-weight: 800;
}

.row-empty,
.empty {
  padding: 48px;
  color: var(--muted);
  text-align: center;
}

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

.work-card {
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.work-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  background: var(--panel-strong);
}

.work-card h3 {
  margin: 16px 0 8px;
}

.work-card .work-download,
.work-card .work-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--bg-elevated);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.work-card .work-download:hover,
.work-card .work-download:focus-visible,
.work-card .work-detail:hover,
.work-card .work-detail:focus-visible,
.task-history-row:hover,
.task-history-row:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.task-history-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.task-history-row span:last-child {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.service-market-orders {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
}

.service-market-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.service-market-section-head h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
}

.service-market-section-head span,
.service-market-order-row small {
  color: var(--muted);
  font-size: 12px;
}

.service-market-order-list {
  display: grid;
  gap: 8px;
}

.service-market-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.service-market-order-row strong {
  min-width: 0;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.service-market-order-row span {
  color: var(--accent);
  font-weight: 800;
}

.login-required {
  grid-column: 1 / -1;
  padding: 100px 20px;
}

.login-required strong {
  display: block;
  color: var(--text-strong);
  font-size: 26px;
}

.login-required p {
  max-width: 520px;
  margin: 14px auto 28px;
  line-height: 1.7;
}

.login-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 50px 160px rgba(51, 10, 20, 0.26);
}

:root[data-mode="dark"] .login-dialog {
  box-shadow: 0 50px 160px #000;
}

.login-dialog::backdrop {
  background: rgba(15, 7, 10, 0.54);
  backdrop-filter: blur(10px);
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 30px;
  cursor: pointer;
}

.login-dialog h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 32px;
}

.dialog-copy,
.login-dialog small {
  color: var(--muted);
  line-height: 1.8;
}

.pairing-code {
  margin: 30px 0 16px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--bg-soft);
  color: var(--text-strong);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-align: center;
}

.login-status {
  color: var(--accent);
  text-align: center;
}

.full {
  width: 100%;
  margin: 12px 0 20px;
}

.action-dialog {
  width: min(640px, calc(100% - 32px));
}

.dialog-content {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.dialog-row-list,
.dialog-list,
.dialog-form,
.legal-preview {
  display: grid;
  gap: 12px;
}

.dialog-row,
.dialog-list-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
}

.dialog-row span,
.dialog-list-item,
.dialog-field span {
  color: var(--muted);
}

.dialog-row strong {
  color: var(--text-strong);
  text-align: right;
}

.dialog-field {
  display: grid;
  gap: 8px;
  color: var(--text-strong);
  font-weight: 800;
}

.dialog-field input,
.dialog-field textarea,
.dialog-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
}

.dialog-field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.7;
}

.dialog-field input:focus,
.dialog-field textarea:focus,
.dialog-field select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.dialog-text-block {
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  color: var(--text-strong);
  white-space: pre-wrap;
  word-break: break-all;
}

.legal-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
}

.legal-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.compact {
  padding: 22px;
}

.mobile-nav {
  display: none;
}

@media (min-width: 1024px) {
  .user-sidebar {
    position: fixed;
    z-index: 25;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: var(--sidebar-width);
    padding: 22px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
    backdrop-filter: blur(24px);
  }

  :root[data-mode="dark"] .user-sidebar {
    background: rgba(17, 7, 11, 0.9);
  }

  .topbar {
    margin-left: var(--sidebar-width);
    padding: 0 32px;
  }

  .topbar .brand,
  .desktop-nav {
    display: none;
  }

  main {
    width: min(1180px, calc(100% - var(--sidebar-width) - 72px));
    margin-left: calc(var(--sidebar-width) + 36px);
    margin-right: 36px;
  }

  .hero {
    min-height: 620px;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-card {
    max-width: 560px;
  }

  .product-grid,
  .tool-grid,
  .works-grid,
  .service-list,
  .poster-template-grid,
  .home-dashboard,
  .delivery-readiness {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-area {
    grid-template-columns: 1fr;
  }

  .panel:nth-child(n) {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  main {
    width: calc(100% - 28px);
    padding-bottom: 118px;
  }

  .topbar {
    height: 64px;
    padding: 0 18px;
  }

  .desktop-nav {
    display: none;
  }

  .theme-toggle {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }

  .account-action {
    min-height: 38px;
    padding: 0 16px;
  }

  .hero {
    min-height: 0;
    padding: 72px 0;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 62px);
  }

  .lead {
    font-size: 15px;
  }

  .hero-card {
    padding: 20px;
  }

  .section-title,
  .catalog-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title > p {
    text-align: left;
  }

  .product-grid,
  .tool-grid,
  .works-grid,
  .metrics,
  .service-list,
  .poster-template-grid,
  .home-dashboard,
  .delivery-readiness {
    grid-template-columns: 1fr;
  }

  .distribution-detail-head {
    flex-direction: column;
  }

  .task-history-row,
  .service-market-order-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
  }

  .task-history-row span:last-child {
    text-align: left;
  }

  .detail-action {
    width: 100%;
  }

  .home-panel {
    padding: 20px;
  }

  .home-row {
    align-items: flex-start;
  }

  .home-row small {
    white-space: normal;
  }

  .delivery-readiness {
    padding: 20px;
  }

  .visual-acceptance-checklist ol {
    grid-template-columns: 1fr;
  }

  .delivery-readiness li {
    flex-direction: column;
    gap: 6px;
  }

  .page-head {
    padding: 70px 0 46px;
  }

  .identity-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    overflow-x: auto;
    height: 74px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
    backdrop-filter: blur(20px);
  }

  :root[data-mode="dark"] .mobile-nav {
    background: rgba(17, 7, 11, 0.96);
  }

  .mobile-nav button {
    flex: 0 0 82px;
    font-weight: 700;
  }

  .mobile-nav button.active {
    color: var(--accent);
  }

  .pairing-code {
    font-size: 32px;
  }

  .login-dialog {
    padding: 34px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .sidebar-nav button:hover,
  .theme-toggle:hover,
  .account-action:hover,
  .primary:hover,
  .secondary:hover {
    transform: none;
  }
}
