/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties {
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
    *, :before, :after, ::backdrop {
      --tw-translate-x: 0;
      --tw-translate-y: 0;
      --tw-translate-z: 0;
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-space-y-reverse: 0;
      --tw-border-style: solid;
      --tw-gradient-position: initial;
      --tw-gradient-from: #0000;
      --tw-gradient-via: #0000;
      --tw-gradient-to: #0000;
      --tw-gradient-stops: initial;
      --tw-gradient-via-stops: initial;
      --tw-gradient-from-position: 0%;
      --tw-gradient-via-position: 50%;
      --tw-gradient-to-position: 100%;
      --tw-leading: initial;
      --tw-font-weight: initial;
      --tw-tracking: initial;
      --tw-shadow: 0 0 #0000;
      --tw-shadow-color: initial;
      --tw-shadow-alpha: 100%;
      --tw-inset-shadow: 0 0 #0000;
      --tw-inset-shadow-color: initial;
      --tw-inset-shadow-alpha: 100%;
      --tw-ring-color: initial;
      --tw-ring-shadow: 0 0 #0000;
      --tw-inset-ring-color: initial;
      --tw-inset-ring-shadow: 0 0 #0000;
      --tw-ring-inset: initial;
      --tw-ring-offset-width: 0px;
      --tw-ring-offset-color: #fff;
      --tw-ring-offset-shadow: 0 0 #0000;
      --tw-outline-style: solid;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
      --tw-duration: initial;
      --tw-content: "";
      --tw-scale-x: 1;
      --tw-scale-y: 1;
      --tw-scale-z: 1;
    }
  }
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../assets/Vazirmatn-FD-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@layer theme {
  :root, :host {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
      "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol", "Noto Color Emoji";
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --color-red-400: oklch(70.4% .191 22.216);
    --color-amber-400: oklch(82.8% .189 84.429);
    --color-green-400: oklch(79.2% .209 151.711);
    --color-black: #000;
    --color-white: #fff;
    --spacing: .25rem;
    --container-2xl: 42rem;
    --container-3xl: 48rem;
    --text-xs: .75rem;
    --text-xs--line-height: calc(1 / .75);
    --text-sm: .875rem;
    --text-sm--line-height: calc(1.25 / .875);
    --text-2xl: 1.5rem;
    --text-2xl--line-height: calc(2 / 1.5);
    --text-3xl: 1.875rem;
    --text-3xl--line-height: calc(2.25 / 1.875);
    --text-4xl: 2.25rem;
    --text-4xl--line-height: calc(2.5 / 2.25);
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --tracking-tight: -.025em;
    --leading-tight: 1.25;
    --radius-sm: .25rem;
    --radius-md: .375rem;
    --radius-lg: .5rem;
    --radius-xl: .75rem;
    --radius-2xl: 1rem;
    --default-transition-duration: .15s;
    --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}

@layer base {
  *, :after, :before, ::backdrop {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::file-selector-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  html, :host {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    line-height: 1.5;
    font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }

  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }

  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

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

  b, strong {
    font-weight: bolder;
  }

  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
    position: relative;
  }

  sub {
    bottom: -.25em;
  }

  sup {
    top: -.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }

  :-moz-focusring:where(:not(iframe)) {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol, ul, menu {
    list-style: none;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    vertical-align: middle;
    display: block;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  button, input, select, optgroup, textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  ::placeholder {
    opacity: 1;
  }

  @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentColor;
    }

    @supports (color: color-mix(in lab, red, red)) {
      ::placeholder {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }

  textarea {
    resize: vertical;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-year-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-month-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-day-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-hour-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-minute-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-second-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-millisecond-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  button, input:where([type="button"], [type="reset"], [type="submit"]) {
    appearance: button;
  }

  ::file-selector-button {
    appearance: button;
  }

  ::-webkit-inner-spin-button {
    height: auto;
  }

  ::-webkit-outer-spin-button {
    height: auto;
  }

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer components;

@layer utilities {
  .pointer-events-auto {
    pointer-events: auto;
  }

  .pointer-events-none {
    pointer-events: none;
  }

  .visible {
    visibility: visible;
  }

  .sr-only {
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
  }

  .absolute {
    position: absolute;
  }

  .fixed {
    position: fixed;
  }

  .relative {
    position: relative;
  }

  .static {
    position: static;
  }

  .sticky {
    position: sticky;
  }

  .inset-0 {
    inset: 0;
  }

  .inset-x-0 {
    inset-inline: 0;
  }

  .inset-y-0 {
    inset-block: 0;
  }

  .start-0 {
    inset-inline-start: calc(var(--spacing) * 0);
  }

  .start-3 {
    inset-inline-start: calc(var(--spacing) * 3);
  }

  .end-0 {
    inset-inline-end: calc(var(--spacing) * 0);
  }

  .end-2 {
    inset-inline-end: calc(var(--spacing) * 2);
  }

  .top-2 {
    top: calc(var(--spacing) * 2);
  }

  .bottom-0 {
    bottom: 0;
  }

  .bottom-6 {
    bottom: calc(var(--spacing) * 6);
  }

  .bottom-16 {
    bottom: calc(var(--spacing) * 16);
  }

  .bottom-full {
    bottom: 100%;
  }

  .left-1\/2 {
    left: 50%;
  }

  .left-2 {
    left: calc(var(--spacing) * 2);
  }

  .z-20 {
    z-index: 20;
  }

  .z-30 {
    z-index: 30;
  }

  .z-40 {
    z-index: 40;
  }

  .z-50 {
    z-index: 50;
  }

  .z-\[60\] {
    z-index: 60;
  }

  .container {
    width: 100%;
  }

  @media (min-width: 40rem) {
    .container {
      max-width: 40rem;
    }
  }

  @media (min-width: 48rem) {
    .container {
      max-width: 48rem;
    }
  }

  @media (min-width: 64rem) {
    .container {
      max-width: 64rem;
    }
  }

  @media (min-width: 80rem) {
    .container {
      max-width: 80rem;
    }
  }

  @media (min-width: 96rem) {
    .container {
      max-width: 96rem;
    }
  }

  .mx-auto {
    margin-inline: auto;
  }

  .my-1 {
    margin-block: var(--spacing);
  }

  .my-2 {
    margin-block: calc(var(--spacing) * 2);
  }

  .my-3 {
    margin-block: calc(var(--spacing) * 3);
  }

  .my-auto {
    margin-block: auto;
  }

  .ms-auto {
    margin-inline-start: auto;
  }

  .mt-1 {
    margin-top: var(--spacing);
  }

  .mt-2 {
    margin-top: calc(var(--spacing) * 2);
  }

  .mt-4 {
    margin-top: calc(var(--spacing) * 4);
  }

  .mb-2 {
    margin-bottom: calc(var(--spacing) * 2);
  }

  .mb-9 {
    margin-bottom: calc(var(--spacing) * 9);
  }

  .block {
    display: block;
  }

  .contents {
    display: contents;
  }

  .flex {
    display: flex;
  }

  .grid {
    display: grid;
  }

  .hidden {
    display: none;
  }

  .inline {
    display: inline;
  }

  .inline-flex {
    display: inline-flex;
  }

  .table {
    display: table;
  }

  .size-4 {
    width: calc(var(--spacing) * 4);
    height: calc(var(--spacing) * 4);
  }

  .size-8 {
    width: calc(var(--spacing) * 8);
    height: calc(var(--spacing) * 8);
  }

  .size-10 {
    width: calc(var(--spacing) * 10);
    height: calc(var(--spacing) * 10);
  }

  .h-1\.5 {
    height: calc(var(--spacing) * 1.5);
  }

  .h-2 {
    height: calc(var(--spacing) * 2);
  }

  .h-2\.5 {
    height: calc(var(--spacing) * 2.5);
  }

  .h-3\.5 {
    height: calc(var(--spacing) * 3.5);
  }

  .h-4 {
    height: calc(var(--spacing) * 4);
  }

  .h-5 {
    height: calc(var(--spacing) * 5);
  }

  .h-6 {
    height: calc(var(--spacing) * 6);
  }

  .h-7 {
    height: calc(var(--spacing) * 7);
  }

  .h-8 {
    height: calc(var(--spacing) * 8);
  }

  .h-9 {
    height: calc(var(--spacing) * 9);
  }

  .h-10 {
    height: calc(var(--spacing) * 10);
  }

  .h-14 {
    height: calc(var(--spacing) * 14);
  }

  .h-72 {
    height: calc(var(--spacing) * 72);
  }

  .h-\[18px\] {
    height: 18px;
  }

  .h-full {
    height: 100%;
  }

  .h-screen {
    height: 100vh;
  }

  .max-h-48 {
    max-height: calc(var(--spacing) * 48);
  }

  .min-h-0 {
    min-height: 0;
  }

  .min-h-9 {
    min-height: calc(var(--spacing) * 9);
  }

  .min-h-10 {
    min-height: calc(var(--spacing) * 10);
  }

  .min-h-full {
    min-height: 100%;
  }

  .w-1\.5 {
    width: calc(var(--spacing) * 1.5);
  }

  .w-2\.5 {
    width: calc(var(--spacing) * 2.5);
  }

  .w-3\.5 {
    width: calc(var(--spacing) * 3.5);
  }

  .w-3\/5 {
    width: 60%;
  }

  .w-4 {
    width: calc(var(--spacing) * 4);
  }

  .w-4\/5 {
    width: 80%;
  }

  .w-5 {
    width: calc(var(--spacing) * 5);
  }

  .w-6 {
    width: calc(var(--spacing) * 6);
  }

  .w-7 {
    width: calc(var(--spacing) * 7);
  }

  .w-9 {
    width: calc(var(--spacing) * 9);
  }

  .w-10 {
    width: calc(var(--spacing) * 10);
  }

  .w-12 {
    width: calc(var(--spacing) * 12);
  }

  .w-24 {
    width: calc(var(--spacing) * 24);
  }

  .w-64 {
    width: calc(var(--spacing) * 64);
  }

  .w-72 {
    width: calc(var(--spacing) * 72);
  }

  .w-\[18px\] {
    width: 18px;
  }

  .w-\[46\%\] {
    width: 46%;
  }

  .w-full {
    width: 100%;
  }

  .max-w-2xl {
    max-width: var(--container-2xl);
  }

  .max-w-3xl {
    max-width: var(--container-3xl);
  }

  .max-w-\[46vw\] {
    max-width: 46vw;
  }

  .max-w-\[70\%\] {
    max-width: 70%;
  }

  .max-w-\[80\%\] {
    max-width: 80%;
  }

  .max-w-\[85\%\] {
    max-width: 85%;
  }

  .max-w-\[640px\] {
    max-width: 640px;
  }

  .min-w-0 {
    min-width: 0;
  }

  .flex-1 {
    flex: 1;
  }

  .flex-shrink, .shrink {
    flex-shrink: 1;
  }

  .shrink-0 {
    flex-shrink: 0;
  }

  .grow {
    flex-grow: 1;
  }

  .border-collapse {
    border-collapse: collapse;
  }

  .-translate-x-1\/2 {
    --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }

  .-translate-x-full {
    --tw-translate-x: -100%;
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }

  .translate-y-4 {
    --tw-translate-y: calc(var(--spacing) * 4);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }

  .rotate-180 {
    rotate: 180deg;
  }

  .transform {
    transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
  }

  .shimmer {
    --_shimmer-base: currentColor;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .shimmer {
      --_shimmer-base: color-mix(in srgb, currentColor 45%, transparent);
    }
  }

  .shimmer {
    --_shimmer-hi: var(--shimmer-color, currentColor);
    --_shimmer-spread: var(--shimmer-spread, 3rem);
    background-image: linear-gradient(calc(90deg + var(--shimmer-angle, 20deg)), var(--_shimmer-base) 0%, var(--_shimmer-base) calc(50% - var(--_shimmer-spread)), var(--_shimmer-hi) 50%, var(--_shimmer-base) calc(50% + var(--_shimmer-spread)), var(--_shimmer-base) 100%);
    -webkit-text-fill-color: transparent;
    animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
    background-position: 100% 0;
    background-repeat: no-repeat;
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
  }

  @media (prefers-reduced-motion: reduce) {
    .shimmer {
      -webkit-text-fill-color: currentColor;
      background-image: none;
      animation: none;
    }
  }

  .shimmer-none {
    -webkit-text-fill-color: currentColor;
    background-image: none;
    animation: none;
  }

  .cursor-pointer {
    cursor: pointer;
  }

  .resize {
    resize: both;
  }

  .resize-none {
    resize: none;
  }

  .scrollbar-none {
    scrollbar-width: none;
  }

  .flex-col {
    flex-direction: column;
  }

  .flex-row {
    flex-direction: row;
  }

  .flex-wrap {
    flex-wrap: wrap;
  }

  .place-items-center {
    place-items: center;
  }

  .items-center {
    align-items: center;
  }

  .items-start {
    align-items: flex-start;
  }

  .items-stretch {
    align-items: stretch;
  }

  .justify-between {
    justify-content: space-between;
  }

  .justify-center {
    justify-content: center;
  }

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

  .gap-0 {
    gap: 0;
  }

  .gap-0\.5 {
    gap: calc(var(--spacing) * .5);
  }

  .gap-1 {
    gap: var(--spacing);
  }

  .gap-1\.5 {
    gap: calc(var(--spacing) * 1.5);
  }

  .gap-2 {
    gap: calc(var(--spacing) * 2);
  }

  .gap-2\.5 {
    gap: calc(var(--spacing) * 2.5);
  }

  .gap-3 {
    gap: calc(var(--spacing) * 3);
  }

  .gap-6 {
    gap: calc(var(--spacing) * 6);
  }

  .gap-7 {
    gap: calc(var(--spacing) * 7);
  }

  :where(.space-y-0\.5 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)));
  }

  :where(.space-y-2 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
  }

  :where(.space-y-7 > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));
    margin-block-end: calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)));
  }

  .gap-x-3 {
    column-gap: calc(var(--spacing) * 3);
  }

  .gap-y-1\.5 {
    row-gap: calc(var(--spacing) * 1.5);
  }

  .self-center {
    align-self: center;
  }

  .truncate {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .overflow-auto {
    overflow: auto;
  }

  .overflow-hidden {
    overflow: hidden;
  }

  .overflow-x-auto {
    overflow-x: auto;
  }

  .overflow-y-auto {
    overflow-y: auto;
  }

  .rounded {
    border-radius: .25rem;
  }

  .rounded-2xl {
    border-radius: var(--radius-2xl);
  }

  .rounded-\[22px\] {
    border-radius: 22px;
  }

  .rounded-\[28px\] {
    border-radius: 28px;
  }

  .rounded-full {
    border-radius: 3.40282e38px;
  }

  .rounded-lg {
    border-radius: var(--radius-lg);
  }

  .rounded-md {
    border-radius: var(--radius-md);
  }

  .rounded-xl {
    border-radius: var(--radius-xl);
  }

  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }

  .border-s {
    border-inline-start-style: var(--tw-border-style);
    border-inline-start-width: 1px;
  }

  .border-e {
    border-inline-end-style: var(--tw-border-style);
    border-inline-end-width: 1px;
  }

  .border-t {
    border-top-style: var(--tw-border-style);
    border-top-width: 1px;
  }

  .border-b {
    border-bottom-style: var(--tw-border-style);
    border-bottom-width: 1px;
  }

  .border-l {
    border-left-style: var(--tw-border-style);
    border-left-width: 1px;
  }

  .border-\[var\(--border\)\] {
    border-color: var(--border);
  }

  .bg-\[var\(--accent\)\] {
    background-color: var(--accent);
  }

  .bg-\[var\(--composer-background\)\] {
    background-color: var(--composer-background);
  }

  .bg-amber-400 {
    background-color: var(--color-amber-400);
  }

  .bg-black\/40 {
    background-color: #0006;
  }

  @supports (color: color-mix(in lab, red, red)) {
    .bg-black\/40 {
      background-color: color-mix(in oklab, var(--color-black) 40%, transparent);
    }
  }

  .bg-green-400 {
    background-color: var(--color-green-400);
  }

  .bg-red-400 {
    background-color: var(--color-red-400);
  }

  .bg-transparent {
    background-color: #0000;
  }

  .bg-gradient-to-t {
    --tw-gradient-position: to top in oklab;
    background-image: linear-gradient(var(--tw-gradient-stops));
  }

  .to-transparent {
    --tw-gradient-to: transparent;
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }

  .p-0\.5 {
    padding: calc(var(--spacing) * .5);
  }

  .p-1\.5 {
    padding: calc(var(--spacing) * 1.5);
  }

  .p-2 {
    padding: calc(var(--spacing) * 2);
  }

  .p-3 {
    padding: calc(var(--spacing) * 3);
  }

  .p-4 {
    padding: calc(var(--spacing) * 4);
  }

  .px-1 {
    padding-inline: var(--spacing);
  }

  .px-2 {
    padding-inline: calc(var(--spacing) * 2);
  }

  .px-2\.5 {
    padding-inline: calc(var(--spacing) * 2.5);
  }

  .px-3 {
    padding-inline: calc(var(--spacing) * 3);
  }

  .px-3\.5 {
    padding-inline: calc(var(--spacing) * 3.5);
  }

  .px-4 {
    padding-inline: calc(var(--spacing) * 4);
  }

  .px-12 {
    padding-inline: calc(var(--spacing) * 12);
  }

  .py-0\.5 {
    padding-block: calc(var(--spacing) * .5);
  }

  .py-1 {
    padding-block: var(--spacing);
  }

  .py-1\.5 {
    padding-block: calc(var(--spacing) * 1.5);
  }

  .py-2 {
    padding-block: calc(var(--spacing) * 2);
  }

  .py-2\.5 {
    padding-block: calc(var(--spacing) * 2.5);
  }

  .py-3 {
    padding-block: calc(var(--spacing) * 3);
  }

  .pt-2 {
    padding-top: calc(var(--spacing) * 2);
  }

  .pt-4 {
    padding-top: calc(var(--spacing) * 4);
  }

  .pt-6 {
    padding-top: calc(var(--spacing) * 6);
  }

  .pt-8 {
    padding-top: calc(var(--spacing) * 8);
  }

  .pb-1 {
    padding-bottom: var(--spacing);
  }

  .pb-1\.5 {
    padding-bottom: calc(var(--spacing) * 1.5);
  }

  .pb-2 {
    padding-bottom: calc(var(--spacing) * 2);
  }

  .pb-3 {
    padding-bottom: calc(var(--spacing) * 3);
  }

  .pb-4 {
    padding-bottom: calc(var(--spacing) * 4);
  }

  .pb-32 {
    padding-bottom: calc(var(--spacing) * 32);
  }

  .pb-44 {
    padding-bottom: calc(var(--spacing) * 44);
  }

  .text-center {
    text-align: center;
  }

  .text-left {
    text-align: left;
  }

  .text-start {
    text-align: start;
  }

  .font-\[Vazirmatn\,sans-serif\] {
    font-family: Vazirmatn, sans-serif;
  }

  .font-mono {
    font-family: var(--font-mono);
  }

  .font-sans {
    font-family: var(--font-sans);
  }

  .font-serif {
    font-family: var(--font-serif);
  }

  .text-2xl {
    font-size: var(--text-2xl);
    line-height: var(--tw-leading, var(--text-2xl--line-height));
  }

  .text-4xl {
    font-size: var(--text-4xl);
    line-height: var(--tw-leading, var(--text-4xl--line-height));
  }

  .text-sm {
    font-size: var(--text-sm);
    line-height: var(--tw-leading, var(--text-sm--line-height));
  }

  .text-xs {
    font-size: var(--text-xs);
    line-height: var(--tw-leading, var(--text-xs--line-height));
  }

  .text-\[12\.5px\] {
    font-size: 12.5px;
  }

  .text-\[13\.5px\] {
    font-size: 13.5px;
  }

  .text-\[13px\] {
    font-size: 13px;
  }

  .text-\[14\.5px\] {
    font-size: 14.5px;
  }

  .text-\[14px\] {
    font-size: 14px;
  }

  .text-\[15\.5px\] {
    font-size: 15.5px;
  }

  .text-\[15px\] {
    font-size: 15px;
  }

  .text-\[16\.5px\] {
    font-size: 16.5px;
  }

  .text-\[22px\] {
    font-size: 22px;
  }

  .leading-6 {
    --tw-leading: calc(var(--spacing) * 6);
    line-height: calc(var(--spacing) * 6);
  }

  .leading-7 {
    --tw-leading: calc(var(--spacing) * 7);
    line-height: calc(var(--spacing) * 7);
  }

  .leading-\[1\.75\] {
    --tw-leading: 1.75;
    line-height: 1.75;
  }

  .leading-tight {
    --tw-leading: var(--leading-tight);
    line-height: var(--leading-tight);
  }

  .font-medium {
    --tw-font-weight: var(--font-weight-medium);
    font-weight: var(--font-weight-medium);
  }

  .font-normal {
    --tw-font-weight: var(--font-weight-normal);
    font-weight: var(--font-weight-normal);
  }

  .font-semibold {
    --tw-font-weight: var(--font-weight-semibold);
    font-weight: var(--font-weight-semibold);
  }

  .tracking-tight {
    --tw-tracking: var(--tracking-tight);
    letter-spacing: var(--tracking-tight);
  }

  .whitespace-nowrap {
    white-space: nowrap;
  }

  .whitespace-pre-wrap {
    white-space: pre-wrap;
  }

  .text-\[hsl\(0_0\%_98\%\)\] {
    color: #fafafa;
  }

  .text-\[var\(--accent-color\,var\(--foreground\)\)\] {
    color: var(--accent-color, var(--foreground));
  }

  .text-\[var\(--accent-foreground\)\] {
    color: var(--accent-foreground);
  }

  .text-\[var\(--foreground\)\] {
    color: var(--foreground);
  }

  .text-\[var\(--muted\)\] {
    color: var(--muted);
  }

  .text-white {
    color: var(--color-white);
  }

  .underline {
    text-decoration-line: underline;
  }

  .antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .opacity-0 {
    opacity: 0;
  }

  .shadow-\[0_2px_12px_rgb\(0_0_0\/\.04\)\] {
    --tw-shadow: 0 2px 12px var(--tw-shadow-color, #0000000a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .shadow-sm {
    --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .shadow-xl {
    --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, #0000001a), 0 8px 10px -6px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .ring {
    --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .outline {
    outline-style: var(--tw-outline-style);
    outline-width: 1px;
  }

  .blur {
    --tw-blur: blur(8px);
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .filter {
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .transition {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .transition-all {
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .transition-colors {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .transition-opacity {
    transition-property: opacity;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .duration-150 {
    --tw-duration: .15s;
    transition-duration: .15s;
  }

  .duration-200 {
    --tw-duration: .2s;
    transition-duration: .2s;
  }

  .outline-none {
    --tw-outline-style: none;
    outline-style: none;
  }

  .select-none {
    -webkit-user-select: none;
    user-select: none;
  }

  .shimmer-once {
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
  }

  .shimmer-duration-1000 {
    --shimmer-duration: calc(1000 * 1ms);
  }

  .shimmer-reverse {
    animation-direction: reverse;
  }

  .peer-checked\:hidden:is(:where(.peer):checked ~ *) {
    display: none;
  }

  .after\:absolute:after {
    content: var(--tw-content);
    position: absolute;
  }

  .after\:inset-x-0:after {
    content: var(--tw-content);
    inset-inline: 0;
  }

  .after\:inset-y-1:after {
    content: var(--tw-content);
    inset-block: var(--spacing);
  }

  .after\:-bottom-px:after {
    content: var(--tw-content);
    bottom: -1px;
  }

  .after\:-left-px:after {
    content: var(--tw-content);
    left: -1px;
  }

  .after\:h-0\.5:after {
    content: var(--tw-content);
    height: calc(var(--spacing) * .5);
  }

  .after\:w-0\.5:after {
    content: var(--tw-content);
    width: calc(var(--spacing) * .5);
  }

  .after\:rounded-full:after {
    content: var(--tw-content);
    border-radius: 3.40282e38px;
  }

  .after\:bg-\[var\(--foreground\)\]:after {
    content: var(--tw-content);
    background-color: var(--foreground);
  }

  .after\:opacity-0:after {
    content: var(--tw-content);
    opacity: 0;
  }

  .after\:transition-opacity:after {
    content: var(--tw-content);
    transition-property: opacity;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .after\:duration-150:after {
    content: var(--tw-content);
    --tw-duration: .15s;
    transition-duration: .15s;
  }

  @media (hover: hover) {
    .hover\:bg-\[hsl\(217_91\%_48\%\)\]:hover {
      background-color: #0b60ea;
    }

    .hover\:bg-\[var\(--button-hover\)\]:hover {
      background-color: var(--button-hover);
    }

    .hover\:text-\[var\(--foreground\)\]:hover {
      color: var(--foreground);
    }

    .hover\:opacity-85:hover {
      opacity: .85;
    }
  }

  .focus-visible\:ring-2:focus-visible {
    --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .focus-visible\:ring-\[var\(--accent\)\]:focus-visible {
    --tw-ring-color: var(--accent);
  }

  .focus-visible\:ring-offset-2:focus-visible {
    --tw-ring-offset-width: 2px;
    --tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  }

  .focus-visible\:ring-offset-\[var\(--background\)\]:focus-visible {
    --tw-ring-offset-color: var(--background);
  }

  .focus-visible\:outline-2:focus-visible {
    outline-style: var(--tw-outline-style);
    outline-width: 2px;
  }

  .focus-visible\:outline-offset-2:focus-visible {
    outline-offset: 2px;
  }

  .focus-visible\:outline-\[hsl\(217_91\%_60\%\)\]:focus-visible {
    outline-color: #3c83f6;
  }

  .focus-visible\:outline-\[var\(--accent\)\]:focus-visible {
    outline-color: var(--accent);
  }

  .active\:scale-95:active {
    --tw-scale-x: 95%;
    --tw-scale-y: 95%;
    --tw-scale-z: 95%;
    scale: var(--tw-scale-x) var(--tw-scale-y);
  }

  .disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
  }

  .disabled\:opacity-40:disabled {
    opacity: .4;
  }

  .aria-selected\:bg-\[var\(--sidebar-active\)\][aria-selected="true"] {
    background-color: var(--sidebar-active);
  }

  .aria-selected\:text-\[var\(--foreground\)\][aria-selected="true"] {
    color: var(--foreground);
  }

  .aria-selected\:after\:opacity-100[aria-selected="true"]:after {
    content: var(--tw-content);
    opacity: 1;
  }

  @media (min-width: 40rem) {
    .sm\:end-4 {
      inset-inline-end: calc(var(--spacing) * 4);
    }

    .sm\:flex {
      display: flex;
    }

    .sm\:inline {
      display: inline;
    }

    .sm\:px-4 {
      padding-inline: calc(var(--spacing) * 4);
    }

    .sm\:px-14 {
      padding-inline: calc(var(--spacing) * 14);
    }

    .sm\:text-3xl {
      font-size: var(--text-3xl);
      line-height: var(--tw-leading, var(--text-3xl--line-height));
    }

    .sm\:text-sm {
      font-size: var(--text-sm);
      line-height: var(--tw-leading, var(--text-sm--line-height));
    }

    .sm\:text-\[44px\] {
      font-size: 44px;
    }
  }

  @media (min-width: 48rem) {
    .md\:static {
      position: static;
    }

    .md\:block {
      display: block;
    }

    .md\:hidden {
      display: none;
    }

    .md\:translate-x-0 {
      --tw-translate-x: 0px;
      translate: var(--tw-translate-x) var(--tw-translate-y);
    }
  }

  @media (min-width: 64rem) {
    .lg\:flex {
      display: flex;
    }
  }

  .rtl\:translate-x-full:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    --tw-translate-x: 100%;
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }

  .rtl\:rotate-180:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    rotate: 180deg;
  }

  @media (min-width: 48rem) {
    .md\:rtl\:translate-x-0:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
      --tw-translate-x: 0px;
      translate: var(--tw-translate-x) var(--tw-translate-y);
    }
  }

  .\[\&\:has\(\#promo-banner-close\:focus-visible\)_label\]\:outline-2:has(#promo-banner-close:focus-visible) label {
    outline-style: var(--tw-outline-style);
    outline-width: 2px;
  }

  .\[\&\:has\(\#promo-banner-close\:focus-visible\)_label\]\:outline-\[var\(--accent\)\]:has(#promo-banner-close:focus-visible) label {
    outline-color: var(--accent);
  }
}

:root {
  --background: #fff;
  --foreground: #171717;
  --sidebar-background: #f7f7f8;
  --sidebar-hover: #ededed;
  --sidebar-active: #e6e6e6;
  --border: #e6e6e6;
  --muted: #6b6b6b;
  --sidebar-color: #fff;
  --muted-foreground: #8c8c8c;
  --input-background: #fff;
  --input-border: #d9d9d9;
  --button-hover: #f2f2f2;
  --accent: #171717;
  --accent-foreground: #fff;
  --scrollbar: #d1d1d1;
  --tooltip-background: #212121;
  --tooltip-foreground: #fafafa;
  --tooltip-border: #404040;
  --composer-background: #f5f5f5;
  --composer-hover: #e3e3e3;
  --composer-ring: #00000014;
  --composer-ring-focus: #0000002e;
  --message-bubble: #e8f3fe;
  --message-bubble-text: #0c274a;
  --code-background: #f3f3f3;
  --code-header: #f3f3f3;
  --code-border: #d8dee4;
  --code-foreground: #24292f;
  --radius: 12px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
  --scrollbar-track-bg: transparent;
  --scrollbar-thumb-bg: #0000002e;
  --scrollbar-thumb-hover: #00000052;
  --scrollbar-size: 8px;
  --sidebar-border: #ffffff1a;
  --dropdown-background: var(--input-background);
  --dropdown-hover: var(--sidebar-hover);
  --attachment-border: #d6d6d6;
  --attachment-hover: #f5f5f5;
  --attachment-remove-background: #171717;
  --attachment-remove-foreground: #fff;
  --attachment-remove-border: #171717;
}

[data-theme="dark"] {
  --background: #000;
  --foreground: #ededed;
  --sidebar-background: #000;
  --sidebar-hover: #ffffff1a;
  --sidebar-active: #ffffff1a;
  --border: #3b3b3b;
  --muted: #a1a1a1;
  --muted-foreground: #8c8c8c;
  --input-background: #2e2e2e;
  --input-border: #545454;
  --button-hover: #303030;
  --accent: #fff;
  --accent-foreground: #171717;
  --scrollbar: #525252;
  --tooltip-background: #f5f5f5;
  --tooltip-foreground: #1a1a1a;
  --tooltip-border: #d1d1d1;
  --composer-background: #212121;
  --composer-hover: #ffffff14;
  --composer-ring: #ffffff0f;
  --composer-ring-focus: #ffffff24;
  --message-bubble: #173e76;
  --message-bubble-text: #e8f3fe;
  --code-background: #212121;
  --code-header: #212121;
  --code-border: #343943;
  --code-foreground: #e6edf3;
  --scrollbar-track-bg: transparent;
  --scrollbar-thumb-bg: #ffffff1a;
  --scrollbar-thumb-hover: #fff3;
  --scrollbar-size: 8px;
  --attachment-border: #ffffff1f;
  --attachment-hover: #ffffff14;
  --attachment-remove-background: #fff;
  --attachment-remove-foreground: #171717;
  --attachment-remove-border: #545454;
}

:root[data-accent][data-theme] {
  --accent-foreground: #fff;
}

:root[data-accent="blue"][data-theme] {
  --accent: #3b82f6;
  --accent-color: #3b82f6;
}

:root[data-accent="green"][data-theme] {
  --accent: #16a34a;
  --accent-color: #16a34a;
}

:root[data-accent="purple"][data-theme] {
  --accent: #8b5cf6;
  --accent-color: #8b5cf6;
}

:root[data-accent="orange"][data-theme] {
  --accent: #f97316;
  --accent-color: #f97316;
}

:root[data-accent="gray"][data-theme] {
  --accent: #6b7280;
  --accent-color: #6b7280;
}

:root[data-accent][data-theme="light"] {
  --message-bubble: var(--accent-color);
}

@supports (color: color-mix(in lab, red, red)) {
  :root[data-accent][data-theme="light"] {
    --message-bubble: color-mix(in srgb, var(--accent-color) 18%, #fff);
  }
}

:root[data-accent][data-theme="light"] {
  --message-bubble-text: var(--accent-color);
}

@supports (color: color-mix(in lab, red, red)) {
  :root[data-accent][data-theme="light"] {
    --message-bubble-text: color-mix(in srgb, var(--accent-color) 30%, #0a0a0a);
  }
}

:root[data-accent][data-theme="dark"] {
  --message-bubble: var(--accent-color);
}

@supports (color: color-mix(in lab, red, red)) {
  :root[data-accent][data-theme="dark"] {
    --message-bubble: color-mix(in srgb, var(--accent-color) 42%, #000);
  }
}

:root[data-accent][data-theme="dark"] {
  --message-bubble-text: #f5f5f5;
}

:root[data-accent] {
  accent-color: var(--accent-color);
  caret-color: var(--accent-color);
}

:root[data-accent] ::selection {
  background: var(--accent-color);
}

@supports (color: color-mix(in lab, red, red)) {
  :root[data-accent] ::selection {
    background: color-mix(in srgb, var(--accent-color) 30%, transparent);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}

[dir="rtl"] {
  font-family: Vazirmatn, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
}

body {
  overflow: hidden;
}

.dashboard-body {
  flex-direction: column;
  display: flex;
}

.dashboard-body > .app {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}

body.modal-open .app {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

body.sidebar-drawer-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.app {
  background: var(--background);
  width: 100%;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

.main {
  background: var(--background);
  overscroll-behavior: contain;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden auto;
}

.scroll-area::-webkit-scrollbar {
  width: 5px;
}

.scroll-area::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 999px;
}

.backdrop {
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  -webkit-backdrop-filter: blur();
  backdrop-filter: blur();
  background: #0006;
  transition: opacity .24s, visibility .24s, -webkit-backdrop-filter .24s, backdrop-filter .24s;
  position: fixed;
  inset: 0;
}

.backdrop.open {
  opacity: 1;
  visibility: visible;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb-bg) var(--scrollbar-track-bg);
}

::-webkit-scrollbar {
  height: var(--scrollbar-size);
  background: var(--scrollbar-track-bg);
  width: var(--scrollbar-size) !important;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-bg);
  border-radius: 9999px;
  transition: background-color .2s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-corner {
  background: var(--scrollbar-track-bg);
}

@keyframes tw-shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-rotate-x {
  syntax: "*";
  inherits: false
}

@property --tw-rotate-y {
  syntax: "*";
  inherits: false
}

@property --tw-rotate-z {
  syntax: "*";
  inherits: false
}

@property --tw-skew-x {
  syntax: "*";
  inherits: false
}

@property --tw-skew-y {
  syntax: "*";
  inherits: false
}

@property --tw-space-y-reverse {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-gradient-position {
  syntax: "*";
  inherits: false
}

@property --tw-gradient-from {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}

@property --tw-gradient-via {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}

@property --tw-gradient-to {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}

@property --tw-gradient-stops {
  syntax: "*";
  inherits: false
}

@property --tw-gradient-via-stops {
  syntax: "*";
  inherits: false
}

@property --tw-gradient-from-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0%;
}

@property --tw-gradient-via-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 50%;
}

@property --tw-gradient-to-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-leading {
  syntax: "*";
  inherits: false
}

@property --tw-font-weight {
  syntax: "*";
  inherits: false
}

@property --tw-tracking {
  syntax: "*";
  inherits: false
}

@property --tw-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-inset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-ring-inset {
  syntax: "*";
  inherits: false
}

@property --tw-ring-offset-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0;
}

@property --tw-ring-offset-color {
  syntax: "*";
  inherits: false;
  initial-value: #fff;
}

@property --tw-ring-offset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-outline-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-blur {
  syntax: "*";
  inherits: false
}

@property --tw-brightness {
  syntax: "*";
  inherits: false
}

@property --tw-contrast {
  syntax: "*";
  inherits: false
}

@property --tw-grayscale {
  syntax: "*";
  inherits: false
}

@property --tw-hue-rotate {
  syntax: "*";
  inherits: false
}

@property --tw-invert {
  syntax: "*";
  inherits: false
}

@property --tw-opacity {
  syntax: "*";
  inherits: false
}

@property --tw-saturate {
  syntax: "*";
  inherits: false
}

@property --tw-sepia {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false
}

@property --tw-duration {
  syntax: "*";
  inherits: false
}

@property --tw-content {
  syntax: "*";
  inherits: false;
  initial-value: "";
}

@property --tw-scale-x {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}

@property --tw-scale-y {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}

@property --tw-scale-z {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
/* ===== Shared controls ================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

.btn:hover {
  background: var(--button-hover);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-primary:hover {
  opacity: 0.86;
  background: var(--accent);
}
.btn-outline {
  border-color: var(--input-border);
  background: var(--input-background);
}
.btn-outline:hover {
  border-color: var(--muted);
}
.btn-icon {
  width: 36px;
  padding: 0;
}
.btn-block {
  width: 100%;
}

/* Asset-backed icons inherit currentColor through an SVG mask. */
.icon-asset {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--icon-size, 18px);
  height: var(--icon-size, 18px);
  background-color: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

/* ===== Sidebar ========================================================= */
/* Sidebar side is set by `data-sidebar-side` on `.app`:
   - auto (default): left in LTR, right in RTL, following `dir` on <html>.
   - left / right: pinned to that physical side in every direction.
   Text inside always follows `dir`. */
[dir="rtl"] .app[data-sidebar-side="left"],
[dir="ltr"] .app[data-sidebar-side="right"] {
  flex-direction: row-reverse;
}

:is(.app[data-sidebar-side="left"], [dir="ltr"] .app[data-sidebar-side="auto"]) .sidebar {
  border-right: 1px solid var(--sidebar-border);
}

:is(.app[data-sidebar-side="right"], [dir="rtl"] .app[data-sidebar-side="auto"]) .sidebar {
  border-left: 1px solid var(--sidebar-border);
}

/* The header sidebar icon points at the docked side. */
:is(.app[data-sidebar-side="right"], [dir="rtl"] .app[data-sidebar-side="auto"]) .sidebar-collapse-button .icon-asset,
:is(.app[data-sidebar-side="right"], [dir="rtl"] .app[data-sidebar-side="auto"]) [data-sidebar-expand] .icon-asset {
  transform: scaleX(-1);
}

.sidebar {
  position: relative;
  z-index: 50;
  display: flex;
  flex: 0 0 272px;
  flex-direction: column;
  width: 260px;
  height: 100%;
  overflow: hidden;
  background: var(--sidebar-background);
  color: var(--foreground);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    width 180ms ease,
    flex-basis 180ms ease;

  /* Built-in conversation icon for the collapsed rail. */
  --conversation-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.sidebar-header {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
}
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 650;
  text-align: left;
}
.sidebar-brand:hover {
  background: var(--sidebar-hover);
}
.sidebar-brand > .icon-asset { color: var(--foreground); }
.sidebar-brand-text { overflow: hidden; white-space: nowrap; }
.sidebar-extra-actions { margin-bottom: 12px; }
.sidebar-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 33px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--foreground);
  font-size: 14px;
  text-align: left;
  transition: background 120ms ease;
}
.sidebar-button:hover {
  background: var(--sidebar-hover);
}
.sidebar-button.active {
  background: var(--sidebar-active);
}
.sidebar-icon {
  display: inline-flex;
  color: currentColor;
}
.conversation-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 8px 9px;
  padding-top: 0;
  padding-inline-start: 4px;
}
.conversation-group {
  margin-bottom: 18px;
}
.conversation-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px 7px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.conversation-entry {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: 8px;
}
.conversation-entry:hover,
.conversation-entry:focus-within,
.conversation-entry:has(.conversation.active) {
  background: var(--sidebar-hover);
}
.conversation {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 14px;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    background 120ms ease,
    color 120ms ease;
}
.conversation:hover {
  color: var(--foreground);
}
.conversation.active {
  color: var(--foreground);
}
.conversation-entry:has(.conversation.active) {
  background: var(--sidebar-active);
}
.conversation-more {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-inline-end: 4px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    background 140ms ease,
    color 140ms ease;
}
.conversation-entry:hover .conversation-more,
.conversation-entry:focus-within .conversation-more,
.conversation-entry.menu-open .conversation-more {
  opacity: 1;
  pointer-events: auto;
}
.conversation-more:hover,
.conversation-entry.menu-open .conversation-more {
  background: var(--button-hover);
  color: var(--foreground);
}
.conversation-more:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.conversation-entry.menu-open {
  background: var(--sidebar-hover);
}

/* Inline rename field replaces the row's button while editing. */
.conversation-entry.renaming .conversation,
.conversation-entry.renaming .conversation-more {
  display: none;
}
.conversation-rename {
  flex: 1;
  min-width: 0;
  height: 38px;
  margin: 0 4px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--input-border));
  border-radius: 8px;
  outline: 0;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
}

/* Multi-select mode. */
.conversation-container.is-selecting .conversation-more {
  display: none;
}
.conversation-container {
  --check-accent: var(--accent-color, #2c67c5);
  --check-border: color-mix(in srgb, var(--foreground) 24%, transparent);
}
/* Round selection checkbox: light ring when empty, solid blue with a white tick when chosen. */
.conversation-check {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-inline: 8px 2px;
  border: 1.5px solid var(--check-border);
  border-radius: 50%;
  background: transparent center / 14px no-repeat;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.conversation-check:hover {
  border-color: color-mix(in srgb, var(--foreground) 45%, transparent);
}
.conversation-check:checked {
  border-color: var(--check-accent);
  background-color: var(--check-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.6l2.7 2.7L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 1px 3px color-mix(in srgb, var(--check-accent) 45%, transparent);
}
.conversation-check:focus-visible {
  outline: 2px solid var(--check-accent);
  outline-offset: 2px;
}

/* Toggle beside the group title that turns multi-select on and off. */
.group-action {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-foreground);
  transition: background 120ms ease, color 120ms ease;
}
.group-action:hover {
  background: var(--sidebar-hover);
  color: var(--foreground);
}
.group-action[aria-pressed="true"] {
  background: color-mix(in srgb, var(--check-accent) 14%, transparent);
  color: var(--check-accent);
}
.conversation-entry.selected {
  background: var(--sidebar-active);
}
.selection-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.selection-bar[hidden] {
  display: none;
}
.selection-bar__count {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.selection-bar__button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
}
.selection-bar__button:hover:not(:disabled) {
  background: var(--sidebar-hover);
}
.selection-bar__button--danger {
  border-color: transparent;
  background: #e5322d;
  color: #fff;
}
.selection-bar__button--danger:hover:not(:disabled) {
  background: #cf2a26;
}
.selection-bar__button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Conversation options menu. It lives in <body> (see scripts/sidebar.ts), above the
   sidebar (z-index 50) and backdrop (40) but below modals (120). */
.conversation-menu {
  position: fixed;
  z-index: 90;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--dropdown-background);
  box-shadow: 0 12px 35px hsl(0 0% 0% / 0.14), 0 2px 8px hsl(0 0% 0% / 0.06);
  animation: conversation-menu-in 120ms ease;
}
.conversation-menu[hidden] {
  display: none;
}
.conversation-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 500;
  text-align: start;
  white-space: nowrap;
}
.conversation-menu__item:hover,
.conversation-menu__item:focus-visible {
  outline: 0;
  background: var(--dropdown-hover);
}
.conversation-menu__item--danger {
  color: #e5322d;
}
@keyframes conversation-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.app-download-card {
  position: fixed;
  z-index: 95;
  width: 148px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--dropdown-background);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  animation: conversation-menu-in 120ms ease;
}
.app-download-card[hidden] { display: none; }
.app-download-card__qr {
  display: grid;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
}
.app-download-card__qr img { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.app-download-card__caption {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.sidebar-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 130;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--tooltip-background);
  color: var(--tooltip-foreground);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.sidebar-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.conversation-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-title-writing .conversation-title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(4px);
  animation: conversation-word-in 260ms ease forwards;
}

.conversation-title-word + .conversation-title-word {
  animation-delay: 260ms;
}

@keyframes conversation-word-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .conversation-title-writing .conversation-title-word {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
.sidebar-footer {
  flex: 0 0 auto;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  text-align: left;
  transition: background 120ms ease;
}
.profile:hover {
  background: var(--sidebar-hover);
}
.profile-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
}
.profile-name,
.profile-plan {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-name {
  font-size: 13px;
  font-weight: 600;
}
.profile-plan {
  color: var(--muted-foreground);
  font-size: 11px;
}
.profile-dropdown { width: 100%; }
.profile-trigger { justify-content: flex-start; }
.profile-chevron { display: inline-flex; margin-inline-start: auto; color: var(--muted-foreground); transition: transform 140ms ease; }
.profile-dropdown.open .profile-trigger .profile-chevron { transform: rotate(180deg); }
/* Account row in the menu: chevron points toward the end side (right in LTR, left in RTL). */
.profile-chevron-side .icon-asset { transform: rotate(-90deg); }
[dir="rtl"] .profile-chevron-side .icon-asset { transform: rotate(90deg); }
.profile-dropdown .dropdown-menu { top: auto; bottom: calc(100% + 8px); width: min(260px, calc(100vw - 24px)); }
.account-menu-item { flex-direction: row; align-items: center; gap: 10px; min-height: 36px; padding: 8px 10px; }
.account-menu-item > svg,
.account-menu-item > .icon-asset { flex: 0 0 auto; color: var(--muted); }
.account-menu-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-offer { color: var(--foreground); font-weight: 600; }
.account-menu-offer > svg,
.account-menu-offer > .icon-asset { color: var(--accent); }
.account-menu-danger { color: #c53d3d; }
.account-menu-danger > svg,
.account-menu-danger > .icon-asset { color: currentColor; }
.dropdown-separator { height: 1px; margin: 5px 4px; background: var(--border); }

/* =====================================================================
   Compact desktop rail
   ---------------------------------------------------------------------
   The rail keeps the ChatGPT mark and the remaining header actions as
   icon-only buttons. The search button and the collapse toggle are
   hidden. Conversation items stay visible and become centered glyph
   buttons. The avatar stays in the footer, centered.
   ===================================================================== */
.sidebar.collapsed {
  flex-basis: 56px;
  width: 56px;
}

/* Header row: center its only remaining visible child (the brand). */
.sidebar.collapsed .sidebar-header > div:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-inline: 0;
}

/* Brand: shrink to its icon and center it inside the rail. */
.sidebar.collapsed .sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
  margin-inline: auto;
  gap: 0;
  padding: 7px;
}

/* Force-hide every non-icon child of the brand so only the logo shows. */
.sidebar.collapsed .sidebar-brand > *:not(.icon-asset):not(svg) {
  display: none !important;
}

/* Hide the collapse toggle when collapsed. */
.sidebar.collapsed .sidebar-collapse-button {
  display: none;
}

/* Hide text-only pieces that cannot fit in the rail. */
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .profile-info,
.sidebar.collapsed .profile-chevron,
.sidebar.collapsed .conversation-group-title,
.sidebar.collapsed .conversation-title {
  display: none;
}

/* Hide the search button entirely when collapsed. */
.sidebar.collapsed [data-search-chats] {
  display: none;
}

/* Keep other header buttons visible, but icon-only. */
.sidebar.collapsed .sidebar-button {
  justify-content: center;
  gap: 0;
  padding: 0;
  font-size: 0;
}
.sidebar.collapsed .sidebar-button > svg,
.sidebar.collapsed .sidebar-button > .icon-asset,
.sidebar.collapsed .sidebar-button > .sidebar-icon {
  flex: 0 0 auto;
  font-size: 14px;
  width: 18px;
  height: 18px;
  color: currentColor;
}

/* Extra actions stay visible as icons. */
.sidebar.collapsed .sidebar-extra-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
  align-items: center;
}

/* Conversations are NOT hidden — they become compact glyph buttons. */
.sidebar.collapsed .conversation-container {
  display: block;
  flex: 1;
  min-height: 0;
  padding: 8px 9px;
  padding-top: 0;
  padding-inline: 4px;
}
.sidebar.collapsed .conversation-group {
  margin-bottom: 8px;
}
.sidebar.collapsed .conversation {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  margin: 0 auto 4px;
  padding: 0;
  border-radius: 10px;
  font-size: 0;
  text-align: center;
}
.sidebar.collapsed .conversation-more {
  display: none;
}
.sidebar.collapsed .conversation{
  display: none;
}
.sidebar.collapsed .conversation::before {
  content: '';
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--conversation-icon) center / contain no-repeat;
  mask: var(--conversation-icon) center / contain no-repeat;
  opacity: 0.85;
}

/* Footer: avatar stays in the same bottom position, centered. */
.sidebar.collapsed .sidebar-footer {
  padding-inline: 8px;
}
.sidebar.collapsed .profile {
  justify-content: center;
  padding: 8px 0;
}
.sidebar.collapsed .profile-dropdown .dropdown-menu {
  bottom: 0;
}
:is(.app[data-sidebar-side="left"], [dir="ltr"] .app[data-sidebar-side="auto"]) .sidebar.collapsed .profile-dropdown .dropdown-menu {
  left: calc(100% + 8px);
  right: auto;
}
:is(.app[data-sidebar-side="right"], [dir="rtl"] .app[data-sidebar-side="auto"]) .sidebar.collapsed .profile-dropdown .dropdown-menu {
  right: calc(100% + 8px);
  left: auto;
}

/* ===== Avatar, badges and tooltips ==================================== */
.avatar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #27ae60;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.avatar-md {
  width: 34px;
  height: 34px;
}
.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 17px;
}
.avatar-circle {
  border-radius: 50%;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}
.badge-neutral {
  background: var(--sidebar-hover);
  color: var(--muted);
}
.badge-accent {
  background: var(--accent);
  color: var(--accent-foreground);
}
.badge-outline {
  border: 1px solid var(--input-border);
  color: var(--muted);
}
/* ===== Dropdown ======================================================= */
.dropdown {
  position: relative;
  display: inline-flex;
}
.dropdown-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  inset-inline-start: 0;
  display: flex;
  width: 245px;
  max-width: min(245px, calc(100vw - 24px));
  flex-direction: column;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input-background);
  box-shadow: 0 12px 35px hsl(0 0% 0% / 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    visibility 120ms ease,
    transform 120ms ease;
}
.dropdown-menu[data-placement-y="top"] {
  transform: translateY(4px);
}
.dropdown-menu.end {
  inset-inline-end: 0;
  inset-inline-start: auto;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--foreground);
  font-size: 13px;
  text-align: left;
}
.dropdown-item > span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dropdown-item:hover,
.dropdown-item[aria-selected="true"] {
  background: var(--sidebar-hover);
}
.dropdown-item-desc {
  color: var(--muted-foreground);
  font-size: 11px;
}

