* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 10%, rgba(28, 130, 123, .22), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(224, 116, 71, .18), transparent 26%),
    linear-gradient(135deg, #eef7f4 0%, #f7f3e9 48%, #eef3ff 100%);
  color: #132126;
  font: 14px/1.5 "Be Vietnam Pro", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: #087367; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
.auth-shell, .account-shell, .dashboard-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}
.dashboard-shell {
  display: flex;
  flex-direction: column;
  width: min(1440px, calc(100vw - 32px));
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 42px;
}
.auth-page {
  overflow-x: hidden;
}
.auth-copy {
  position: relative;
  padding: 30px 0;
}
.auth-copy::before {
  content: "";
  position: absolute;
  inset: -36px auto auto -34px;
  width: 150px;
  height: 150px;
  border-radius: 28px;
  background: linear-gradient(145deg, #0b776d, #f08a52);
  opacity: .12;
  transform: rotate(-12deg);
}
.auth-copy h1, .page-title h1, .index-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}
.auth-copy p {
  max-width: 560px;
  color: #4f6269;
  font-size: 16px;
}
.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.auth-highlights span, .brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(8, 115, 103, .18);
  color: #087367;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
}
.page-title p, .muted { color: #65717a; }
.panel {
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(20, 45, 50, .12);
  backdrop-filter: blur(16px);
}
.auth-card {
  padding: 28px;
  border-top: 5px solid #0b776d;
}
.auth-card h2 { margin: 0 0 18px; font-size: 24px; }
.auth-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.auth-card-heading h2 { margin: 0; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field span { font-weight: 650; }
.field input, .field textarea, .field select, .compact-form input {
  width: 100%;
  border: 1px solid #c9d9d5;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .92);
  color: #172126;
}
.field input:focus, .field textarea:focus, .field select:focus, .compact-form input:focus {
  outline: 3px solid rgba(8, 115, 103, .14);
  border-color: #0b776d;
}
.field textarea { min-height: 120px; resize: vertical; }
.primary-btn, .secondary-btn, .danger-btn {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
}
.primary-btn { background: linear-gradient(145deg, #0b776d, #0a5c8f); color: #fff; box-shadow: 0 10px 24px rgba(8, 115, 103, .2); }
.secondary-btn { background: #fff; color: #172126; border-color: #bfd3ce; }
.danger-btn { background: #fff; color: #b72f38; border-color: #e6b9bd; }
.primary-btn:hover, .secondary-btn:hover, .danger-btn:hover {
  transform: translateY(-1px);
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.nav-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.language-select {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.language-select label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.language-select span {
  font-size: .82rem;
  color: #6c7b7c;
}
.language-select select {
  border: 1px solid #bfd3ce;
  border-radius: 999px;
  padding: 8px 28px 8px 10px;
  background: rgba(255, 255, 255, .92);
  color: #172126;
  font: inherit;
}
.flash-list { display: grid; gap: 8px; margin-bottom: 14px; }
.flash {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d3dfdc;
  background: #fff;
}
.flash.error { border-color: #e6b9bd; color: #9a242d; background: #fff7f7; }
.flash.success { border-color: #b9ddc8; color: #0f6b3d; background: #f4fff8; }
.account-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}
.account-dashboard-shell {
  width: min(1280px, calc(100vw - 32px));
}
.account-dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
}
.account-menu {
  padding: 14px;
  align-self: start;
  position: sticky;
  top: 18px;
}
.account-menu-profile {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(8, 115, 103, .10), rgba(240, 138, 82, .10));
  margin-bottom: 12px;
}
.account-menu-profile span {
  color: #65717a;
}
.coin-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #102f35;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}
.account-menu nav {
  display: grid;
  gap: 6px;
}
.account-menu nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #26363c;
  font-weight: 750;
}
.account-menu nav a.active {
  background: #0b776d;
  color: #fff;
}
.account-content {
  min-width: 0;
}
.panel-inner { padding: 20px; }
.user-meta { display: grid; gap: 10px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f4f2;
  color: #0d6b63;
  font-weight: 700;
  font-size: 12px;
}
.badge.suspended { background: #fff0f1; color: #b72f38; }
.dashboard-table-wrap { overflow-x: auto; }
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1220px;
}
.dashboard-table th, .dashboard-table td {
  border-bottom: 1px solid #e3ebe9;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}
.dashboard-table th { color: #65717a; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.compact-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) auto;
  gap: 8px;
}
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; }
.inline-form select { min-height: 34px; border: 1px solid #ccd8d5; border-radius: 8px; padding: 6px 8px; }
.inline-form input, .stack-form input {
  min-height: 34px;
  border: 1px solid #ccd8d5;
  border-radius: 8px;
  padding: 6px 8px;
}
.inline-form input[type="number"] { width: 96px; }
.stack-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.license-admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.license-admin-stats > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e3ebe9;
  border-radius: 8px;
  background: rgba(247, 252, 250, .82);
}
.license-admin-stats strong {
  font-size: 20px;
}
.license-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 160px;
  gap: 10px;
  margin-bottom: 14px;
}
.license-admin-toolbar input,
.license-admin-toolbar select,
.job-admin-toolbar input,
.job-admin-toolbar select,
.license-form-grid input,
.license-form-grid select,
.license-form-grid textarea {
  width: 100%;
  border: 1px solid #ccd8d5;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .94);
}
.license-admin-table {
  min-width: 1080px;
}
.job-admin-toolbar {
  display: grid;
  grid-template-columns: 140px 180px auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.job-admin-toolbar label {
  display: grid;
  gap: 5px;
  color: #65717a;
  font-size: 12px;
  font-weight: 700;
}
.job-admin-table {
  min-width: 1120px;
}
.server-pool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.server-pool-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.server-pool-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.server-pool-header h3 {
  margin: 0;
  font-size: 16px;
}
.server-pool-header p {
  margin: 4px 0 0;
}
.server-pool-panel textarea {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  border: 1px solid #ccd8d5;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .94);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}
.job-id {
  max-width: 220px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
.job-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.payload-size {
  display: grid;
  gap: 4px;
}
.admin-dashboard-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-dashboard-content {
  min-width: 0;
}
.admin-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 14px;
}
.admin-sidebar-group {
  display: grid;
  gap: 8px;
}
.admin-sidebar-group > span {
  color: #65717a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-sidebar nav {
  display: grid;
  gap: 6px;
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: #26363c;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-align: left;
}
.admin-sidebar-link:hover {
  background: rgba(8, 115, 103, .08);
  text-decoration: none;
}
.admin-sidebar-link.active {
  background: #0b776d;
  color: #fff;
}
.admin-dashboard-section[hidden] {
  display: none !important;
}
.admin-dashboard-section {
  margin-top: 0;
}
.job-media-preview {
  display: grid;
  place-items: center;
  width: 160px;
  min-height: 92px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid #dbe7e4;
  border-radius: 8px;
  background: #f4faf8;
  color: #0b776d;
  font-weight: 800;
}
.job-media-preview img,
.job-media-preview video {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
  background: #102f35;
}
.job-media-preview audio {
  width: 150px;
}
.job-media-preview.file {
  padding: 12px;
  text-align: center;
}
.license-key {
  word-break: break-all;
}
.license-edit-dialog {
  width: min(680px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 26px 90px rgba(20, 45, 50, .25);
}
.account-license-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 20px;
  color: #172126;
  box-shadow: 0 26px 90px rgba(20, 45, 50, .25);
}
.account-license-dialog::backdrop {
  background: rgba(19, 33, 38, .42);
  backdrop-filter: blur(4px);
}
.license-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.license-dialog-heading h2 {
  margin: 0;
  font-size: 20px;
}
.license-dialog-heading p {
  margin: 4px 0 0;
}
.dialog-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #d7e2df;
  border-radius: 999px;
  background: #fff;
  color: #172126;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.license-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.license-cost-preview {
  margin: 2px 0 14px;
  padding: 10px 12px;
  border: 1px solid #d7e8e4;
  border-radius: 8px;
  background: #f5fbf9;
  color: #0d6b63;
  font-weight: 800;
}
.license-cost-preview.is-over-budget {
  border-color: #e6b9bd;
  background: #fff7f7;
  color: #b72f38;
}
.license-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.license-dialog-key {
  word-break: break-all;
}
.license-edit-dialog::backdrop {
  background: rgba(19, 33, 38, .42);
  backdrop-filter: blur(4px);
}
.license-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.license-form-grid label {
  display: grid;
  gap: 6px;
  color: #415158;
  font-weight: 700;
}
.license-form-grid .span-2 {
  grid-column: 1 / -1;
}
.license-edit-dialog .license-dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
.dashboard-toast {
  margin-bottom: 10px;
}
.account-section {
  margin-top: 18px;
}
.account-section.flat-top {
  margin-top: 0;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-heading.compact {
  margin-bottom: 12px;
}
.section-heading h2 {
  margin: 0;
  font-size: 20px;
}
.section-heading p { margin: 4px 0 0; }
.key-list, .transaction-list {
  display: grid;
  gap: 10px;
}
.key-row, .transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e3ebe9;
  border-radius: 8px;
  padding: 12px;
}
.key-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.transaction-amount {
  display: grid;
  gap: 2px;
  justify-items: end;
  font-weight: 800;
}
.transaction-amount.positive { color: #0f6b3d; }
.transaction-amount.negative { color: #b72f38; }
.index-page {
  min-height: 100vh;
}
.index-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}
.index-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}
.index-nav > div:first-child {
  display: grid;
  gap: 2px;
}
.index-nav span {
  color: #65717a;
  font-size: 12px;
}
.index-hero {
  max-width: 780px;
  margin-bottom: 26px;
}
.index-hero p {
  color: #4f6269;
  font-size: 17px;
  max-width: 680px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 350px;
  align-content: space-between;
  gap: 28px;
  padding: 24px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 28px 70px rgba(13, 32, 38, .22);
  isolation: isolate;
}
.product-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: auto -18% -38% 20%;
  height: 210px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  filter: blur(4px);
  z-index: -1;
}
.studio-card::before {
  background:
    linear-gradient(145deg, rgba(7, 50, 60, .72), rgba(11, 119, 109, .86)),
    url("https://images.unsplash.com/photo-1518709268805-4e9042af2176?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
}
.freeform-card::before {
  background:
    linear-gradient(145deg, rgba(80, 38, 83, .74), rgba(224, 116, 71, .86)),
    url("https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
}
.product-card-art {
  display: flex;
  justify-content: flex-end;
}
.product-card-art span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  font-weight: 900;
  font-size: 24px;
}
.product-card .eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .78);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}
.product-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}
.product-card p {
  max-width: 520px;
  color: rgba(255, 255, 255, .88);
}
.product-card-action {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, .92);
  color: #132126;
  font-weight: 850;
}
@media (max-width: 820px) {
  .auth-shell, .account-grid, .account-dashboard, .admin-dashboard-layout, .product-grid { grid-template-columns: 1fr; }
  .auth-shell { align-items: start; padding-top: 48px; }
  .top-nav, .index-nav { align-items: flex-start; flex-direction: column; }
  .account-menu { position: static; }
  .admin-sidebar { position: static; }
  .compact-form { grid-template-columns: 1fr; }
  .license-dialog-grid { grid-template-columns: 1fr; }
  .section-heading, .key-row, .transaction-row { grid-template-columns: 1fr; }
  .job-admin-toolbar, .license-admin-toolbar, .license-admin-stats, .server-pool-grid { grid-template-columns: 1fr; }
  .transaction-amount { justify-items: start; }
}
