:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #111318;
  --muted: #6f7480;
  --soft: #e3e6ed;
  --line: #dfe3eb;
  --primary: #5968f3;
  --primary-dark: #3947d2;
  --ink: #191a20;
  --green: #14b86a;
  --green-bg: #e8fbf1;
  --red: #e93642;
  --red-bg: #fff0f1;
  --orange: #f37d2f;
  --orange-bg: #fff4eb;
  --blue-bg: #eef2ff;
  --shadow: 0 18px 60px rgba(16, 20, 32, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 480px) 1fr;
  background:
    linear-gradient(120deg, rgba(89, 104, 243, 0.1), rgba(20, 184, 106, 0.08)),
    var(--bg);
}

.login-panel {
  background: var(--panel);
  padding: 44px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-art {
  padding: 48px;
  display: grid;
  align-content: center;
  gap: 24px;
}

.demo-reel-panel {
  padding: 0;
  align-content: stretch;
  background: #0f1219;
  overflow: hidden;
}

.demo-reel-card {
  width: 100%;
  height: 100vh;
  min-height: 100%;
  display: grid;
  place-items: center;
}

.demo-reel-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0f1219;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
}

.brand-logo {
  width: 58px;
  max-width: 100%;
  height: 26px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.brand-name {
  color: #6f7480;
  font-size: 22px;
  font-weight: 650;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #111318, var(--primary));
  font-size: 13px;
  letter-spacing: 0;
}

.login-panel h1 {
  margin: 34px 0 10px;
  font-size: 34px;
  line-height: 1.1;
}

.login-panel p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 24px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 700;
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
}

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

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(89, 104, 243, 0.15);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: var(--ink);
  color: #fff;
}

.ghost-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.apply-artist-cta {
  width: 100%;
  min-height: 58px;
  margin-top: 34px;
  border-color: #d4d9e5;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.05);
}

.apply-artist-cta:hover {
  border-color: var(--primary);
  background: #f8f9ff;
}

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

.icon-btn {
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px 1fr;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: padding 180ms ease, gap 180ms ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-card {
  border: 0;
  border-radius: 8px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f2f4f8;
  color: #7c828d;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
}

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

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

.nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 8px 6px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  color: var(--text);
  font-weight: 750;
  font-size: 18px;
  position: relative;
}

.nav-button > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-button.active,
.nav-button:hover {
  color: var(--text);
  background: #f7f8fb;
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: #858a94;
  flex: 0 0 auto;
}

.nav-icon svg,
.sidebar-icon-button svg,
.sidebar-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #8d919b;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 8px;
}

.sidebar-icon-button:hover,
.sidebar-icon-button.active {
  color: var(--text);
  background: #f7f8fb;
}

.nav-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 950;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.sidebar-toggle {
  height: 48px;
  margin: 2px -18px -18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: #a0a5ae;
  display: grid;
  place-items: center;
}

.sidebar-toggle .nav-icon {
  width: 28px;
  height: 28px;
  transition: transform 180ms ease;
}

