.ai-studio-page {
  background: #f6f8fb;
  color: #142033;
}

.ai-hero {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 16, 33, 0.86), rgba(18, 42, 67, 0.64) 48%, rgba(246, 248, 251, 0.1)),
    url("../assets/images/portfolio/portfolio-ai-models-premium.png") center right / cover no-repeat;
}

.ai-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(246, 248, 251, 0), #f6f8fb);
  pointer-events: none;
}

.ai-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 96px;
}

.ai-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #b8f7e2;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.ai-kicker i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #29d6a3;
  box-shadow: 0 0 0 8px rgba(41, 214, 163, 0.16);
}

.ai-hero h1 {
  max-width: 760px;
  color: #fff;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.94;
  font-weight: 860;
  margin: 0 0 18px;
  letter-spacing: 0;
}

.ai-hero-copy {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
  margin-bottom: 28px;
}

.ai-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.ai-hero-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 760;
}

.ai-hero-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 780px;
  gap: 10px;
}

.ai-status-tile {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
}

.ai-status-tile strong {
  display: block;
  font-size: 1.06rem;
}

.ai-status-tile span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.ai-studio-shell {
  width: min(1580px, calc(100% - 32px));
  margin: -42px auto 64px;
  position: relative;
  z-index: 2;
}

.ai-category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ai-category-card {
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: left;
  color: #26374f;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.ai-category-card:hover,
.ai-category-card.active {
  transform: translateY(-2px);
  border-color: #2d62db;
}

.ai-category-card i {
  color: #0f9f83;
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.ai-category-card strong {
  display: block;
  font-weight: 800;
}

.ai-category-card span {
  display: block;
  color: #64748b;
  font-size: 0.84rem;
  margin-top: 4px;
}

.ai-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(500px, 1fr) minmax(260px, 330px);
  gap: 14px;
  align-items: start;
}

.ai-panel {
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid #e5edf5;
}

.ai-panel-header h2,
.ai-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 820;
  color: #142033;
}

.ai-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: 660px;
  overflow: auto;
}

.ai-capability {
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 5px;
}

.ai-capability.active {
  border-color: #2d62db;
  background: #f2f7ff;
}

.ai-capability.disabled {
  opacity: 0.62;
}

.ai-capability strong {
  color: #142033;
}

.ai-capability small {
  color: #64748b;
}

.ai-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 760;
}

.ai-workbench {
  padding: 16px;
}

.ai-model-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-field {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 730;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.ai-field textarea {
  min-height: 210px;
  resize: vertical;
}

.ai-field .form-control,
.ai-field .form-select {
  border-radius: 8px;
  border-color: #cbd5e1;
}

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

.ai-image-controls {
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #fbfdff;
  padding: 18px;
  margin-bottom: 12px;
}

.ai-workflow-banner {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 15px;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 54%, #f2fbf7 100%);
  color: #21344d;
}

.ai-workflow-banner strong {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
}

.ai-workflow-banner p {
  margin: 0;
  color: #5c6f85;
  line-height: 1.45;
}

.ai-workflow-banner .ai-beta-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 820;
  font-size: 0.76rem;
}

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

.ai-upload-zone {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 214px;
  margin: 0;
  padding: 18px;
  border: 1px dashed #9fb8d4;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.96)),
    #fff;
  color: #233850;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ai-upload-zone:hover,
.ai-upload-zone.dragging,
.ai-upload-zone.has-file {
  border-color: #1f6feb;
  box-shadow: 0 16px 36px rgba(31, 111, 235, 0.12);
  transform: translateY(-1px);
}

.ai-upload-zone[hidden] {
  display: none !important;
}

.ai-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.ai-upload-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #eef6ff;
  color: #1f6feb;
}

.ai-upload-zone strong {
  color: #142033;
  font-size: 1rem;
}

.ai-upload-zone small {
  color: #64748b;
  line-height: 1.45;
}

.ai-upload-filename {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef6ff;
  color: #1e3a5f;
  font-size: 0.76rem;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.ai-upload-preview {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: #f8fafc;
}

.ai-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.ai-workflow-card {
  margin: 14px 0;
  padding: 15px;
  border: 1px solid #e0e9f4;
  border-radius: 8px;
  background: #ffffff;
}

.ai-workflow-card[hidden] {
  display: none !important;
}

/* Premium footer support for AI Studio */

.ai-workflow-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-workflow-card-head strong {
  display: block;
  color: #142033;
}

.ai-workflow-card-head span {
  color: #64748b;
  font-size: 0.85rem;
}

.ai-contract-tips {
  margin-top: 12px;
  border-top: 1px solid rgba(37, 99, 235, 0.12);
  padding-top: 10px;
}

.ai-contract-tips summary {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 820;
}

.ai-contract-tips ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: #53677f;
  font-size: 0.88rem;
}

