:root {
      --bg: #f7f5f1;
      --surface: #ffffff;
      --surface-soft: #fbfaf8;
      --line: #e9e3dc;
      --line-dark: #d9d0c6;
      --text: #121315;
      --muted: #77736e;
      --muted-2: #a19a92;
      --accent: #b98b67;
      --accent-soft: #f4eee8;
      --accent-2: #ff5a1f;
      --dark: #101012;
      --green: #eef8ef;
      --green-text: #507954;
      --orange: #fff2e8;
      --orange-text: #b56a3b;
      --shadow: 0 18px 50px rgba(35, 28, 22, .055);
      --shadow-soft: 0 10px 30px rgba(35, 28, 22, .04);
      --radius-xl: 26px;
      --radius-lg: 20px;
      --radius-md: 14px;
      --container: 1440px;
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at 12% 0%, rgba(245, 232, 219, .65), transparent 32%),
        radial-gradient(circle at 88% 10%, rgba(255, 238, 226, .5), transparent 28%),
        var(--bg);
      letter-spacing: -.015em;
      font-weight: 400;
    }

    button, input, select { font: inherit; }
    button { cursor: pointer; }

    .page { min-height: 100vh; }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 50;
      height: 66px;
      display: flex;
      align-items: center;
      border-bottom: 1px solid var(--line);
      background: rgba(248, 246, 243, .86);
      backdrop-filter: blur(18px);
    }

    .topbar-inner {
      width: min(var(--container), calc(100% - 64px));
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 28px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: 27px;
      text-decoration: none;
      font-weight: 800;
      letter-spacing: .04em;
    }

    .logo-image {
      width: 132px;
      height: auto;
      display: block;
    }

    .nav {
      display: flex;
      align-items: center;
      gap: 42px;
      font-size: 15px;
      color: #2d2c2a;
      font-weight: 400;
    }

    .nav a {
      color: inherit;
      text-decoration: none;
      opacity: .92;
      transition: opacity .18s ease, color .18s ease;
    }

    .nav a:hover { color: var(--accent); opacity: 1; }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 22px;
    }

    .cart-btn {
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      border: 0;
      background: transparent;
      color: var(--dark);
    }

    .main-cta {
      --magic-bronze: #b28a6a;
      --magic-beige: #c7a17f;
      --magic-coffee: #8f684f;
      --magic-glow: rgba(199, 161, 127, 0.45);
      position: relative;
      isolation: isolate;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      min-width: 182px;
      min-height: 46px;
      border: 1px solid var(--magic-bronze);
      color: white;
      background: linear-gradient(135deg, var(--magic-beige), var(--magic-bronze) 46%, var(--magic-coffee));
      padding: 0 24px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.1;
      text-decoration: none;
      overflow: hidden;
      box-shadow: 0 18px 34px rgba(156, 118, 88, 0.23);
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    }

    .main-cta::before,
    .main-cta::after {
      content: "";
      position: absolute;
      pointer-events: none;
    }

    .main-cta::before {
      inset: -1px;
      z-index: -1;
      border-radius: inherit;
      background: linear-gradient(115deg, var(--magic-coffee), var(--magic-beige), var(--magic-bronze), var(--magic-coffee));
      background-size: 240% 240%;
      opacity: 0;
      box-shadow: 0 18px 38px rgba(143, 104, 79, 0.24), 0 0 0 1px rgba(248, 223, 168, 0.18);
    }

    .main-cta::after {
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.06) 34%, rgba(248, 223, 168, 0.36) 48%, rgba(255, 255, 255, 0.07) 62%, transparent 100%);
      opacity: 0;
      transform: translateX(-110%);
    }

    .main-cta:hover {
      transform: translateY(-1px);
      box-shadow: 0 22px 46px rgba(143, 104, 79, 0.28), 0 0 28px rgba(248, 223, 168, 0.2);
    }

    .main-cta:hover::before {
      opacity: 1;
      animation: magicGradientFlow 5s ease infinite;
    }

    .main-cta:hover::after {
      opacity: 1;
      animation: magicLightPass 2.2s ease infinite;
    }

    .main-cta svg {
      width: 14px;
      height: 14px;
      stroke-width: 2;
    }

    .main-cta__content {
      position: relative;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-width: 0;
    }

    .main-cta__spark {
      color: #f8dfa8;
      font-size: 13px;
      filter: drop-shadow(0 0 8px var(--magic-glow));
      animation: magicSparkBreath 2.4s ease-in-out infinite;
    }

    .main-cta__label {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .main-cta__particles {
      position: absolute;
      inset: -14px 4px;
      z-index: 1;
      overflow: hidden;
      border-radius: inherit;
      opacity: 0;
      pointer-events: none;
    }

    .main-cta:hover .main-cta__particles { opacity: 1; }

    .main-cta__particles span {
      position: absolute;
      width: 3px;
      height: 3px;
      border-radius: 999px;
      background: #f8dfa8;
      box-shadow: 0 0 12px rgba(248, 223, 168, 0.76);
      animation: magicParticleFloat 2.8s ease-in-out infinite;
    }

    .main-cta__particles span:nth-child(1) { left: 8%; top: 62%; animation-delay: 0s; }
    .main-cta__particles span:nth-child(2) { left: 18%; top: 26%; animation-delay: .5s; }
    .main-cta__particles span:nth-child(3) { left: 32%; top: 72%; animation-delay: 1.15s; }
    .main-cta__particles span:nth-child(4) { left: 48%; top: 18%; animation-delay: .25s; }
    .main-cta__particles span:nth-child(5) { left: 63%; top: 68%; animation-delay: .9s; }
    .main-cta__particles span:nth-child(6) { left: 76%; top: 30%; animation-delay: 1.45s; }
    .main-cta__particles span:nth-child(7) { left: 88%; top: 58%; animation-delay: .7s; }
    .main-cta__particles span:nth-child(8) { left: 56%; top: 82%; animation-delay: 1.8s; }

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

    @keyframes magicLightPass {
      0% { transform: translateX(-110%); }
      48%, 100% { transform: translateX(110%); }
    }

    @keyframes magicSparkBreath {
      0%, 100% { opacity: .72; transform: scale(.92); }
      50% { opacity: 1; transform: scale(1.08); }
    }

    @keyframes magicParticleFloat {
      0%, 100% { opacity: 0; transform: translate3d(0, 8px, 0) scale(.75); }
      22% { opacity: .85; }
      68% { opacity: .5; transform: translate3d(6px, -14px, 0) scale(1); }
    }

    .layout {
      width: min(var(--container), calc(100% - 64px));
      margin: 0 auto;
      padding: 32px 0 54px;
      position: relative;
      display: grid;
      grid-template-columns: 254px minmax(0, 1fr);
      gap: 34px;
      align-items: start;
      overflow-anchor: none;
    }

    .sidebar {
      position: fixed;
      top: 98px;
      left: calc((100vw - min(var(--container), calc(100vw - 64px))) / 2);
      width: 254px;
      height: calc(100vh - 130px);
      min-height: 0;
      max-height: calc(100vh - 130px);
      display: flex;
      flex-direction: column;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.74);
      border-radius: var(--radius-xl);
      padding: 14px;
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(16px);
      overflow: hidden;
      overflow-anchor: none;
    }

    .profile-mini {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 10px 18px;
      min-width: 0;
    }

    .profile-mini-text {
      min-width: 0;
      flex: 1 1 auto;
    }

    .avatar {
      width: 52px;
      height: 52px;
      min-width: 52px;
      flex: 0 0 52px;
      aspect-ratio: 1 / 1;
      border-radius: 50%;
      border: 1px solid var(--line);
      background:
        radial-gradient(circle at 48% 28%, #f7d5bd 0 13%, transparent 14%),
        radial-gradient(circle at 50% 38%, #35281f 0 16%, transparent 17%),
        radial-gradient(circle at 50% 45%, #f4c7aa 0 23%, transparent 24%),
        linear-gradient(145deg, #eee1d6, #faf8f5);
      overflow: hidden;
      position: relative;
    }

    .avatar::before {
      content: "";
      position: absolute;
      left: 15px;
      top: 12px;
      width: 23px;
      height: 18px;
      border-radius: 50% 50% 44% 44%;
      background: #5b463d;
    }

    .avatar::after {
      content: "";
      position: absolute;
      left: 10px;
      bottom: -4px;
      width: 34px;
      height: 22px;
      border-radius: 18px 18px 0 0;
      background: #fff;
    }

    .avatar.has-image {
      background: #f5f1ec;
    }

    .avatar.has-image::before,
    .avatar.has-image::after {
      display: none;
    }

    .avatar img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: inherit;
    }

    .profile-mini b {
      display: block;
      font-size: 14px;
      font-weight: 560;
      letter-spacing: -.01em;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-mini span {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      letter-spacing: 0;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .side-menu {
      display: grid;
      gap: 6px;
      padding-top: 2px;
    }

    .side-link {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 13px;
      border: 0;
      padding: 14px 13px;
      border-radius: 14px;
      color: #4b4946;
      background: transparent;
      font-size: 14px;
      font-weight: 410;
      text-align: left;
      transition: background .18s ease, color .18s ease, transform .18s ease;
    }

    .side-link svg { width: 19px; height: 19px; stroke-width: 1.75; color: #6a625b; }

    .side-link:hover { background: var(--surface-soft); transform: translateX(1px); }

    .side-link.active {
      color: #a2704e;
      background: linear-gradient(90deg, #f5eee7, #fbf8f4);
    }

    .side-link.active svg { color: #a2704e; }

    .sidebar-bottom {
      margin-top: auto;
      display: grid;
      gap: 12px;
    }

    .help-card {
      border: 1px solid transparent;
      border-radius: 16px;
      background: rgba(255,255,255,.78);
      padding: 14px;
    }

    .icon-soft {
      flex: 0 0 auto;
      width: 38px;
      height: 38px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: var(--accent-soft);
      color: #a2704e;
    }

    .help-card small {
      display: block;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
    }

    .help-card b {
      display: block;
      font-size: 14px;
      font-weight: 570;
      margin-top: 2px;
    }

    .outline-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      height: 36px;
      padding: 0 14px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: #fff;
      color: #986b4d;
      font-size: 12px;
      font-weight: 520;
      transition: border .18s ease, background .18s ease, color .18s ease, transform .18s ease;
    }

    .outline-btn:hover {
      border-color: var(--line-dark);
      background: #fbf7f2;
      transform: translateY(-1px);
    }

    .help-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border: 1px solid transparent;
      text-align: left;
      cursor: pointer;
      transition: border .18s ease, background .18s ease, transform .18s ease;
      width: 100%;
    }

    .help-card:hover,
    .help-card:focus-visible {
      border-color: var(--line-dark);
      background: #fff;
      transform: translateY(-1px);
    }

    .content {
      grid-column: 2;
      min-width: 0;
    }

    .hero-row {
      display: flex;
      justify-content: space-between;
      gap: 24px;
      align-items: center;
      margin: 0 0 26px;
    }

    .eyebrow {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
      font-weight: 390;
    }

    h1, h2, h3, p { margin: 0; }

    h1 {
      font-size: clamp(17px, 1.9vw, 27px);
      line-height: 1.07;
      letter-spacing: -.055em;
      font-weight: 520;
      margin-top: 0;
    }

    .content[data-active-tab]:not([data-active-tab="overview"]) .hero-row h1 {
      display: none;
    }

    h2 {
      font-size: 19px;
      line-height: 1.25;
      font-weight: 520;
      letter-spacing: -.035em;
    }

    h3 {
      font-size: 15px;
      line-height: 1.3;
      font-weight: 520;
      letter-spacing: -.025em;
    }

    .hero-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 6px;
    }

    .soft-btn, .dark-btn {
      border-radius: 12px;
      height: 42px;
      padding: 0 16px;
      font-size: 13px;
      font-weight: 520;
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border .18s ease;
    }

    .soft-btn {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.75);
      color: #423f3b;
    }

    .dark-btn {
      border: 1px solid #111;
      background: #111113;
      color: white;
      box-shadow: 0 12px 24px rgba(0,0,0,.10);
    }

    .soft-btn:hover, .dark-btn:hover { transform: translateY(-1px); }
    .soft-btn:hover { background: #fff; border-color: var(--line-dark); }
    .dark-btn:hover { background: #1a1a1d; }

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

    .catalog-create-btn,
    .catalog-url-btn,
    .catalog-upload-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      position: relative;
      line-height: 1;
      white-space: nowrap;
    }

    .catalog-create-btn,
    .catalog-url-btn {
      gap: 8px;
    }

    .catalog-create-btn svg,
    .catalog-url-btn svg {
      width: 16px;
      height: 16px;
    }

    .catalog-upload-btn svg {
      position: absolute;
      left: 16px;
      width: 16px;
      height: 16px;
    }

    .catalog-upload-btn span {
      display: block;
      width: 100%;
      text-align: center;
    }

    .projects-layout {
      display: block;
    }

    .project-history-panel {
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }

    .project-history-list {
      display: grid;
      gap: 12px;
    }

    .project-card {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      overflow: hidden;
      transition: border .18s ease, background .18s ease, box-shadow .18s ease;
    }

    .project-card:hover {
      border-color: var(--line-dark);
      background: #fbfaf8;
    }

    .project-card.open {
      overflow: visible;
      border-color: transparent;
      background: transparent;
      box-shadow: none;
    }

    .project-card-head {
      width: 100%;
      min-height: 58px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto auto auto;
      align-items: center;
      gap: 14px;
      padding: 12px 14px;
      color: var(--text);
      cursor: pointer;
    }

    .project-card.open .project-card-head {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
    }

    .project-card-toggle {
      min-width: 0;
    }

    .project-card-title {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 620;
    }

    .project-status-badge {
      min-width: 0;
      height: auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      border: 0;
      background: transparent;
      font-size: 12px;
      font-weight: 560;
      line-height: 1;
      white-space: nowrap;
    }

    .project-status-badge.is-active {
      color: #ff5a1f;
    }

    .project-status-badge.is-completed {
      color: #0e9ba8;
    }

    .project-status-badge.is-archived {
      color: #a2704e;
    }

    .project-edit-btn,
    .project-delete-btn,
    .project-continue-btn {
      width: 42px;
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: border .18s ease, color .18s ease, background .18s ease;
    }

    .project-edit-btn {
      color: #7b6a5c;
    }

    .project-edit-btn:hover {
      border-color: var(--line-dark);
      background: #fffaf5;
      color: var(--accent);
    }

    .project-delete-btn {
      color: #9f4f4f;
    }

    .project-delete-btn:hover {
      border-color: #d9b7b7;
      background: #fff8f8;
      color: #8f3333;
    }

    .project-continue-btn {
      --magic-bronze: #b28a6a;
      --magic-beige: #c7a17f;
      --magic-coffee: #8f684f;
      border-color: var(--magic-bronze);
      color: #f8dfa8;
      background: linear-gradient(135deg, var(--magic-beige), var(--magic-bronze) 46%, var(--magic-coffee));
      box-shadow: 0 14px 28px rgba(156, 118, 88, .2);
    }

    .project-continue-btn:hover {
      border-color: var(--magic-coffee);
      background: linear-gradient(135deg, #cdaa8b, var(--magic-bronze) 42%, #7f5943);
      color: #fff3ce;
      transform: translateY(-1px);
    }

    .project-continue-btn span {
      font-size: 15px;
      line-height: 1;
      filter: drop-shadow(0 0 8px rgba(248, 223, 168, .45));
    }

    .project-edit-btn svg,
    .project-delete-btn svg {
      width: 17px;
      height: 17px;
    }

    .project-card-details {
      display: grid;
      grid-template-columns: 300px minmax(0, 1fr);
      grid-template-rows: 0fr;
      gap: 20px;
      align-items: start;
      border-top: 0;
      padding: 0 14px;
      background: transparent;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      transform: translateY(-8px);
      transition: grid-template-rows .28s ease, opacity .2s ease, transform .24s ease, padding .24s ease;
    }

    .project-card.open .project-card-details {
      grid-template-rows: 1fr;
      padding: 14px 14px 0;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    .project-card-details > * {
      min-height: 0;
    }

    .project-detail-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0;
      align-self: start;
    }

    .project-detail-field {
      display: flex;
      align-items: center;
      min-width: 0;
      min-height: 39px;
      padding: 0 4px;
      border-bottom: 1px solid #eee8e0;
      background: transparent;
    }

    .project-detail-field:last-child {
      border-bottom: 0;
    }

    .project-detail-field strong {
      overflow-wrap: anywhere;
      color: var(--text);
      font-size: 13px;
      font-weight: 560;
      line-height: 1.35;
    }

    .project-detail-field.is-empty strong {
      color: var(--muted);
      font-weight: 430;
    }

    .project-edit-form {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0;
      align-self: start;
    }

    .project-edit-form label {
      display: block;
    }

    .project-edit-form input,
    .project-edit-form select {
      width: 100%;
      min-height: 39px;
      border: 0;
      border-bottom: 1px solid #eee8e0;
      border-radius: 0;
      background: transparent;
      color: var(--text);
      padding: 0 4px;
      font: inherit;
      font-size: 13px;
      font-weight: 560;
      outline: none;
    }

    .project-edit-form input:focus,
    .project-edit-form select:focus {
      border-color: var(--line-dark);
      box-shadow: none;
    }

    .project-edit-actions {
      grid-column: 1 / -1;
      display: flex;
      justify-content: flex-start;
      gap: 10px;
      padding-top: 10px;
    }

    .project-generations {
      display: grid;
      gap: 9px;
      min-width: 0;
      align-self: start;
    }

    .project-generations-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(136px, 160px));
      gap: 12px;
      justify-content: start;
    }

    .project-generation-thumb {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
    }

    .project-generation-thumb img {
      width: 100%;
      aspect-ratio: 4 / 3;
      display: block;
      object-fit: cover;
      background: var(--surface-soft);
    }

    .project-generation-thumb .thumb {
      height: auto;
      aspect-ratio: 4 / 3;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }

    .project-generation-thumb .thumb img {
      height: 100%;
      aspect-ratio: auto;
    }

    .project-generation-thumb:hover .thumb-actions,
    .project-generation-thumb:focus-within .thumb-actions {
      opacity: 1;
      transform: translateY(0);
    }

    .mobile-tabs {
      display: none;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 4px;
      margin: 0 0 20px;
    }

    .mobile-tabs .side-link {
      width: auto;
      flex: 0 0 auto;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.75);
      padding: 10px 13px;
    }

    .dashboard-section { display: none; animation: fadeUp .28s ease both; }
    .dashboard-section.active { display: block; }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .card {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.78);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-soft);
    }

    .stat-card {
      position: relative;
      min-height: 190px;
      padding: 22px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: transform .18s ease, box-shadow .18s ease, border .18s ease;
    }

    .stat-card:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow);
      border-color: var(--line-dark);
    }

    .stat-top {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      align-items: center;
      margin-bottom: 0;
    }

    .stat-card .icon-soft {
      width: 32px;
      height: 32px;
      border-radius: 11px;
      order: 2;
    }

    .stat-card .icon-soft svg {
      width: 16px;
      height: 16px;
    }

    .stat-label {
      font-size: 14px;
      line-height: 1.3;
      color: #4f4a45;
      font-weight: 560;
    }

    .stat-value {
      display: flex;
      align-items: baseline;
      gap: 10px;
      min-height: 34px;
      margin-top: 28px;
      font-size: 27px;
      line-height: .95;
      font-weight: 620;
      letter-spacing: -.06em;
    }

    .stat-unit {
      font-size: 14px;
      letter-spacing: -.015em;
      font-weight: 450;
      color: #625c55;
    }

    .stat-subvalue {
      margin-top: 42px;
      color: #7a746e;
      font-size: 13px;
      line-height: 1.25;
      font-weight: 430;
    }

    .stat-link {
      margin-top: 39px;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      color: #986b4d;
      font-size: 13px;
      font-weight: 650;
      text-decoration: none;
      border: 0;
      background: transparent;
      padding: 0;
      align-self: flex-start;
    }

    .stat-link.boxed {
      width: 100%;
      height: 40px;
      margin-top: 39px;
      justify-content: space-between;
      border: 1px solid #eadfd6;
      border-radius: 9px;
      padding: 0 16px;
      background: #fffaf6;
    }

    .stat-progress {
      margin-top: 10px;
      width: 100%;
      height: 8px;
      border-radius: 999px;
      background: #eee6df;
      overflow: hidden;
    }

    .stat-progress span {
      display: block;
      width: 53%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #bd7145, #d7a27f);
    }

    .stat-progress-label {
      margin-top: 27px;
      text-align: right;
      color: #776f68;
      font-size: 13px;
    }

    .stats-grid .stat-link.boxed {
      position: absolute;
      left: 22px;
      right: 22px;
      bottom: 22px;
      width: auto;
      margin-top: 0;
    }

    .stats-grid .stat-link:not(.boxed),
    .stats-grid .stat-subvalue {
      position: absolute;
      left: 22px;
      bottom: 32px;
      margin-top: 0;
      line-height: 20px;
    }

    .stats-grid .stat-progress {
      position: absolute;
      left: 22px;
      right: 22px;
      bottom: 38px;
      width: auto;
      margin-top: 0;
    }

    .stats-grid .stat-progress-label {
      position: absolute;
      right: 22px;
      bottom: 52px;
      margin-top: 0;
      line-height: 18px;
    }

    .main-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.65fr) minmax(330px, .95fr);
      gap: 18px;
      align-items: start;
    }

    .stack { display: grid; gap: 18px; min-width: 0; }

    .stack:has(.latest-generations-panel) {
      align-content: start;
    }

    .latest-generations-panel,
    .overview-chart-panel {
      height: 312px;
    }

    .latest-generations-panel {
      align-self: start;
    }

    .billing-invoices {
      margin-top: 18px;
    }

    .billing-admin {
      margin-top: 18px;
    }

    @media (min-width: 1181px) {
      .main-grid > .stack {
        display: contents;
      }

      .main-grid > .stack:first-child > :first-child {
        grid-column: 1;
        grid-row: 1;
      }

      .main-grid > .stack:first-child > :nth-child(2) {
        grid-column: 1;
        grid-row: 2;
      }

      .main-grid > .stack:nth-child(2) > :first-child {
        grid-column: 2;
        grid-row: 1;
      }

      .main-grid > .stack:nth-child(2) > :nth-child(2) {
        grid-column: 2;
        grid-row: 2;
      }
    }

    .tariff-admin-panel .panel-head {
      margin-bottom: 22px;
    }

    .tariff-admin-panel {
      background: transparent;
      border: 0;
      box-shadow: none;
      padding: 0;
    }

    .tariff-admin-panel .panel-head .dark-btn {
      min-height: 46px;
      border-radius: 10px;
      padding: 0 18px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 16px 34px rgba(0,0,0,.16);
    }

    .billing-admin-grid {
      display: grid;
      grid-template-columns: minmax(260px, .9fr) minmax(0, 1.25fr);
      gap: 14px;
      align-items: start;
    }

    .billing-metrics-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    .billing-metric {
      min-height: 82px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: #fff;
      display: grid;
      align-content: space-between;
      gap: 8px;
    }

    .billing-metric span {
      color: var(--muted-strong);
      font-size: 11px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .billing-metric strong {
      color: var(--ink);
      font-size: clamp(18px, 2vw, 26px);
      line-height: 1.05;
    }

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

    .manual-credit-form label {
      display: grid;
      gap: 6px;
      color: var(--muted-strong);
      font-size: 11px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .manual-credit-form input,
    .manual-credit-form select {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0 12px;
      background: #fff;
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      outline: none;
    }

    .manual-credit-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .billing-limit-form {
      display: grid;
      grid-template-columns: repeat(5, minmax(110px, 1fr)) auto;
      gap: 10px;
      align-items: end;
      margin-top: 16px;
    }

    .billing-limit-form label {
      display: grid;
      gap: 6px;
      color: var(--muted-strong);
      font-size: 11px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .billing-limit-form input,
    .billing-limit-form select {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0 12px;
      background: #fff;
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      outline: none;
    }

    .billing-limit-form .check-row {
      display: flex;
      align-items: center;
      min-height: 42px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      text-transform: none;
      font-size: 14px;
      font-weight: 700;
    }

    .billing-limit-form .check-row input {
      width: auto;
      min-height: 0;
      margin-right: 8px;
    }

    .tariff-list {
      display: grid;
      gap: 10px;
    }

    .tariff-admin-panel .tariff-list {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      justify-content: start;
      align-items: stretch;
      gap: 14px;
    }

    .tariff-row {
      display: grid;
      grid-template-columns: minmax(140px, 1fr) minmax(120px, .7fr) minmax(120px, .7fr) auto;
      gap: 12px;
      align-items: center;
      min-height: 58px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px 12px;
      background: #fff;
    }

    .tariff-row strong,
    .tariff-row span {
      min-width: 0;
    }

    .tariff-row-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    .tariff-plan-row {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 11px;
      min-height: 272px;
      border-radius: 14px;
      padding: 16px 16px 58px;
      box-shadow: 0 22px 58px rgba(30, 25, 20, .05);
      overflow: hidden;
    }

    .tariff-plan-row::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      border: 1px solid var(--tariff-accent, #d8cfc7);
      opacity: .62;
    }

    .tariff-card-top {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      height: 36px;
      flex: 0 0 36px;
      width: 100%;
    }

    .tariff-card-icon {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      display: grid;
      place-items: center;
      color: var(--tariff-accent, var(--accent));
      background: color-mix(in srgb, var(--tariff-accent, var(--accent)) 12%, white);
      flex: 0 0 auto;
    }

    .tariff-tone-0 { --tariff-accent: #2fa14d; }
    .tariff-tone-1 { --tariff-accent: #2b73d6; }
    .tariff-tone-2 { --tariff-accent: #7b42d9; }
    .tariff-tone-3 { --tariff-accent: #b07a55; }

    .tariff-plan-row strong {
      display: block;
      color: var(--ink);
      font-size: 19px;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .tariff-plan-row .tariff-row-value {
      color: var(--ink);
      font-size: 13px;
      line-height: 1.2;
    }

    .tariff-plan-row .tariff-price {
      color: var(--tariff-accent, var(--ink));
      font-size: 19px;
      font-weight: 760;
    }

    .tariff-plan-row .tariff-row-actions {
      position: absolute;
      right: 14px;
      bottom: 14px;
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    .tariff-plan-row .tariff-card-body {
      display: grid;
      grid-template-rows: 42px 66px 1fr;
      gap: 10px;
      padding-top: 0;
    }

    .tariff-credit-line {
      display: flex;
      align-items: baseline;
      min-height: 42px;
    }

    .tariff-credit-value {
      color: var(--tariff-accent, var(--ink));
      font-size: 23px;
      font-weight: 820;
      line-height: 1;
    }

    .tariff-credit-line .tariff-row-value {
      margin-left: 8px;
      line-height: 1;
    }

    .tariff-details {
      display: grid;
      align-content: center;
      gap: 9px;
      position: relative;
      padding: 10px 0;
      height: 66px;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
    }

    .tariff-details::before {
      content: '';
      position: absolute;
      top: -4px;
      left: 50%;
      width: 8px;
      height: 8px;
      background: #fff;
      border: 1px solid color-mix(in srgb, var(--tariff-accent, var(--accent)) 45%, var(--line));
      transform: translateX(-50%) rotate(45deg);
    }

    .tariff-edit-details {
      grid-template-columns: 1fr 92px;
    }

    .tariff-details small {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .tariff-feature-list {
      display: grid;
      align-content: start;
      gap: 8px;
      color: #403a35;
      font-size: 11px;
    }

    .tariff-feature-list span {
      display: grid;
      grid-template-columns: 16px minmax(0, 1fr);
      align-items: start;
      gap: 8px;
      line-height: 1.35;
    }

    .tariff-feature-list span::before {
      content: '✓';
      width: 14px;
      height: 14px;
      margin-top: 1px;
      display: inline-grid;
      place-items: center;
      border: 1px solid currentColor;
      border-radius: 50%;
      font-size: 9px;
      line-height: 1;
      color: var(--tariff-accent, var(--accent));
      font-weight: 900;
    }

    .tariff-plan-row .tariff-config-btn {
      width: 36px;
      height: 36px;
      min-height: 36px;
      border-radius: 10px;
      justify-content: center;
      padding: 0;
    }

    .tariff-plan-row .icon-btn {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: #fff;
    }

    .tariff-inline-form {
      display: flex;
      flex-direction: column;
      gap: 14px;
      height: 100%;
    }

    .tariff-inline-form input,
    .tariff-inline-form select {
      width: 100%;
      border: 0;
      border-bottom: 1px solid color-mix(in srgb, var(--tariff-accent, var(--accent)) 34%, var(--line));
      border-radius: 0;
      padding: 0 0 3px;
      background: transparent;
      color: var(--ink);
      font: inherit;
      outline: none;
    }

    .tariff-inline-form input:focus,
    .tariff-inline-form select:focus {
      border-bottom-color: var(--tariff-accent, var(--accent));
    }

    .tariff-edit-title {
      font-size: 22px;
      font-weight: 820;
      line-height: 1.15;
    }

    .tariff-edit-credits {
      color: var(--tariff-accent, var(--ink));
      max-width: 128px;
      font-size: 26px;
      font-weight: 820;
      line-height: 1;
    }

    .tariff-edit-price {
      color: var(--tariff-accent, var(--ink));
      max-width: 120px;
      font-size: 22px;
      font-weight: 760;
    }

    .tariff-edit-currency {
      max-width: 92px;
      font-size: 15px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .tariff-edit-feature {
      font-size: 13px;
      color: #403a35;
    }

    .tariff-edit-credit-row,
    .tariff-inline-grid {
      display: flex;
      align-items: baseline;
      gap: 10px;
      min-height: 70px;
    }

    .tariff-inline-actions {
      position: static;
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      margin-top: auto;
      padding-top: 8px;
    }

    .tariff-inline-actions .dark-btn,
    .tariff-inline-actions .soft-btn {
      min-height: 36px;
      padding: 0 13px;
      border-radius: 11px;
      font-size: 12px;
    }

    .panel {
      padding: 20px;
      min-width: 0;
    }

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

    .panel-subtitle {
      margin-top: 5px;
      color: #6f6b66;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
      font-size: 14px;
      font-weight: 450;
      font-stretch: normal;
      letter-spacing: 0;
      line-height: 1.5;
    }

    .select-mini {
      height: 36px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: white;
      padding: 0 10px;
      color: #55504a;
      font-size: 12px;
      outline: none;
    }

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

    .gen-card {
      min-width: 0;
      transition: transform .18s ease;
    }

    .gen-card:hover { transform: translateY(-3px); }

    .thumb {
      height: 162px;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid #e5ddd4;
      background: #e8e0d6;
      position: relative;
      box-shadow: 0 10px 24px rgba(39,31,25,.08);
    }

    .thumb::before,
    .thumb::after {
      content: "";
      position: absolute;
      inset: 0;
    }

    .thumb::before {
      background:
        linear-gradient(90deg, rgba(255,255,255,.58) 0 16%, transparent 16% 100%),
        linear-gradient(180deg, rgba(255,255,255,.92) 0 6%, transparent 6% 100%),
        linear-gradient(125deg, transparent 0 58%, rgba(80,61,43,.17) 58% 59%, transparent 59%),
        linear-gradient(0deg, #c2ad99 0 22%, #efe4d7 22% 100%);
    }

    .thumb::after {
      background:
        radial-gradient(ellipse at 48% 72%, rgba(86,66,48,.23) 0 18%, transparent 19%),
        linear-gradient(90deg, transparent 0 34%, rgba(255,255,255,.55) 34% 35%, transparent 35%),
        radial-gradient(circle at 22% 34%, rgba(255,255,255,.75) 0 9%, transparent 10%),
        linear-gradient(90deg, transparent 0 20%, rgba(116,86,64,.32) 20% 22%, transparent 22%),
        linear-gradient(90deg, transparent 0 72%, rgba(116,86,64,.24) 72% 74%, transparent 74%);
      mix-blend-mode: multiply;
      opacity: .72;
    }

    .thumb.has-image::before,
    .thumb.has-image::after {
      display: none;
    }

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

    .thumb-product-label {
      position: absolute;
      left: 14px;
      bottom: 12px;
      z-index: 2;
      max-width: calc(100% - 96px);
      color: #fff;
      font-size: 15px;
      line-height: 1.15;
      font-weight: 570;
      letter-spacing: -.02em;
      text-shadow: 0 2px 12px rgba(0,0,0,.55);
      pointer-events: none;
    }

    .thumb-product-label span {
      display: block;
      margin-top: 3px;
      font-size: 12px;
      line-height: 1.15;
      font-weight: 520;
      opacity: .92;
    }

    .thumb-actions {
      position: absolute;
      right: 10px;
      bottom: 10px;
      display: flex;
      gap: 8px;
      opacity: 0;
      transform: translateY(6px);
      transition: opacity .18s ease, transform .18s ease;
      z-index: 2;
    }

    .thumb:hover .thumb-actions,
    .gallery-card:focus-within .thumb-actions,
    .gen-card:focus-within .thumb-actions {
      opacity: 1;
      transform: translateY(0);
    }

    .thumb-action {
      width: 34px;
      height: 34px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.58);
      background: rgba(34,30,26,.72);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      backdrop-filter: blur(8px);
      cursor: pointer;
    }

    .thumb-action svg {
      width: 16px;
      height: 16px;
      stroke-width: 2.2;
    }

    .thumb.kitchen::before {
      background:
        linear-gradient(0deg, #c7b197 0 23%, #efe9df 23% 100%),
        linear-gradient(90deg, transparent 0 28%, rgba(65,51,40,.14) 28% 30%, transparent 30%),
        linear-gradient(90deg, #e8dfd2 0 32%, #f8f3ed 32% 69%, #d3c2ae 69% 100%);
    }

    .thumb.kitchen::after {
      background:
        radial-gradient(ellipse at 55% 65%, rgba(58,43,32,.33) 0 14%, transparent 15%),
        linear-gradient(90deg, transparent 0 38%, rgba(95,76,56,.25) 38% 40%, transparent 40%),
        radial-gradient(circle at 62% 42%, rgba(162,116,73,.24) 0 8%, transparent 9%);
    }

    .thumb.bath::before {
      background:
        linear-gradient(0deg, #cfc2b3 0 20%, #e8e4dc 20% 100%),
        linear-gradient(90deg, transparent 0 45%, rgba(81,70,62,.12) 45% 46%, transparent 46%),
        radial-gradient(circle at 58% 48%, rgba(163,143,124,.38) 0 18%, transparent 19%);
    }

    .thumb.bath::after {
      background:
        radial-gradient(ellipse at 52% 72%, rgba(100,83,69,.25) 0 19%, transparent 20%),
        linear-gradient(90deg, transparent 0 70%, rgba(255,255,255,.55) 70% 82%, transparent 82%);
    }

    .thumb.living::before {
      background:
        linear-gradient(0deg, #c0aa91 0 22%, #f2eadf 22% 100%),
        radial-gradient(circle at 78% 35%, rgba(255,255,255,.68) 0 11%, transparent 12%),
        linear-gradient(90deg, #e3d5c5 0 38%, #f7f1eb 38% 100%);
    }

    .thumb.living::after {
      background:
        radial-gradient(ellipse at 53% 69%, rgba(109,82,59,.32) 0 24%, transparent 25%),
        radial-gradient(circle at 34% 50%, rgba(255,255,255,.62) 0 9%, transparent 10%);
    }

    .gen-meta {
      margin-top: 11px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1;
      letter-spacing: 0;
    }

    .gen-title {
      margin-top: 8px;
      min-height: 34px;
      font-size: 12px;
      line-height: 1.25;
      font-weight: 500;
      letter-spacing: -.015em;
    }

    .coin-chip {
      margin-top: 9px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 25px;
      padding: 0 8px;
      border-radius: 999px;
      border: 1px solid #e8ded4;
      background: #fbf8f5;
      color: #8d674c;
      font-size: 12px;
      font-weight: 500;
    }

    .chart-total {
      display: flex;
      align-items: baseline;
      gap: 6px;
      margin: 5px 0 20px;
      font-size: 22px;
      font-weight: 520;
      letter-spacing: -.04em;
    }

    .chart-total small {
      color: #5e5952;
      font-size: 13px;
      font-weight: 400;
      letter-spacing: -.015em;
    }

    .chart-wrap {
      height: 208px;
      display: grid;
      grid-template-columns: 32px 1fr;
      gap: 10px;
      align-items: stretch;
      min-width: 0;
    }

    .overview-chart-panel .chart-wrap {
      height: 140px;
    }

    .y-axis {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      color: var(--muted-2);
      font-size: 11px;
      padding: 6px 0 22px;
      letter-spacing: 0;
    }

    .chart-area {
      position: relative;
      display: flex;
      align-items: end;
      gap: 7px;
      min-width: 0;
      overflow: hidden;
      padding: 6px 0 24px;
      border-bottom: 1px solid var(--line);
      background: repeating-linear-gradient(to top, transparent 0 53px, rgba(217,208,198,.42) 54px);
    }

    .chart-area.chart-period-30 { gap: 4px; }
    .chart-area.chart-period-90 { gap: 2px; }

    .bar {
      flex: 1;
      min-width: 0;
      max-width: 13px;
      border-radius: 8px 8px 0 0;
      background: linear-gradient(180deg, rgba(185,139,103,.46), rgba(185,139,103,.22));
      transform-origin: bottom;
      animation: growBar .7s ease both;
      animation-delay: calc(var(--i) * 20ms);
    }

    @keyframes growBar {
      from { transform: scaleY(.2); opacity: .25; }
      to { transform: scaleY(1); opacity: 1; }
    }

    .x-axis {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      justify-content: space-between;
      color: var(--muted-2);
      font-size: 11px;
      letter-spacing: 0;
    }

    .table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
      letter-spacing: 0;
    }

    .table th {
      text-align: left;
      color: var(--muted);
      font-weight: 420;
      padding: 0 0 12px;
      border-bottom: 1px solid var(--line);
    }

    .table td {
      padding: 13px 0;
      border-bottom: 1px solid #f0ebe5;
      color: #34312d;
      vertical-align: middle;
    }

    .table tr:last-child td { border-bottom: 0; }

    .catalog-group-row td {
      padding: 0 0 10px;
      background: transparent;
    }

    .catalog-panel {
      min-width: 0;
    }

    .catalog-product-head th {
      padding: 16px 0 10px;
      border-bottom: 1px solid var(--line);
      color: var(--muted);
      font-size: 12px;
      font-weight: 420;
      text-align: left;
    }

    .catalog-product-head th:first-child {
      padding-left: 14px;
    }

    .catalog-products-panel-row td {
      padding: 0;
      border-bottom: 0;
    }

    .catalog-products-panel {
      display: grid;
      grid-template-rows: 0fr;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      transform: translateY(-8px);
      transition: grid-template-rows .28s ease, opacity .2s ease, transform .24s ease;
    }

    .catalog-products-panel.open {
      grid-template-rows: 1fr;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    .catalog-products-panel-inner {
      min-height: 0;
      overflow: hidden;
    }

    .catalog-products-inner-table {
      margin: 0;
    }

    .catalog-product-head th:nth-child(2),
    .catalog-product-row td:nth-child(2) {
      padding-left: 18px;
    }

    .catalog-group-btn {
      width: 100%;
      min-height: 58px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      padding: 12px 14px;
      color: var(--text);
      text-align: left;
      transition: border .18s ease, background .18s ease;
    }

    .catalog-group-btn:hover {
      border-color: var(--line-dark);
      background: #fbfaf8;
    }

    .catalog-group-title {
      display: grid;
      gap: 3px;
      min-width: 0;
      justify-items: start;
      position: relative;
    }

    .catalog-group-title strong {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 620;
    }

    .catalog-title-action {
      border: 0;
      background: transparent;
      color: inherit;
      display: block;
      max-width: 100%;
      padding: 0;
      text-align: left;
      font-weight: 620;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .catalog-title-action:hover {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .catalog-cell-action {
      border: 0;
      background: transparent;
      color: inherit;
      padding: 0;
      max-width: 100%;
      font: inherit;
      text-align: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .catalog-cell-action:hover {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .catalog-inline-edit {
      display: grid;
      grid-template-columns: minmax(120px, 1fr) auto auto;
      align-items: center;
      gap: 7px;
      width: min(100%, 360px);
    }

    .catalog-group-title .catalog-inline-edit {
      width: min(100%, 300px);
    }

    .catalog-inline-edit input {
      width: 100%;
      height: 36px;
      border: 1px solid var(--line-dark);
      border-radius: 10px;
      background: #fff;
      color: var(--text);
      padding: 0 10px;
      font: inherit;
      outline: none;
    }

    .catalog-meta-line {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 420;
    }

    .catalog-category-trigger {
      border: 0;
      background: transparent;
      color: var(--accent);
      padding: 0;
      font: inherit;
      font-weight: 620;
      cursor: pointer;
    }

    .catalog-category-trigger:hover {
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .catalog-category-menu {
      position: absolute;
      left: 0;
      top: calc(100% + 8px);
      z-index: 20;
      width: 220px;
      max-height: 280px;
      overflow: auto;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 18px 36px rgba(52, 49, 45, .14);
    }

    .catalog-category-option {
      width: 100%;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--text);
      padding: 9px 10px;
      text-align: left;
      font: inherit;
      cursor: pointer;
    }

    .catalog-category-option:hover,
    .catalog-category-option.active {
      background: #f6f1ec;
      color: var(--accent);
    }

    .catalog-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 14px;
      justify-self: end;
      white-space: nowrap;
    }

    .catalog-inline-edit input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(185, 142, 109, .16);
    }

    .catalog-inline-save,
    .catalog-inline-cancel {
      width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      display: inline-grid;
      place-items: center;
      color: var(--accent);
      font-weight: 800;
    }

    .catalog-inline-save:hover,
    .catalog-inline-cancel:hover {
      border-color: var(--line-dark);
      background: #fbfaf8;
      color: #5f4b3d;
    }

    .catalog-inline-cancel {
      color: #9c3f3f;
    }

    .catalog-order-btn,
    .catalog-add-product-btn,
    .catalog-delete-btn {
      width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      color: var(--accent);
      display: inline-grid;
      place-items: center;
      transition: border .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
    }

    .catalog-add-product-btn:hover,
    .catalog-order-btn:hover {
      border-color: var(--line-dark);
      background: #fbfaf8;
      color: #5f4b3d;
    }

    .catalog-order-btn:disabled {
      cursor: default;
      opacity: .35;
    }

    .catalog-delete-btn {
      color: #9c3f3f;
    }

    .catalog-delete-btn:hover {
      border-color: #e0c5c0;
      background: #fff7f6;
      color: #8f2f2f;
    }

    .catalog-add-product-btn svg,
    .catalog-order-btn svg,
    .catalog-delete-btn svg {
      width: 16px;
      height: 16px;
    }

    .catalog-group-title span,
    .catalog-group-meta {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.3;
    }

    .catalog-chevron {
      color: var(--muted);
      font-size: 18px;
      line-height: 1;
      transform: rotate(0deg);
      transition: transform .18s ease;
    }

    .catalog-group-btn.open .catalog-chevron { transform: rotate(90deg); }

    .catalog-product-row td {
      padding-top: 10px;
      padding-bottom: 10px;
    }

    .catalog-product-row td:first-child {
      width: 94px;
      padding-left: 5px;
    }

    .catalog-thumb {
      width: 84px;
      height: 84px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--surface-soft);
      object-fit: contain;
      object-position: center;
      display: block;
    }

    .catalog-thumb-wrap {
      position: relative;
      width: 84px;
      height: 84px;
      display: block;
    }

    .catalog-thumb-view {
      width: 84px;
      height: 84px;
      border: 0;
      border-radius: 10px;
      background: transparent;
      display: block;
      padding: 0;
      overflow: hidden;
    }

    .catalog-thumb-wrap .catalog-thumb {
      width: 100%;
      height: 100%;
    }

    .catalog-thumb-view:hover .catalog-thumb {
      border-color: var(--line-dark);
    }

    .catalog-product-action-cell {
      width: 42px;
      text-align: right;
    }

    .catalog-thumb-edit {
      position: absolute;
      top: 5px;
      right: 5px;
      width: 28px;
      height: 28px;
      border: 1px solid rgba(233, 227, 220, .9);
      border-radius: 9px;
      background: rgba(255, 255, 255, .92);
      color: var(--accent);
      display: grid;
      place-items: center;
      opacity: 0;
      pointer-events: none;
      box-shadow: 0 8px 22px rgba(35, 28, 22, .12);
      transition: opacity .16s ease, transform .16s ease, background .16s ease;
    }

    .catalog-thumb-edit svg {
      width: 14px;
      height: 14px;
    }

    .catalog-thumb-wrap:hover .catalog-thumb-edit,
    .catalog-thumb-wrap:focus-within .catalog-thumb-edit {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    .catalog-thumb-edit:hover {
      background: #fff;
      color: #5f4b3d;
    }

    .catalog-thumb-empty {
      display: grid;
      place-items: center;
      color: var(--muted-2);
      font-size: 10px;
    }

    .status {
      display: inline-flex;
      align-items: center;
      height: 26px;
      border-radius: 8px;
      padding: 0 9px;
      font-size: 11px;
      font-weight: 500;
    }

    .status.paid { background: var(--green); color: var(--green-text); }
    .status.pending { background: var(--orange); color: var(--orange-text); }

    .icon-btn {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: white;
      display: inline-grid;
      place-items: center;
      color: #69625b;
      transition: transform .18s ease, border .18s ease, background .18s ease;
    }

    .icon-btn:hover { transform: translateY(-1px); border-color: var(--line-dark); background: #fbf8f5; }

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

    .action-item {
      border: 0;
      background: transparent;
      display: grid;
      grid-template-columns: 42px minmax(0,1fr) 16px;
      align-items: center;
      gap: 13px;
      text-align: left;
      padding: 0;
      color: inherit;
    }

    .action-item:not(:last-child) { padding-bottom: 13px; border-bottom: 1px solid #f0ebe5; }

    .action-item b { display: block; font-size: 14px; font-weight: 520; }
    .action-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
    .chevron { color: var(--muted-2); }

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

    .searchbar {
      display: flex;
      align-items: center;
      gap: 10px;
      height: 44px;
      min-width: 310px;
      padding: 0 14px;
      border: 1px solid var(--line);
      border-radius: 13px;
      background: rgba(255,255,255,.8);
      color: var(--muted);
    }

    .searchbar input {
      width: 100%;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--text);
      font-size: 13px;
      font-weight: 390;
    }

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

    .generation-pagination {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-top: 24px;
    }

    .generation-page-btn {
      min-width: 40px;
      height: 40px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      color: var(--text);
      font-weight: 700;
      cursor: pointer;
    }

    .generation-page-btn.active {
      color: #fff;
      background: var(--accent);
      border-color: var(--accent);
    }

    .generation-page-gap { color: var(--muted); }

    .gallery-card {
      padding: 0;
      border-radius: 20px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .18s ease, box-shadow .18s ease, border .18s ease;
    }

    .gallery-card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow);
      border-color: var(--line-dark);
    }

    .gallery-card .thumb {
      height: 230px;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }

    .gallery-body {
      padding: 0;
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      min-height: 0;
    }

		    .used-assets {
		      margin-top: 0;
		      display: grid;
		      grid-template-columns: repeat(2, minmax(0, 1fr));
		      grid-auto-rows: 142px;
		      height: 142px;
		      gap: 0;
		      align-items: stretch;
		      border-bottom: 1px solid var(--line);
		      overflow: hidden;
		    }

		    .used-asset {
		      min-width: 0;
		      min-height: 0;
		      height: 142px;
	      border: 0;
	      border-right: 1px solid var(--line);
	      border-radius: 0;
	      overflow: hidden;
	      background: #fff;
	      box-shadow: none;
	      display: flex;
	      flex-direction: column;
	    }

    .used-asset:last-child { border-right: 0; }

    .used-asset--brand {
      background: #fff;
    }

    .used-asset[data-product-card] {
      cursor: pointer;
      transition: background .18s ease;
    }

    .used-asset[data-product-card]:hover {
      background: #fbf8f5;
    }

		    .used-asset img {
		      width: 100%;
		      height: 96px;
		      flex: 0 0 96px;
	      display: block;
	      object-fit: cover;
	      background: #f4eee7;
	    }

		    .used-asset-logo {
		      flex: 0 0 96px;
		      display: flex;
		      flex-direction: column;
		      align-items: center;
		      justify-content: center;
		      gap: 8px;
		      padding: 16px;
		      background: #fff;
		    }

	    .used-asset--brand .used-asset-logo {
	      flex: 1 1 auto;
	      min-height: 142px;
	    }

		    .used-asset-logo img {
		      width: min(98px, 53%);
		      height: auto;
		      flex: 0 0 auto;
		      object-fit: contain;
		      background: transparent;
		    }

	    .used-asset-logo-word {
	      color: #98603f;
	      font-size: 20px;
	      font-weight: 900;
	      line-height: 1;
	      letter-spacing: .02em;
	    }

		    .used-asset-logo span {
		      max-width: min(98px, 53%);
		      color: #98603f;
		      font-size: 9px;
		      font-weight: 760;
		      letter-spacing: .01em;
		      line-height: 1.1;
		      text-align: center;
		      text-transform: none;
		    }

		    .used-asset-meta {
		      flex: 0 0 46px;
		      height: 46px;
		      padding: 6px 10px;
		      overflow: hidden;
		    }

    .used-asset-meta b,
    .used-asset-meta span {
      display: -webkit-box;
      overflow: hidden;
      -webkit-box-orient: vertical;
      overflow-wrap: anywhere;
      text-align: left;
    }

	    .used-asset-meta b {
	      color: var(--text);
	      font-size: 14px;
	      line-height: 1.18;
	      font-weight: 570;
	      -webkit-line-clamp: 1;
	    }

	    .used-asset--brand .used-asset-meta {
	      display: none;
	    }

	    .used-asset-meta span {
	      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.22;
      font-weight: 700;
	      -webkit-line-clamp: 1;
	    }

    .used-asset-label {
      width: auto;
      min-width: 96px;
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.3;
      box-shadow: none;
    }

		    .gallery-footer {
		      margin-top: 0;
		      height: 38px;
		      flex: 0 0 38px;
		      min-height: 38px;
		      max-height: 38px;
	      overflow: hidden;
	      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      color: var(--muted);
      font-size: 12px;
    }

    .credit-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 18px;
    }

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

    .package {
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 22px;
      background: rgba(255,255,255,.8);
      transition: transform .18s ease, box-shadow .18s ease, border .18s ease;
    }

    .package:hover, .package.featured {
      transform: translateY(-2px);
      border-color: #c7b8aa;
      box-shadow: var(--shadow-soft);
    }

    .package.featured {
      background: linear-gradient(180deg, #fff, #fbf7f1);
    }

    .package small { color: var(--muted); font-size: 12px; line-height: 1.4; }
    .package strong { display: block; margin-top: 12px; font-size: 30px; font-weight: 520; letter-spacing: -.055em; }
    .package .soft-btn, .package .dark-btn { width: 100%; margin-top: 20px; }

    .settings-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 18px;
    }

    .settings-tabs {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255,255,255,.62);
      overflow-x: auto;
    }

    .settings-tab {
      height: 40px;
      flex: 0 0 auto;
      border: 0;
      border-radius: 12px;
      background: transparent;
      color: #6b625b;
      padding: 0 16px;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
    }

    .settings-tab.active {
      background: #181716;
      color: #fff;
      box-shadow: 0 10px 22px rgba(0,0,0,.12);
    }

    .settings-panel[hidden] {
      display: none;
    }

    .settings-panel-unframed {
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .settings-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .setting-tile {
      padding: 20px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(255,255,255,.72);
    }

    .setting-tile p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }

    .settings-wide { grid-column: 1 / -1; }

    .profile-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .profile-role {
      color: var(--text);
      font-size: 15px;
      line-height: 1.2;
      font-weight: 800;
      text-transform: lowercase;
      white-space: nowrap;
    }

    .profile-card-top .profile-photo-row {
      margin-top: 0;
    }

    .workspace-eyebrow {
      display: block;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .workspace-title {
      margin: 0;
      font-size: 24px;
      line-height: 1.12;
      font-weight: 560;
    }

    .workspace-subtitle {
      margin-top: 8px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .settings-metric-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin: 18px 0;
    }

    .settings-metric {
      min-height: 82px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255,255,255,.7);
    }

    .settings-metric span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.35;
      font-weight: 800;
      text-transform: uppercase;
    }

    .settings-metric strong {
      display: block;
      margin-top: 8px;
      font-size: 22px;
      line-height: 1.05;
      font-weight: 560;
    }

    .workspace-summary-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .workspace-chip {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      margin-top: 14px;
      padding: 0 10px;
      border-radius: 999px;
      color: #5b4a3c;
      background: #f5ece3;
      font-size: 11px;
      font-weight: 800;
    }

    .role-matrix,
    .rollout-list {
      display: grid;
      gap: 10px;
    }

    .role-row,
    .rollout-step {
      display: grid;
      grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      min-height: 54px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255,255,255,.66);
    }

    .role-row strong,
    .rollout-step strong {
      font-size: 13px;
      line-height: 1.3;
    }

    .role-row span,
    .rollout-step span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .settings-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 26px;
      padding: 0 10px;
      border-radius: 999px;
      white-space: nowrap;
      color: #5b4a3c;
      background: #f5ece3;
      font-size: 11px;
      font-weight: 800;
    }

    .settings-status.active {
      color: #1f6b48;
      background: #e6f5ec;
    }

    .settings-status.pending {
      color: #765b1f;
      background: #f8efd4;
    }

    .settings-status.locked {
      color: #715050;
      background: #f6e6e3;
    }

    .workspace-management-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .setting-tile-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .setting-tile-head h3 {
      margin-top: 14px;
    }

    .tile-icon-btn {
      min-width: 122px;
      height: 38px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.78);
      color: #6d5847;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0 12px;
      font-size: 12px;
      line-height: 1;
      font-weight: 800;
      cursor: pointer;
    }

    .tile-icon-btn:hover {
      border-color: var(--line-dark);
      background: #fff;
    }

    .tile-icon-btn svg {
      width: 17px;
      height: 17px;
      stroke-width: 2;
    }

    .workspace-insight-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .support-grid {
      display: grid;
      grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
      gap: 18px;
    }

    .support-form {
      display: grid;
      gap: 12px;
    }

    .support-form label {
      display: grid;
      gap: 7px;
      color: #5f5750;
      font-size: 11px;
      line-height: 1.3;
      font-weight: 800;
      text-transform: uppercase;
    }

    .support-form input,
    .support-form select,
    .support-form textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.82);
      color: var(--text);
      padding: 12px;
      outline: none;
      font-size: 13px;
      font-weight: 450;
      text-transform: none;
    }

    .support-form input {
      height: 42px;
    }

    .support-form select {
      height: 42px;
    }

    .support-form textarea {
      min-height: 150px;
      resize: vertical;
      line-height: 1.45;
    }

    .support-form input:focus,
    .support-form select:focus,
    .support-form textarea:focus {
      border-color: #cbb9aa;
      box-shadow: 0 0 0 3px rgba(185,139,103,.12);
    }

    .support-info {
      display: grid;
      align-content: start;
      gap: 12px;
    }

    .support-info h3 {
      margin-top: 14px;
      font-size: 18px;
    }

    .support-info p {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .support-ticket-list {
      display: grid;
      gap: 8px;
      margin-top: 16px;
    }

    .support-ticket {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.66);
      padding: 12px;
      text-align: left;
      color: inherit;
      cursor: pointer;
      transition: border .18s ease, background .18s ease, transform .18s ease;
    }

    .support-ticket:hover,
    .support-ticket.active {
      border-color: var(--line-dark);
      background: #fff;
      transform: translateY(-1px);
    }

    .support-ticket strong,
    .support-chat-head strong {
      display: block;
      font-size: 13px;
      line-height: 1.25;
      font-weight: 700;
    }

    .support-ticket span,
    .support-chat-head span {
      display: block;
      margin-top: 5px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .support-chat {
      display: grid;
      grid-template-rows: auto minmax(260px, 1fr) auto;
      min-height: 520px;
    }

    .support-chat-head {
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line);
    }

    .support-messages {
      display: grid;
      align-content: start;
      gap: 10px;
      padding: 16px 0;
      overflow: auto;
      max-height: 360px;
    }

    .support-message {
      max-width: min(76%, 560px);
      display: grid;
      gap: 5px;
      justify-self: start;
    }

    .support-message.user {
      justify-self: end;
    }

    .support-message-body {
      padding: 11px 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.72);
      color: var(--text);
      font-size: 13px;
      line-height: 1.45;
      white-space: pre-wrap;
    }

    .support-message.user .support-message-body {
      border-color: #d7c8b8;
      background: #f5eee7;
    }

    .support-message-meta {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.25;
    }

    .support-reply-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
    }

    .support-reply-form textarea {
      min-height: 44px;
      max-height: 130px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.82);
      color: var(--text);
      padding: 12px;
      outline: none;
      font-size: 13px;
      line-height: 1.35;
      resize: vertical;
    }

    .support-empty {
      align-self: center;
      justify-self: center;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
    }

    .workspace-form {
      display: grid;
      gap: 10px;
      margin-top: 14px;
    }

    .workspace-form[hidden] {
      display: none;
    }

    .office-form,
    .employee-form {
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      transform: translateY(-8px);
      margin-top: 0;
      transition: max-height .28s ease, opacity .2s ease, transform .24s ease, margin-top .24s ease;
    }

    .office-form.is-open,
    .employee-form.is-open {
      max-height: 330px;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
      margin-top: 14px;
    }

    .workspace-form label {
      display: grid;
      gap: 6px;
      color: #5f5750;
      font-size: 11px;
      line-height: 1.3;
      font-weight: 800;
      text-transform: uppercase;
    }

    .workspace-form input,
    .workspace-form select {
      width: 100%;
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.82);
      color: var(--text);
      padding: 0 12px;
      outline: none;
      font-size: 13px;
      font-weight: 450;
      text-transform: none;
    }

    .workspace-form select,
    .workspace-member-form select {
      appearance: none;
      background-color: rgba(255,255,255,.86);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f5750' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 4px center;
      background-size: 16px 16px;
      padding-right: 28px;
    }

    .workspace-form input:focus,
    .workspace-form select:focus {
      border-color: #cbb9aa;
      box-shadow: 0 0 0 3px rgba(185,139,103,.12);
    }

    .workspace-form .dark-btn,
    .workspace-form .soft-btn {
      width: 100%;
      margin-top: 2px;
    }

    .workspace-switcher {
      min-width: min(320px, 100%);
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .workspace-switcher select {
      min-height: 42px;
      padding: 0 38px 0 13px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      color: var(--text);
      font: inherit;
    }

    .workspace-list {
      display: grid;
      gap: 8px;
      margin-top: 14px;
    }

    .workspace-list-item {
      position: relative;
      display: grid;
      gap: 4px;
      min-height: 52px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.62);
    }

    .workspace-list-item.selectable {
      cursor: pointer;
      transition: border .18s ease, background .18s ease, transform .18s ease;
    }

    .workspace-list-item.selectable:hover,
    .workspace-list-item.selected {
      border-color: var(--line-dark);
      background: #fff;
      transform: translateY(-1px);
    }

    .workspace-list-item.selected {
      box-shadow: 0 0 0 3px rgba(185,139,103,.11);
    }

    .workspace-list-item strong {
      font-size: 13px;
      line-height: 1.25;
      font-weight: 560;
    }

    .workspace-list-item span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .workspace-office-row {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      gap: 11px;
      align-items: center;
      padding-right: 76px;
    }

    .workspace-member-row {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      gap: 11px;
      align-items: center;
      padding-right: 76px;
    }

    .workspace-office-logo,
    .workspace-member-avatar {
      width: 42px;
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fffaf6;
      display: grid;
      place-items: center;
      overflow: hidden;
      color: #9c6d4c;
      font-size: 12px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .workspace-member-avatar {
      color: #a36f4c;
    }

    .workspace-member-avatar svg {
      width: 20px;
      height: 20px;
      stroke-width: 2;
    }

    .workspace-office-logo img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      padding: 6px;
      background: #fff;
    }

    .workspace-list-actions {
      position: absolute;
      top: 10px;
      right: 10px;
      display: flex;
      gap: 8px;
    }

    .workspace-list-actions button {
      width: 30px;
      height: 30px;
      border-radius: 9px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.78);
      color: #6d5847;
      display: inline-grid;
      place-items: center;
      cursor: pointer;
    }

    .workspace-list-actions svg {
      width: 15px;
      height: 15px;
      stroke-width: 2;
    }

    .workspace-list-actions button:hover {
      border-color: var(--line-dark);
      background: #fff;
    }

    .workspace-list-actions button[data-office-delete],
    .workspace-list-actions button[data-employee-delete] {
      color: #8b3d35;
    }

    .workspace-list-item em {
      justify-self: start;
      color: #6d5847;
      background: #f3ece5;
      border-radius: 999px;
      padding: 4px 8px;
      font-size: 11px;
      line-height: 1;
      font-style: normal;
      font-weight: 800;
    }

    .office-settings-form {
      display: grid;
      gap: 14px;
    }

    .office-settings-form label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-weight: 700;
      font-size: 13px;
    }

    .office-settings-form input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
      padding: 14px 16px;
      color: var(--text);
      outline: none;
    }

    .office-logo-uploader {
      display: grid;
      grid-template-columns: 104px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      padding: 14px;
      border: 1px dashed var(--line-dark);
      border-radius: 18px;
      background: #fffaf6;
    }

    .office-logo-preview {
      width: 104px;
      height: 84px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
      display: grid;
      place-items: center;
      overflow: hidden;
      color: #9c6d4c;
      font-size: 12px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .office-logo-preview img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      padding: 10px;
    }

    .office-logo-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .office-logo-note {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .workspace-member-form {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 6px;
    }

    .workspace-member-form select {
      width: 100%;
      height: 36px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background-color: rgba(255,255,255,.86);
      color: var(--text);
      padding: 0 28px 0 9px;
      outline: none;
      font-size: 12px;
    }

    .workspace-member-form button {
      grid-column: 1 / -1;
      width: 100%;
      height: 36px;
      border-radius: 10px;
    }

    .workspace-filter-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 12px;
    }

    .workspace-filter-form label {
      display: grid;
      gap: 6px;
      color: #5f5750;
      font-size: 11px;
      line-height: 1.3;
      font-weight: 800;
      text-transform: uppercase;
    }

    .workspace-filter-form input,
    .workspace-filter-form select {
      width: 100%;
      height: 36px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(255,255,255,.86);
      color: var(--text);
      padding: 0 9px;
      outline: none;
      font-size: 12px;
      text-transform: none;
    }

    .workspace-filter-form button {
      grid-column: 1 / -1;
      width: 100%;
      height: 36px;
      border-radius: 10px;
    }

    .workspace-filter-form button + button {
      margin-top: 0;
    }

    .profile-photo-row {
      display: inline-flex;
      position: relative;
      margin-top: 14px;
      width: 68px;
      height: 68px;
    }

    .profile-photo-row .avatar {
      width: 64px;
      height: 64px;
      flex: 0 0 auto;
      margin: 2px;
    }

    .avatar-upload {
      position: absolute;
      inset: 2px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      color: #fff;
      font-size: 11px;
      line-height: 1.15;
      font-weight: 800;
      text-align: center;
      cursor: pointer;
      overflow: hidden;
    }

    .avatar-upload::before {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(18,17,16,.62);
      opacity: 0;
      transition: opacity .16s ease;
    }

    .avatar-upload::after {
      content: "Добавить фото";
      position: relative;
      z-index: 1;
      max-width: 54px;
      opacity: 0;
      transition: opacity .16s ease;
    }

    .profile-photo-row.has-photo .avatar-upload::after {
      content: "Сменить фото";
    }

    .profile-photo-row:hover .avatar-upload::before,
    .profile-photo-row:focus-within .avatar-upload::before,
    .profile-photo-row:hover .avatar-upload::after,
    .profile-photo-row:focus-within .avatar-upload::after {
      opacity: 1;
    }

    .profile-photo-row input {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 100;
      background: rgba(18,16,14,.24);
      backdrop-filter: blur(9px);
      padding: 24px;
    }

    .modal-backdrop.open { display: flex; }

    .modal {
      width: min(520px, 100%);
      border: 1px solid var(--line);
      background: rgba(255,255,255,.94);
      border-radius: 28px;
      padding: 24px;
      box-shadow: 0 28px 80px rgba(0,0,0,.18);
      animation: modalIn .22s ease both;
    }

    .catalog-url-modal {
      width: min(760px, 100%);
      max-height: calc(100vh - 48px);
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .catalog-url-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 120px;
      gap: 12px;
      align-items: end;
    }

    .catalog-url-form label,
    .catalog-url-limits label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 520;
    }

    .catalog-url-form input {
      height: 44px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0 13px;
      background: #fff;
      color: var(--text);
      font: inherit;
      font-weight: 500;
      outline: none;
    }

    .catalog-url-form input:focus {
      border-color: var(--line-dark);
      box-shadow: 0 0 0 3px rgba(255, 94, 20, .1);
    }

    .catalog-url-limits {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 160px));
      gap: 12px;
    }

    .catalog-url-progress {
      display: grid;
      gap: 8px;
      padding: 12px 14px;
      border-radius: 14px;
      background: #fff8f3;
      color: var(--muted);
    }

    .catalog-url-progress p {
      margin: 0;
      font-size: 13px;
      line-height: 1.35;
    }

    .catalog-url-progress-bar {
      height: 7px;
      overflow: hidden;
      border-radius: 999px;
      background: #efe6de;
    }

    .catalog-url-progress-bar span {
      display: block;
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #ff5e14, #c19774);
      transition: width .24s ease;
    }

    .catalog-url-results {
      min-height: 86px;
      max-height: min(360px, 42vh);
      overflow: auto;
      padding-right: 4px;
      display: grid;
      gap: 10px;
    }

    .catalog-url-group {
      display: grid;
      grid-template-columns: 22px minmax(0, 1fr);
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
    }

    .catalog-url-group input {
      width: 18px;
      height: 18px;
      margin-top: 2px;
      accent-color: #ff5e14;
    }

    .catalog-url-group strong {
      display: block;
      margin-bottom: 4px;
      font-size: 16px;
      font-weight: 620;
      color: var(--text);
    }

    .catalog-url-group small {
      display: block;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .catalog-url-group-items {
      margin-top: 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .catalog-url-footer {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 2px;
    }

    .image-modal {
      width: auto;
      max-width: calc(100vw - 96px);
      max-height: calc(100vh - 56px);
      border: 0;
      border-radius: 24px;
      background: transparent;
      padding: 0;
      position: relative;
      overflow: hidden;
      box-shadow: none;
    }

    .image-modal .modal-head {
      position: absolute;
      top: 18px;
      right: 18px;
      z-index: 30;
      margin: 0;
      display: block;
    }

    .image-modal .modal-head > div {
      display: none;
    }

    .image-modal .close-btn {
      width: 48px;
      height: 48px;
      border-color: rgba(255, 255, 255, 0.55);
      background: rgba(20, 18, 16, 0.34);
      color: #fff;
      box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
      backdrop-filter: blur(10px);
    }

    .image-modal img {
      display: block;
      width: auto;
      height: auto;
      max-width: calc(100vw - 96px);
      max-height: calc(100vh - 56px);
      object-fit: contain;
      border-radius: 24px;
      background: transparent;
      box-shadow: 0 24px 80px rgba(22, 24, 29, 0.26);
    }

    .image-modal-product-label {
      position: absolute;
      left: 34px;
      bottom: 30px;
      z-index: 24;
      display: flex;
      align-items: center;
      gap: 13px;
      max-width: min(420px, calc(100% - 132px));
      color: #fff;
      font-size: clamp(24px, 2.2vw, 36px);
      line-height: 1.08;
      font-weight: 620;
      letter-spacing: -.02em;
      text-shadow: 0 3px 18px rgba(0,0,0,.58);
      pointer-events: none;
    }

    .image-modal-product-label span {
      display: block;
      margin-top: 7px;
      font-size: clamp(17px, 1.35vw, 24px);
      line-height: 1.1;
      font-weight: 430;
      opacity: .86;
    }

    .image-modal-brand-mark {
      color: #fff;
      font-size: clamp(28px, 2.45vw, 40px);
      font-weight: 850;
      letter-spacing: .02em;
      text-shadow: 0 3px 18px rgba(0,0,0,.42);
    }

    .image-modal-brand-mark span {
      display: inline;
      margin: 0;
      color: var(--accent-2);
      font: inherit;
      opacity: 1;
    }

    .product-modal[hidden] {
      display: none;
    }

    .product-modal {
      position: fixed;
      inset: 0;
      z-index: 110;
      display: grid;
      place-items: center;
      padding: 24px;
      animation: modalIn .22s ease both;
    }

    .product-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(18, 16, 14, .42);
      backdrop-filter: blur(3px);
    }

    .product-modal__panel {
      position: relative;
      z-index: 1;
      width: min(820px, calc(100vw - 32px));
      height: min(720px, calc(100vh - 48px));
      max-height: calc(100vh - 48px);
      display: grid;
      grid-template-columns: minmax(280px, 1fr) minmax(220px, .75fr);
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      background: #fff;
      box-shadow: 0 24px 80px rgba(22, 24, 29, .22);
      animation: modalIn .24s ease both;
    }

    .product-modal__close {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 2;
      width: 34px;
      height: 34px;
      border: 0;
      border-radius: 50%;
      background: rgba(255,255,255,.92);
      color: #3f4248;
      font-size: 24px;
      line-height: 1;
      box-shadow: 0 8px 20px rgba(22,24,29,.12);
    }

    .product-modal__image {
      width: 100%;
      height: 100%;
      min-height: 0;
      object-fit: contain;
      object-position: center;
      background: #f7f6f4;
    }

    .product-modal__image[hidden] {
      display: none;
    }

    .product-modal__content {
      padding: 34px 28px;
      align-self: center;
    }

    .product-modal__content h2 {
      margin: 0 0 12px;
      font-size: 24px;
      line-height: 1.12;
      letter-spacing: 0;
    }

    .product-modal__content p {
      margin: 0;
      color: var(--muted);
      font-size: 16px;
      line-height: 1.45;
    }

    .product-modal__content p span {
      display: block;
      margin-top: 8px;
    }

    .product-modal__content p b {
      color: #7e848f;
      font-weight: 800;
    }

    .image-nav {
      position: absolute;
      top: 50%;
      z-index: 3;
      width: 58px;
      height: 86px;
      border: 0;
      background: transparent;
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transform: translateY(-50%);
      text-shadow: 0 2px 14px rgba(0,0,0,.5);
      transition: transform .18s ease, opacity .18s ease, color .18s ease;
      font-size: 74px;
      font-weight: 200;
      line-height: 1;
    }

    .image-nav:hover {
      transform: translateY(-50%) scale(1.03);
      color: #f8f2ea;
    }

    .image-nav:disabled {
      opacity: .28;
      cursor: default;
      transform: translateY(-50%);
    }

    .image-nav.prev { left: 26px; }
    .image-nav.next { right: 26px; }

    @keyframes modalIn {
      from { opacity: 0; transform: translateY(14px) scale(.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .modal-head {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      align-items: flex-start;
      margin-bottom: 18px;
    }

    .close-btn {
      border: 1px solid var(--line);
      background: #fff;
      width: 36px;
      height: 36px;
      border-radius: 12px;
      color: var(--muted);
    }

    .modal-options { display: grid; gap: 10px; }

    .login-form {
      display: grid;
      gap: 12px;
    }

    .login-form[hidden] { display: none; }

    .auth-switch {
      border: 0;
      padding: 2px 0;
      background: transparent;
      color: #f05a00;
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      text-align: center;
      cursor: pointer;
    }

    .auth-switch:hover { text-decoration: underline; }

    .email-verification-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: var(--muted);
      font-size: 12px;
    }

    .email-verification-row.is-verified { color: #2f7d4d; }

    .email-verification-row button {
      border: 0;
      padding: 0;
      background: transparent;
      color: #f05a00;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
    }

    .login-form label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-weight: 700;
      font-size: 13px;
    }

    .login-form input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
      padding: 14px 16px;
      color: var(--text);
      outline: none;
    }

    .login-form input:focus {
      border-color: #b89979;
      box-shadow: 0 0 0 4px rgba(184, 153, 121, .14);
    }

    .password-field {
      position: relative;
      display: block;
    }

    .password-field input {
      padding-right: 48px;
    }

    .password-toggle {
      position: absolute;
      right: 10px;
      top: 50%;
      width: 34px;
      height: 34px;
      transform: translateY(-50%);
      border: 0;
      border-radius: 10px;
      background: transparent;
      color: #706861;
      display: inline-grid;
      place-items: center;
      cursor: pointer;
    }

    .password-toggle:hover {
      background: #f4eee8;
      color: var(--text);
    }

    .password-toggle svg {
      width: 18px;
      height: 18px;
      stroke-width: 2;
    }

    #loginModal .auth-submit {
      appearance: none;
      -webkit-appearance: none;
      height: 45.5px;
      min-height: 45.5px;
      justify-content: center;
      margin-top: 4px;
      border: 1px solid var(--line);
      border-radius: 16px !important;
      padding-top: 0;
      padding-bottom: 0;
      overflow: hidden;
    }

    .modal-option {
      border: 1px solid var(--line);
      background: white;
      border-radius: 16px;
      padding: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 18px;
      transition: border .18s ease, transform .18s ease, background .18s ease;
    }

    .modal-option > span {
      min-width: 0;
      display: flex;
      align-items: baseline;
      gap: 14px;
      text-align: left;
      flex-wrap: wrap;
    }

    .modal-option b,
    .modal-option strong {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .modal-option .panel-subtitle {
      display: inline-block;
      min-width: 0;
    }

    .modal-option:hover {
      border-color: #c7b8aa;
      background: #fbf8f5;
      transform: translateY(-1px);
    }

    .toast {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 120;
      transform: translateY(16px);
      opacity: 0;
      pointer-events: none;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.94);
      color: #302b26;
      border-radius: 16px;
      padding: 14px 16px;
      box-shadow: 0 18px 44px rgba(0,0,0,.12);
      transition: opacity .2s ease, transform .2s ease;
      font-size: 13px;
      font-weight: 430;
    }

    .toast.show { opacity: 1; transform: translateY(0); }

    svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

    @media (max-width: 1180px) {
      .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .main-grid, .projects-layout, .billing-admin-grid { grid-template-columns: 1fr; }
      .latest-generations-panel,
      .overview-chart-panel { height: auto; }
      .chart-wrap { height: 210px; }
      .overview-chart-panel .chart-wrap { height: 210px; }
      .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .credit-grid, .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .billing-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .billing-limit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .billing-limit-form .dark-btn { grid-column: auto; }
      .tariff-admin-panel .tariff-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 980px) {
      .topbar-inner, .layout { width: min(100% - 32px, var(--container)); }
      .nav { display: none; }
      .layout { display: block; padding-top: 24px; }
      .content { grid-column: auto; }
      .sidebar { display: none; }
      .mobile-tabs { display: flex; }
      .hero-row { flex-direction: column; }
      .hero-actions { width: 100%; }
      .hero-actions button { flex: 1; }
      .sidebar-bottom { margin-top: 32px; }
      .project-card.open .project-card-details { grid-template-columns: 1fr; }
      .project-generations-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
    }

    @media (max-width: 680px) {
      .topbar { height: auto; min-height: 61px; }
      .topbar-inner { gap: 14px; }
      .logo-image { width: 118px; }
      .top-actions { gap: 8px; }
      .main-cta { padding: 12px 14px; font-size: 13px; }
      .cart-btn { display: none; }
      .stats-grid, .gen-row, .gallery-grid, .credit-grid, .package-grid, .settings-grid, .settings-list, .project-detail-grid, .workspace-summary-grid, .workspace-management-grid, .workspace-insight-grid, .support-grid, .billing-admin-grid, .billing-metrics-grid, .billing-limit-form, .tariff-row { grid-template-columns: 1fr; }
      .project-detail-field.full { grid-column: auto; }
      .tariff-admin-panel .tariff-list { grid-template-columns: 1fr; }
      .tariff-plan-row { padding: 14px; }
      .tariff-row-actions { justify-content: flex-start; }
      .tariff-plan-row .tariff-row-actions { position: static; }
      .role-row, .rollout-step { grid-template-columns: 1fr; align-items: flex-start; }
      .section-top { align-items: flex-start; flex-direction: column; }
      .searchbar { min-width: 0; width: 100%; }
      .panel { padding: 16px; }
      .stat-card { min-height: 128px; padding: 22px; }
      .gallery-card .thumb { height: 190px; }
      .table-wrap { overflow-x: auto; }
      .table { min-width: 620px; }
      .modal-option {
        align-items: flex-start;
      }
      .modal-option > span {
        flex-direction: column;
        gap: 5px;
      }
      .image-nav {
        width: 44px;
        height: 68px;
        font-size: 58px;
      }
      .image-nav.prev { left: 18px; }
      .image-nav.next { right: 18px; }
    }
