:root {
      /* surfaces */
      --bg-primary: #0b0b10;
      --bg-secondary: #131318;
      --bg-tertiary: #1a1a21;
      --bg-input: #1e1e27;
      --bg-hover: #24242f;

      /* purple accent — used for selection/active/primary, not decoration */
      --purple-300: #c4b5fd;
      --purple-400: #a78bfa;
      --purple-500: #8b5cf6;
      --purple-600: #7c3aed;
      --purple-700: #6d28d9;
      --accent: var(--purple-500);
      --accent-hover: #9a6cf7;
      --accent-soft: rgba(139, 92, 246, 0.1);
      --accent-soft-strong: rgba(139, 92, 246, 0.16);
      --accent-border: rgba(139, 92, 246, 0.28);
      --purple-glow: rgba(139, 92, 246, 0.08);
      --purple-glow-md: rgba(139, 92, 246, 0.14);
      --purple-border: rgba(139, 92, 246, 0.18);

      /* text */
      --text-primary: #f5f5f7;
      --text-secondary: #d4d4d8;
      --text-tertiary: #9a9aa5;
      --text-quaternary: #6b6b76;
      --text-disabled: #52525e;

      /* semantic */
      --success: #22c55e;
      --success-soft: rgba(34, 197, 94, 0.12);
      --success-border: rgba(34, 197, 94, 0.3);
      --warning: #f59e0b;
      --warning-soft: rgba(245, 158, 11, 0.12);
      --warning-border: rgba(245, 158, 11, 0.3);
      --error: #ef4444;
      --error-soft: rgba(239, 68, 68, 0.12);
      --info: #38bdf8;
      --info-soft: rgba(56, 189, 248, 0.12);

      /* borders */
      --border-subtle: rgba(255, 255, 255, 0.055);
      --border-medium: rgba(255, 255, 255, 0.09);
      --border-strong: rgba(255, 255, 255, 0.14);

      /* shadows */
      --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
      --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.45), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
      --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.55), 0 4px 10px -4px rgba(0, 0, 0, 0.35);
      --shadow-purple-md: 0 4px 14px -4px rgba(139, 92, 246, 0.28);

      /* radius */
      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 14px;
      --radius-xl: 16px;
      --radius-pill: 999px;

      /* spacing scale */
      --space-1: 4px;
      --space-2: 8px;
      --space-3: 12px;
      --space-4: 16px;
      --space-5: 20px;
      --space-6: 24px;
      --space-8: 32px;
      --space-10: 40px;
      --space-12: 48px;

      /* type scale */
      --text-xs: 0.75rem;
      --text-sm: 0.8125rem;
      --text-base: 0.9375rem;
      --text-md: 1rem;
      --text-lg: 1.125rem;
      --text-xl: 1.375rem;
      --text-2xl: 1.75rem;

      /* motion + focus */
      --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
      --transition-fast: 130ms var(--ease);
      --transition-med: 200ms var(--ease);
      --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.35);
    }

    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

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

    :focus:not(:focus-visible) {
      outline: none;
    }

    html {
      font-size: 16px;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
      font-size: var(--text-base);
      background: var(--bg-primary);
      color: var(--text-secondary);
      min-height: 100vh;
      line-height: 1.55;
      overflow-x: hidden;
      position: relative;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
      opacity: 0.35;
      pointer-events: none;
      z-index: 1;
      mix-blend-mode: overlay;
    }

    .container {
      position: relative;
      z-index: 2;
      max-width: 780px;
      margin: 0 auto;
      padding: var(--space-8) var(--space-5) var(--space-12);
    }

    header {
      text-align: left;
      margin-bottom: var(--space-8);
      padding-left: 2px;
    }

    h1 {
      font-size: clamp(1.5rem, 4vw, 2rem);
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.02em;
      line-height: 1.2;
      margin-bottom: var(--space-2);
    }

    .subtitle {
      font-size: var(--text-base);
      color: var(--text-tertiary);
      max-width: 480px;
    }

    .card {
      background: var(--bg-secondary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-lg);
      padding: var(--space-6);
      margin-bottom: var(--space-4);
    }

    .input-group {
      margin-bottom: var(--space-5);
    }

    .input-group:last-of-type {
      margin-bottom: 0;
    }

    .label-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 13px;
    }

    label {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 0.02em;
    }

    input[type="number"] {
      width: 100%;
      padding: 14px 16px;
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: 11px;
      color: var(--text-primary);
      font-size: 1.125rem;
      font-weight: 500;
      font-family: inherit;
      transition: all 0.22s ease-out;
      outline: none;
    }

    input[type="number"]:hover {
      border-color: var(--accent-border);
    }

    input[type="number"]:focus {
      border-color: var(--purple-500);
      box-shadow: var(--focus-ring);
      background: var(--bg-hover);
    }

    input[type="number"]::placeholder {
      color: var(--text-quaternary);
    }

    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
      opacity: 1;
      height: 32px;
    }

    .result-label {
      font-size: 0.8125rem;
      font-weight: 600;
      text-transform: capitalize;
      letter-spacing: 0.01em;
      color: var(--purple-400);
      margin-bottom: 8px;
    }

    .result-eur {
      font-size: clamp(2rem, 6vw, 2.5rem);
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.02em;
      transition: transform 0.3s ease;
      font-variant-numeric: tabular-nums;
    }

    .result-eur.updated {
      animation: numberPop 0.3s ease;
    }

    @keyframes numberPop {
      0% { transform: scale(1); }
      50% { transform: scale(1.02); }
      100% { transform: scale(1); }
    }

    .result-ron {
      font-size: 1.125rem;
      font-weight: 500;
      color: var(--text-tertiary);
      margin-top: 4px;
    }

    .exchange-rate {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-top: var(--space-6);
      padding: 10px 16px;
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      border-radius: var(--radius-xl);
      font-size: var(--text-sm);
      color: var(--text-secondary);
      cursor: pointer;
      transition: background var(--transition-fast), border-color var(--transition-fast);
    }

    .exchange-rate:hover {
      background: var(--accent-soft-strong);
      border-color: var(--accent-border);
    }

    .exchange-rate .icon {
      color: var(--purple-400);
    }

    .exchange-rate .rate {
      font-weight: 600;
      font-family: inherit;
    }

    .exchange-rate .loading {
      color: var(--text-quaternary);
      font-style: italic;
    }

    .breakdown-card {
      border-radius: 14px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 6px 16px rgba(0, 0, 0, 0.1);
      animation-delay: 0.35s;
    }

    .breakdown-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      user-select: none;
      padding: 4px 0;
      transition: color 180ms ease;
    }

    .breakdown-header:hover {
      color: var(--purple-400);
    }

    .breakdown-header:hover .chevron {
      color: var(--purple-500);
    }

    .breakdown-header h3 {
      margin-bottom: 0;
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 0.02em;
    }

    .breakdown-header .chevron {
      transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), color 180ms ease;
      color: var(--text-tertiary);
      flex-shrink: 0;
    }

    .breakdown-header.open .chevron {
      transform: rotate(180deg);
      color: var(--purple-400);
    }

    .breakdown-content {
      max-height: 0;
      overflow: hidden;
      transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1), padding-top 350ms ease;
      padding-top: 0;
      font-size: 0.875rem;
      line-height: 1.8;
      color: var(--text-tertiary);
    }

    .breakdown-content.open {
      max-height: 400px;
      padding-top: 16px;
    }

    .breakdown-line {
      display: flex;
      justify-content: space-between;
      padding: 4px 0;
    }

    .breakdown-line .operator {
      color: var(--purple-400);
    }

    .breakdown-line .result {
      color: var(--text-primary);
      font-weight: 500;
    }

    .breakdown-line .final {
      color: var(--success);
      font-weight: 600;
    }

    .breakdown-divider {
      height: 1px;
      background: var(--border-medium);
      margin: 8px 0;
    }

    footer {
      text-align: center;
      margin-top: var(--space-8);
      font-size: var(--text-xs);
      color: var(--text-quaternary);
    }

    .hidden {
      display: none !important;
    }

    select {
      width: 100%;
      padding: 13px 14px;
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: 11px;
      color: var(--text-primary);
      font-size: 0.9375rem;
      font-weight: 500;
      font-family: inherit;
      transition: all 0.22s ease-out;
      outline: none;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 38px;
    }

    select:hover {
      border-color: var(--accent-border);
    }

    select:focus {
      border-color: var(--purple-500);
      box-shadow: var(--focus-ring);
      background-color: var(--bg-hover);
    }

    select option {
      background: var(--bg-secondary);
      color: var(--text-primary);
    }

    .receipt-card {
      border: none;
      border-radius: var(--radius-lg);
      background: transparent;
      padding: 0;
      overflow: visible;
    }

    .receipt {
      background: var(--bg-tertiary);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-md);
      position: relative;
    }

    .receipt-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      padding: 16px 24px;
      background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    }

    .receipt-header-brand {
      display: flex;
      align-items: center;
      gap: 13px;
      color: #fff;
      min-width: 0;
    }

    .receipt-header-brand > svg {
      width: 36px;
      height: 36px;
      flex-shrink: 0;
      padding: 8px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.18);
      box-sizing: border-box;
    }

    .receipt-header-text h3 {
      margin-bottom: 0;
      font-size: 1.2rem;
      font-weight: 800;
      color: #fff;
      letter-spacing: -0.02em;
      line-height: 1.05;
      white-space: nowrap;
    }

    .receipt-header-text h3 .wm-accent { color: #c4b5fd; }

    .receipt-header-text p {
      display: inline-block;
      margin-top: 5px;
      padding: 2px 9px 3px;
      font-size: 0.55rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: #e9d5ff;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 999px;
      line-height: 1.5;
      white-space: nowrap;
    }

    .receipt-meta {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border-subtle);
    }

    .receipt-meta-cell {
      display: flex;
      flex-direction: column;
      gap: 3px;
      padding: 12px 20px 13px;
      border-left: 1px solid var(--border-subtle);
    }

    .receipt-meta-cell:first-child { border-left: none; }

    .receipt-meta-cell span {
      font-size: 0.6rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-quaternary);
    }

    .receipt-meta-cell b {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text-primary);
      overflow-wrap: anywhere;
    }

    .receipt-meta-cell b.est {
      color: var(--warning);
    }

    .receipt-body {
      padding: 28px 30px 32px;
      background: var(--bg-tertiary);
    }

    .receipt-section-title {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 0.7rem;
      font-weight: 800;
      color: var(--purple-400);
      text-transform: uppercase;
      letter-spacing: 0.14em;
      margin: 28px 0 4px;
    }

    .receipt-section-title:first-child {
      margin-top: 0;
    }

    .receipt-section-title::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--accent-border);
    }

    .receipt-row {
      display: flex;
      flex-direction: column;
      gap: 3px;
      padding: 11px 0 12px;
      border-top: 1px solid var(--border-subtle);
    }

    .receipt-row:first-of-type {
      border-top: none;
    }

    .receipt-row .label {
      font-size: 0.66rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      color: var(--text-quaternary);
    }

    .receipt-row .value {
      font-size: 0.9688rem;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1.55;
      text-align: left;
      overflow-wrap: anywhere;
    }

    .receipt-row .value .sub {
      display: inline-block;
      margin-left: 8px;
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--text-tertiary);
    }

    .receipt-total {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      padding: 16px 20px;
      margin: 16px 0 4px;
      background: var(--bg-secondary);
      border: 1px solid var(--accent-border);
      border-radius: var(--radius-md);
    }

    .receipt-total .label {
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-secondary);
    }

    .receipt-total .value {
      font-size: 1.5rem;
      font-weight: 750;
      color: var(--purple-400);
      text-align: right;
      line-height: 1.1;
    }

    .receipt-total .value .sub {
      display: block;
      font-size: 0.8rem;
      font-weight: 550;
      color: var(--text-tertiary);
      margin-top: 4px;
    }

    .receipt-footer {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: var(--space-5) var(--space-6) var(--space-6);
      background: var(--bg-secondary);
      border-top: 1px solid var(--border-subtle);
      color: var(--text-tertiary);
      font-size: var(--text-sm);
      text-align: center;
      line-height: 1.6;
    }

    .receipt-footer svg {
      color: var(--purple-400);
      flex-shrink: 0;
    }

    .receipt-footer-text b { color: var(--text-primary); }

    @media (max-width: 768px) {
      .form-row.two-col { grid-template-columns: 1fr; }
    }

    @media (max-width: 640px) {
      .container {
        padding: 36px 16px 48px;
      }

      header {
        padding-left: 0;
      }

      .card {
        padding: var(--space-6);
      }

      .receipt-body {
        padding: 22px 20px 26px;
      }

      .receipt-header {
        padding: 14px 18px;
        gap: 10px;
      }

      .receipt-meta-cell {
        padding: 11px 14px 12px;
      }

      .receipt-header-text h3 {
        font-size: 1.05rem;
      }

      .receipt-header-text p {
        font-size: 0.54rem;
      }

      .receipt-total .value {
        font-size: 1.35rem;
      }

      input[type="number"],
      input[type="text"],
      input[type="password"] {
        font-size: 1rem;
      }
    }

    @media (max-width: 480px) {
      .container {
        padding: 28px 14px 40px;
      }

      .card {
        padding: var(--space-5);
      }

      .receipt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
      }

      .receipt-body {
        padding: 18px 16px 22px;
      }

      .receipt-section-title {
        font-size: 0.75rem;
      }

      .receipt-row .value .sub {
        font-size: 0.75rem;
      }

      .receipt-total .value {
        font-size: 1.25rem;
      }
    }

    /* ============ Admin secret page (Discord-style) ============ */
    #admin-gate {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: var(--bg-primary);
      display: none;
      align-items: center;
      justify-content: center;
      overflow-y: auto;
      opacity: 0;
      transition: opacity 0.25s ease;
    }
    #admin-gate.show {
      opacity: 1;
    }
    #admin-gate .gate-card {
      width: 100%;
      max-width: 360px;
      margin: 20px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-lg);
      padding: 30px;
      box-shadow: var(--shadow-lg);
    }
    #admin-gate .gate-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
    }
    #admin-gate .gate-brand .logo {
      width: 46px;
      height: 46px;
      border-radius: var(--radius-md);
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 800;
      font-size: 20px;
      box-shadow: var(--shadow-sm);
    }
    #admin-gate h2 {
      margin: 0;
      color: var(--text-primary);
      font-size: 20px;
      letter-spacing: -0.01em;
    }
    #admin-gate .gate-sub {
      margin: 2px 0 0;
      color: var(--text-quaternary);
      font-size: 13px;
    }
    #admin-gate input[type="password"],
    #admin-gate input[type="text"] {
      width: 100%;
      box-sizing: border-box;
      padding: 12px 14px;
      background: var(--bg-primary);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: 15px;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    #admin-gate input[type="password"]:focus,
    #admin-gate input[type="text"]:focus {
      border-color: var(--accent);
      box-shadow: var(--focus-ring);
    }
    #admin-gate input[type="password"] {
      margin-top: 10px;
    }
    #admin-gate .gate-btn {
      width: 100%;
      margin-top: 14px;
      padding: 12px;
      background: var(--accent);
      color: #fff;
      font-size: 15px;
      font-weight: 600;
      border: none;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background var(--transition-fast), transform 0.1s;
    }
    #admin-gate .gate-btn:hover {
      background: var(--accent-hover);
    }
    #admin-gate .gate-btn:active {
      transform: translateY(1px);
    }
    #admin-gate .error {
      color: var(--error);
      font-size: 13px;
      margin-top: 10px;
      min-height: 18px;
    }
    #admin-gate .error.shake {
      animation: shake 0.3s;
    }
    #admin-gate .gate-back {
      width: 100%;
      margin-top: 8px;
      padding: 10px;
      background: transparent;
      border: 1px solid var(--border-strong);
      color: var(--text-tertiary);
      font-size: 13px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: border-color 0.2s, color 0.2s;
    }
    #admin-gate .gate-back:hover {
      border-color: var(--accent-border);
      color: var(--text-primary);
    }
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-6px); }
      75% { transform: translateX(6px); }
    }

    /* Loading overlay */
    #admin-loading {
      position: fixed;
      inset: 0;
      z-index: 1100;
      background: var(--bg-primary);
      display: none;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 18px;
    }
    #admin-loading.show {
      display: flex;
    }
    #admin-loading .spin-logo {
      width: 62px;
      height: 62px;
      border-radius: var(--radius-md);
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 800;
      font-size: 26px;
      animation: pulse-logo 1.4s ease-in-out infinite;
      box-shadow: var(--shadow-sm);
    }
    @keyframes pulse-logo {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.05); opacity: 0.9; }
    }
    #admin-loading .loading-dots {
      display: flex;
      gap: 6px;
    }
    #admin-loading .loading-dots span {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
      animation: dot-bounce 1.2s ease-in-out infinite;
    }
    #admin-loading .loading-dots span:nth-child(2) { animation-delay: 0.15s; }
    #admin-loading .loading-dots span:nth-child(3) { animation-delay: 0.3s; }
    @keyframes dot-bounce {
      0%, 100% { transform: translateY(0); opacity: 0.5; }
      50% { transform: translateY(-8px); opacity: 1; }
    }
    #admin-loading .loading-text {
      color: var(--text-tertiary);
      font-size: 14px;
    }

    /* Two-pane shell */
    #admin-panel {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: var(--bg-primary);
      display: none;
      opacity: 0;
      transition: opacity var(--transition-fast) ease;
    }
    #admin-panel.show {
      opacity: 1;
    }
    #admin-panel .shell {
      display: flex;
      height: 100vh;
      width: 100%;
      max-width: 100%;
      overflow: hidden;
    }
    #mobile-topbar {
      display: none;
    }
    #admin-scrim {
      display: none;
    }
    #admin-sidebar {
      width: 232px;
      flex-shrink: 0;
      height: 100%;
      background: var(--bg-tertiary);
      display: flex;
      flex-direction: column;
      border-right: 1px solid var(--border-medium);
    }
    #admin-sidebar .sb-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 14px 12px;
    }
    #admin-sidebar .sb-brand .logo {
      width: 34px;
      height: 34px;
      border-radius: var(--radius-md);
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 750;
      font-size: 16px;
    }
    #admin-sidebar .sb-brand .t {
      font-weight: 700;
      color: var(--text-primary);
      font-size: 15px;
      letter-spacing: -0.01em;
    }
    #admin-sidebar .sb-section {
      padding: 12px 14px 6px;
      font-size: 11px;
      font-weight: 650;
      letter-spacing: 0.08em;
      color: var(--text-quaternary);
      text-transform: uppercase;
    }
    #admin-sidebar .nav-btn + .sb-section {
      padding-top: 14px;
    }
    #admin-sidebar .nav-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 1px 8px;
      padding: 8px 10px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: var(--radius-sm);
      color: var(--text-tertiary);
      font-size: 15px;
      cursor: pointer;
      text-align: left;
      transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    }
    #admin-sidebar .nav-btn .hash {
      font-size: 19px;
      line-height: 1;
      color: var(--text-quaternary);
      transition: color var(--transition-fast);
      flex-shrink: 0;
    }
    #admin-sidebar .nav-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }
    #admin-sidebar .nav-btn:hover .hash {
      color: var(--text-tertiary);
    }
    #admin-sidebar .nav-btn.active {
      background: var(--accent-soft);
      color: var(--text-primary);
      border-color: var(--accent-border);
    }
    #admin-sidebar .nav-btn.active .hash {
      color: var(--purple-300);
    }
    #admin-sidebar .sb-empty {
      flex: 1;
    }
    #admin-sidebar .sb-user {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      margin: 0 8px 10px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
    }
    #admin-sidebar .sb-user .u-avatar {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 14px;
      flex-shrink: 0;
    }
    #admin-sidebar .sb-user .u-name {
      flex: 1;
      min-width: 0;
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #admin-sidebar .sb-exit {
      background: transparent;
      border: 1px solid var(--border-medium);
      color: var(--text-tertiary);
      border-radius: var(--radius-sm);
      margin: 0 8px 10px;
      padding: 8px;
      font-size: 12px;
      cursor: pointer;
      transition: border-color var(--transition-fast), color var(--transition-fast);
    }
    #admin-sidebar .sb-exit:hover {
      border-color: var(--error);
      color: var(--error);
    }

    #admin-content {
      flex: 1;
      min-width: 0;
      height: 100%;
      display: flex;
      flex-direction: column;
      background: var(--bg-secondary);
      overflow-y: auto;
    }
    .content-view {
      display: none;
      flex-direction: column;
      height: 100%;
      min-height: 0;
    }
    .content-view.active {
      display: flex;
    }
    #admin-setup-note {
      display: none;
      margin: 16px 20px 0;
    }
    .setup-note {
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      color: var(--purple-300);
      border-radius: var(--radius-md);
      padding: 14px 16px;
      font-size: 13px;
      line-height: 1.6;
      white-space: pre-wrap;
    }

    /* Chat */
    #admin-chat .ch-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border-medium);
      background: var(--bg-secondary);
    }
    #admin-chat .ch-header .hash {
      color: var(--text-quaternary);
      font-size: 24px;
      line-height: 1;
    }
    #admin-chat .ch-header .t {
      color: var(--text-primary);
      font-weight: 700;
      font-size: 16px;
    }
    #admin-chat .ch-header .live {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--success);
      font-size: 12px;
      font-weight: 600;
    }
    #admin-chat .ch-header .live .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--success);
    }
    #admin-chat .ch-header .typing-ind {
      color: var(--purple-300);
      font-size: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      opacity: 0;
      transform: translateY(-2px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      white-space: nowrap;
    }
    #admin-chat .ch-header .typing-ind.show { opacity: 1; transform: translateY(0); }
    .typing-dots { display: inline-flex; gap: 3px; }
    .typing-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--purple-300); animation: tdot 1.2s infinite ease-in-out; }
    .typing-dots span:nth-child(2) { animation-delay: 0.15s; }
    .typing-dots span:nth-child(3) { animation-delay: 0.3s; }
    @keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
    .edit-pill {
      display: none;
      align-self: flex-start;
      align-items: center;
      gap: 8px;
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      color: var(--purple-300);
      border-radius: var(--radius-sm);
      padding: 6px 10px;
      font-size: 12.5px;
      animation: msgIn 0.2s ease;
    }
    .edit-pill.show { display: flex; }
    .msg-feed {
      flex: 1;
      overflow-y: auto;
      padding: 18px 20px 10px;
      display: flex;
      flex-direction: column;
    }
    .msg-empty {
      color: var(--text-disabled);
      text-align: center;
      font-size: 13px;
      margin-top: 40px;
    }
    .msg {
      display: flex;
      gap: 14px;
      padding: 4px 12px;
      border-radius: var(--radius-sm);
      margin: 0 -12px;
      position: relative;
    }
    .msg:hover {
      background: var(--bg-hover);
    }
    .msg.avatar-gap {
      margin-top: 14px;
    }
    .msg .ava {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 16px;
      flex-shrink: 0;
      margin-top: 2px;
      overflow: hidden;
      background-size: cover;
      background-position: center;
    }
    .msg .ava img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .msg.grouped .ava {
      visibility: hidden;
    }
    .msg .m-body {
      flex: 1;
      min-width: 0;
    }
    .msg .m-header {
      display: flex;
      align-items: baseline;
      gap: 8px;
      flex-wrap: wrap;
    }
    .msg .m-name {
      font-weight: 700;
      font-size: 15px;
    }
    .msg .m-time {
      color: var(--text-quaternary);
      font-size: 11px;
    }
    .msg .m-text {
      color: var(--text-primary);
      font-size: 15px;
      line-height: 1.45;
      word-break: break-word;
      white-space: pre-wrap;
    }
    .msg.grouped .m-header {
      display: none;
    }

    @keyframes msgIn {
      from { opacity: 0; transform: translateY(10px) scale(0.99); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .msg.msg-enter { animation: msgIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

    .msg .m-pointer {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      border-radius: var(--radius-sm);
      background: var(--accent);
      opacity: 0;
      transform: scaleY(0.5);
      transition: opacity var(--transition-fast), transform var(--transition-fast);
      pointer-events: none;
    }
    .msg:hover .m-pointer { opacity: 1; transform: scaleY(1); }

    .m-text .edited-mark { color: var(--text-quaternary); font-size: 11px; font-weight: 600; margin-left: 6px; }
    .m-text.diff-flash { animation: diffFlash 1s ease-out; }
    @keyframes diffFlash {
      0% { background: rgba(139, 92, 246, 0.2); border-radius: var(--radius-sm); }
      100% { background: transparent; }
    }
    .msg.msg-removing { animation: msgOut 0.25s ease forwards; overflow: hidden; }
    @keyframes msgOut {
      0% { opacity: 1; transform: translateY(0); max-height: 200px; }
      100% { opacity: 0; transform: translateY(-8px); max-height: 0; padding-top: 0; padding-bottom: 0; }
    }
    .chat-input {
      border-top: 1px solid var(--border-medium);
      padding: 14px 20px 18px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: var(--bg-secondary);
    }
    .chat-input .ci-row {
      display: flex;
      gap: 10px;
    }
    .chat-input .ci-row input {
      flex: 1;
      min-width: 0;
      padding: 11px 13px;
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: 15px;
      outline: none;
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }
    .chat-input .ci-row input:focus {
      border-color: var(--accent);
      box-shadow: var(--focus-ring);
    }
    .chat-input .ci-send {
      padding: 11px 22px;
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: background var(--transition-fast);
    }
    .chat-input .ci-send:hover {
      background: var(--accent-hover);
    }
    .chat-input .ci-send:active {
      transform: translateY(1px);
    }
    .admin-hint {
      color: var(--text-disabled);
      font-size: 12px;
    }

    /* Purchases */
    #admin-purchases {
      overflow-y: auto;
    }
    #admin-purchases .pu-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border-medium);
    }
    #admin-purchases .pu-header .hash {
      color: var(--text-tertiary);
      font-size: 24px;
      line-height: 1;
    }
    #admin-purchases .pu-header .t {
      color: var(--text-primary);
      font-weight: 700;
      font-size: 16px;
    }
    #admin-purchases .pu-header .owner-chip {
      margin-left: auto;
      color: var(--text-quaternary);
      font-size: 11.5px;
      font-weight: 600;
      letter-spacing: 0.02em;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-pill);
      padding: 3px 10px;
      white-space: nowrap;
    }
    #admin-purchases .pu-body {
      padding: 20px;
    }
    #admin-purchases .log-btn {
      width: 100%;
      margin-bottom: 18px;
      padding: 12px 14px;
      background: var(--accent);
      color: #fff;
      border: 1px solid transparent;
      border-radius: var(--radius-md);
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: background var(--transition-fast);
    }
    #admin-purchases .log-btn:hover {
      background: var(--accent-hover);
    }
    #admin-purchases .log-btn:active {
      transform: translateY(1px);
    }
    #admin-clients .pu-body {
      padding: 20px;
    }
    .cl-input {
      margin-bottom: 14px;
    }
    .cl-input input {
      width: 100%;
      padding: 11px 13px;
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: 14px;
      outline: none;
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }
    .cl-input input:focus {
      border-color: var(--accent);
      box-shadow: var(--focus-ring);
    }
    .client-item {
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      margin-bottom: 10px;
      overflow: hidden;
    }
    .client-item.open {
      border-color: var(--accent-border);
    }
    .client-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      cursor: pointer;
      transition: background var(--transition-fast);
    }
    .client-row:hover {
      background: var(--bg-hover);
    }
    .client-avatar {
      width: 36px;
      height: 36px;
      flex: 0 0 36px;
      border-radius: var(--radius-md);
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      color: var(--purple-300);
      font-weight: 750;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
    }
    .client-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .client-main b {
      color: var(--text-primary);
      font-size: 14px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .client-sub {
      font-size: 12px;
      color: var(--text-quaternary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .client-count {
      padding: 3px 9px;
      background: var(--accent-soft);
      color: var(--purple-300);
      border-radius: var(--radius-pill);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .client-del {
      background: var(--error-soft);
      color: var(--error);
      border: 1px solid rgba(239, 68, 68, 0.3);
      border-radius: var(--radius-sm);
      padding: 5px 10px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: background var(--transition-fast);
    }
    .client-del:hover {
      background: rgba(239, 68, 68, 0.2);
    }
    .client-detail {
      border-top: 1px solid var(--border-medium);
      padding: 12px 14px;
      background: var(--bg-primary);
    }
    .client-detail .cd-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 14px;
      font-size: 13px;
    }
    .client-detail .cd-grid .k {
      color: var(--text-quaternary);
    }
    .client-detail .cd-grid .v {
      color: var(--text-primary);
      overflow-wrap: anywhere;
    }
    .client-empty {
      color: var(--text-quaternary);
      text-align: center;
      padding: 30px 0;
      font-size: 14px;
    }
    #admin-pricing .pu-body, #admin-reports .pu-body {
      padding: 20px;
    }
    .pricing-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .price-card {
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 14px 14px 12px;
      transition: border-color var(--transition-fast);
    }
    .price-card.custom {
      border-color: var(--accent-border);
    }
    .price-card-head {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
    }
    .price-lvl-badge {
      width: 42px;
      height: 34px;
      border-radius: var(--radius-sm);
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      color: var(--purple-300);
      font-weight: 750;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 42px;
    }
    .price-card-name {
      min-width: 0;
    }
    .price-card-name b {
      display: block;
      color: var(--text-primary);
      font-size: 13.5px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .price-card-name span {
      display: block;
      font-size: 11px;
      color: var(--text-quaternary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .price-card-body {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .price-input-wrap {
      display: flex;
      align-items: center;
      gap: 2px;
      padding: 9px 11px;
      background: var(--bg-primary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 700;
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }
    .price-input-wrap:focus-within {
      border-color: var(--accent);
      box-shadow: var(--focus-ring);
    }
    .price-input-wrap .cur {
      color: var(--text-quaternary);
      font-weight: 600;
      margin-right: 2px;
    }
    .price-input {
      width: 72px;
      background: transparent;
      border: none;
      outline: none;
      color: var(--text-primary);
      font-size: 14px;
      font-weight: 700;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }
    .price-default {
      color: var(--text-quaternary);
      font-size: 11px;
      margin-left: auto;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .price-card-foot {
      display: flex;
      align-items: center;
      margin-top: 11px;
      padding-top: 10px;
      border-top: 1px solid var(--border-subtle);
    }
    .price-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 10.5px;
      font-weight: 800;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      padding: 3px 9px;
      border-radius: 999px;
    }
    .price-badge .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }
    .price-badge.custom {
      color: var(--purple-300);
      background: var(--accent-soft);
    }
    .price-badge.default {
      color: var(--text-tertiary);
      background: var(--border-subtle);
    }
    .pricing-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 16px;
      padding: 14px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
    }
    .pricing-actions .pa-info {
      flex: 1;
      color: var(--text-quaternary);
      font-size: 12.5px;
      line-height: 1.45;
    }
    .pricing-actions .pa-buttons {
      display: flex;
      gap: 10px;
    }
    .pricing-actions .log-btn {
      margin-bottom: 0;
      padding: 11px 18px;
      font-size: 13.5px;
      white-space: nowrap;
    }
    .log-btn.ghost {
      background: transparent;
      border: 1px solid var(--border-strong);
      color: var(--text-secondary);
    }
    .log-btn.ghost:hover {
      border-color: var(--accent-border);
      color: var(--purple-300);
    }
    .rep-cards {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 18px;
    }
    .rep-card {
      position: relative;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 14px 16px;
      overflow: hidden;
    }
    .rep-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--acc, var(--accent));
    }
    .rep-card .rc-label {
      color: var(--text-quaternary);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rep-card .rc-value {
      color: var(--text-primary);
      font-size: 22px;
      font-weight: 800;
      margin-top: 7px;
      font-variant-numeric: tabular-nums;
      letter-spacing: -0.01em;
    }
    .rep-card .rc-value .unit {
      color: var(--text-quaternary);
      font-size: 13px;
      font-weight: 700;
      margin-left: 2px;
    }
    .rep-card .rc-sub {
      color: var(--text-quaternary);
      font-size: 12px;
      margin-top: 5px;
    }
    .rep-card .rc-sub em {
      color: var(--acc);
      font-style: normal;
      font-weight: 700;
    }
    .rep-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .rep-col {
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 16px;
    }
    .rep-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: var(--text-secondary);
      font-size: 13.5px;
      font-weight: 800;
      letter-spacing: -0.01em;
      margin-bottom: 14px;
    }
    .rep-title .rt-count {
      color: var(--text-quaternary);
      font-size: 11.5px;
      font-weight: 600;
    }
    .bar-list {
      display: flex;
      flex-direction: column;
      gap: 11px;
    }
    .bar-item {
      display: grid;
      grid-template-columns: 118px 1fr 96px;
      align-items: center;
      gap: 12px;
    }
    .bar-label {
      min-width: 0;
    }
    .bar-label b {
      display: block;
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 700;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .bar-label span {
      display: block;
      color: var(--text-quaternary);
      font-size: 11px;
    }
    .bar-track {
      height: 8px;
      background: var(--bg-primary);
      border-radius: var(--radius-pill);
      overflow: hidden;
    }
    .bar-fill {
      height: 100%;
      border-radius: var(--radius-pill);
      background: var(--accent);
      transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .rep-col.month .bar-fill {
      background: var(--info);
    }
    .bar-val {
      text-align: right;
    }
    .bar-val b {
      display: block;
      color: var(--text-primary);
      font-size: 13px;
      font-variant-numeric: tabular-nums;
    }
    .bar-val span {
      display: block;
      color: var(--text-quaternary);
      font-size: 11px;
      font-variant-numeric: tabular-nums;
    }
    .rep-total {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--border-subtle);
    }
    .rep-total .t-lab {
      color: var(--text-quaternary);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }
    .rep-total .t-val {
      text-align: right;
    }
    .rep-total .t-val b {
      display: block;
      color: var(--text-primary);
      font-size: 15px;
      font-variant-numeric: tabular-nums;
    }
    .rep-total .t-val span {
      display: block;
      color: var(--text-quaternary);
      font-size: 11.5px;
      font-variant-numeric: tabular-nums;
    }
    .rep-empty {
      color: var(--text-quaternary);
      font-size: 13px;
      padding: 16px 0;
      text-align: center;
    }
    .purchase-item {
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      margin-bottom: 10px;
      overflow: hidden;
    }
    .purchase-item.open {
      border-color: var(--accent-border);
    }
    .purchase-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      cursor: pointer;
      transition: background var(--transition-fast);
    }
    .purchase-row:hover {
      background: var(--bg-hover);
    }
    .purchase-row .p-id {
      padding: 4px 9px;
      background: var(--accent-soft);
      color: var(--purple-300);
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .purchase-row .p-main {
      flex: 1;
      min-width: 0;
      color: var(--text-primary);
      font-weight: 600;
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .purchase-row .p-sub {
      color: var(--text-quaternary);
      font-size: 12px;
      margin-top: 3px;
      text-align: right;
      flex-shrink: 0;
    }
    .purchase-row .p-acts {
      display: flex;
      gap: 6px;
      flex-shrink: 0;
    }
    .purchase-row .p-act {
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      color: var(--purple-300);
      padding: 5px 11px;
      font-size: 12px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color var(--transition-fast), background var(--transition-fast);
    }
    .purchase-row .p-act:hover {
      border-color: var(--accent);
      background: rgba(139, 92, 246, 0.18);
    }
    .purchase-row .p-del {
      background: var(--error-soft);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: var(--error);
      padding: 5px 11px;
      font-size: 12px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color var(--transition-fast), background var(--transition-fast);
    }
    .purchase-row .p-del:hover {
      border-color: var(--error);
      background: rgba(248, 113, 113, 0.16);
    }
    .purchase-row .p-chev {
      color: var(--text-quaternary);
      flex-shrink: 0;
      transition: transform var(--transition-fast);
      font-size: 12px;
    }
    .purchase-item.open .p-chev {
      transform: rotate(90deg);
      color: var(--purple-400);
    }
    .purchase-detail {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
      background: var(--bg-primary);
    }
    .purchase-item.open .purchase-detail {
      max-height: 600px;
    }
    .purchase-detail .pd-inner {
      padding: 4px 14px 14px;
    }
    .purchase-detail .pd-dl {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 10px;
    }
    .purchase-detail .pd-cell {
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
    }
    .purchase-detail .pd-cell .k {
      color: var(--text-quaternary);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 3px;
    }
    .purchase-detail .pd-cell .v {
      color: var(--text-primary);
      font-size: 14px;
      font-weight: 500;
    }
    .purchase-detail .pd-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-medium);
    }
    .purchase-detail .pd-act {
      flex: 1;
      padding: 9px 12px;
      background: var(--accent-soft);
      color: var(--purple-300);
      border: 1px solid var(--accent-border);
      border-radius: var(--radius-sm);
      font-size: 12.5px;
      font-weight: 650;
      cursor: pointer;
      transition: background var(--transition-fast), transform 0.1s;
    }
    .purchase-detail .pd-act:hover {
      background: rgba(139, 92, 246, 0.2);
    }
    .purchase-detail .pd-act:active {
      transform: translateY(1px);
    }
    .pushed-note {
      color: var(--success);
      font-size: 12px;
      margin-top: 12px;
      text-align: center;
      min-height: 16px;
    }
    .purchase-empty {
      color: var(--text-disabled);
      text-align: center;
      font-size: 13px;
      padding: 30px 0;
    }

    /* Responsive */
    @media (max-width: 640px) {
      #admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 2000;
        width: 270px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
      }
      #admin-sidebar.open {
        transform: translateX(0);
      }
      #admin-members {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        width: 270px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
      }
      #admin-members.open {
        transform: translateX(0);
      }
      #admin-scrim {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1500;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        transition: opacity 0.25s ease;
      }
      #admin-scrim.show {
        display: block;
        opacity: 1;
      }
      #mobile-topbar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--border-medium);
        flex-shrink: 0;
        background: var(--bg-tertiary);
        -webkit-app-region: no-drag;
      }
      #mobile-topbar .mtb-btn {
        background: none;
        border: 1px solid var(--border-strong);
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        width: 38px;
        height: 34px;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }
      #mobile-topbar #mtb-title {
        flex: 1;
        text-align: center;
        color: var(--text-primary);
        font-weight: 700;
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      #admin-content {
        width: 100vw;
      }
      #admin-content > .content-view {
        flex: 1;
        min-height: 0;
      }
      #admin-chat .ch-header,
      #admin-purchases .pu-header {
        padding: 10px 14px;
      }
      #admin-chat .ch-header .live {
        font-size: 11px;
      }
      .purchase-row .p-sub {
        display: none;
      }
      .purchase-detail .pd-dl {
        grid-template-columns: 1fr;
      }
    }

    /* ---- Right-side members / presence panel ---- */
    #admin-members {
      width: 232px;
      flex-shrink: 0;
      height: 100%;
      background: var(--bg-tertiary);
      border-left: 1px solid var(--border-medium);
      overflow-y: auto;
      padding: 18px 12px;
    }
    #admin-members .mem-header {
      color: var(--text-quaternary);
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin: 16px 8px 8px;
    }
    #admin-members .mem-header:first-child { margin-top: 0; }
    #admin-members .mem-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 6px 8px;
      border-radius: var(--radius-sm);
      cursor: default;
    }
    #admin-members .mem-row:hover {
      background: var(--bg-hover);
    }
    #admin-members .mem-ava {
      position: relative;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 14px;
      flex-shrink: 0;
      overflow: hidden;
      background-size: cover;
      background-position: center;
    }
    #admin-members .mem-ava img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    #admin-members .mem-ava .presence-dot {
      position: absolute;
      bottom: -1px;
      right: -1px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2.5px solid var(--bg-tertiary);
      background: #3ba55c;
    }
    #admin-members .presence-dot.online { background: #3ba55c; }
    #admin-members .presence-dot.idle { background: #faa61a; }
    #admin-members .presence-dot.dnd { background: #ed4245; }
    #admin-members .presence-dot.offline { background: #747f8d; }
    #admin-members .mem-name {
      color: var(--text-primary);
      font-size: 14px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #admin-members .mem-me {
      color: var(--text-quaternary);
      font-size: 10px;
      margin-left: 4px;
    }

    /* ---- Profile / status controls (user chip) ---- */
    #sb-user-chip {
      position: relative;
      cursor: pointer;
    }
    #sb-user-chip .u-avatar {
      overflow: hidden;
      background-size: cover;
      background-position: center;
      cursor: pointer;
    }
    #sb-user-chip .u-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    #sb-user-chip .u-avatar .pfp-cam {
      position: absolute;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 15px;
      background: rgba(0, 0, 0, 0.5);
    }
    #sb-user-chip:hover .u-avatar .pfp-cam {
      display: flex;
    }
    .status-menu {
      position: absolute;
      bottom: calc(100% + 6px);
      left: 8px;
      z-index: 60;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 6px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 170px;
      box-shadow: var(--shadow-md);
    }
    .status-menu .sm-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: 13px;
      cursor: pointer;
      background: none;
      border: none;
      text-align: left;
    }
    .status-menu .sm-item:hover {
      background: var(--accent-soft);
    }
    .status-menu .sm-item .d { width: 10px; height: 10px; border-radius: 50%; }
    .status-menu .sm-item .d.online { background: #3ba55c; }
    .status-menu .sm-item .d.idle { background: #faa61a; }
    .status-menu .sm-item .d.dnd { background: #ed4245; }
    .status-menu .sm-item .d.offline { background: #747f8d; }
    .status-menu .sm-sep {
      height: 1px;
      background: var(--border-medium);
      margin: 4px 2px;
    }
    .status-menu .sm-item.sm-danger {
      color: var(--error);
    }
    .status-menu .sm-item.sm-danger:hover {
      background: var(--error-soft);
      color: #fff;
    }

    /* ---- Chat: message actions, reply, pin, mentions, formatting ---- */
    .msg { position: relative; }
    .m-actions {
      position: absolute;
      top: -10px;
      right: 8px;
      display: flex;
      gap: 2px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 3px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.12s;
      box-shadow: var(--shadow-md);
    }
    .msg:hover .m-actions {
      opacity: 1;
      pointer-events: auto;
    }
    .m-actions button {
      background: none;
      border: none;
      color: var(--text-tertiary);
      font-size: 13px;
      width: 26px;
      height: 24px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.12s, color 0.12s, transform 0.12s;
    }
    .m-actions button:hover { background: var(--bg-hover); color: var(--text-primary); }
    .m-actions button:active { transform: scale(0.92); }
    .m-actions button.on { color: var(--purple-300); }
    .m-actions button.on:hover { color: var(--purple-300); }
    .msg .pin-mark {
      display: inline-flex;
      align-items: center;
      margin-left: 2px;
      font-size: 12px;
      color: var(--accent);
    }
    .react-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
    .react-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      color: var(--text-primary);
      border-radius: var(--radius-pill);
      padding: 2px 8px;
      font-size: 12px;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s, transform 0.1s;
      animation: reactPop 0.2s ease;
    }
    .react-chip:hover { background: rgba(139, 92, 246, 0.2); border-color: var(--accent); }
    .react-chip:active { transform: scale(0.92); }
    .react-chip.mine { background: var(--accent); border-color: var(--accent); color: #fff; }
    @keyframes reactPop { 0% { opacity: 0; transform: scale(0.6); } 100% { opacity: 1; transform: scale(1); } }
    .react-pop {
      position: absolute;
      bottom: 30px;
      right: 0;
      display: flex;
      gap: 2px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      padding: 4px;
      box-shadow: var(--shadow-md);
      opacity: 0;
      pointer-events: none;
      transform: translateY(4px);
      transition: opacity 0.15s ease, transform 0.15s ease;
      z-index: 20;
    }
    .react-pop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .react-pop-btn {
      background: none;
      border: none;
      font-size: 18px;
      padding: 4px 6px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background 0.12s, transform 0.1s;
    }
    .react-pop-btn:hover { background: var(--bg-hover); transform: scale(1.2); }
    .m-actions button.del:hover { color: var(--error) !important; background: var(--error-soft) !important; }
    .msg .m-reply {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12.5px;
      color: var(--text-tertiary);
      margin-bottom: 3px;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .msg .m-reply .rr { color: var(--purple-300); font-weight: 600; flex-shrink: 0; }
    .msg .m-reply .rt { opacity: 0.8; overflow: hidden; text-overflow: ellipsis; }
    .msg .m-reply:hover .rt { text-decoration: underline; }
    .msg.pinned { background: rgba(139, 92, 246, 0.06); border-radius: var(--radius-sm); }

    .m-text b, .m-text strong { font-weight: 700; color: var(--text-primary); }
    .m-text i, .m-text em { font-style: italic; }
    .m-text u { text-decoration: underline; }
    .m-text s, .m-text del { text-decoration: line-through; }
    .m-text code {
      background: var(--bg-input);
      border-radius: var(--radius-sm);
      padding: 1px 5px;
      font-family: Consolas, monospace;
      font-size: 13px;
      color: var(--purple-300);
    }
    .m-text pre {
      background: var(--bg-primary);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      overflow-x: auto;
      margin: 6px 0;
    }
    .m-text pre code { background: none; padding: 0; }
    .m-text blockquote {
      margin: 4px 0;
      padding: 2px 0 2px 10px;
      border-left: 3px solid var(--accent);
      color: var(--text-secondary);
    }
    .m-text .mention {
      background: var(--accent-soft);
      color: var(--purple-300);
      border-radius: var(--radius-sm);
      padding: 0 4px;
      cursor: pointer;
      font-weight: 600;
    }
    .m-text .mention:hover { background: rgba(139, 92, 246, 0.35); color: #fff; }

    /* Chat header: pins toggle */
    #admin-chat .ch-header .pins-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-medium);
      color: var(--text-secondary);
      padding: 5px 10px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    #admin-chat .ch-header .pins-toggle:hover { color: var(--text-primary); border-color: var(--accent-border); }
    .pins-panel {
      display: none;
      border-bottom: 1px solid var(--border-medium);
      max-height: 40vh;
      overflow-y: auto;
      padding: 10px 20px;
    }
    .pins-panel.show { display: block; }
    .pins-panel .pin-title {
      color: var(--text-quaternary);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-bottom: 8px;
    }
    .pins-panel .pin-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 8px;
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: 13.5px;
      cursor: pointer;
    }
    .pins-panel .pin-row:hover { background: var(--bg-hover); }
    .pins-panel .pin-row .p-ava {
      width: 22px; height: 22px; border-radius: 50%;
      color: #fff; font-size: 11px; font-weight: 700;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; overflow: hidden; background-size: cover; background-position: center;
    }
    .pins-panel .pin-row .p-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pins-panel .pin-row .p-unpin { background: none; border: none; color: var(--text-disabled); cursor: pointer; font-size: 12px; }
    .pins-panel .pin-row .p-unpin:hover { color: var(--error); }

    /* Formatting toolbar */
    .fmt-bar {
      display: flex;
      gap: 4px;
      margin-bottom: 8px;
      flex-wrap: wrap;
    }
    .fmt-bar button {
      background: var(--bg-secondary);
      border: 1px solid var(--border-medium);
      color: var(--text-secondary);
      border-radius: var(--radius-sm);
      min-width: 30px;
      height: 28px;
      font-size: 13px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 8px;
    }
    .fmt-bar button:hover { color: var(--text-primary); border-color: var(--accent-border); background: var(--bg-hover); }

    /* Replying pill in input area */
    .reply-pill {
      display: none;
      align-items: center;
      gap: 8px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-strong);
      border-left: 3px solid var(--accent);
      border-radius: var(--radius-sm);
      padding: 7px 11px;
      margin-bottom: 9px;
      font-size: 13px;
      color: var(--text-primary);
    }
    .reply-pill.show { display: flex; }
    .reply-pill .rp-lbl {
      color: var(--purple-300);
      font-weight: 700;
      flex-shrink: 0;
    }
    .reply-pill .rp-x {
      margin-left: auto;
      background: none;
      border: none;
      color: var(--text-disabled);
      cursor: pointer;
      font-size: 15px;
      line-height: 1;
      padding: 2px 4px;
      border-radius: var(--radius-sm);
      transition: color 0.15s, background 0.15s;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .reply-pill .rp-x:hover { color: var(--error); background: var(--error-soft); }

    /* ============ Public studio UI (v2) ============ */
    .container { max-width: 1120px; }

    .site-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-4);
      margin-bottom: var(--space-8);
      flex-wrap: wrap;
    }

    .brand { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }

    .brand-logo {
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    .brand h1 { margin-bottom: 2px; font-size: clamp(1.375rem, 3.5vw, 1.75rem); }

    .btn-admin {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 15px;
      border-radius: var(--radius-md);
      font-size: var(--text-sm);
      font-weight: 600;
      font-family: inherit;
      color: var(--text-secondary);
      background: var(--bg-secondary);
      border: 1px solid var(--border-medium);
      text-decoration: none;
      cursor: pointer;
      transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
      margin-left: auto;
    }

    .btn-admin:hover {
      color: var(--text-primary);
      border-color: var(--accent-border);
      background: var(--bg-hover);
    }

    .btn-admin:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }

    .admin-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--success);
    }

    .page-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 350px;
      gap: var(--space-6);
      align-items: start;
    }

    .col-side { position: sticky; top: var(--space-6); }

    .form-card { padding: var(--space-6); }

    .card-head {
      display: flex;
      align-items: flex-start;
      gap: var(--space-3);
      margin-bottom: var(--space-5);
      padding-bottom: var(--space-4);
      border-bottom: 1px solid var(--border-subtle);
    }

    .card-head-ico {
      width: 30px;
      height: 30px;
      flex-shrink: 0;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--purple-400);
      background: var(--accent-soft);
      border: 1px solid var(--purple-border);
    }

    .card-head h2 {
      font-size: var(--text-md);
      font-weight: 650;
      color: var(--text-primary);
      letter-spacing: -0.01em;
      line-height: 1.3;
    }

    .card-head-sub {
      font-size: var(--text-sm);
      color: var(--text-tertiary);
      margin-top: 1px;
    }

    .form-row.two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-4);
    }

    .form-row.two-col .input-group { margin-bottom: 0; }

    input[type="text"],
    input[type="number"],
    textarea,
    select {
      width: 100%;
      padding: 11px 13px;
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: var(--text-base);
      font-weight: 450;
      font-family: inherit;
      transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
      outline: none;
    }

    input[type="text"]:hover,
    input[type="number"]:hover,
    textarea:hover {
      border-color: var(--border-strong);
    }

    input[type="text"]:focus,
    input[type="number"]:focus,
    textarea:focus {
      border-color: var(--accent);
      box-shadow: var(--focus-ring);
      background: var(--bg-hover);
    }

    input[type="text"]::placeholder,
    input[type="number"]::placeholder,
    textarea::placeholder {
      color: var(--text-quaternary);
      font-weight: 400;
    }

    textarea { resize: vertical; line-height: 1.55; min-height: 74px; }

    .hint-text {
      margin-top: 6px;
      font-size: var(--text-xs);
      color: var(--text-quaternary);
      line-height: 1.45;
    }

    .opt-chip {
      font-size: 0.6875rem;
      font-weight: 650;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text-tertiary);
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      padding: 2px 8px;
      border-radius: var(--radius-sm);
    }

    /* ---- Add-ons & discount ---- */
    .group-title {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 0.02em;
    }

    .addon-rule {
      padding: var(--space-3) var(--space-4);
      margin-bottom: var(--space-3);
      border-radius: var(--radius-sm);
      background: var(--info-soft);
      border: 1px solid rgba(56, 189, 248, 0.18);
      font-size: var(--text-xs);
      line-height: 1.5;
      color: var(--text-tertiary);
    }

    .addon-rule b { color: var(--text-secondary); font-weight: 600; }

    .addon-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: var(--space-2);
    }

    @media (min-width: 720px) {
      .addon-list { grid-template-columns: repeat(2, 1fr); }
    }

    .addon-item {
      display: flex;
      flex-direction: column;
      border-radius: var(--radius-md);
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      transition: border-color var(--transition-fast), background var(--transition-fast);
    }

    .addon-item:hover { border-color: var(--accent-border); }

    .addon-item.open { border-color: var(--accent-border); background: var(--bg-hover); }

    .addon-item.disabled { opacity: 0.6; }

    .addon-head {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-3) var(--space-4);
      cursor: pointer;
      border-radius: var(--radius-md);
    }

    .addon-checkbox {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      margin: 0;
      flex-shrink: 0;
      cursor: pointer;
    }

    .addon-checkbox input[type="checkbox"] {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      margin: 0;
      opacity: 0;
      cursor: pointer;
      z-index: 2;
    }

    .addon-checkbox .check-box {
      width: 20px;
      height: 20px;
      border-radius: 5px;
      border: 2px solid var(--border-strong);
      background: var(--bg-input);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
      box-sizing: border-box;
    }

    .addon-checkbox .check-box::after {
      content: '';
      width: 5px;
      height: 9px;
      border-right: 2px solid #fff;
      border-bottom: 2px solid #fff;
      transform: rotate(45deg) translate(-1.5px, -1px) scale(0.4);
      opacity: 0;
      transition: opacity 120ms ease, transform 120ms ease;
      box-sizing: border-box;
    }

    .addon-checkbox:hover .check-box { border-color: var(--purple-400); }

    .addon-checkbox input[type="checkbox"]:checked + .check-box {
      background: var(--accent);
      border-color: transparent;
    }

    .addon-checkbox input[type="checkbox"]:checked + .check-box::after {
      opacity: 1;
      transform: rotate(45deg) translate(-1.5px, -1px) scale(1);
    }

    .addon-checkbox input[type="checkbox"]:focus-visible + .check-box {
      box-shadow: var(--focus-ring);
      border-color: var(--purple-400);
    }

    .addon-checkbox input[type="checkbox"]:disabled { cursor: not-allowed; }

    .addon-checkbox input[type="checkbox"]:disabled + .check-box { opacity: 0.5; }

    .addon-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .addon-name {
      font-size: 0.875rem;
      font-weight: 700;
      color: var(--text-primary);
      transition: color 180ms ease;
    }

    .addon-item.open .addon-name { color: #fff; }

    .addon-desc {
      font-size: 0.75rem;
      line-height: 1.4;
      color: var(--text-quaternary);
    }

    .addon-price {
      flex-shrink: 0;
      font-size: var(--text-sm);
      font-weight: 600;
      color: var(--success);
      white-space: nowrap;
      padding: 3px 9px;
      border-radius: var(--radius-sm);
      background: var(--success-soft);
      border: 1px solid rgba(34, 197, 94, 0.25);
    }

    .addon-item.open .addon-price { color: var(--success); background: var(--success-soft); border-color: rgba(34, 197, 94, 0.35); }

    .addon-detail {
      display: none;
      padding: 0 var(--space-4) var(--space-4);
      padding-left: 49px;
    }

    .addon-item.open .addon-detail { display: block; }

    .addon-detail-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 7px;
    }

    .addon-detail-label {
      font-size: 0.7rem;
      font-weight: 650;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-tertiary);
    }

    .addon-detail-badge {
      font-size: 0.6rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-tertiary);
      background: var(--bg-tertiary);
      border: 1px solid var(--border-medium);
      padding: 2px 8px;
      border-radius: var(--radius-sm);
    }

    .addon-desc-input {
      width: 100%;
      min-height: 56px;
      resize: vertical;
    }

    .addon-desc-input.invalid {
      border-color: var(--error);
      box-shadow: 0 0 0 2px var(--error-soft);
    }

    .addon-item .addon-desc-error { margin-top: var(--space-2); color: var(--error); }

    .discount-row {
      display: flex;
      align-items: center;
      gap: var(--space-2);
    }

    .discount-type {
      flex-shrink: 0;
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-medium);
      background: var(--bg-input);
      color: var(--text-quaternary);
      font-size: var(--text-sm);
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
    }

    .discount-type:hover { color: var(--text-secondary); border-color: var(--accent-border); }

    .discount-type.active {
      color: #fff;
      background: var(--accent);
      border-color: transparent;
    }

    .discount-row input[type="number"] { flex: 1; }

    .discount-clear {
      flex-shrink: 0;
      width: 40px;
      height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-medium);
      background: var(--bg-input);
      color: var(--text-tertiary);
      font-size: var(--text-sm);
      font-family: inherit;
      cursor: pointer;
      transition: border-color var(--transition-fast), color var(--transition-fast);
    }

    .discount-clear:hover { color: var(--error); border-color: rgba(239, 68, 68, 0.4); }

    .discount-status {
      margin-top: 8px;
      font-size: var(--text-xs);
      font-weight: 600;
      color: var(--success);
    }

    .discount-row.is-locked .discount-type,
    .discount-row.is-locked .discount-clear { cursor: not-allowed; opacity: 0.55; pointer-events: none; }

    /* ---- Scope locking & versioning ---- */
    .lock-controls {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      margin-top: var(--space-5);
    }

    .lock-bar {
      display: flex;
      align-items: center;
      padding: var(--space-3) var(--space-4);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      background: var(--bg-input);
    }

    .lock-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: var(--text-sm);
      font-weight: 600;
      color: var(--text-tertiary);
    }

    .lock-chip .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--text-quaternary);
      flex-shrink: 0;
    }

    .lock-chip.locked { color: var(--success); }
    .lock-chip.locked .dot {
      background: var(--success);
    }

    .lock-chip.editing { color: var(--purple-400); }
    .lock-chip.editing .dot {
      background: var(--accent);
    }

    .lock-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: var(--space-2);
    }

    .lock-row .hint-text { margin-top: 0; flex-basis: 100%; }

    .btn-form {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 16px;
      border-radius: var(--radius-sm);
      font-size: var(--text-sm);
      font-weight: 650;
      font-family: inherit;
      cursor: pointer;
      transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    }

    .btn-form.primary {
      background: var(--accent);
      color: #fff;
      border: 1px solid transparent;
    }

    .btn-form.primary:hover { background: var(--accent-hover); }
    .btn-form.primary:active { background: var(--purple-600); transform: translateY(1px); }

    .btn-form.ghost {
      background: var(--bg-input);
      color: var(--text-secondary);
      border: 1px solid var(--border-medium);
    }

    .btn-form.ghost:hover { color: var(--text-primary); border-color: var(--accent-border); background: var(--bg-hover); }

    .lock-error { color: var(--error); flex-basis: 100%; }

    .version-list {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
    }

    .version-item {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      width: 100%;
      padding: 10px 13px;
      border-radius: var(--radius-sm);
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      font-family: inherit;
      text-align: left;
      cursor: pointer;
      transition: border-color var(--transition-fast), background var(--transition-fast);
    }

    .version-item:hover { border-color: var(--accent-border); background: var(--bg-hover); }
    .version-item.active { border-color: rgba(34, 197, 94, 0.4); cursor: default; }

    .version-item .v-index {
      flex-shrink: 0;
      min-width: 34px;
      padding: 3px 8px;
      border-radius: var(--radius-sm);
      text-align: center;
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--purple-400);
      background: var(--accent-soft);
      border: 1px solid var(--purple-border);
    }

    .version-item .v-meta {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      font-size: var(--text-sm);
      color: var(--text-secondary);
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .version-item .v-meta .v-date { color: var(--text-tertiary); }

    .version-item .v-restore,
    .version-item .v-active {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.6875rem;
      font-weight: 650;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: var(--radius-sm);
    }

    .version-item .v-active {
      color: var(--success);
      background: rgba(16, 185, 129, 0.12);
    }

    .version-item .v-active::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--success);
    }

    .version-item .v-restore {
      color: var(--purple-400);
      background: rgba(139, 92, 246, 0.1);
      border: 1px solid rgba(139, 92, 246, 0.18);
    }

    .version-item:not(.active):hover .v-restore {
      color: #fff;
      background: rgba(139, 92, 246, 0.28);
    }

    .version-item .v-delete {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 30px;
      height: 26px;
      padding: 0 9px;
      border-radius: var(--radius-pill);
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-quaternary);
      font-size: 0.6875rem;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
    }

    .version-item .v-delete:hover {
      color: var(--error);
      background: var(--error-soft);
      border-color: rgba(239, 68, 68, 0.3);
    }

    .level-tile.is-locked-mark {
      opacity: 0.7;
      cursor: not-allowed;
      pointer-events: none;
    }

    input[readonly],
    textarea[readonly] {
      opacity: 0.75;
      cursor: not-allowed;
    }

    .level-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: var(--space-2);
    }

    .level-tile {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 3px;
      padding: var(--space-3) var(--space-4) var(--space-3);
      border-radius: var(--radius-md);
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      cursor: pointer;
      text-align: left;
      font-family: inherit;
      transition: border-color var(--transition-fast), background var(--transition-fast);
    }

    .level-tile:hover {
      border-color: var(--accent-border);
      background: var(--bg-hover);
    }

    .level-tile.active {
      border-color: var(--accent);
      background: var(--accent-soft);
      box-shadow: inset 0 0 0 1px var(--accent-border);
    }

    .level-tile.active::after {
      content: '✓';
      position: absolute;
      top: 9px;
      right: 12px;
      color: var(--purple-400);
      font-weight: 800;
      font-size: 13px;
    }

    .lt-code { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--purple-400); }
    .lt-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); line-height: 1.25; padding-right: 14px; }
    .lt-price { font-size: var(--text-xs); font-weight: 550; color: var(--text-tertiary); margin-top: auto; }

    .summary-card {
      border-radius: var(--radius-lg);
      overflow: hidden;
      padding: 0;
      background: var(--bg-secondary);
      border-color: var(--purple-border);
    }

    .summary-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: var(--space-4) var(--space-5) var(--space-4);
      border-bottom: 1px solid var(--border-subtle);
    }

    .summary-head h3 { font-size: var(--text-md); font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }

    .summary-tag {
      font-size: 0.6875rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      color: var(--purple-300, #c4b5fd);
      background: var(--accent-soft);
      border: 1px solid var(--accent-border);
      padding: 3px 10px;
      border-radius: var(--radius-xl);
    }

    .summary-tag.paid {
      color: var(--success);
      background: var(--success-soft);
      border-color: var(--success-border);
    }

    .summary-tag.est {
      color: var(--warning);
      background: var(--warning-soft);
      border-color: var(--warning-border);
    }

    .summary-sub { display: block; padding: var(--space-2) var(--space-6) 0; font-size: var(--text-xs); color: var(--text-quaternary); }

    .summary-rows { padding: var(--space-3) var(--space-6) var(--space-1); display: flex; flex-direction: column; gap: var(--space-2); }

    .summary-line {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-3);
      font-size: var(--text-sm);
    }
    .summary-line span { color: var(--text-tertiary); flex-shrink: 0; }
    .summary-line b {
      color: var(--text-primary);
      font-weight: 550;
      text-align: right;
      max-width: 60%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .summary-total {
      margin: var(--space-3) var(--space-6) 0;
      padding: var(--space-5) 0 var(--space-4);
      text-align: center;
      border-top: 1px solid var(--border-medium);
      border-bottom: 1px solid var(--border-medium);
    }

    .summary-total .result-label { margin-bottom: var(--space-1); }
    .summary-total .result-eur {
      display: block;
      font-size: clamp(2rem, 4vw, 2.5rem);
      font-weight: 700;
      letter-spacing: -0.02em;
      color: var(--text-primary);
      line-height: 1.1;
    }
    .summary-total .result-ron { color: var(--text-tertiary); margin-top: 2px; font-size: var(--text-sm); }

    .summary-card .exchange-rate { margin: var(--space-4) var(--space-6) 0; }

    .summary-actions {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-2);
      padding: var(--space-4) var(--space-6) 0;
    }

    .summary-actions .preview-copy-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      margin: 0;
      padding: 11px 14px;
      font-size: var(--text-sm);
      font-weight: 650;
      font-family: inherit;
      color: var(--text-secondary);
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    }

    .summary-actions .preview-copy-btn svg { flex-shrink: 0; }

    .summary-actions .preview-copy-btn:hover {
      color: var(--text-primary);
      border-color: var(--accent-border);
      background: var(--bg-hover);
    }

    .summary-actions .preview-copy-btn:active { transform: translateY(1px); }

    .summary-actions .preview-copy-btn:first-child {
      background: var(--accent);
      color: #fff;
      border-color: transparent;
    }

    .summary-actions .preview-copy-btn:first-child:hover {
      border-color: transparent;
      background: var(--accent-hover);
    }

    .summary-actions .preview-copy-btn.success {
      background: var(--success) !important;
      color: #fff !important;
      border-color: transparent !important;
      transform: none !important;
    }

    .summary-note {
      padding: var(--space-3) var(--space-6) var(--space-5);
      text-align: center;
      font-size: var(--text-xs);
      color: var(--text-quaternary);
      line-height: 1.45;
    }

    .receipt-card { max-width: 660px; margin-left: auto; margin-right: auto; }

    @media (max-width: 560px) {
      .receipt-header { flex-direction: column; align-items: stretch; gap: 12px; }
      .receipt-header-text h3 { font-size: 1.1rem; }
      .receipt-meta { grid-template-columns: 1fr; }
      .receipt-meta-cell { padding: 11px 16px 12px; border-left: none; border-top: 1px solid var(--border-subtle); }
      .receipt-meta-cell:first-child { border-top: none; }
      .rep-grid { grid-template-columns: 1fr; }
      .pricing-grid { grid-template-columns: 1fr; }
      .rep-cards { grid-template-columns: repeat(2, 1fr); }
      .bar-item { grid-template-columns: 88px 1fr 84px; }
      .pricing-actions { flex-direction: column; align-items: stretch; }
      .purchase-row { flex-wrap: wrap; }
      .purchase-row .p-main { min-width: 55%; }
      .purchase-row .p-acts { order: 5; margin-left: auto; }
      .purchase-row .p-del { order: 6; }
      .purchase-row .p-chev { order: 7; }
    }

    @media (max-width: 960px) {
      .page-grid { grid-template-columns: 1fr; }
      .col-side { position: static; }
      .form-row.two-col { grid-template-columns: 1fr; }
      .site-header { flex-direction: column; align-items: flex-start; }
      .btn-admin { margin-left: 0; }
    }

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