/* Mobile-only responsive styling for bitbanks panel */

@font-face {
  font-family: "YekanBakh";
  src: url("./assets/fonts/woff2/YekanBakh-Regular.woff2") format("woff2"),
    url("/bitbanks/assets/fonts/woff2/YekanBakh-Regular.woff2") format("woff2"),
    url("/assets/fonts/woff2/YekanBakh-Regular.woff2") format("woff2"),
    url("./assets/fonts/woff/YekanBakh-Regular.woff") format("woff"),
    url("/bitbanks/assets/fonts/woff/YekanBakh-Regular.woff") format("woff"),
    url("/assets/fonts/woff/YekanBakh-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YekanBakh";
  src: url("./assets/fonts/woff2/YekanBakh-SemiBold.woff2") format("woff2"),
    url("/bitbanks/assets/fonts/woff2/YekanBakh-SemiBold.woff2") format("woff2"),
    url("/assets/fonts/woff2/YekanBakh-SemiBold.woff2") format("woff2"),
    url("./assets/fonts/woff/YekanBakh-SemiBold.woff") format("woff"),
    url("/bitbanks/assets/fonts/woff/YekanBakh-SemiBold.woff") format("woff"),
    url("/assets/fonts/woff/YekanBakh-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YekanBakh";
  src: url("./assets/fonts/woff2/YekanBakh-Bold.woff2") format("woff2"),
    url("/bitbanks/assets/fonts/woff2/YekanBakh-Bold.woff2") format("woff2"),
    url("/assets/fonts/woff2/YekanBakh-Bold.woff2") format("woff2"),
    url("./assets/fonts/woff/YekanBakh-Bold.woff") format("woff"),
    url("/bitbanks/assets/fonts/woff/YekanBakh-Bold.woff") format("woff"),
    url("/assets/fonts/woff/YekanBakh-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YekanBakh";
  src: url("./assets/fonts/woff2/YekanBakh-ExtraBold.woff2") format("woff2"),
    url("/bitbanks/assets/fonts/woff2/YekanBakh-ExtraBold.woff2") format("woff2"),
    url("/assets/fonts/woff2/YekanBakh-ExtraBold.woff2") format("woff2"),
    url("./assets/fonts/woff/YekanBakh-ExtraBold.woff") format("woff"),
    url("/bitbanks/assets/fonts/woff/YekanBakh-ExtraBold.woff") format("woff"),
    url("/assets/fonts/woff/YekanBakh-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #18a982;
  --color-primary-dark: #e1a31d;
  --color-hero-start: #18a982;
  --color-hero-end: #ff9d00;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-text-primary: #111827;
  --color-text-muted: #6b7280;
  --color-bg-app: #f3f4f6;
  --color-surface: #ffffff;
  --mobile-radius: 18px;
  --mobile-gap: 14px;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  background: var(--color-bg-app);
  margin: 0;
  padding: 0;
}

body {
  font-family: "YekanBakh", sans-serif;
  color: var(--color-text-primary);
}

button,
input,
textarea,
select {
  font-family: "YekanBakh", sans-serif;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

.dashboard {
  display: block;
}

.dashboard.hidden {
  display: none;
}

.task-view {
  display: none;
}

.task-view.active {
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s ease;
  z-index: 5;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000000;
  padding: 16px;
}

.image-lightbox.show {
  display: flex;
}

.image-lightbox img {
  max-width: 96vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: #0f172a;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

  .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.32);
  }

  .lightbox-download {
    position: absolute;
    top: 12px;
    left: 12px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
  }

  .agent-error-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 14px 12px 0;
    background: rgba(15, 23, 42, 0.18);
    z-index: 10000002;
  }

  .agent-error-popup[hidden] {
    display: none !important;
  }

  .agent-error-popup-card {
    width: 100%;
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(248, 113, 113, 0.28);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.2);
    position: relative;
  }

  .agent-error-popup-title {
    font-size: 15px;
    font-weight: 900;
    color: #991b1b;
    margin-bottom: 8px;
  }

  .agent-error-popup-body {
    font-size: 13px;
    line-height: 1.9;
    color: #334155;
    white-space: pre-wrap;
  }

  .agent-error-popup-close {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 20px;
  }

@media (max-width: 980px) {
  :root {
    --mobile-radius: 16px;
    --mobile-gap: 12px;
  }

  body {
    background:
      radial-gradient(circle at 12% 0%, #eaf7f2, transparent 50%),
      radial-gradient(circle at 88% 10%, #fff3df, transparent 55%),
      var(--color-bg-app);
    font-size: 15px;
    margin: 0;
    padding: 0;
  }

  .app {
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;

  }

  .content {
    margin: 0;
    padding: 5px 14px 120px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(340px, 86vw);
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: -18px 0 36px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: right;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .overlay {
    z-index: 15;
  }

  .hamburger {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    gap: 4px;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    z-index: 9998;
  }

  .top-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .brand-icon {
    width: 100%;
    max-height: clamp(64px, 22vw, 110px);
    border-radius: 12px;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .brand-icon-project {
    min-height: clamp(64px, 22vw, 96px);
  }

  .brand-icon-project.is-empty {
    display: none;
  }

  .brand-icon img {
    width: auto;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }

  .menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .menu-item {
    display: block;
    width: 100%;
    font-size: 0.95rem;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    color: #374151;
    transition: 0.2s ease;
  }

  .menu-item.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(24, 169, 130, 0.25);
  }

  .sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 12px;
    padding: 10px;
  }

  .avatar-circle {
    width: clamp(32px, 9vw, 36px);
    height: clamp(32px, 9vw, 36px);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), #0ea5a4);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: clamp(12px, 3.2vw, 13px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.32);
  }

  .status-pill {
    background: #eefdf5;
    color: #0f5132;
    border: 1px solid #c6f6d5;
    padding: 6px 10px;
    border-radius: 999px;
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: clamp(11px, 3vw, 12px);
  }

  .status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  }

  .project-switcher {
    position: static;
    transform: none;
    order: 2;
    width: min(100%, 56vw);
    justify-content: center;
    min-width: 0;
  }

  .project-switcher-track {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(10px);
  }

  .project-badge,
  .project-switcher-more {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
  }

  .project-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.42;
    filter: grayscale(1);
    transform: scale(0.8);
    transition: transform 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
  }

  .project-badge.is-active,
  .project-badge.is-compact {
    opacity: 1;
    filter: none;
  }

  .project-badge.is-active {
    transform: scale(1.05);
  }

  .project-badge.is-compact {
    transform: none;
  }

  .project-badge-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .project-badge.is-active .project-badge-logo {
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .project-badge.is-compact .project-badge-logo {
    width: 52px;
    height: 52px;
  }

  .project-badge-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .project-badge-fallback {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    background: transparent;
  }

  .project-switcher-more {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(203, 213, 225, 0.95);
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  }

  .project-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    backdrop-filter: blur(8px);
  }

  .project-picker-backdrop[hidden] {
    display: none !important;
  }

  .project-picker-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    border-radius: 22px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  }

  .project-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .project-picker-head h3 {
    margin: 0;
    font-size: 1.05rem;
  }

  .project-picker-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: #fff1f2;
    color: #be123c;
    font-size: 22px;
  }

  .project-picker-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-picker-empty {
    border-radius: 18px;
    padding: 18px;
    background: #fff;
    border: 1px dashed rgba(203, 213, 225, 0.95);
    color: #64748b;
    text-align: center;
    font-weight: 700;
  }

  .project-picker-card {
    border-radius: 20px;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .project-picker-card.is-active {
    border-color: rgba(34, 197, 94, 0.75);
  }

  .project-picker-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .project-picker-name {
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
  }

  .project-picker-domain {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.82rem;
    word-break: break-word;
  }

  .project-picker-activate {
    width: 100%;
    min-height: 42px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow: 0 14px 24px rgba(239, 68, 68, 0.16);
  }

  .project-picker-activate.is-active {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 14px 24px rgba(34, 197, 94, 0.16);
  }

  .top-right {
    order: 4;
    display: flex;
    align-items: center;
  }

  .top-left {
    display: none;
  }

  .panel-title {
    font-size: 11px;
  }

  .hamburger {
    order: 1;
    margin-inline-end: 4px;
    margin-inline-start: 0;
  }

  .panel-title {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 700;
  }

  .header-project-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-hero-end));
    color: transparent;
    font-size: 0;
    line-height: 1;
    position: relative;
    box-shadow: 0 12px 22px rgba(24, 169, 130, 0.22);
  }

  .header-project-button::before {
    content: "+";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 28px;
    font-weight: 500;
  }

  .hero {
    background:
      linear-gradient(135deg, rgba(24, 169, 130, 0.95), rgba(255, 157, 0, 0.9)),
      radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.2), transparent 55%);
    color: #fff;
    border-radius: var(--mobile-radius);
    padding: 16px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
    margin-bottom: 14px;
  }

  .hero-text h1 {
    font-size: clamp(1.25rem, 4.8vw, 1.5rem);
    line-height: 1.45;
    margin: 0 0 6px;
  }

  .hero-text p {
    font-size: clamp(0.9rem, 3.6vw, 0.98rem);
    line-height: 1.75;
    margin: 0;
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mobile-gap);
  }

  .card {
    background: #ffffff;
    border-radius: var(--mobile-radius);
    padding: 12px;
    box-shadow:
      0 10px 24px rgba(15, 23, 42, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "icon"
      "title"
      "desc";
    row-gap: 5px;
    text-align: right;
  }

  .card-icon {
    width: 100%;
    height: auto;
    max-height: clamp(88px, 26vw, 120px);
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
  }

  .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }

  .card h3 {
    font-size: clamp(0.92rem, 3.2vw, 1.02rem);
    font-weight: 800;
    margin: 0;
  }

  .card p {
    font-size: clamp(0.8rem, 2.9vw, 0.9rem);
    opacity: 0.7;
    margin: 0;
  }

  .task-card,
  .task-card-onebyone-card,
  .ready-prompts {
    border-radius: var(--mobile-radius);
    padding: 18px;
    background: #ffffff;
    box-shadow:
      0 12px 28px rgba(15, 23, 42, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .task-card + .ready-prompts,
  .task-card-onebyone-card + .onebyone-results-panel,
  .onebyone-results-panel + .ready-prompts {
    margin-top: 14px;
  }

  .task-card h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 6px;
  }

  .task-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #374151;
  }

  .task-card form,
  .task-card-onebyone-card form,
  .formtaki {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }

  .task-subtitle {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 18px;
  }

  .ready-prompts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }

  .ready-prompts-meta {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ready-prompts-note {
    display: none;
  }

  .ready-prompts .refresher,
  .ready-prompts .refresh-button,
  .ready-prompts .refresh-button img {
    display: none;
  }

  .ready-prompts-list {
    display: grid;
    gap: 12px;
  }

  .prompt-card {
    border: 1px solid #eceff1;
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    background: #fff;
  }

  .prompt-card.image-card {
    grid-template-columns: 1fr;
  }

  .prompt-card-title {
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    background: var(--color-primary);
    padding: 6px 8px;
    border-radius: 8px;
  }

  .single-image-card {
    border: 1px solid #eceff1;
    border-radius: 12px;
    padding: 12px;
    background: #f9f9f9;
  }

  .single-image-card h3 {
    font-size: 14px;
  }

  .single-image-card .task-textarea {
    min-height: 120px;
  }

  .single-result {
    display: none;
    margin-top: 10px;
    border: 1px solid #eceff1;
    border-radius: 12px;
    padding: 10px;
    background: #fafafa;
    gap: 12px;
    align-items: stretch;
    justify-content: flex-start;
  }

  .single-result.show {
    display: flex;
    flex-direction: column;
  }

  .onebyone-results-panel h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
  }

  .single-result-type {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: var(--color-primary);
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
    width: fit-content;
  }

  .single-result-media {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    max-height: 46vh;
  }

  .single-result-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 46vh;
    object-fit: contain;
  }

  .download-btn {
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 11px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
  }

  .allimgsection .download-btn {
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 9px;
  }

  #taskSourceText,
  .task-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    outline: none;
    margin-bottom: 14px;
  }

  #taskSourceText {
    width: 100% !important;
  }

  .task-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .task-result-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
  }

  .task-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .task-result-title {
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
  }

  .task-result-badge {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(169, 24, 31, 0.1);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
  }

  .task-result-meta {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .task-result-output {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-sizing: border-box;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.8;
    color: #0f172a;
    background: rgba(248, 250, 252, 0.95);
  }

  .task-result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .onebyone-type-switcher {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .onebyone-type-btn {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    color: #0f172a;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .onebyone-type-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
  }

  .task-result-image-wrap {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid #e5e7eb;
  }

  .task-result-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 46vh;
    object-fit: contain;
    cursor: zoom-in;
  }

  .btn-primary {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 14px;
    min-height: 44px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    padding: 12px 14px;
    font-weight: 700;
  }

  .pwa-install-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    display: grid;
    place-items: end center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(8px);
  }

  .pwa-install-backdrop[hidden] {
    display: none !important;
  }

  .pwa-install-card {
    width: 100%;
    border-radius: 22px;
    padding: 18px;
    background:
      radial-gradient(circle at top right, rgba(24, 169, 130, 0.16), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
  }

  .pwa-install-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(24, 169, 130, 0.12);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 900;
  }

  .pwa-install-card h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
  }

  .pwa-install-copy {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.9;
  }

  .pwa-install-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  .pwa-install-dismiss {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
  }

  .workflow-model-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
  }

  .workflow-model-picker {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  }

  .workflow-model-label {
    font-size: 12px;
    font-weight: 900;
    color: #0f172a;
    padding: 0 2px;
  }

  .workflow-model-search {
    min-height: 44px;
    border-radius: 14px;
    margin: 0;
  }

  .workflow-model-select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    font-weight: 800;
  }

  .workflow-model-status {
    min-height: 18px;
    font-size: 11px;
    color: #64748b;
    padding: 0 2px;
  }

  .task-status.error {
    color: #b91c1c;
  }

  .chat-ai-shell {
    position: relative;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .chat-settings-launch {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .chat-settings-icon {
    font-size: 18px;
    line-height: 1;
  }

  .chat-ai-header {
    padding-left: 50px;
    display: grid;
    gap: 10px;
  }

  .chat-ai-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .chat-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #334155;
    font-size: 11px;
    font-weight: 800;
  }

  .chat-badge-live {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
  }

  .chat-badge-muted {
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
  }

  .chat-thread {
    min-height: 44vh;
    max-height: 52vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  }

  .chat-empty-state {
    margin: auto;
    text-align: center;
    color: #64748b;
  }

  .chat-empty-title {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 6px;
  }

  .chat-empty-copy {
    font-size: 12px;
    line-height: 1.9;
  }

  .chat-message {
    max-width: 88%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  }

  .chat-message-user {
    align-self: flex-start;
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
    color: #fff;
    border-bottom-right-radius: 8px;
  }

  .chat-message-assistant {
    align-self: flex-end;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-bottom-left-radius: 8px;
  }

  .chat-message-role {
    font-size: 10px;
    font-weight: 900;
    opacity: 0.8;
  }

  .chat-message-body {
    white-space: pre-wrap;
    line-height: 2;
    font-size: 13px;
  }

  .chat-message-media {
    display: grid;
    gap: 8px;
  }

  .chat-message-image-card {
    width: 100%;
  }

  .chat-message-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #f8fafc;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    cursor: zoom-in;
    object-fit: contain;
  }

  .chat-composer {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .chat-composer-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chat-model-picker {
    display: grid;
    gap: 8px;
  }

  .chat-model-search {
    min-height: 44px;
    border-radius: 14px;
  }

  .chat-secondary-btn,
  .chat-model-select,
  .chat-input {
    min-height: 44px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-family: "YekanBakh", sans-serif;
    font-size: 14px;
  }

  .chat-secondary-btn {
    width: 100%;
    padding: 0 14px;
    font-weight: 800;
  }

  .chat-model-select,
  .chat-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0 14px;
    outline: none;
  }

  .chat-model-select:focus,
  .chat-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(169, 24, 31, 0.12);
  }

  .chat-prompt-form {
    display: grid;
    gap: 10px;
  }

  .chat-prompt-input {
    min-height: 120px;
    margin-bottom: 0;
  }

  .chat-send-btn,
  .chat-inline-primary {
    width: 100%;
  }

  .chat-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 10000001;
  }

  .chat-modal-backdrop[hidden] {
    display: none !important;
  }

  .chat-modal-panel {
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
  }

  .chat-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid #edf2f7;
  }

  .chat-modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
  }

  .chat-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 22px;
  }

  .chat-modal-body {
    display: grid;
    gap: 10px;
    padding: 16px 18px 10px;
  }

  .chat-modal-actions {
    display: grid;
    gap: 10px;
    padding: 12px 18px 18px;
  }

  .chat-system-textarea {
    min-height: 220px;
    margin-bottom: 0;
  }

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

  .project-modal-panel {
    max-height: 98vh;
  }

  .project-colors-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-color-field {
    display: grid;
    gap: 8px;
  }

  .project-color-input {
    width: 100%;
    height: 50px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
    box-sizing: border-box;
  }

  .project-file-input {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .project-logo-preview {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    border: 1px solid #dbe3ea;
    background: linear-gradient(180deg, #fff, #f8fafc);
    display: grid;
    place-items: center;
    overflow: hidden;
  }

  .project-logo-preview[hidden] {
    display: none !important;
  }

  .project-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  .project-prompt-input {
    min-height: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .project-modal-actions {
    padding: 0;
    margin-top: 4px;
  }

  .project-settings-shell {
    display: grid;
    gap: 14px;
    background:
      radial-gradient(circle at top right, rgba(24, 169, 130, 0.08), transparent 28%),
      radial-gradient(circle at top left, rgba(255, 157, 0, 0.08), transparent 24%);
  }

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

  .project-settings-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 253, 0.99));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
  }

  .project-settings-card-head {
    padding: 16px 16px 14px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, rgba(24, 169, 130, 0.12), rgba(255, 157, 0, 0.12));
  }

  .project-settings-card-title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
  }

  .project-settings-card-title span {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
}

  .project-settings-palette {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
  }

  .project-settings-palette-swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
  }

  .project-settings-card-body {
    display: grid;
    gap: 14px;
    padding: 14px;
  }

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

  .project-settings-group-title {
    font-size: 12px;
    font-weight: 900;
    color: #64748b;
    padding: 0 4px;
  }

  .project-setting-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  }

  .project-setting-content {
    min-width: 0;
  }

  .project-setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 2px;
  }

  .project-setting-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(24, 169, 130, 0.1);
    color: #0f766e;
    font-size: 10px;
    font-weight: 900;
  }

  .project-setting-value {
    font-size: 13px;
    line-height: 1.9;
    color: #0f172a;
    min-width: 0;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
  }

  .project-setting-prompt {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .project-setting-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .project-edit-btn,
  .project-agent-btn,
  .project-activate-btn {
    border: 1px solid rgba(209, 219, 229, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    min-height: 38px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  }

  .project-edit-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }

  .project-agent-btn {
    padding: 0 12px;
    background: linear-gradient(135deg, rgba(24, 169, 130, 0.08), rgba(255, 157, 0, 0.08));
  }

  .project-activate-btn {
    padding: 0 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(24, 169, 130, 0.1));
  }

  .project-activate-btn.is-active {
    background: linear-gradient(135deg, var(--color-primary), #0ea5a4);
    color: #fff;
    border-color: transparent;
  }

  .project-settings-logo-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: block;
    padding: 6px;
    box-sizing: border-box;
  }

  .project-settings-empty {
    color: #94a3b8;
  }

  .project-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.22);
    flex: 0 0 auto;
  }

  body.chat-modal-open {
    overflow: hidden;
  }

  .onebyone-grid,
  .ready-prompts-list {
    grid-template-columns: 1fr;
    max-height: 46vh;
    overflow-y: auto;
  }

  .prompt-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .prompt-card-title {
    width: fit-content;
  }

  .prompt-actions {
    justify-content: flex-end;
  }

  .single-result {
    flex-direction: column;
  }

  .single-result-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .progress {
    gap: 8px;
  }

	  .prosescontainer {
	    position: fixed;
	    top: 50%;
	    left: 50%;
	    transform: translate(-50%, -50%);
	    width: 94vw;
	    min-height: 60vh;
	    max-height: 82vh;
	    padding: 16px;
	    box-sizing: border-box;
	    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
      0 24px 60px rgba(17, 24, 39, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      inset 0 -1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 99999;
  }

  .ppbar {
    display: none;
    width: min(520px, 86vw);
    height: 12px;
    flex: 0 0 auto;
    border-radius: 999px;
    overflow: hidden;
    background-color: #c7c7c7;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
    position: relative;
    z-index: 5;
  }

  .prosescontainer.active:not(.done) .ppbar {
    display: block;
  }

  .ppbarin {
    width: 0%;
    height: 100%;
    background: var(--color-primary);
    border-radius: inherit;
  }

  .prosescontainer > * {
    position: relative;
    z-index: 1;
  }

  .prosescontainer.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .prosescontainer .waiting,
  .prosescontainer .done {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-height: 100%;
    overflow: auto;
  }

  .prosescontainer .done {
    display: none;
  }

  .prosescontainer.done .waiting {
    display: none;
  }

  .prosescontainer.done .done {
    display: flex;
  }

  .prosescontainer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 45%),
      radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.22), transparent 40%);
  }

  .prosestext,
  .theteztinpross {
    font-size: 1rem;
  }

  #loadingLottie,
  #textToImageLoadingLottie,
  #oneByOneLoadingLottie {
    width: min(220px, 70vw);
    max-height: 42vh;
  }

  .allimgbutton {
    position: fixed;
    left: 14px;
    top: 14px;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
      0 18px 40px rgba(15, 23, 42, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    z-index: 9999999;
    cursor: pointer;
    display: grid;
    place-items: center;
  }

  .allimgbutton::before {
    content: "";
    width: 36px;
    height: 36px;
    display: block;
    background: url("./assets/gallery.svg") center / contain no-repeat;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.25));
  }

  .allimgsection {
    position: fixed;
    width: 94vw;
    height: calc(100dvh - 24px);
    left: 50%;
    top: 12px;
    bottom: 12px;
    transform: translateX(-50%);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
      0 24px 60px rgba(17, 24, 39, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    z-index: 9999;
  }

  .image-lightbox img {
    max-width: 96vw;
    max-height: 78vh;
  }
}

@media (max-width: 520px) {
  .content {
    padding: 5px 12px 112px;
  }

  .hero-text h1 {
    font-size: clamp(1.15rem, 5.2vw, 1.35rem);
  }

  .hero-text p {
    font-size: clamp(0.88rem, 3.8vw, 0.94rem);
  }

  .project-switcher {
    width: min(100%, 52vw);
  }

  .card-icon {
    max-height: clamp(120px, 52vw, 160px);
  }

  .allimgbutton {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }

  .allimgbutton::before {
    width: 34px;
    height: 34px;
  }

  .allimgsection {
    height: calc(100dvh - 20px);
    top: 10px;
    bottom: 10px;
    border-radius: 18px;
  }
}

@media (max-width: 360px) {
  .content {
    padding: 0 10px 108px;
  }

  .topbar {
    gap: 6px;
  }

  .sidebar {
    width: min(320px, 90vw);
  }

  .hero {
    padding: 14px;
  }

  .task-card,
  .ready-prompts {
    padding: 14px;
  }

  #taskSourceText,
  .task-textarea,
  .btn-primary {
    font-size: 13px;
  }
}