.dropdown-item.account-menu-item{
  flex-direction: row;
}

.profile-dropdown .account-menu-item{
  font-weight: 600;
}

.profile-dropdown .account-menu-item svg,
.profile-dropdown .account-menu-item .icon-asset{
  width: 19px;
  height: 19px;
}

.profile-dropdown .account-menu-item > .icon-asset {
  color: var(--foreground);
}

.profile-dropdown .account-menu-offer > .icon-asset {
  color: var(--accent);
}

.profile-dropdown .account-menu-danger > .icon-asset {
  color: currentColor;
}

/* ===== Modal and settings ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: hsl(0 0% 0% / 0.46);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}
.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(1px);
}
.modal-panel {
  width: min(100%, 570px);
  max-height: min(680px, calc(100dvh - 40px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background);
  box-shadow: 0 24px 80px hsl(0 0% 0% / 0.25);
  transform: translateY(8px) scale(0.98);
  transition: transform 160ms ease;
}
.modal.open .modal-panel {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.modal-body {
  padding: 0 20px 20px;
}
.spinner {
  display: inline-block;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.spinner-sm {
  width: 18px;
  height: 18px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(86vw, 300px);
    box-shadow: none;
    visibility: hidden;
    transition:
      transform 280ms cubic-bezier(.22, 1, .36, 1),
      box-shadow 280ms ease,
      visibility 280ms ease;
    will-change: transform;
  }
  /* Collapsing is a desktop rail behavior; keep the mobile drawer readable. */
  .sidebar.collapsed {
    flex-basis: 272px;
    width: min(86vw, 300px);
  }
  .sidebar.collapsed .sidebar-header > div:first-child {
    justify-content: space-between;
    gap: 3px;
    padding-inline: 0;
  }
  .sidebar.collapsed .sidebar-brand {
    justify-content: flex-start;
    width: auto;
    margin-inline: 0;
    gap: 8px;
    padding: 5px 7px;
  }
  .sidebar.collapsed .sidebar-brand > *:not(.icon-asset):not(svg) {
    display: revert !important;
  }
  .sidebar.collapsed .sidebar-brand-text,
  .sidebar.collapsed .profile-info,
  .sidebar.collapsed .profile-chevron,
  .sidebar.collapsed .conversation-group-title,
  .sidebar.collapsed .conversation-title {
    display: revert;
  }
  .sidebar.collapsed .conversation-group-title {
    display: flex;
  }
  /* Restore the search button on mobile. */
  .sidebar.collapsed [data-search-chats] {
    display: revert;
  }
  /* Restore the collapse toggle on mobile. */
  .sidebar.collapsed .sidebar-collapse-button {
    display: revert;
  }
  .sidebar.collapsed .sidebar-button {
    justify-content: flex-start;
    gap: 11px;
    padding: 0 11px;
    font-size: 14px;
  }
  .sidebar.collapsed .sidebar-extra-actions {
    display: revert;
    margin-bottom: 12px;
  }
  .sidebar.collapsed .conversation-container {
    padding: 8px 9px;
    padding-top: 0;
    padding-inline: 9px;
  }
  .sidebar.collapsed .conversation-group {
    margin-bottom: 18px;
  }
  .sidebar.collapsed .conversation {
    display: block;
    width: 100%;
    height: auto;
    min-height: 38px;
    margin: 0;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
  }
  .sidebar.collapsed .conversation-more {
    display: grid;
  }
  .conversation-more {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar.collapsed .conversation::before {
    display: none;
  }
  .sidebar.collapsed .sidebar-footer {
    padding-inline: 12px;
  }
  .sidebar.collapsed .profile {
    justify-content: flex-start;
    padding: 8px;
  }
  /* The drawer slides in from whichever side the sidebar is docked to. */
  :is(.app[data-sidebar-side="left"], [dir="ltr"] .app[data-sidebar-side="auto"]) .sidebar {
    right: auto;
    left: 0;
    transform: translate3d(-105%, 0, 0);
  }
  :is(.app[data-sidebar-side="right"], [dir="rtl"] .app[data-sidebar-side="auto"]) .sidebar {
    right: 0;
    left: auto;
    transform: translate3d(105%, 0, 0);
  }
  .app[data-sidebar-side] .sidebar.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }
  :is(.app[data-sidebar-side="left"], [dir="ltr"] .app[data-sidebar-side="auto"]) .sidebar.open {
    box-shadow: 10px 0 35px hsl(0 0% 0% / 0.18);
  }
  :is(.app[data-sidebar-side="right"], [dir="rtl"] .app[data-sidebar-side="auto"]) .sidebar.open {
    box-shadow: -10px 0 35px hsl(0 0% 0% / 0.18);
  }
  .modal {
    padding: 10px;
    align-items: flex-end;
  }
  .modal-panel {
    max-height: calc(100dvh - 20px);
    border-radius: 16px 16px 10px 10px;
  }
}