.sidebar-toggle:hover {
  color: var(--text);
  background: #fbfcff;
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 22px 14px 18px;
  gap: 24px;
  align-items: center;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-logo {
  width: 44px;
}

.app-shell.sidebar-collapsed .sidebar-actions,
.app-shell.sidebar-collapsed .nav-button > span:nth-child(2),
.app-shell.sidebar-collapsed .user-card div:not(.avatar),
.app-shell.sidebar-collapsed .language-toggle,
.app-shell.sidebar-collapsed .sidebar-bottom > .ghost-btn {
  display: none;
}

.app-shell.sidebar-collapsed .nav,
.app-shell.sidebar-collapsed .sidebar-bottom {
  width: 100%;
}

.app-shell.sidebar-collapsed .nav-button {
  justify-content: center;
  padding: 8px;
  gap: 0;
}

.app-shell.sidebar-collapsed .nav-count {
  position: absolute;
  margin: 0;
  transform: translate(17px, -14px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
}

.app-shell.sidebar-collapsed .user-card {
  justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  width: 76px;
  margin-left: -14px;
  margin-right: -14px;
}

.app-shell.sidebar-collapsed .sidebar-toggle .nav-icon {
  transform: rotate(180deg);
}

.language-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.language-toggle button {
  border: 0;
  padding: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.language-toggle button.active {
  background: var(--ink);
  color: #fff;
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-language-toggle {
  min-width: 140px;
}

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

.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 0;
  text-align: left;
}

.auth-link {
  margin-top: 10px;
}

.wide-auth-btn {
  width: 100%;
}

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

.choice-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  font-weight: 800;
  color: var(--muted);
}

.choice-pill:has(input:checked) {
  border-color: var(--primary);
  background: rgba(89, 104, 243, 0.08);
  color: var(--ink);
}

.choice-pill input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 74px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.content {
  padding: 28px;
  width: 100%;
  max-width: 1520px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.segmented {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 5px;
  display: inline-flex;
  gap: 4px;
}

.segmented button {
  border: 0;
  border-radius: 7px;
  min-height: 36px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.segmented button.active {
  background: var(--ink);
  color: #fff;
}

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

.stats-grid {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 106px;
}

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

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.finance-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.finance-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.finance-card strong {
  font-size: 21px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.finance-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.finance-card.earnings {
  border-color: rgba(20, 184, 106, 0.32);
}

.finance-card.payouts,
.finance-card.submitted {
  border-color: rgba(89, 104, 243, 0.32);
}

.finance-card.paid {
  border-color: rgba(20, 184, 106, 0.42);
  background: #fbfffd;
}

.finance-chart-panel {
  display: grid;
  gap: 14px;
}

.finance-chart-panel .toolbar {
  margin-bottom: 0;
}

.finance-chart {
  --bar-count: 1;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 20px 18px;
  display: grid;
  grid-template-columns: repeat(var(--bar-count), minmax(90px, 1fr));
  gap: 18px;
  align-items: end;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  overflow-x: auto;
}

.finance-bar-wrap {
  min-height: 176px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.finance-bar {
  height: var(--bar-height);
  min-height: 10px;
  border: 1px solid rgba(89, 104, 243, 0.7);
  border-radius: 8px 8px 2px 2px;
  background: rgba(89, 104, 243, 0.24);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

.finance-bar span {
  transform: translateY(-22px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.finance-bar-wrap small {
  font-weight: 800;
}

.finance-period-table {
  display: grid;
  gap: 10px;
}

.finance-period-table h3 {
  margin: 0;
  font-size: 16px;
}

.panel.finance-toggle-panel {
  padding: 0;
  overflow: hidden;
}

.finance-toggle-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.finance-toggle-panel > summary::-webkit-details-marker {
  display: none;
}

.finance-toggle-panel > summary strong {
  display: block;
  font-size: 18px;
}

.finance-toggle-panel > summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.finance-toggle-panel > .finance-card-grid,
.finance-toggle-panel > .table-list {
  padding: 0 18px 18px;
}

.table-row.compact {
  padding: 12px 14px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.project-card,
.submission-card,
.panel,
.artist-row,
.notification-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-card {
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 330px;
}

.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 34px rgba(30, 35, 60, 0.1);
}

.project-card-main {
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 14px;
  text-align: left;
  color: inherit;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.project-image,
.submission-preview {
  border-radius: 8px;
  background: #f1f3f8;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.project-image {
  height: 180px;
}

.project-image img,
.submission-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.project-placeholder {
  width: 96px;
  height: 96px;
  border: 3px solid var(--primary);
  border-radius: 26px 8px 26px 8px;
  transform: rotate(-8deg);
  position: relative;
}

.project-placeholder::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 4px solid var(--orange);
  border-radius: 50%;
}

.project-card h2,
.submission-card h3,
.panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.project-card p,
.submission-card p,
.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}

.badge.review {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid rgba(243, 125, 47, 0.45);
}

.badge.submitted {
  background: var(--blue-bg);
  color: var(--primary-dark);
  border: 1px solid rgba(89, 104, 243, 0.45);
}

.badge.approved {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(20, 184, 106, 0.45);
}

.badge.rejected {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(233, 54, 66, 0.45);
}

.badge.neutral {
  background: #f2f4f8;
  color: var(--muted);
  border: 1px solid var(--line);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

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

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.choice-shell {
  max-width: 980px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.choice-card {
  min-height: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 14px;
  text-align: left;
  align-content: start;
}

.choice-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 34px rgba(30, 35, 60, 0.1);
}

.choice-card h2 {
  margin: 0;
  font-size: 26px;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.stepbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

.step-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
  color: var(--ink);
}

.step-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.submission-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}

.submission-card {
  padding: 14px;
  display: grid;
  gap: 10px;
  text-align: left;
  min-height: 0;
  align-content: start;
}

.submission-preview {
  height: clamp(220px, 17vw, 300px);
  background: #fff;
  padding: 10px;
}

.submission-preview img {
  image-rendering: auto;
}

.submission-card .badge-row {
  gap: 6px;
}

.submission-card .badge {
  min-height: 25px;
  padding: 0 8px;
  font-size: 11px;
}

.submission-card h3 {
  font-size: 18px;
  line-height: 1.12;
}

.submission-card p {
  font-size: 13px;
  line-height: 1.25;
}

.submission-card .submission-id {
  font-size: 15px;
}

.submission-card .project-meta {
  font-size: 12px;
}

.file-icon {
  width: 76px;
  height: 92px;
  border: 2px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--muted);
  background: #fff;
}

.submission-id {
  font-size: 18px;
  font-weight: 950;
}

.panel {
  padding: 18px;
}

.requirements-panel {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 14px;
  align-self: start;
}

.empty {
  border: 1px dashed #cfd5df;
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  background: #fff;
  color: var(--muted);
}

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

.table-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.table-row p,
.table-row small {
  margin: 4px 0 0;
  color: var(--muted);
}

.payout-row {
  display: block;
}

.payout-row summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
}

.payout-row summary::-webkit-details-marker {
  display: none;
}

.payout-items {
  margin-bottom: 0;
}

.artist-row,
.notification-row {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.7fr) auto;
  gap: 14px;
  align-items: center;
}

.artist-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.artist-card .artist-row {
  border: 0;
  border-radius: 8px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.7fr) auto 24px;
}

.artist-card[open] {
  box-shadow: 0 12px 30px rgba(30, 35, 60, 0.07);
}

.artist-card summary {
  cursor: pointer;
  list-style: none;
}

.artist-card summary::-webkit-details-marker {
  display: none;
}

.artist-card summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 900;
  justify-self: end;
}

.artist-card[open] summary::after {
  content: "-";
}

.artist-detail-body {
  border-top: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 16px;
}

.artist-detail-body h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.detail-item {
  border: 1px solid #eef1f6;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcff;
  display: grid;
  gap: 4px;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.compact-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.notification-row {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.5fr);
}

.notification-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 16px;
  text-align: left;
  align-items: start;
}

.notification-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 28px rgba(30, 35, 60, 0.08);
}

.notification-card.unread {
  border-color: var(--primary);
  background: #f8f9ff;
}

.notification-card strong,
.notification-card p {
  margin: 0;
}

.notification-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notification-body {
  white-space: pre-line;
}

.audit-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(180px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.audit-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.trash-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.trash-card strong,
.trash-card p {
  margin: 0;
}

.trash-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.trash-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.profile-page {
  display: grid;
  gap: 18px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.profile-main {
  display: grid;
  gap: 20px;
}

.profile-section {
  display: grid;
  gap: 0;
}

.profile-section h2 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(160px, 0.38fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid #edf0f5;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row label {
  color: var(--muted);
  font-weight: 850;
}

.profile-row .input,
.profile-row .select {
  max-width: 520px;
}

.profile-actions {
  margin-top: 0;
}

.profile-nav {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 10px;
}

.profile-nav a {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 850;
}

.profile-nav a:hover {
  border-color: var(--line);
  background: #fbfcff;
}

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

.small {
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 16, 23, 0.42);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  padding: 20px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.compact-actions {
  margin-top: 8px;
}

.upload-confirmation {
  display: grid;
  gap: 14px;
}

.file-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.package-requirements {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.upload-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fbfcff;
  min-width: 0;
}

.upload-preview-card strong,
.upload-preview-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-media {
  height: 110px;
  background: #f1f3f8;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.upload-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.upload-preview-media canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  background: #fff;
}

.generated-gif-preview {
  border-color: var(--accent);
  background: #fff;
}

.generated-gif-preview.preview-error {
  border-color: #ffb184;
}

.tileset-grid-preview-card {
  border-color: #ffb1b1;
  background: #fff;
}

.tileset-grid-preview-card .upload-preview-media {
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 150px;
}

.tileset-grid-image {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
}

.tileset-grid-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tileset-grid-image span {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent calc(100% - 1px), #ff1f1f calc(100% - 1px)),
    linear-gradient(to bottom, transparent calc(100% - 1px), #ff1f1f calc(100% - 1px));
  background-size: calc(100% / var(--grid-count)) 100%, 100% calc(100% / var(--grid-count));
  border: 1px solid #ff1f1f;
}

.tileset-grid-detail {
  background: #fff;
  display: grid;
  place-items: center;
}

.tileability-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 16px;
  grid-column: 1 / -1;
  min-width: 0;
}

.tileability-detail-card {
  margin: 16px 0;
}

.tileability-header,
.tileability-summary,
.tileability-combo-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tileability-header h3,
.tileability-combo-title h3 {
  margin: 0 0 4px;
}

.tileability-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.tileability-summary p {
  margin: 4px 0 0;
}

.tileability-grid-map {
  position: relative;
  width: min(100%, 520px);
  max-height: 520px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tileability-grid-map img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tileability-grid-map span {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent calc(100% - 1px), #ff00c8 calc(100% - 1px)),
    linear-gradient(to bottom, transparent calc(100% - 1px), #ff00c8 calc(100% - 1px));
  background-size: calc(100% / var(--grid-count)) 100%, 100% calc(100% / var(--grid-count));
  border: 2px solid #ff00c8;
}

.sprite-combinations {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 16px;
}

.tile-combo-stage {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.tile-combo-cross {
  width: min(100%, 720px);
  max-height: 70vh;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 0;
  place-items: stretch;
}

.tile-combo-cell {
  position: relative;
  width: 100%;
  aspect-ratio: var(--tile-aspect, 1 / 1);
  display: block;
  color: #ff149d;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.tile-combo-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tile-combo-label {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 2px 6px;
  border-radius: 999px;
  color: #ff149d;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.68);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
}

.tile-combo-none {
  color: var(--muted);
  text-shadow: none;
}

.tile-combo-none .tile-combo-label {
  top: 50%;
  bottom: auto;
  color: var(--muted);
  background: transparent;
  text-shadow: none;
}

.tile-combo-cell.top {
  grid-column: 2;
  grid-row: 1;
}

.tile-combo-cell.left {
  grid-column: 1;
  grid-row: 2;
}

.tile-combo-cell.center {
  grid-column: 2;
  grid-row: 2;
}

.tile-combo-cell.right {
  grid-column: 3;
  grid-row: 2;
}

.tile-combo-cell.bottom {
  grid-column: 2;
  grid-row: 3;
}

.tileability-nav {
  width: 44px;
  height: 44px;
  font-size: 34px;
  line-height: 1;
}

.tileability-picker {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.tileability-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 140px);
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 6px;
}

.tileability-thumbs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  min-height: 110px;
  padding: 6px;
  display: grid;
  gap: 4px;
  position: relative;
  cursor: pointer;
}

.tileability-thumbs button.active {
  border-color: #ff149d;
  box-shadow: 0 0 0 2px rgba(255, 20, 157, 0.14);
}

.tileability-thumbs img {
  width: 100%;
  height: 80px;
  object-fit: contain;
}

.tileability-thumbs span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 800;
  padding: 3px;
  text-align: center;
}

.tileability-thumbs strong {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 12px;
}

.pending-gif-stage {
  grid-template-columns: minmax(220px, 1fr);
}

.pending-gif-stage .upload-preview-card {
  max-width: min(840px, 100%);
  margin: 0 auto;
}

.pending-gif-stage .upload-preview-media {
  height: min(58vh, 560px);
  background: #fff;
}

.pending-gif-stage .upload-preview-media canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pending-upload-review .file-list {
  margin-top: 14px;
}

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

.feedback-item {
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.delivery-group {
  display: grid;
  gap: 10px;
}

.delivery-group + .delivery-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.delivery-group-title {
  font-weight: 950;
}

.delivery-style-grid {
  display: grid;
  gap: 10px;
}

.delivery-style {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
  display: grid;
  gap: 8px;
}

.application-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.application-card h3 {
  margin: 10px 0 4px;
  font-size: 22px;
}

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

.application-project-card {
  min-height: 150px;
  text-align: left;
  align-content: space-between;
}

.application-project-card h3 {
  margin: 0 0 6px;
}

.compact-back {
  margin-bottom: 10px;
}

.danger-section {
  border-color: #ffd1d1;
}

.danger-section p {
  color: var(--muted);
  margin-top: 0;
}

.application-review-form {
  display: grid;
  gap: 10px;
}

.application-side {
  display: grid;
  gap: 12px;
}

.application-delete-panel {
  border: 1px solid #ffd1d1;
  border-radius: 8px;
  padding: 12px;
  background: #fffafa;
  display: grid;
  gap: 8px;
}

.application-delete-panel h3 {
  margin: 0;
  font-size: 17px;
}

.application-delete-panel p {
  margin: 0;
  color: var(--muted);
}

.special-rate-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
  display: grid;
  gap: 12px;
}

.special-rate-panel h3,
.special-rate-panel h4 {
  margin: 0;
}

.special-rate-panel h4 {
  font-size: 15px;
}

.special-rate-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.special-rate-row {
  background: #fff;
}

.access-picker {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcff;
}

.access-project {
  border: 1px solid #eef1f6;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.access-project-label {
  margin: 0;
}

.access-deliveries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding-left: 28px;
}

.access-delivery-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.broadcast-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.broadcast-form .full {
  grid-column: 1 / -1;
}

.broadcast-heading h3 {
  margin: 0;
  font-size: 18px;
}

.support-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-bottom: 14px;
}

.support-form .full {
  grid-column: 1 / -1;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.5fr);
  gap: 16px;
}

