  :root {
    --vista-bg-gradient: linear-gradient(135deg, #4a1525 0%, #350e18 50%, #22080f 100%),
                         repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 8px);
    --vista-window-bg: rgba(255, 255, 255, 0.85);
    --vista-glass-border: rgba(201, 162, 39, 0.4);
    --vista-glass-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    --card-bg: rgba(245, 240, 242, 0.85);
    --card-hover: rgba(250, 242, 245, 0.95);
    --border-color: #d4af37;
    --accent: #800020;
    --accent-hover: #600018;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.3);
    --danger-text: #b91c1c;
    --aero: #1D8FA6;
    --aero-light: #5FCBDA;
    --aero-dark: #0F5F70;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; -webkit-tap-highlight-color: transparent; }

  body {
    background: var(--vista-bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #app {
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    background-color: var(--vista-window-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--vista-glass-shadow);
    border: 1px solid var(--vista-glass-border);
  }

  @media (min-width: 480px) {
    #app {
      min-height: 840px;
      border-radius: 16px;
    }
  }

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(245,235,238,0.9) 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  #backBtn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(to bottom, #ffffff 0%, #f9f0f2 100%);
    border: 1px solid var(--border-color);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  #backBtn:hover:not(:disabled) { background: linear-gradient(to bottom, #ffffff 0%, #f0e1e6 100%); border-color: #800020; }
  #backBtn:disabled { opacity: 0.3; pointer-events: none; }

  .logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: #4a1525;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  }

  .logo-badge {
    background: linear-gradient(to bottom, #800020 0%, #4a1525 100%);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  }

  #langBtn {
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(to bottom, #ffffff 0%, #f9f0f2 100%);
    border: 1px solid var(--border-color);
    color: var(--accent);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  #langBtn:hover { background: linear-gradient(to bottom, #ffffff 0%, #f0e1e6 100%); }

  #dotsContainer {
    display: flex;
    gap: 6px;
    padding: 12px 20px 4px 20px;
  }
  #dotsContainer.hidden { display: none; }
  .dot {
    height: 4px;
    flex: 1;
    border-radius: 99px;
    background: rgba(212, 175, 55, 0.4);
    transition: background 0.3s;
  }
  .dot.active { background: var(--aero); box-shadow: 0 0 6px rgba(29, 143, 166, 0.5); }

  main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: fadeIn 0.25s ease-out;
  }

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

  .banner-free {
    background: rgba(128,0,32,0.1);
    border: 1px solid rgba(212,175,55,0.4);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #4a1525;
  }

  h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #4a1525;
  }

  .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .grid-cats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-bottom: 10px;
  }

  .cat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.6);
  }
  .cat-card:hover {
    background: var(--card-hover);
    border-color: var(--aero-dark);
    box-shadow: 0 4px 10px rgba(29,143,166,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateY(-1px);
  }
  .cat-card .icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(to bottom, #ffffff 0%, #f5e6ea 100%);
    border: 1px solid #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aero-dark);
  }
  .cat-card span.label { font-size: 13px; font-weight: 600; color: #4a1525; }

  .options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .opt-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), inset 0 1px 0 rgba(255,255,255,0.6);
  }
  .opt-btn:hover {
    background: var(--card-hover);
    border-color: var(--aero-dark);
    box-shadow: 0 3px 8px rgba(29,143,166,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
  }
  .opt-btn.danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-text);
  }
  .opt-btn.danger:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: #f87171;
  }
  .opt-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aero-dark);
  }
  .opt-btn.danger .opt-icon { color: #dc2626; }

  .input-box {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 6px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  }
  .input-box:focus { border-color: var(--aero); box-shadow: 0 0 5px rgba(29,143,166,0.35), inset 0 1px 3px rgba(0,0,0,0.05); }
  .input-box.error { border-color: #ef4444; box-shadow: 0 0 5px rgba(239,68,68,0.3); }

  label.input-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a1525;
    margin-bottom: 6px;
  }

  .primary-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(to bottom, var(--aero) 0%, var(--aero-dark) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #d4af37;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(29, 143, 166, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    margin-top: 10px;
  }
  .primary-btn:hover { background: linear-gradient(to bottom, #229FB8 0%, var(--aero-dark) 100%); box-shadow: 0 6px 15px rgba(29, 143, 166, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
  .primary-btn:active { transform: scale(0.99); }
  .primary-btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

  .secondary-btn {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    background: rgba(255,255,255,0.7);
    color: var(--aero-dark);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--aero-light);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
  }
  .secondary-btn:hover { background: rgba(29,143,166,0.08); border-color: var(--aero); }

  .summary-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  }
  .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  }
  .summary-row:last-child { border-bottom: none; }
  .summary-row .lbl { color: var(--text-muted); }
  .summary-row .val { font-weight: 600; display: flex; align-items: center; gap: 6px; color: #4a1525; }

  .badge-priority {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
  }
  .badge-priority.normal { background: rgba(29, 143, 166, 0.12); color: var(--aero-dark); border: 1px solid rgba(29, 143, 166, 0.35); }
  .badge-priority.urgent { background: rgba(239, 68, 68, 0.15); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.3); }

  .info-box {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .text-btn {
    background: none;
    border: none;
    color: var(--aero-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    text-align: center;
    transition: color 0.2s;
  }
  .text-btn:hover { background: rgba(29, 143, 166, 0.08); border-radius: 8px; }

  footer {
    padding: 12px 20px;
    text-align: center;
    font-size: 11px;
    color: #4a1525;
    border-top: 1px solid var(--border-color);
    background: rgba(245, 240, 242, 0.8);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .consult-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #ffffff 0%, #f9f0f2 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--aero-dark);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .consult-btn:hover { background: linear-gradient(to bottom, #ffffff 0%, #f0e1e6 100%); border-color: var(--aero-dark); }

  /* Styl modalu pilnej konsultacji */
  .app-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
  }
  .app-modal-overlay.active {
    display: flex;
  }
  .app-modal-content {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 550px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: left;
  }
  .app-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
  }
  .app-modal-content h3 {
    font-family: 'Playfair Display', serif;
    color: #0a2240;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
  }
  .app-modal-content p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-align: left;
  }
  .app-modal-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
  }
  .app-modal-consent input {
    margin-top: 3px;
    cursor: pointer;
  }
  .app-stripe-wrapper {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s;
    text-align: center;
  }
  .app-stripe-wrapper.enabled {
    opacity: 1;
    pointer-events: auto;
  }

  #toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(74, 21, 37, 0.95);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
  }
  #toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .success-view {
    text-align: center;
    padding: 20px 0;
  }
  .success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 10px rgba(21,128,61,0.15);
  }
  .ref-box {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    background: #ffffff;
    border: 1px solid var(--aero-light);
    padding: 14px;
    border-radius: 10px;
    color: var(--aero-dark);
    margin: 20px 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  }