/* ===== Help flyout in the account menu ================================ */
.account-help { display: block; }
.account-help-trigger { width: 100%; }
.account-help-chevron { margin-inline-start: auto; color: var(--muted); }
[dir="rtl"] .account-help-chevron { transform: scaleX(-1); }
.dropdown-item.account-menu-item { text-decoration: none; }
.help-submenu {
  /* Fixed so the sidebar's overflow:hidden cannot clip it; script sets the coordinates. */
  position: fixed;
  z-index: 200;
  display: none;
  flex-direction: column;
  width: 245px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--dropdown-background);
  box-shadow: 0 12px 35px hsl(0 0% 0% / 0.14);
}
/* Keeps the flyout open while the pointer crosses the gap. */
.help-submenu::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-end: 100%;
  width: 10px;
}
.account-help:hover .help-submenu,
.account-help:focus-within .help-submenu,
.account-help.open .help-submenu { display: flex; }
.dropdown:not(.open) .help-submenu { display: none; }
.help-submenu .dropdown-item { flex-direction: row; }
/* A transform would make the open menu the containing block of the fixed flyout. */
.profile-dropdown.open .dropdown-menu { transform: none; }
@media (max-width: 768px) {
  .help-submenu {
    position: static;
    width: 100%;
    margin-top: 2px;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 10px;
  }
  .help-submenu::before { display: none; }
  .account-help:hover .help-submenu,
  .account-help:focus-within .help-submenu { display: none; }
  .account-help.open .help-submenu { display: flex; }
}