.ai-suggestions {
  display: grid;
  gap: 10px;
  margin: -2px 0 14px;
}

.ai-suggestion-group {
  display: grid;
  gap: 7px;
}

.ai-suggestion-group strong {
  color: #64748b;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.ai-suggestion-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-suggestion-group button {
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  background: #ffffff;
  color: #1d3557;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.2;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ai-suggestion-group button:hover {
  transform: translateY(-1px);
  border-color: #0f62fe;
  background: #f0f6ff;
}

.ai-image-controls[hidden],
.ai-field[hidden] {
  display: none !important;
}

.ai-advanced-card {
  margin-top: 14px;
  border: 1px solid #e0e9f4;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ai-advanced-card[hidden] {
  display: none !important;
}

.ai-advanced-card summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  color: #243b55;
  font-weight: 840;
}

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

.ai-advanced-card summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #1f6feb;
  transition: transform 0.18s ease;
}

.ai-advanced-card[open] summary::after {
  transform: rotate(180deg);
}

.ai-advanced-card summary small {
  color: #64748b;
  font-weight: 700;
}

.ai-advanced-card > .ai-form-grid,
.ai-advanced-card > .ai-field {
  padding: 0 14px 14px;
}

.ai-image-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ai-image-policy span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cfe4ef;
  border-radius: 999px;
  background: #fff;
  color: #28546c;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 760;
}

.ai-image-policy i {
  color: #0f9f83;
}

.ai-run-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  width: 100%;
  border-radius: 8px;
  font-weight: 800;
}

.ai-result {
  margin-top: 14px;
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #f8fafc;
  min-height: 260px;
  padding: 16px;
  white-space: pre-wrap;
  line-height: 1.6;
  color: #182235;
}

.ai-result.empty {
  color: #64748b;
}

.ai-result-state {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 220px;
  text-align: center;
}

.ai-result-state i {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #eef6ff;
  color: #1f6feb;
  font-size: 1.2rem;
}

.ai-result-state strong {
  color: #142033;
  font-size: 1.05rem;
}

.ai-result-state p {
  max-width: 520px;
  margin: 0;
  color: #64748b;
}

.ai-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.ai-progress-steps span {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #e0e9f4;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffffff, #f5f9ff, #ffffff);
  background-size: 220% 100%;
  color: #415a76;
  font-size: 0.78rem;
  font-weight: 800;
  animation: aiLoadingSweep 1.4s ease-in-out infinite;
}

.ai-progress-steps span:nth-child(2) { animation-delay: 0.12s; }
.ai-progress-steps span:nth-child(3) { animation-delay: 0.24s; }
.ai-progress-steps span:nth-child(4) { animation-delay: 0.36s; }

@keyframes aiLoadingSweep {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.ai-job-state {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d9e8f4;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.92)),
    #fff;
  color: #172033;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  white-space: normal;
}

.ai-job-state-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
}

.ai-job-icon {
  display: inline-grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  color: #0f62fe;
  background: #eef6ff;
}

.ai-job-state small,
.ai-job-state strong,
.ai-job-state p {
  display: block;
  min-width: 0;
}

.ai-job-state small {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.ai-job-state strong {
  color: #142033;
  font-size: 1.08rem;
  font-weight: 860;
}

.ai-job-state p {
  margin: 4px 0 0;
  color: #52657b;
  line-height: 1.45;
}

.ai-job-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf6;
}

.ai-job-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f62fe, #0f9f83);
}

.ai-job-track span[data-indeterminate="true"] {
  animation: aiJobIndeterminate 1.25s ease-in-out infinite;
}

.ai-job-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.ai-job-steps li {
  padding: 8px 10px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 780;
}

.ai-job-steps li[data-state="done"] {
  color: #0f6e55;
  border-color: rgba(15, 159, 131, 0.22);
  background: rgba(15, 159, 131, 0.08);
}

.ai-job-steps li[data-state="active"] {
  color: #174ea6;
  border-color: rgba(15, 98, 254, 0.24);
  background: rgba(15, 98, 254, 0.08);
}

.ai-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dce7f2;
  border-radius: 999px;
  color: #40566f;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 760;
}

.ai-job-cancel {
  justify-self: start;
}

@keyframes aiJobIndeterminate {
  0% { transform: translateX(-85%); }
  100% { transform: translateX(245%); }
}

.ai-job-state[data-tone="active"] {
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.14);
}

.ai-job-state[data-tone="review"] {
  border-color: rgba(217, 119, 6, 0.28);
}

.ai-job-state[data-tone="success"] {
  border-color: rgba(15, 159, 131, 0.32);
}

.ai-job-state[data-tone="danger"] {
  border-color: rgba(220, 38, 38, 0.3);
}

