:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #d8dee8;
  --soft: #f8fafc;
  --accent: #111111;
  --danger: #d92d20;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}

.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.08);
}

.brand,
.side-brand {
  color: #000;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
}

.login-card h1,
.topbar h2,
.order-form h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.login-card p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.4;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

input, textarea, select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.login-card button,
.primary {
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: #000;
  border: 1px solid #000;
  border-radius: 9px;
  font-weight: 950;
}

.form-status {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

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

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.client-name {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.side nav {
  display: grid;
  gap: 8px;
}

.side button,
.side a {
  min-height: 40px;
  padding: 0 11px;
  color: #4b5563;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 950;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
}

.side button.active {
  color: #fff;
  background: #000;
  border-color: #000;
}

.core-button {
  margin-top: auto;
  border-color: var(--line) !important;
  display: flex;
  align-items: center;
}

.logout-button {
  color: #7a818c !important;
  font-size: 11px !important;
}

main {
  min-width: 0;
  padding: 22px;
}

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

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

.top-actions .subtle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-actions .info-link {
  color: #fff;
  background: #128c4a;
  border-color: #128c4a;
}

.top-actions .info-link:hover {
  background: #0f7a41;
  border-color: #0f7a41;
}

.top-actions #publicCaseButton {
  color: #fff;
  background: #111;
  border-color: #111;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.16);
}

.top-actions #publicCaseButton:hover {
  background: #000;
  border-color: #000;
}

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

.news-grid,
.case-grid,
.core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.card,
.case-card,
.summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.card {
  padding: 20px;
}

.card h3,
.case-card h3 {
  margin: 0;
  color: #000;
  font-size: 20px;
  line-height: 1.14;
}

.card p,
.case-card p {
  margin: 8px 0 0;
  color: #4b5563;
  line-height: 1.45;
}

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

.provider-summary {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(280px, 1fr);
  gap: 10px;
}

.summary-card {
  padding: 16px;
}