/* ===== Settings dialog (two-column) =================================== */
.settings-modal {
  --sm-bg: #ffffff;
  --sm-nav-hover: hsl(0 0% 94%);
  --sm-nav-active: hsl(0 0% 92%);
  --sm-line: hsl(0 0% 91%);
  --sm-card: hsl(0 0% 96%);
  --sm-pill: hsl(0 0% 93%);
  --sm-switch-off: hsl(0 0% 80%);
  --sm-blue: var(--accent-color, #3b82f6);
}
:root[data-theme="dark"] .settings-modal {
  --sm-bg: #212121;
  --sm-nav-hover: #ffffff14;
  --sm-nav-active: #ffffff1f;
  --sm-line: #ffffff1a;
  --sm-card: #000000;
  --sm-pill: #ffffff1a;
  --sm-switch-off: #4a4a4a;
}
.settings-modal .modal-panel.sm-panel-shell {
  display: flex;
  width: min(100%, 850px);
  height: min(700px, calc(100dvh - 40px));
  max-height: none;
  overflow: hidden;
  border: 1px solid var(--sm-line);
  border-radius: 24px;
  background: var(--sm-bg);
  color: var(--foreground);
}
.sm-nav {
  display: flex;
  flex: 0 0 250px;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border-inline-end: 1px solid var(--sm-line);
  overflow-y: auto;
}
.sm-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
}
.sm-nav__close:hover { background: var(--sm-nav-hover); color: var(--foreground); }
.sm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--sm-card);
  color: var(--muted);
}
:root:not([data-theme="dark"]) .sm-search { background: var(--sm-pill); }
.sm-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 14px;
}
.sm-tablist { display: flex; flex-direction: column; gap: 2px; }
.sm-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--foreground);
  font-size: 14px;
  text-align: start;
}
.sm-tab[hidden] { display: none; }
.sm-tab:hover { background: var(--sm-nav-hover); }
.sm-tab[aria-selected="true"] { background: var(--sm-nav-active); }
.sm-tab svg { flex: none; }
.sm-empty { margin: 8px 12px; color: var(--muted); font-size: 13px; }
.sm-content { flex: 1; min-width: 0; padding: 22px 32px 32px; overflow-y: auto; }
.sm-panel[hidden] { display: none; }
.sm-panel__title { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--sm-line); font-size: 18px; font-weight: 600; }
.sm-panel__subtitle, .sm-muted { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.sm-link { color: var(--sm-blue); text-decoration: underline; }
.sm-section-title { margin: 20px 0 8px; font-size: 15px; font-weight: 600; }
.sm-value { color: var(--muted); font-size: 14px; }

.sm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sm-line);
}
.sm-row:last-child { border-bottom: 0; }
.sm-row--stacked { flex-direction: column; align-items: stretch; gap: 10px; }
.sm-row--stacked .sm-row__control { width: 100%; }
.sm-row--heading { border-bottom: 0; padding-bottom: 0; }
.sm-row--heading .sm-section-title { margin: 12px 0 0; }
.sm-row__label { font-size: 14.5px; }
.sm-row__desc { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 460px; }
.sm-row__control { flex: none; display: flex; align-items: center; }