.ai-job-icon[data-tone="active"] {
  color: #7c3aed;
  background: #f3ecff;
  animation: aiJobIconPulse 1.6s ease-in-out infinite;
}

.ai-job-icon[data-tone="review"] {
  color: #b45309;
  background: #fff4e5;
}

.ai-job-icon[data-tone="success"] {
  color: #0f9f83;
  background: #e7fbf4;
}

.ai-job-icon[data-tone="danger"] {
  color: #dc2626;
  background: #fdeaea;
}

.ai-job-track span {
  transition: width 0.6s cubic-bezier(0.22, 0.8, 0.32, 1), background 0.5s ease;
}

.ai-job-track span[data-tone="active"] {
  background: linear-gradient(90deg, #7c3aed, #0f62fe, #0f9f83);
  background-size: 220% 100%;
  animation: aiLoadingSweep 2.2s ease-in-out infinite;
}

.ai-job-track span[data-tone="review"] {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.ai-job-track span[data-tone="success"] {
  background: linear-gradient(90deg, #0f9f83, #22c55e);
}

.ai-job-track span[data-tone="danger"] {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

.ai-job-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(120deg, #0f62fe, #7c3aed, #0f9f83);
  background-size: 220% 220%;
  animation: aiJobModelShimmer 3.4s ease infinite;
  box-shadow: 0 8px 20px rgba(15, 98, 254, 0.26);
}

.ai-job-model-badge i {
  animation: aiJobModelSpark 1.4s ease-in-out infinite;
}

.ai-job-runpod-status {
  color: #40566f;
}

@keyframes aiJobModelShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes aiJobIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
}

@keyframes aiJobModelSpark {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(8deg); }
}

.ai-side {
  display: grid;
  gap: 14px;
}

.ai-runtime-panel {
  overflow: hidden;
}

.ai-runtime-board {
  display: grid;
  gap: 12px;
  padding: 13px;
}

.ai-runtime-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 98, 254, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 14%, rgba(15, 98, 254, 0.14), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f3f8ff 52%, #eefaf6 100%);
  padding: 14px;
}

.ai-runtime-hero::before {
  content: "";
  position: absolute;
  inset: -45% auto auto -24%;
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(15, 98, 254, 0.22), rgba(15, 159, 131, 0.06), rgba(15, 98, 254, 0.22));
  animation: aiRuntimeSweep 7s linear infinite;
  opacity: 0.72;
  pointer-events: none;
}

.ai-runtime-hero-main {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
}

.ai-runtime-ring {
  --pct: 82;
  width: 78px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #ffffff 56%, transparent 58%),
    conic-gradient(#0f62fe calc(var(--pct) * 1%), rgba(15, 98, 254, 0.12) 0);
  box-shadow: inset 0 0 0 1px rgba(15, 98, 254, 0.1), 0 12px 28px rgba(15, 98, 254, 0.16);
  animation: aiRuntimePulse 3.6s ease-in-out infinite;
}

.ai-runtime-ring strong {
  color: #132238;
  font-size: 1rem;
  font-weight: 860;
}

.ai-runtime-copy {
  min-width: 0;
}

.ai-runtime-copy small {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.ai-runtime-copy strong {
  display: block;
  color: #142033;
  font-size: 1.03rem;
  line-height: 1.24;
  margin: 2px 0 4px;
}

.ai-runtime-copy span {
  display: block;
  color: #516276;
  font-size: 0.82rem;
  line-height: 1.35;
}

.ai-runtime-chips,
.ai-guardrail-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-runtime-chips {
  margin-top: 12px;
}

.ai-runtime-chip,
.ai-guardrail-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d7e5f4;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #25415f;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1.1;
}

.ai-runtime-chip i,
.ai-guardrail-chip i {
  color: #0f9f83;
}

.ai-runtime-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ai-runtime-meter {
  border: 1px solid #e2ebf5;
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.ai-runtime-meter span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 780;
  text-transform: uppercase;
}

.ai-runtime-meter strong {
  display: block;
  color: #142033;
  font-size: 1.02rem;
  margin-top: 5px;
}

.ai-runtime-bar {
  --pct: 50;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
  margin-top: 9px;
}

.ai-runtime-bar::before {
  content: "";
  display: block;
  width: calc(var(--pct) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f62fe, #0f9f83);
  animation: aiRuntimeFill 0.72s ease both;
}

.ai-guardrail-strip {
  padding: 10px;
  border: 1px solid #e1edf4;
  border-radius: 8px;
  background: #f8fbfd;
}

.ai-runtime-details {
  border: 1px solid #e1eaf3;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.ai-runtime-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #243b55;
  font-size: 0.84rem;
  font-weight: 820;
}

.ai-runtime-details summary::-webkit-details-marker {
  display: none;
}

.ai-runtime-details summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #0f62fe;
  transition: transform 0.18s ease;
}

.ai-runtime-details[open] summary::after {
  transform: rotate(180deg);
}

.ai-runtime-details p {
  margin: 0;
  padding: 0 12px 12px;
  color: #5b6b80;
  font-size: 0.82rem;
  line-height: 1.45;
}

@keyframes aiRuntimeSweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aiRuntimePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

@keyframes aiRuntimeFill {
  from {
    width: 0;
  }
}

.ai-history {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: 300px;
  overflow: auto;
}

.ai-history-item {
  border: 1px solid #e5edf5;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.ai-history-item strong {
  display: block;
  color: #142033;
}

.ai-history-item span {
  color: #64748b;
  font-size: 0.82rem;
}

.ai-image-result {
  display: grid;
  gap: 12px;
}

.ai-image-result strong {
  color: #142033;
  font-size: 1.04rem;
}

.ai-result-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-result-metrics span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  border: 1px solid rgba(20, 32, 51, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  padding: 9px 10px;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.06);
}