.provider-info {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.provider-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.provider-info strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

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

.summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  color: #000;
  font-size: 28px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.case-card {
  position: relative;
  display: grid;
  gap: 11px;
  min-height: 264px;
  padding: 22px 18px 16px 22px;
  border-radius: 18px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.case-card:hover {
  border-color: #8c96a3;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  transform: translateY(-1px);
}

.work-date {
  position: absolute;
  top: 14px;
  right: 18px;
  color: #8a929d;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.case-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: start;
  padding-top: 12px;
}

.case-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 7px;
}

.case-heading > strong {
  color: #000;
  font-size: 13px;
  font-weight: 950;
}

.product-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 150px;
  padding: 0 8px;
  overflow: hidden;
  color: #111;
  background: color-mix(in srgb, var(--product-color, #d8dadd) 20%, #fff);
  border: 1px solid color-mix(in srgb, var(--product-color, #d8dadd) 45%, #d8dadd);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  color: var(--status-text, #111);
  background: var(--status-color, #e5e7eb);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.case-top .status {
  width: min(100%, 260px);
  min-height: 36px;
  justify-content: center;
  margin-top: 8px;
  padding: 0 11px;
  border-radius: 10px;
  box-shadow: inset 4px 0 0 rgba(0,0,0,0.18);
}

.exit-box {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-height: 78px;
  margin-top: auto;
  padding-top: 26px;
  color: #000;
}

.exit-box span,
.exit-box small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.exit-box strong {
  overflow: hidden;
  max-width: 132px;
  font-size: 20px;
  font-weight: 950;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.exit-box small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-dot {
  display: inline-flex;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
}

.pay-dot.paid { background: #16a34a; }
.pay-dot.unpaid { background: #d92d20; }

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

.case-meta div {
  min-height: 42px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #d8dadd;
  border-radius: 10px;
}

.case-meta span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.case-meta strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-actions,
.file-list,
.case-file-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-file-buttons {
  align-self: end;
}

.subtle-button,
.case-actions button,
.file-list a,
.file-list button {
  min-height: 34px;
  padding: 0 10px;
  color: #000;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.compact {
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

.approval {
  border-color: #f2c94c !important;
  background: #fff8d7 !important;
}

.approval-note {
  width: fit-content;
  min-height: 26px;
  padding: 5px 9px;
  color: #111;
  background: #fff8d7;
  border: 1px solid #f2c94c;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.loading-card {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.34);
}

.modal-panel {
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 54px rgba(16, 24, 40, 0.24);
}

.modal-close {
  float: right;
  min-height: 34px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-form {
  display: grid;
  gap: 12px;
  clear: both;
}

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

.detail-topline,
.detail-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-status-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.approved-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #111;
  background: #eef7ef;
  border: 1px solid #cfe8d2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.video-list video {
  width: 100%;
  max-height: 420px;
  background: #000;
  border-radius: 12px;
}

.case-file-buttons {
  margin: 10px 0 14px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  color: #000;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.file-pill.active {
  color: #fff;
  background: #000;
  border-color: #000;
}

.file-pill.disabled {
  color: #9aa3af;
  background: #f5f6f7;
}

.file-pill.empty {
  color: #9aa3af;
  background: #f5f6f7;
  border-color: #e0e4ea;
}

.file-pill.locked {
  color: #2f3946;
  background: #fff;
  border-style: dashed;
  border-color: #9aa3af;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
}

.detail-entry {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.approval-panel {
  display: grid;
  gap: 10px;
}

.video-empty {
  min-height: 94px;
}

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

.provider-list {
  display: grid;
  gap: 14px;
}

.provider-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.provider-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.provider-group h3 {
  margin: 0;
  font-size: 18px;
}

.provider-group header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-group header span {
  min-width: 26px;
  min-height: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #111;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.provider-empty {
  min-height: 48px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.provider-row {
  display: grid;
  grid-template-columns: 104px minmax(180px, 1.4fr) minmax(90px, 0.7fr) 118px minmax(130px, 0.8fr) 150px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--status-color, #111);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.provider-assign {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.public-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.credits-launch {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-color: var(--line);
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.05);
}

.credits-copy {
  display: grid;
  align-content: center;
  gap: 6px;
}

.credits-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credits-copy h3 {
  max-width: 640px;
  font-size: 24px;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.credits-copy p {
  max-width: 620px;
  color: #374151;
  font-size: 13px;
}

.credits-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.credits-meta strong {
  color: #000;
  font-size: 14px;
  line-height: 1;
}

.credits-meta span {
  color: #4b5563;
  letter-spacing: 0;
  text-transform: none;
}

.credit-plans {
  display: grid;
  gap: 8px;
  align-content: center;
}

.credit-buy-label {
  width: fit-content;
  padding: 5px 8px;
  color: #fff;
  background: #111;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credit-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 6px;
}

.credit-buttons a {
  color: #111;
  text-decoration: none;
}

.credit-buttons a {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.credit-buttons a.featured {
  color: #fff;
  background: #111;
  border-color: #111;
}

.credit-buttons span {
  color: inherit;
  opacity: 0.78;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.credit-buttons strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.public-hero span,
.admin-row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.provider-order {
  color: #6b7280;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.provider-row strong,
.provider-color {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-row .status {
  width: fit-content;
  margin-top: 5px;
}

.provider-color {
  color: #111;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.ready-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: #111;
  font-size: 11px;
}

.ready-check input {
  width: 16px;
  min-height: 16px;
  accent-color: #111;
}

.archive-row {
  display: grid;
  grid-template-columns: 34px 92px minmax(150px, 1.1fr) minmax(180px, 1.4fr) 110px 84px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.archive-row a {
  color: #6b7280;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.archive-row strong,
.archive-row span,
.archive-row small,
.archive-row time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-row small,
.archive-row time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.icon-button {
  width: 30px;
  height: 30px;
  color: #111;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 950;
}

.request-panel {
  width: min(620px, 100%);
}

.price-panel {
  width: min(860px, 100%);
}

.price-content {
  display: grid;
  gap: 12px;
  clear: both;
}

.price-content > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.price-content h2 {
  margin: 0;
  font-size: 28px;
}

.price-content p {
  margin: 0;
  color: var(--muted);
}

.price-list-grid,
.credit-grid {
  display: grid;
  gap: 8px;
}

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

.price-section-title {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #111;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-item,
.credit-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 10px;
  padding: 10px 12px;
  color: #111;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.price-item {
  align-items: flex-start;
  flex-direction: column;
}

.price-item span {
  font-size: 18px;
  font-weight: 950;
}

.price-item small,
.credit-pack small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.credit-pack strong,
.credit-pack span {
  font-weight: 950;
}

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

@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
    height: auto;
  }
  .side nav {
    grid-template-columns: repeat(3, 1fr);
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .archive-row {
    grid-template-columns: 32px 88px 1fr;
  }
  .provider-summary {
    grid-template-columns: 1fr;
  }
  .provider-row {
    grid-template-columns: 1fr;
  }
  .price-list-grid {
    grid-template-columns: 1fr;
  }
  .credits-launch,
  .credit-plans,
  .credit-buttons {
    grid-template-columns: 1fr;
  }
  .credit-buttons a {
    min-height: 56px;
  }
  .archive-row span,
  .archive-row small,
  .archive-row time {
    display: none;
  }
}