.sm-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.sm-select select {
  appearance: none;
  border: 0;
  outline: 0;
  padding: 4px 22px 4px 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-align: end;
}
[dir="rtl"] .sm-select select { padding: 4px 0 4px 22px; }
.sm-select select option { background: var(--sm-bg); color: var(--foreground); }
.sm-select svg { position: absolute; inset-inline-end: 0; pointer-events: none; }
.sm-select:hover select { color: var(--foreground); }
.sm-select__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--foreground); }
.sm-select__dot[data-accent="blue"] { background: #3b82f6; }
.sm-select__dot[data-accent="green"] { background: #22c55e; }
.sm-select__dot[data-accent="purple"] { background: #a855f7; }
.sm-select__dot[data-accent="orange"] { background: #f97316; }
.sm-select__dot[data-accent="gray"] { background: #9ca3af; }

.sm-switch { position: relative; display: inline-block; width: 40px; height: 24px; cursor: pointer; }
.sm-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sm-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--sm-switch-off);
  transition: background 150ms ease;
  pointer-events: none;
}
.sm-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms ease;
}
.sm-switch input:checked + span { background: var(--sm-blue); }
.sm-switch input:checked + span::after { transform: translateX(16px); }
[dir="rtl"] .sm-switch input:checked + span::after { transform: translateX(-16px); }
.sm-switch input:focus-visible + span { outline: 2px solid var(--sm-blue); outline-offset: 2px; }

.sm-pill {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--sm-pill);
  color: var(--foreground);
  font-size: 14px;
  white-space: nowrap;
}
.sm-pill:hover { filter: brightness(0.96); }
.sm-pill--primary { background: var(--foreground); color: var(--background); }
.sm-pill--danger { background: #dc2626; color: #fff; }

.sm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--sm-card);
}
:root:not([data-theme="dark"]) .sm-card { background: var(--sm-card); }
.sm-card[hidden] { display: none; }
.sm-card__body { flex: 1; min-width: 0; }
.sm-card__title { font-size: 15px; font-weight: 600; }
.sm-card__text { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.sm-card__icon { flex: none; color: var(--muted); }
.sm-card__dismiss { flex: none; align-self: flex-start; color: var(--muted); border-radius: 50%; padding: 2px; }
.sm-card__dismiss:hover { color: var(--foreground); }
.sm-card--mfa .sm-pill { background: var(--foreground); color: var(--background); }

.sm-textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--sm-line);
  border-radius: 12px;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.sm-textarea:focus { outline: 2px solid color-mix(in srgb, var(--sm-blue) 50%, transparent); }