.ai-result-metrics i {
  grid-row: span 2;
  color: #2457ff;
}

.ai-result-metrics em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  text-transform: uppercase;
}

.ai-result-metrics b {
  color: #142033;
  font-size: 0.92rem;
  line-height: 1.1;
}

.ai-image-result dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ai-image-result dl div {
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.ai-image-result dt {
  color: #64748b;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.ai-image-result dd {
  margin: 0;
  color: #142033;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.ai-image-result p {
  margin: 0;
  color: #43556c;
}

.ai-result-preview {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #0f172a;
}

.ai-privacy {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 70px;
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.ai-privacy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ai-privacy-grid article {
  border: 1px solid #e5edf5;
  border-radius: 8px;
  padding: 13px;
}

.ai-privacy-grid strong {
  display: block;
  color: #142033;
  margin-bottom: 4px;
}

.ai-privacy-grid span {
  color: #64748b;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .ai-category-card,
  .ai-upload-zone,
  .ai-runtime-hero::before,
  .ai-runtime-ring,
  .ai-runtime-bar::before,
  .ai-progress-steps span,
  .ai-job-icon[data-tone="active"],
  .ai-job-track span,
  .ai-job-model-badge,
  .ai-job-model-badge i,
  .ai-job-track span[data-indeterminate="true"] {
    animation: none;
    transition: none;
  }
}

@media (max-width: 1199.98px) {
  .ai-category-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-workspace {
    grid-template-columns: 1fr;
  }

  .ai-side {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .ai-hero {
    min-height: auto;
  }

  .ai-hero-inner {
    padding: 56px 0 86px;
  }

  .ai-hero-status,
  .ai-category-strip,
  .ai-form-grid,
  .ai-upload-grid,
  .ai-progress-steps,
  .ai-result-metrics,
  .ai-image-result dl,
  .ai-privacy-grid,
  .ai-model-row {
    grid-template-columns: 1fr;
  }

  .ai-side,
  .ai-runtime-metrics {
    grid-template-columns: 1fr;
  }

  .ai-runtime-hero-main {
    grid-template-columns: 72px 1fr;
  }

  .ai-runtime-ring {
    width: 68px;
  }

  .ai-studio-shell {
    width: min(100% - 18px, 100%);
  }
}

/* === PIXICORE AI PROGRESS V3 START === */

.ai-job-progress-shell[hidden] {
  display: none !important;
}

.ai-job-progress-shell {
  width: 100%;
  min-width: 0;

  margin:
    0
    0
    1rem;

  contain: layout paint;
}

.ai-job-progress-shell .ai-job-state {
  width: 100%;
  min-width: 0;
}

.ai-job-steps li[data-state="error"],
.ai-job-steps li[data-state="cancelled"] {
  font-weight: 750;
}

.ai-job-steps li[data-state="error"]::before,
.ai-job-steps li[data-state="cancelled"]::before {
  content: "!";
  display: inline-grid;
  place-items: center;

  width: 1.35rem;
  height: 1.35rem;

  margin-right: 0.4rem;

  border-radius: 999px;

  font-size: 0.75rem;
  font-weight: 900;
}

.ai-job-steps li[data-state="error"] {
  color: #ff8f9a;
}

.ai-job-steps li[data-state="cancelled"] {
  color: #f5b85d;
}

.ai-job-steps li[aria-current="step"] {
  outline:
    2px solid
    rgba(86, 182, 255, 0.25);

  outline-offset: 4px;
}

@media (max-width: 767.98px) {
  .ai-job-progress-shell {
    margin-bottom: 0.8rem;
  }

  .ai-job-steps {
    overflow-wrap: anywhere;
  }

  .ai-job-steps li {
    min-width: 0;
  }
}

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

/* === PIXICORE AI PROGRESS V3 END === */