.support-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.support-ticket-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 12px;
}

.support-ticket-card:hover,
.support-ticket-card.active {
  border-color: var(--accent);
}

.support-ticket-card.unread {
  box-shadow: inset 3px 0 0 var(--accent);
}

.support-ticket-card strong,
.support-thread h3 {
  color: var(--text);
}

.support-ticket-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.support-thread {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.support-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.support-thread-head h3 {
  margin: 10px 0 4px;
  font-size: 24px;
}

.support-thread-head p {
  margin: 0;
  color: var(--muted);
}

.support-messages {
  display: grid;
  gap: 10px;
}

.support-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  max-width: 78%;
}

.support-message.mine {
  justify-self: end;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.support-message p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.support-reply-form {
  display: grid;
  gap: 10px;
}

.onboarding-shell {
  min-height: 100vh;
  grid-template-columns: minmax(320px, 760px);
  justify-content: center;
}

.onboarding-panel {
  min-height: auto;
  align-self: center;
}

.legal-sign-form {
  display: grid;
  gap: 18px;
}

.legal-document-preview {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.legal-document-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.legal-document-header h2 {
  margin: 4px 0 0;
}

.legal-document-header > span,
.legal-readonly {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
}

.legal-document-preview section {
  display: grid;
  gap: 10px;
}

.legal-window-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.legal-document-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.legal-rates-frame {
  min-height: 240px;
}

.legal-document-preview h3 {
  margin: 0;
  font-size: 18px;
}

.legal-document-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.legal-fill-field,
.legal-readonly {
  display: grid;
  gap: 6px;
}

.legal-fill-field span,
.legal-readonly span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legal-fill-control {
  background: #fff7cc;
  border-color: #facc15;
}

.legal-phone-group {
  display: grid;
  grid-template-columns: minmax(132px, 0.36fr) minmax(0, 1fr);
  gap: 8px;
}

.phone-prefix-select {
  min-width: 132px;
}

.legal-fill-field-locked {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.legal-locked-value {
  display: grid;
  gap: 2px;
}

.legal-locked-value strong {
  color: var(--ink);
}

.legal-locked-value em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.legal-company-signature {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.legal-company-signature img {
  width: 160px;
  max-width: 100%;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  margin-top: 10px;
  mix-blend-mode: multiply;
}

.legal-company-signature span,
.legal-company-signature strong {
  display: block;
}

.legal-company-signature span {
  color: var(--muted);
  font-weight: 800;
}

.legal-company-signature strong {
  margin-top: 14px;
  font-size: 24px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: #16a34a;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 18px 38px rgba(22, 163, 74, 0.24);
  max-width: min(420px, calc(100vw - 40px));
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .project-grid,
  .submission-grid,
  .choice-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

  .requirements-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .choice-pill-grid {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

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

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

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }

  .project-grid,
  .submission-grid,
  .choice-grid,
  .upload-preview,
  .stats-grid,
  .legal-phone-group,
  .legal-fill-grid,
  .legal-signature-grid {
    grid-template-columns: 1fr;
  }

  .legal-document-header {
    flex-direction: column;
  }

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

  .finance-chart {
    grid-template-columns: repeat(var(--bar-count), minmax(90px, 1fr));
    min-height: 220px;
  }

  .finance-toggle-panel > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .tileability-header,
  .tileability-summary,
  .tileability-combo-title,
  .tile-combo-stage {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .tileability-nav {
    width: 100%;
  }

  .artist-row,
  .notification-row,
  .notification-card,
  .audit-row,
  .trash-card,
  .application-card,
  .broadcast-form,
  .support-form,
  .support-layout,
  .support-thread-head,
  .profile-layout,
  .profile-row {
    grid-template-columns: 1fr;
  }

  .support-message {
    max-width: 100%;
  }

  .profile-nav {
    position: static;
  }
}