.sm-link-value { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
[dir="rtl"] .sm-link-value svg, [dir="rtl"] .sm-list__item > svg:last-child { transform: scaleX(-1); }
.sm-list { margin-top: 6px; }
.sm-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 4px;
  border-bottom: 1px solid var(--sm-line);
  font-size: 14.5px;
  text-align: start;
}
.sm-list__item:last-child { border-bottom: 0; }
.sm-list__item > span:not(.sm-list__glyph) { flex: 1; }
.sm-list__item img { border-radius: 7px; }
.sm-list__glyph { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; color: var(--muted); }
.sm-list__item > svg:last-child { color: var(--muted); }
.sm-list__item:hover { background: var(--sm-nav-hover); border-radius: 10px; }

.sm-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 8px 0; }
.sm-spinner { width: 16px; height: 16px; border: 2px solid var(--sm-line); border-top-color: var(--foreground); border-radius: 50%; animation: spin 700ms linear infinite; }

.sm-meter { margin: 8px 0 18px; }
.sm-meter__head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.sm-meter__bar { height: 8px; border-radius: 999px; background: var(--sm-pill); overflow: hidden; margin-bottom: 8px; }
.sm-meter__bar span { display: block; height: 100%; background: var(--sm-blue); }
.sm-tabs { display: inline-flex; gap: 4px; padding: 3px; margin: 8px 0 12px; border-radius: 999px; background: var(--sm-pill); }
.sm-tabs__tab { min-height: 30px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 13.5px; }
.sm-tabs__tab[aria-selected="true"] { background: var(--sm-bg); color: var(--foreground); }
[hidden].sm-muted { display: none; }

@media (max-width: 768px) {
  .settings-modal { padding: 0; align-items: stretch; }
  .settings-modal .modal-panel.sm-panel-shell {
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .sm-nav { flex: none; flex-direction: row; align-items: center; gap: 8px; padding: 10px; border-inline-end: 0; border-bottom: 1px solid var(--sm-line); overflow-x: auto; overflow-y: hidden; }
  .sm-search { display: none; }
  .sm-tablist { flex-direction: row; gap: 4px; }
  .sm-tab { white-space: nowrap; padding: 0 12px; }
  .sm-tab svg { display: none; }
  .sm-content { padding: 16px; }
  .sm-row { align-items: flex-start; }
}

/* Shared page container: every app-shell page (Plugins, Projects, Library,
   Scheduled, Images) uses the same width and padding. */
.page-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding: 28px clamp(14px, 4vw, 32px) 56px;
}

/* "More" dropdown in the sidebar: trigger looks like the other rows, menu opens above/below as space allows. */
.sidebar-more { display: flex; width: 100%; }
.sidebar-more > .sidebar-button { width: 100%; }
.sidebar-more .dropdown-menu { width: min(220px, calc(100vw - 24px)); }

/* ── Chat search dialog ─────────────────────────────────────────── */
.search-modal { align-items: flex-start; padding-top: min(14vh, 120px); }
.search-panel {
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  max-height: min(70dvh, 520px);
  overflow: hidden;
  border-radius: 20px;
  background: #212121;
}
.search-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 16px; }
[dir='rtl'] .search-head { padding: 6px 16px 6px 10px; }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 16px;
  outline: none;
}
.search-input::placeholder { color: var(--muted-foreground); }
.search-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}
.search-close:hover { background: var(--button-hover); color: var(--foreground); }
.search-results { flex: 1 1 auto; overflow-y: auto; padding: 0 8px 8px; }
.search-group { margin-bottom: 6px; }
.search-group[hidden], .search-row[hidden], .search-empty[hidden] { display: none; }
.search-group-title {
  margin: 0;
  padding: 8px 10px 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--foreground);
  font-size: 14.5px;
  text-align: start;
  transition: background 100ms ease;
}
.search-row:hover, .search-row.is-active { background: var(--sidebar-hover); }
.search-row-icon { display: inline-flex; flex: 0 0 auto; color: var(--muted); }
.search-row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { margin: 0; padding: 18px 10px; color: var(--muted-foreground); font-size: 14px; text-align: center; }

/* Collapsed rail: hovering the logo swaps it for the "open sidebar" icon. */
.sidebar-brand-expand { display: none; }
@media (min-width: 769px) {
  .sidebar.collapsed .sidebar-brand:is(:hover, :focus-visible) .sidebar-brand-logo { display: none; }
  .sidebar.collapsed .sidebar-brand:is(:hover, :focus-visible) .sidebar-brand-expand { display: inline-block; }
}

/* Collapsed rail: tooltip bubble, icon-only buy button. */
.rail-tooltip {
  position: fixed;
  z-index: 300;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--foreground);
  color: var(--background);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 20px hsl(0 0% 0% / 0.25);
}
.rail-tooltip[hidden] { display: none; }
.sidebar-buy { gap: 8px; }
@media (min-width: 769px) {
  .sidebar.collapsed .sidebar-footer { align-items: center; }
  .sidebar.collapsed .sidebar-buy {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .sidebar.collapsed .sidebar-buy-label { display: none; }
}
/* ===== Header ========================================================= */
.header {
  /* Sticks to the top of the scrolling main column. */
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 60px;
  padding: 0 18px;
  background: var(--background);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-model-selector { display: block; }

.mobile-chat-brand,
.mobile-header-actions { display: none; }

.header-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: background 120ms ease;
}

.header-button:hover {
  background: var(--button-hover);
}

.offer-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--accent-color, #63A8F8);
  font-size: 12px;
  font-weight: 700;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.offer-button:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--background));
}

.offer-button:active { transform: scale(.98); }

[data-temporary-chat][aria-pressed='true'] {
  background: var(--sidebar-active);
  color: var(--foreground);
}

.model-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  transition: background 120ms ease;
}

.model-button:hover {
  background: var(--button-hover);
}

.model-chevron {
  display: flex;
  color: var(--muted);
}

.theme-trigger {
  width: auto;
  gap: 3px;
  padding: 0 8px;
}

.theme-mode-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  box-shadow: inset -5px -3px 0 0 var(--background);
  transform: rotate(-20deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.theme-mode-icon[data-active-theme='light'] {
  border-width: 2px;
  box-shadow: inset 0 0 0 4px var(--background);
  transform: rotate(0);
}

.theme-chevron {
  display: inline-flex;
  color: var(--muted-foreground);
  transition: transform 140ms ease;
}

.theme-dropdown.open .theme-chevron { transform: rotate(180deg); }
.theme-dropdown .dropdown-menu { width: 150px; }

.theme-option {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.theme-option > span:first-child { justify-content: flex-start; }
.theme-check { color: var(--foreground); opacity: 0; }
.theme-option[aria-selected='true'] .theme-check { opacity: 1; }

/* ===== Chat area ====================================================== */
/* `.main` owns the scrolling; this column just grows with its content. */
.chat {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 0;
}

.messages {
  flex: 1 0 auto;
}

.messages-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  /* Extra room at the bottom so the last message clears the sticky composer. */
  padding: 40px 24px 150px;
}

/* ===== Welcome ======================================================== */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 23vh;
  text-align: center;
}

.welcome[hidden] {
  display: none;
}

.welcome-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--input-background);
}

.welcome-logo .icon-asset {
  width: 22px;
  height: 22px;
}

.welcome-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.welcome-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ===== Messages ======================================================= */
.message {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.message-user .message-attachment-list {
  width: max-content;
  max-width: 78%;
}

.message-user .message-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 18px;
  background: var(--message-bubble);
  color: var(--message-bubble-text);
  font-weight: 400;
}

.message-row {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: start;
}

.message-assistant .message-row {
  justify-content: flex-start;
}

.message-bubble {
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.message-assistant .message-bubble {
  width: min(100%, 760px);
}

.message-bubble p {
  margin: 0;
}

.message-bubble code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--sidebar-hover);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ===== Code blocks ==================================================== */
.code-block {
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--code-background);
  color: var(--code-foreground);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  direction: ltr;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px 0 16px;
  background: var(--code-header);
}

.code-language {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}

.code-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}

.code-action:hover:not(:disabled) {
  background: color-mix(in srgb, var(--foreground) 9%, transparent);
  color: var(--foreground);
}

.code-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.code-actions__divider {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--code-border);
}

.code-copy {
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: background 120ms ease, color 120ms ease;
}

.code-copy:hover {
  background: var(--button-hover);
  color: var(--foreground);
}

.code-copy:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.code-scroll {
  max-height: 320px;
  overflow: auto;
}

.code-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-scroll pre {
  min-width: max-content;
  margin: 0;
  padding: 16px 18px;
}

.code-scroll code,
.message-bubble .code-scroll code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--code-foreground);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}

[data-theme='light'] .hljs-keyword,
[data-theme='light'] .hljs-selector-tag,
[data-theme='light'] .hljs-literal { color: #cf222e; }
[data-theme='light'] .hljs-title.function_,
[data-theme='light'] .hljs-title,
[data-theme='light'] .hljs-type,
[data-theme='light'] .hljs-built_in { color: #8250df; }
[data-theme='light'] .hljs-string,
[data-theme='light'] .hljs-attr { color: #0a3069; }
[data-theme='light'] .hljs-number,
[data-theme='light'] .hljs-symbol { color: #0550ae; }
[data-theme='light'] .hljs-comment { color: #6e7781; font-style: italic; }
[data-theme='light'] .hljs-variable,
[data-theme='light'] .hljs-params { color: #953800; }
[data-theme='light'] .hljs-property,
[data-theme='light'] .hljs-selector-class { color: #116329; }

[data-theme='dark'] .hljs-keyword,
[data-theme='dark'] .hljs-selector-tag,
[data-theme='dark'] .hljs-literal,
[data-theme='dark'] .hljs-title.function_ { color: #c792ea; }
[data-theme='dark'] .hljs-string,
[data-theme='dark'] .hljs-attr { color: #c3e88d; }
[data-theme='dark'] .hljs-number,
[data-theme='dark'] .hljs-symbol { color: #f78c6c; }
[data-theme='dark'] .hljs-comment { color: #697098; font-style: italic; }
[data-theme='dark'] .hljs-title,
[data-theme='dark'] .hljs-type,
[data-theme='dark'] .hljs-built_in { color: #82aaff; }
[data-theme='dark'] .hljs-variable,
[data-theme='dark'] .hljs-params { color: #f07178; }
[data-theme='dark'] .hljs-property,
[data-theme='dark'] .hljs-selector-class { color: #ffcb6b; }

/* ===== Message actions ================================================ */
.message-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 1;
  transition: opacity 120ms ease;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
}

.message-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}

.message-action:hover {
  background: var(--button-hover);
  color: var(--foreground);
}

.message-action[aria-pressed="true"] {
  color: var(--accent);
}

.message-action:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.version-pager {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.version-pager[hidden] {
  display: none;
}

.version-pager .message-action {
  width: 24px;
}

.version-pager__count {
  min-width: 28px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  user-select: none;
}

/* Chevrons point in the reading direction. */
.version-pager__button svg {
  display: block;
}

.version-pager:dir(rtl) .version-pager__button svg {
  transform: scaleX(-1);
}

/* ===== Inline message editor ========================================== */
.message-editing > .message-row,
.message-editing > .message-actions,
.message-editing > .message-attachment-list {
  display: none;
}

.message-editor {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--input-border);
  border-radius: 20px;
  background: var(--composer-background);
  transition: border-color 120ms ease;
}

.message-editor:focus-within {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--input-border));
}

.message-editor__input {
  display: block;
  width: 100%;
  min-height: 44px;
  max-height: 200px;
  padding: 8px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.6;
  resize: none;
}

.message-editor__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 4px 8px;
}

.message-editor__attachments[hidden] {
  display: none;
}

.edit-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--attachment-border);
  border-radius: 999px;
  color: var(--foreground);
  font-size: 13px;
}

.edit-attachment__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-attachment__remove {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.edit-attachment__remove:hover {
  background: var(--button-hover);
  color: var(--foreground);
}

.message-editor__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.message-editor__attach {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.message-editor__attach:hover {
  background: var(--composer-hover);
  color: var(--foreground);
}

.message-editor__attach:has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.message-editor__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-editor__button {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background 120ms ease, opacity 120ms ease;
}

.message-editor__button--cancel {
  border: 1px solid var(--input-border);
  background: transparent;
  color: var(--foreground);
}

.message-editor__button--cancel:hover {
  background: var(--button-hover);
}

.message-editor__button--send {
  background: var(--accent);
  color: var(--accent-foreground);
}

.message-editor__button--send:hover:not(:disabled) {
  opacity: 0.85;
}

.message-editor__button--send:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* ===== Composer ======================================================= */
.chat-composer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex-shrink: 0;
  width: 100%;
  padding: 16px 0 10px;
  padding-top: 0;
  background: var(--background);
}

.chat-empty .messages-inner {
  padding-bottom: 250px;
}

.chat-empty .chat-composer {
  position: absolute;
  right: 0;
  bottom: 47vh;
  left: 0;
  background: transparent;
}

.chat-composer > section {
  gap: 0;
}

.chat-composer #chat-form {
  max-width: 820px;
}

.chat-hint {
  margin: 8px 16px 0;
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: center;
}

#chat-form [data-role='primary']:disabled {
  cursor: default;
  opacity: .45;
}

.chat-input-shell {
  position: relative;
  background: var(--composer-background);
  color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--composer-ring), 0 8px 30px hsl(0 0% 0% / .08);
}

.chat-input-shell:focus-within {
  box-shadow: inset 0 0 0 1px var(--composer-ring-focus), 0 8px 32px hsl(0 0% 0% / .1);
}

.chat-textarea { color: var(--foreground); }
.chat-textarea::placeholder { color: var(--muted-foreground); }
.chat-input-action { color: var(--muted); }

.chat-input-action:hover {
  background: var(--composer-hover);
  color: var(--foreground);
}

.chat-input-action.is-open {
  background: var(--composer-hover);
  color: var(--foreground);
}

.chat-input-action.is-open .icon-asset {
  transform: rotate(45deg);
}

.chat-input-action .icon-asset {
  transition: transform 140ms ease;
}

.attachment-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 30;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--input-background);
  box-shadow: 0 18px 55px hsl(0 0% 0% / .18);
}

.attachment-menu[hidden] {
  display: none;
}

.attachment-menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 66px;
  padding: 10px 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--foreground);
  text-align: left;
  transition: background 120ms ease;
}

button.attachment-menu-item:hover {
  background: var(--button-hover);
}

.attachment-menu-item-static {
  cursor: default;
}

.attachment-menu-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--composer-background);
  color: var(--foreground);
}

.attachment-menu-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: start;
  gap: 3px;
}

.attachment-menu-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.attachment-menu-copy > span {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.35;
}

.attachment-preview-list {
  display: flex;
  gap: 8px;
  padding: 8px 4px 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.attachment-preview-list[hidden] {
  display: none;
}

.attachment-preview-card {
  position: relative;
  display: flex;
  flex: 0 0 218px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 34px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--input-background);
}

.attachment-preview-visual {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background: var(--composer-background);
}

.attachment-preview-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-file-extension {
  max-width: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-overflow: ellipsis;
}

.attachment-preview-details {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.attachment-preview-details strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-details > span {
  color: var(--muted-foreground);
  font-size: 10px;
}

.attachment-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: var(--composer-background);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: background 120ms ease, color 120ms ease;
}

.attachment-remove:hover {
  background: var(--button-hover);
  color: var(--foreground);
}

.think-action[aria-pressed='true'] {
  background: color-mix(in srgb, var(--accent-color, #2c67c5) 16%, transparent);
  color: color-mix(in srgb, var(--accent-color, #2c67c5) 76%, var(--foreground));
}

.chat-send-button { background: var(--accent-color, #2c67c5); color: var(--accent-foreground, #fff); }

.composer-wrapper {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  padding: 20px 24px 24px;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--background) 85%, transparent) 20%,
    var(--background) 55%
  );
}

.composer-shell {
  width: 100%;
  max-width: 820px;
}

.composer {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--input-border);
  border-radius: 16px;
  background: var(--input-background);
  box-shadow: 0 2px 8px hsl(0 0% 0% / 0.04), 0 8px 30px hsl(0 0% 0% / 0.04);
  transition: border-color 120ms ease;
}

.composer:focus-within {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--input-border));
}

.composer textarea {
  width: 100%;
  min-height: 54px;
  max-height: 180px;
  padding: 8px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
}

.composer textarea::placeholder {
  color: var(--muted-foreground);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.composer-left,
.composer-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.composer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}

.composer-button:hover {
  background: var(--button-hover);
  color: var(--foreground);
}

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-foreground);
  transition: opacity 120ms ease, transform 120ms ease;
}

.send-button:hover {
  opacity: 0.85;
}

.send-button:active {
  transform: scale(0.95);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.disclaimer {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: center;
}

/* ===== Error / 404 ==================================================== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  text-align: center;
}

.error-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ===== Responsive ===================================================== */
@media (max-width: 768px) {
  .header {
    z-index: 20;
    height: 58px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 90%, transparent);
    backdrop-filter: blur(14px);
  }

  .desktop-model-selector { display: none; }

  .mobile-chat-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .header-right { gap: 2px; }
  .theme-trigger { padding: 0 6px; }

  .header-right > .tooltip:has(.offer-button),
  .header-right > .tooltip:has([data-temporary-chat]) { display: none; }

  .offer-button span { display: none; }

  .messages-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .chat-composer {
    padding-top: 10px;
  }

  .chat-empty .chat-composer {
    bottom: 20vh;
  }

  .chat-composer > section {
    padding-right: 10px;
    padding-left: 10px;
  }

  .attachment-menu {
    border-radius: 18px;
  }

  .attachment-preview-card {
    flex-basis: 190px;
  }

  .welcome {
    padding-top: 14vh;
  }

  .welcome-title {
    font-size: 24px;
  }

  .composer-wrapper {
    padding: 16px 10px 10px;
  }

  .composer {
    border-radius: 14px;
  }
}

/* ===== Sent-message attachment cards ================================== */
.message-attachment-list {
  display: flex;
  gap: 8px;
  padding: 4px 2px 10px;
  overflow-x: auto;
}

/* ── Card — base (shared) ────────────────────────────────── */
.attachment-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 64px;
  padding: 9px 10px;
  border-radius: 16px;
  border: 1px solid var(--attachment-border);
  background: var(--input-background);
  transition:
    border-color 120ms ease,
    background 120ms ease;
  overflow: hidden;
}

.attachment-card:hover {
  background: var(--attachment-hover);
}

/* ── File variant (default) — 240px wide, icon + meta ─────── */
.attachment-card--file {
  width: 240px;
}

/* ── Image variant — square thumb only, no meta ───────────── */
.attachment-card--image {
  width: 64px;
  height: 64px;
  padding: 0;
  gap: 0;
  border-radius: 14px;
}

/* ── Icon shell (file variant) ───────────────────────────── */
.attachment-card__visual {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

/* ── Image variant visual — fills the whole square card ──── */
.attachment-card__visual--image {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.attachment-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── File icon ───────────────────────────────────────────── */

/* ── Text meta (file variant only) ───────────────────────── */
.attachment-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.attachment-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-card__size {
  font-size: 11px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

/* ── Close button — appears on hover ─────────────────────── */
.attachment-card__remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--attachment-remove-border);
  background: var(--attachment-remove-background);
  color: var(--attachment-remove-foreground);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    color 120ms ease;
  z-index: 2;
}

.attachment-card__remove svg {
  width: 10px;
  height: 10px;
  display: block;
}

/* Show on card hover / focus */
.attachment-card:hover .attachment-card__remove,
.attachment-card:focus-within .attachment-card__remove {
  opacity: 1;
  transform: scale(1);
}

.attachment-card__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Empty state: welcome title + composer centred as one group ====== */
.chat.chat-empty {
  justify-content: center;
  /* Nudge the group slightly above true centre. */
  margin-top: -72px;
}
.chat.chat-empty .messages {
  flex: 0 0 auto;
}
.chat.chat-empty .messages-inner {
  padding: 0 24px;
}
.chat.chat-empty .welcome {
  padding-top: 0;
  margin-bottom: 28px;
}
.chat.chat-empty .chat-composer {
  position: static;
  background: transparent;
  padding-top: 0;
}
@media (max-width: 768px) {
  .chat.chat-empty {
    margin-top: -48px;
  }
  .chat.chat-empty .messages-inner {
    padding: 0 16px;
  }
}

/* ── Attachment menu: single-line rows + search field ─────────── */
.attachment-menu { padding: 6px; border-radius: 22px; }
.attachment-menu-list { display: flex; flex-direction: column; max-height: min(60vh, 26rem); overflow-y: auto; }
.attachment-menu-item {
  min-height: 0;
  height: 40px;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
  cursor: pointer;
}
.attachment-menu-item:hover,
.attachment-menu-item.is-active { background: var(--button-hover); }
.attachment-menu-icon {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.attachment-menu-icon img { display: block; width: 22px; height: 22px; object-fit: contain; }
.attachment-menu-icon.tone-sky { color: #38bdf8; }
.attachment-menu-icon.tone-pink { color: #ec4899; }
.attachment-menu-copy {
  flex: 1 1 auto;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}
.attachment-menu-copy strong { flex: 0 0 auto; font-size: 14px; font-weight: 500; }
.attachment-menu-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
.attachment-menu-empty { margin: 0; padding: 14px 12px; color: var(--muted-foreground); font-size: 14px; }
.attachment-menu-search {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 14px;
  outline: none;
}
.attachment-menu-search::placeholder { color: var(--muted-foreground); }
[dir='rtl'] .attachment-menu-item { text-align: right; }
@media (max-width: 640px) {
  .attachment-menu-copy > span { display: none; }
}
.attachment-menu-item[hidden] { display: none; }

/* "@" mention list: same rows as the "+" menu, with a tick on chosen ones. */
.attachment-menu-check {
  display: none;
  flex: 0 0 auto;
  margin-inline-start: auto;
  color: var(--foreground);
}

/* ── Composer editor (contenteditable) ─────────────────────────── */
.chat-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; }
.chat-row > [data-attachment-trigger] { order: 1; }
.chat-editor {
  order: 2;
  flex: 1 1 0;
  min-width: 0;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  outline: none;
  cursor: text;
}
.chat-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted-foreground);
  pointer-events: none;
}
.chat-actions { order: 3; }
/* Long message: the editor takes the whole first row, controls drop underneath. */
.chat-row[data-expanded] > .chat-editor { order: 0; flex: 1 1 100%; padding-inline: 12px; }
.chat-row[data-expanded] > .chat-actions { margin-inline-start: auto; }

/* ── Mention chips ─────────────────────────────────────────────── */
.mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin-inline: 1px;
  padding: 0 9px 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sidebar-hover);
  color: var(--foreground);
  font-size: 0.86em;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.mention-chip:hover { background: var(--button-hover); border-color: var(--muted); }
.mention-chip-icon { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; }
.mention-chip-icon .attachment-menu-icon { width: 16px; height: 16px; }
.mention-chip-icon svg, .mention-chip-icon img { width: 16px; height: 16px; }
.mention-chip-icon .icon-asset { --icon-size: 16px; }
.mention-chip-remove { display: none; place-items: center; width: 16px; height: 16px; color: var(--muted-foreground); }
.mention-chip:hover .mention-chip-icon { display: none; }
.mention-chip:hover .mention-chip-remove { display: inline-grid; }

/* Tick on rows that are already added. */
.attachment-menu-item.is-selected .attachment-menu-check { display: inline-flex; }

/* Chip icons: force every kind (mask icon, inline svg, image) into the 16px slot. */
.mention-chip { flex: 0 0 auto; max-width: 100%; }
.mention-chip-icon, .mention-chip-remove { flex: 0 0 16px; overflow: hidden; }
.mention-chip-icon > *,
.mention-chip-icon .icon-asset {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px;
  max-height: 16px;
}
.mention-chip-icon .icon-asset { --icon-size: 16px !important; }
.mention-chip-icon.tone-sky { color: #38bdf8; }
.mention-chip-icon.tone-pink { color: #ec4899; }
.mention-chip-label { overflow: hidden; text-overflow: ellipsis; }

/* ── Model picker ───────────────────────────────────────────────── */
.model-dropdown .dropdown-menu { width: min(320px, calc(100vw - 24px)); max-width: none; padding: 6px; }
.model-group-label {
  padding: 8px 12px 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}
.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--foreground);
  text-align: start;
  transition: background 120ms ease;
}
.model-option:hover,
.model-option:focus-visible { background: var(--sidebar-hover); outline: none; }
.model-option[aria-selected='true'] { background: var(--sidebar-active); }
.model-option-copy { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 2px; }
.model-option-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.model-option-desc { color: var(--muted-foreground); font-size: 12px; line-height: 1.35; }
.model-option-badge {
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 10.5px;
  font-weight: 500;
}
.model-check { display: none; flex: 0 0 auto; color: var(--foreground); }
.model-option[aria-selected='true'] .model-check { display: inline-flex; }

/* Compact model picker */
.model-dropdown .dropdown-menu { width: min(232px, calc(100vw - 24px)); padding: 4px; border-radius: 14px; }
.model-group-label { padding: 6px 10px 2px; font-size: 11px; }
.model-option { gap: 8px; padding: 6px 10px; border-radius: 9px; }
.model-option-copy { gap: 1px; }
.model-option-name { gap: 6px; font-size: 13px; }
.model-option-desc { font-size: 11px; line-height: 1.3; }
.model-option-badge { padding: 0 6px; font-size: 10px; }
.model-check svg { width: 16px; height: 16px; }
.model-dropdown .dropdown-separator { margin: 3px 4px; }

/* Composer spacing: equal padding all round (concentric with the 28px corners) and centred items. */
.chat-input-shell { padding: 8px; }
.chat-row { align-items: center; gap: 6px; }
.chat-row > [data-attachment-trigger],
.chat-actions { align-self: center; }
.chat-actions { gap: 4px; }
.chat-editor {
  min-height: 40px;
  padding-block: 8px;
  padding-inline: 6px;
  align-self: center;
}
.chat-row[data-expanded] > .chat-editor { padding: 6px 12px 8px; }
.chat-row[data-expanded] { row-gap: 2px; }
