    :root {
      --color-bg: #ffffff;
      --color-primary: #0b2345;
      --color-primary-soft: #24446f;
      --color-primary-guest: #8591a2; /* 50% mix of --color-primary and white */
      --color-primary-guest-hover: #93a0b1;
      --color-accent-bg: #f3f7ff;
      --color-text: #1a2640;
      --color-text-muted: #6d7484;
      --color-border-soft: #e3e8f0;
      --radius-lg: 24px;
      --radius-pill: 999px;
      --shadow-soft: 0 20px 40px rgba(15, 35, 69, 0.08);
      --container-width: 1180px;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
      background-color: var(--color-bg);
      color: var(--color-text);
      line-height: 1.4;
    }

    img {
      max-width: 100%;
      display: block;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    .container {
      max-width: var(--container-width);
      margin: 0 auto;
      padding: 0 24px;
    }

    .hidden {
      display: none !important;
    }

    /* HEADER */

    .site-header {
      position: sticky;
      top: 0;
      z-index: 20;
      background-color: var(--color-bg);
      backdrop-filter: blur(10px);
    }

    .header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 0;
      gap: 32px;
    }

    .logo {
      display: flex;
      flex-direction: column;
      font-size: 14px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--color-primary);
      font-weight: 600;
      white-space: nowrap;
      cursor: pointer;
    }

    .logo-sub {
      font-size: 10px;
      letter-spacing: 0.15em;
      font-weight: 400;
      opacity: 0.8;
      margin-top: 4px;
    }

    .main-nav {
      display: flex;
      align-items: center;
      gap: 32px;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      flex: 1;
      justify-content: center;
    }

    .main-nav a {
      position: relative;
      padding: 4px 0;
      font-weight: 500;
      color: #151b2f;
    }

    .main-nav a::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -4px;
      width: 0;
      height: 2px;
      background-color: var(--color-primary);
      border-radius: 999px;
      transition: width 0.2s ease;
    }

    .main-nav a:hover::after,
    .main-nav a:focus-visible::after {
      width: 100%;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 24px;
      border-radius: var(--radius-pill);
      font-size: 14px;
      font-weight: 500;
      border: none;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
      white-space: nowrap;
      font-family: inherit;
      line-height: 1;
    
    }

    .btn-primary {
      background-color: var(--color-primary);
      color: #ffffff;
      box-shadow: 0 18px 30px rgba(11, 35, 69, 0.22);
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 22px 36px rgba(11, 35, 69, 0.28);
      background-color: var(--color-primary-soft);
    }

    
    
    .btn-primary-guest {
      background-color: var(--color-primary-guest);
      color: #ffffff;
      box-shadow: 0 18px 30px rgba(11, 35, 69, 0.18);
    }

    .btn-primary-guest:hover {
      transform: translateY(-1px);
      box-shadow: 0 22px 36px rgba(11, 35, 69, 0.22);
      background-color: var(--color-primary-guest-hover);
    }

    @supports (background-color: color-mix(in srgb, #000 50%, #fff)) {
      .btn-primary-guest {
        background-color: color-mix(in srgb, var(--color-primary) 50%, white);
      }
      .btn-primary-guest:hover {
        background-color: color-mix(in srgb, var(--color-primary-soft) 55%, white);
      }
    }

.btn-primary-light {
      background-color: var(--color-primary-soft);
      color: #ffffff;
      box-shadow: 0 18px 30px rgba(11, 35, 69, 0.18);
    }

    .btn-primary-light:hover {
      transform: translateY(-1px);
      box-shadow: 0 22px 36px rgba(11, 35, 69, 0.22);
      background-color: #325b92;
    }

.btn-outline {
      background-color: transparent;
      border: 1px solid var(--color-border-soft);
      color: var(--color-primary);
      padding-inline: 28px;
    }

    .btn-outline:hover {
      background-color: #f5f7fb;
      box-shadow: 0 8px 16px rgba(15, 35, 69, 0.08);
      transform: translateY(-1px);
    }

    .btn-full {
      width: 100%;
      justify-content: center;
    }

    .btn-ghost {
      background: none;
      border: none;
      padding: 0;
      font: inherit;
      color: var(--color-primary);
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    /* HEADER – ACTIONS + LANGUAGE SWITCH */

    .header-actions {
      display: flex;
      align-items: center;
      gap: 16px;
      white-space: nowrap;
    }

    .lang-switch {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--color-text-muted);
    }

    .lang-switch a {
      padding: 4px 10px;
      border-radius: var(--radius-pill);
      transition: background-color 0.15s ease, color 0.15s ease;
      color: var(--color-text-muted);
    }

    .lang-switch a:hover {
      background-color: #f0f2f8;
      color: var(--color-primary);
    }

    .lang-switch a.is-active {
      background-color: var(--color-primary);
      color: #ffffff;
    }

    .lang-divider {
      opacity: 0.6;
      font-size: 11px;
    }

    /* HERO */

    .hero {
      padding: 60px 0 0;
      position: relative;
      z-index: 0;
    }

    .hero-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 60px;
    }

    .hero-content {
      flex: 1 1 40%;
      max-width: 460px;
    }

    .hero-title {
      font-size: 44px;
      line-height: 1.1;
      letter-spacing: -0.02em;
      margin: 0 0 24px;
      color: var(--color-primary);
    }

    .hero-subtitle {
      font-size: 18px;
      font-weight: 400;
      color: var(--color-text-muted);
      margin: 0 0 32px;
      max-width: 420px;
    }

    .hero-actions {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 40px;
    }

    
    .hero-actions--stack {
      flex-direction: column;
      align-items: flex-start;
      gap: 14px;
    }

.hero-image {
      flex: 1 1 60%;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      position: relative;
    }

    .hero-photo {
      position: relative;
      z-index: 0;
      max-width: 680px;
      border-radius: 28px;
      transform: translateY(8px);
    }

    /* HERO VIEWS */

    .hero-view {
      display: none;
    }

    .hero-view.is-active {
      display: block;
    }

    .auth-card {
      background-color: #ffffff;
      border-radius: 24px;
      padding: 24px 24px 28px;
      border: 1px solid var(--color-border-soft);
      box-shadow: var(--shadow-soft);
    }

    .auth-title {
      font-size: 24px;
      margin: 0 0 8px;
      color: var(--color-primary);
    }

    .auth-subtitle {
      font-size: 14px;
      color: var(--color-text-muted);
      margin: 0 0 20px;
    }

    .auth-fields {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-bottom: 12px;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .field-label {
      font-size: 13px;
      color: var(--color-text-muted);
    }

    .field-input,
    .field-select,
    .field-textarea {
      border-radius: 12px;
      border: 1px solid var(--color-border-soft);
      padding: 9px 11px;
      font-size: 14px;
      font-family: inherit;
      outline: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .field-input:focus,
    .field-select:focus,
    .field-textarea:focus {
      border-color: var(--color-primary-soft);
      box-shadow: 0 0 0 1px rgba(11, 35, 69, 0.18);
    }

    .field-textarea {
      min-height: 72px;
      resize: vertical;
    }

    .field-inline {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: 13px;
      color: var(--color-text-muted);
    }

    .field-inline input[type="checkbox"] {
      margin-top: 2px;
    }

    .auth-footer {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 12px;
      font-size: 13px;
      color: var(--color-text-muted);
    }

    .auth-footer strong {
      color: var(--color-primary);
    }

    .auth-options {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 12px;
    }

    .auth-hint {
      font-size: 13px;
      color: var(--color-text-muted);
      margin-top: 8px;
    }

    .back-link {
      font-size: 13px;
      margin-top: 10px;
    }

    .auth-message {
      font-size: 13px;
      margin-top: 6px;
      min-height: 16px;
    }

    /* KAFELKI CTA */

    .cta-cards {
      margin-top: 80px;
      padding-bottom: 100px;
      position: relative;
      z-index: 1;
    }

    .cards-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 24px;
      margin-top: 8px;
    }

    .cta-card {
      background-color: #ffffff;
      border-radius: var(--radius-lg);
      padding: 24px 26px;
      border: 1px solid var(--color-border-soft);
      box-shadow: var(--shadow-soft);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 120px;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .cta-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 24px 48px rgba(15, 35, 69, 0.12);
    }

    .cta-card-top {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 6px;
    }

    .cta-icon {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background-color: var(--color-accent-bg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      flex-shrink: 0;
    }

    .cta-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--color-primary);
      margin: 0;
    }

    .cta-subtitle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 4px;
    }

    .cta-subtitle {
      font-size: 14px;
      color: var(--color-text-muted);
      margin: 0;
    }
	/* DŁUŻSZY PODTYTUŁ – tylko kafelek "Dla pacjentów" */
	.cta-card--patients .cta-subtitle {
	  font-size: 12px;
	  line-height: 1.25;
	  max-width: 260px;
	}

	
    /* Rozwijane "Dowiedz się więcej" */
    .more-wrap { padding: 0 0 80px; }
    .more-card{
      border: 1px solid var(--color-border-soft);
      border-radius: 18px;
      background: #ffffff;
      padding: 26px 26px 20px;
      box-shadow: 0 10px 30px rgba(11, 35, 69, 0.06);
    }
    .more-head{ max-width: 980px; }
    .more-title{
      margin: 0 0 10px;
      color: var(--color-primary);
      font-size: 26px;
      letter-spacing: -0.02em;
      line-height: 1.18;
    }
    .more-lead{
      margin: 0 0 18px;
      color: var(--color-text-muted);
      font-size: 14px;
      line-height: 1.6;
    }
    .more-grid{
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
      margin-top: 12px;
    }
    .more-block{
      border: 1px solid var(--color-border-soft);
      border-radius: 16px;
      background: var(--color-accent-bg);
      padding: 16px 16px 14px;
    }
    .more-h{
      margin: 0 0 8px;
      color: var(--color-primary);
      font-size: 15px;
      font-weight: 700;
    }
    .more-p{
      margin: 0 0 10px;
      color: var(--color-text);
      font-size: 13px;
      line-height: 1.55;
    }
    .more-ul{
      margin: 0;
      padding-left: 18px;
      color: var(--color-text);
      font-size: 13px;
      line-height: 1.55;
    }
    .more-ul li{ margin: 6px 0; }
    .more-note{
      margin: 16px 0 0;
      color: var(--color-text-muted);
      font-size: 12px;
      line-height: 1.5;
    }
    @media (max-width: 980px){
      .more-grid{ grid-template-columns: 1fr; }
      .more-title{ font-size: 22px; }
    }


/* Sekcja informacyjna (landing) */
	.info-section {
	  padding: 70px 0 90px;
	  border-top: 1px solid var(--color-border-soft);
	  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
	}

	.info-hero { max-width: 860px; }

	.info-hero h2 {
	  margin: 0 0 14px;
	  color: var(--color-primary);
	  font-size: 34px;
	  letter-spacing: -0.02em;
	  line-height: 1.12;
	}

	.info-hero p {
	  margin: 0 0 22px;
	  color: var(--color-text-muted);
	  font-size: 16px;
	  line-height: 1.6;
	}

	.info-actions {
	  display: flex;
	  flex-wrap: wrap;
	  gap: 12px;
	  margin: 6px 0 30px;
	}

	.steps {
	  margin-top: 24px;
	  background: #ffffff;
	  border: 1px solid var(--color-border-soft);
	  border-radius: var(--radius-lg);
	  box-shadow: var(--shadow-soft);
	  padding: 22px 24px;
	  max-width: 980px;
	}

	.steps-title {
	  margin: 0 0 14px;
	  color: var(--color-primary);
	  font-size: 18px;
	  letter-spacing: -0.01em;
	}

	.steps-list {
	  margin: 0;
	  padding-left: 18px;
	  color: var(--color-text);
	  font-size: 14px;
	  line-height: 1.55;
	}

	.steps-list li { margin: 10px 0; }
	.steps-list strong { color: var(--color-primary); font-weight: 600; }

	.disclaimer-box {
	  margin-top: 16px;
	  padding: 12px 14px;
	  border-radius: 16px;
	  border: 1px solid #f1d5a8;
	  background: #fff8eb;
	  color: #6a4a12;
	  font-size: 13px;
	  line-height: 1.45;
	}

	@media (max-width: 960px) {
	  .info-section { padding: 56px 0 70px; }
	  .info-hero h2 { font-size: 28px; }
	  .cta-card--patients .cta-subtitle { max-width: 100%; }
	  .steps { padding: 18px 18px; }
	}

    .cta-arrow {
      font-size: 16px;
      flex-shrink: 0;
    }

    /* DASHBOARD (POST-LOGIN) */

    .dashboard {
      padding: 40px 0 80px;
    }

    .dashboard-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;
      margin-bottom: 24px;
    }

    .dashboard-title {
      font-size: 28px;
      margin: 0 0 6px;
      color: var(--color-primary);
    }

    .dashboard-subtitle {
      margin: 0;
      font-size: 14px;
      color: var(--color-text-muted);
    }

    .dashboard-user-pill {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      background-color: var(--color-accent-bg);
      color: var(--color-primary);
      padding: 6px 14px;
      border-radius: var(--radius-pill);
    }

    .tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      border-bottom: 1px solid var(--color-border-soft);
      margin-bottom: 18px;
      padding-bottom: 4px;
    }

    .tab-button {
      border-radius: var(--radius-pill);
      border: 1px solid transparent;
      padding: 7px 18px;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      background-color: transparent;
      color: var(--color-text-muted);
      cursor: pointer;
      transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }

    .tab-button.is-active {
      background-color: var(--color-primary);
      color: #ffffff;
      border-color: var(--color-primary);
    }

    .tab-panel {
      display: none;
    }

    .tab-panel.is-active {
      display: block;
    }

    /* AI TAB LAYOUT */

    .ai-layout {
      display: flex;
      align-items: flex-start;
      gap: 24px;
      margin-top: 4px;
    }

    .ai-left {
      flex: 1 1 40%;
      max-width: 420px;
    }

    .ai-right {
      flex: 1 1 60%;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    

    /* === AI board layout (2 kolumny: 4 odpowiedzi, potem Zapytanie i Historia) === */
    .ai-board {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      margin-top: 4px;
      align-items: start;
    }
    .ai-span-2 {
      grid-column: 1 / -1;
    }

    .ai-history-card {
      background-color: #ffffff;
      border-radius: 20px;
      border: 1px solid var(--color-border-soft);
      box-shadow: var(--shadow-soft);
      padding: 18px 18px 20px;
    }
    .ai-history-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }
    .ai-history-title {
      margin: 0;
      font-size: 18px;
      color: var(--color-text);
    }
    .ai-history-subtitle {
      color: var(--color-text-muted);
      font-size: 12px;
      line-height: 1.3;
      text-align: right;
      max-width: 60%;
    }
    .ai-history-list {
      border: 1px solid var(--color-border-soft);
      border-radius: 14px;
      padding: 12px;
      background: #f9faff;
      min-height: 110px;
      max-height: 280px;
      overflow: auto;
      white-space: normal;
      font-size: 13px;
      line-height: 1.45;
    }
    .ai-history-item {
      padding: 10px 10px;
      border-radius: 12px;
      background: #fff;
      border: 1px solid rgba(227,232,240,0.9);
    }
    .ai-history-item + .ai-history-item {
      margin-top: 10px;
    }
    .ai-history-meta {
      font-size: 12px;
      color: var(--color-text-muted);
      margin-bottom: 6px;
    }
    .ai-history-user {
      font-weight: 600;
      color: var(--color-text);
      margin-bottom: 6px;
      white-space: pre-wrap;
    }
    .ai-history-answers {
      font-size: 13px;
      color: var(--color-text);
      white-space: pre-wrap;
    }

    /* File input row + czerwony X */
    .ai-file-row {
      display: flex;
      gap: 10px;
      align-items: center;
    }
    .ai-file-row .field-input { flex: 1 1 auto; }
    .file-clear-btn {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid rgba(220, 38, 38, 0.25);
      background: rgba(220, 38, 38, 0.08);
      color: #b91c1c;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      user-select: none;
    }
    .file-clear-btn:hover {
      background: rgba(220, 38, 38, 0.12);
    }

    .ai-note-row{
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-top: 8px;
      flex-wrap: wrap;
    }
    .ai-note-row .ai-note{
      margin: 0;
      flex: 1 1 auto;
    }
    .ai-note-row .ai-history-jump{
      margin-top: 0;
      flex: 0 0 auto;
      text-align: right;
      margin-left: auto;
    }
.ai-history-jump{
      display: inline-block;
      margin-top: 8px;
      font-size: 13px;
      font-weight: 600;
      color: var(--color-primary);
      text-decoration: none;
    }
    .ai-history-jump:hover{ text-decoration: underline; }
    .ai-file-field{ margin-top: 12px; }


@media (max-width: 980px) {
      .ai-board { grid-template-columns: 1fr; }
      .ai-span-2 { grid-column: auto; }
      .ai-history-subtitle { max-width: 100%; text-align: left; }
    }
.ai-query-card {
      background-color: #ffffff;
      border-radius: 20px;
      border: 1px solid var(--color-border-soft);
      box-shadow: var(--shadow-soft);
      padding: 18px 18px 20px;
    }

    .ai-query-title {
      font-size: 16px;
      margin: 0 0 8px;
      color: var(--color-primary);
    }

    .ai-query-subtitle {
      font-size: 13px;
      color: var(--color-text-muted);
      margin: 0 0 12px;
    }

    .ai-file-info {
      font-size: 12px;
      color: var(--color-text-muted);
      margin-top: 4px;
    }

    .ai-send-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 12px;
    }
    .ai-send-row #btn-ai-send { flex: 1; }
    .btn-secondary {
      padding: 10px 16px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,.2);
      background: rgba(255,255,255,.07);
      color: #c8cfe8;
      font-size: .875rem;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      transition: background .15s, border-color .15s;
    }
    .btn-secondary:hover {
      background: rgba(255,255,255,.13);
      border-color: rgba(255,255,255,.35);
    }

    .ai-note {
      font-size: 11px;
      color: var(--color-text-muted);
    }

    .ai-message {
      font-size: 13px;
      margin-top: 8px;
      min-height: 16px;
    }

    .ai-model-card {
      background-color: #ffffff;
      border-radius: 16px;
      border: 1px solid var(--color-border-soft);
      padding: 14px 14px 16px;
      box-shadow: 0 10px 24px rgba(15, 35, 69, 0.06);
      display: flex;
      flex-direction: column;
      min-height: 150px;
    }

    .ai-model-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .ai-model-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--color-primary);
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .ai-model-tag {
      font-size: 11px;
      padding: 3px 8px;
      border-radius: 999px;
      background-color: var(--color-accent-bg);
      color: var(--color-text-muted);
    }

    .ai-response {
      font-size: 13px;
      color: var(--color-text-muted);
      margin-top: 4px;
      white-space: pre-wrap;
    }

    /* Historia i pozostałe zakładki – placeholder */

    .history-placeholder,
    .tab-placeholder {
      background-color: #ffffff;
      border-radius: 20px;
      border: 1px solid var(--color-border-soft);
      padding: 18px 18px 24px;
      box-shadow: var(--shadow-soft);
      font-size: 14px;
      color: var(--color-text-muted);
    }

    

    /* Historia – sesje i podgląd */

    .history-board {
      background-color: #ffffff;
      border-radius: 20px;
      border: 1px solid var(--color-border-soft);
      padding: 18px 18px 20px;
      box-shadow: var(--shadow-soft);
    }

    .history-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }

    .history-title-main {
      font-weight: 700;
      color: var(--color-text);
      font-size: 16px;
    }

    .history-title-sub {
      margin-top: 4px;
      font-size: 13px;
      color: var(--color-text-muted);
      line-height: 1.35;
      max-width: 760px;
    }

    .history-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }

    .history-grid {
      display: grid;
      grid-template-columns: 320px 1fr;
      gap: 14px;
    }

    .history-section-label {
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--color-text-muted);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 10px;
      justify-content: space-between;
    }

    .history-active-session {
      font-size: 12px;
      letter-spacing: 0;
      text-transform: none;
      color: var(--color-text-muted);
    }

    .history-sessions-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 520px;
      overflow: auto;
      padding-right: 6px;
    }

    .history-session-item {
      border: 1px solid var(--color-border-soft);
      border-radius: 14px;
      padding: 10px 12px;
      background: #fff;
      cursor: pointer;
      transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
    }

    .history-session-item:hover {
      transform: translateY(-1px);
      box-shadow: var(--shadow-soft);
    }

    .history-session-item.is-active {
      border-color: rgba(11, 35, 69, 0.35);
      box-shadow: var(--shadow-soft);
    }

    .history-session-top {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: baseline;
    }

    .history-session-title {
      font-weight: 700;
      font-size: 13px;
      color: var(--color-text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 220px;
    }

    .history-session-date {
      font-size: 12px;
      color: var(--color-text-muted);
      white-space: nowrap;
    }

    .history-session-meta {
      margin-top: 6px;
      font-size: 12px;
      color: var(--color-text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .history-messages-view {
      border: 1px solid var(--color-border-soft);
      border-radius: 18px;
      padding: 12px;
      min-height: 240px;
      max-height: 520px;
      overflow: auto;
      background: #ffffff;
    }

    .history-msg {
      border-bottom: 1px dashed var(--color-border-soft);
      padding: 10px 0;
    }

    .history-msg:last-child {
      border-bottom: none;
    }

    .history-msg-meta {
      font-size: 12px;
      color: var(--color-text-muted);
      display: flex;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 6px;
    }

    .history-msg-user {
      font-size: 13px;
      color: var(--color-text);
      white-space: pre-wrap;
    }

    .history-msg-answers {
      margin-top: 8px;
      display: grid;
      gap: 6px;
    }

    .history-msg-answer {
      font-size: 12px;
      color: var(--color-text-muted);
      white-space: pre-wrap;
      border-left: 3px solid var(--color-border-soft);
      padding-left: 10px;
    }

    @media (max-width: 980px) {
      .history-grid {
        grid-template-columns: 1fr;
      }
      .history-sessions-list,
      .history-messages-view {
        max-height: 420px;
      }
      .history-session-title {
        max-width: 100%;
      }
    }
/* RESPONSYWNOŚĆ */

    @media (max-width: 960px) {
      .header-inner {
        flex-wrap: wrap;
        row-gap: 16px;
      }

      .main-nav {
        order: 3;
        flex-wrap: wrap;
        gap: 18px;
        font-size: 13px;
      }

      .hero-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 40px;
      }

      .hero {
        padding-top: 40px;
      }

      .hero-title {
        font-size: 34px;
      }

      .hero-subtitle {
        font-size: 16px;
      }

      .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      }

      .auth-card {
        padding: 20px 18px 24px;
      }

      .ai-layout {
        flex-direction: column;
      }

      .ai-left {
        max-width: 100%;
      }
    }

    @media (max-width: 640px) {
      .header-inner {
        justify-content: space-between;
      }

      .main-nav {
        display: none;
      }

      .hero-actions {
        width: 100%;
      }

      .btn-primary {
        width: 100%;
        justify-content: center;
      }

      .cards-grid {
        grid-template-columns: 1fr;
      }

      .cta-cards {
        padding-bottom: 56px;
      }

      .ai-right {
        grid-template-columns: 1fr;
      }
    }

    /* Wyrównanie logo na dużych ekranach */
    @media (min-width: 960px) {
      .logo {
        margin-left: 16px;
      }
    }
    /* --- AI doc processing UI --- */
    .ai-doc-card{
      margin-top: 14px;
      padding: 14px 14px 12px;
      border: 1px solid var(--color-border-soft);
      border-radius: 16px;
      background: #ffffff;
    }
    .ai-doc-header{
      display:flex;
      gap:12px;
      align-items:flex-start;
      justify-content:space-between;
    }
    .ai-doc-title{
      margin:0;
      font-size: 14px;
      font-weight: 700;
      color: var(--color-text);
    }
    .ai-doc-subtitle{
      margin-top: 4px;
      font-size: 12px;
      color: var(--color-text-muted);
      line-height: 1.35;
    }
    .ai-doc-row{
      margin-top: 10px;
      display:flex;
      gap:10px;
      align-items:center;
      flex-wrap: wrap;
    }
    .ai-doc-inline{
      gap:8px;
      user-select:none;
      font-size: 12.5px;
      color: var(--color-text);
    }
    .ai-doc-actions{ display:flex; gap:8px; }
    .btn-sm{ padding: 8px 10px; font-size: 12px; border-radius: 12px; }
    .ai-doc-status{
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 14px;
      border: 1px solid var(--color-border-soft);
      background: var(--color-accent-bg);
      color: var(--color-text);
      font-size: 12.5px;
      min-height: 18px;
      white-space: pre-line;
    }
    .ai-doc-status.is-error{ background:#fff1f1; border-color:#ffd1d1; color:#8b1a1a; }
    .ai-doc-status.is-ok{ background:#f1fff4; border-color:#c9f5d0; color:#0b5a1b; }
    .ai-doc-toolbar{
      margin-top: 10px;
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      align-items:center;
    }
    .ai-doc-preview{
      margin-top: 10px;
      max-height: 260px;
      overflow:auto;
      padding: 12px;
      border-radius: 14px;
      border: 1px solid var(--color-border-soft);
      background: #0b1220;
      color: #e8eefc;
      font-size: 12px;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
    }

  
    .ai-active-badge{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-top: 8px;
      margin-bottom: 2px;
      font-size: 12px;
      color: var(--color-text-muted);
      background: #f9faff;
      border: 1px solid var(--color-border-soft);
      padding: 6px 10px;
      border-radius: 999px;
      width: fit-content;
    }
    .history-session-top{
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 10px;
    }
    .history-session-del{
      border: 0;
      background: transparent;
      color: var(--color-text-muted);
      cursor: pointer;
      padding: 4px 6px;
      border-radius: 10px;
      line-height: 1;
      font-size: 14px;
    }
    .history-session-del:hover{
      background: rgba(11,35,69,0.06);
      color: var(--color-primary);
    }
    /* TEMP: ukryj przycisk "Zobacz, jak to działa" w sekcji Pacjenci */
    #btn-patients-cta-how {
      display: none !important;
    }

    /* Ukrywamy elementy landingowe po zalogowaniu (opcjonalne) */
    .is-auth .public-only { display: none !important; }
  

    /* CONTACT MODAL */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(11, 35, 69, 0.45);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      z-index: 1000;
    }

    .modal-card {
      width: 100%;
      max-width: 560px;
      background: #ffffff;
      border-radius: var(--radius-lg);
      border: 1px solid var(--color-border-soft);
      box-shadow: 0 26px 60px rgba(15, 35, 69, 0.18);
      overflow: hidden;
    }

    .modal-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding: 18px 20px 12px;
      border-bottom: 1px solid var(--color-border-soft);
      background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    }

    .modal-header h3 {
      margin: 0;
      font-size: 18px;
      color: var(--color-primary);
      letter-spacing: -0.01em;
    }

    .modal-subtitle {
      margin: 6px 0 0;
      font-size: 13px;
      color: var(--color-text-muted);
      line-height: 1.4;
    }

    .modal-close {
      appearance: none;
      border: none;
      background: transparent;
      cursor: pointer;
      font-size: 22px;
      line-height: 1;
      padding: 6px 10px;
      border-radius: 12px;
      color: var(--color-primary);
    }

    .modal-close:hover { background: #f0f4ff; }

    .modal-body {
      padding: 16px 20px 18px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-top: 6px;
    }

    .form-field label {
      display: block;
      font-size: 12px;
      color: var(--color-text-muted);
      margin-bottom: 6px;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .form-field input {
      width: 100%;
      padding: 12px 14px;
      border-radius: 16px;
      border: 1px solid var(--color-border-soft);
      font-size: 14px;
      outline: none;
      transition: box-shadow 0.15s ease, border-color 0.15s ease;
    }

    .form-field input:focus {
      border-color: rgba(11, 35, 69, 0.35);
      box-shadow: 0 0 0 4px rgba(11, 35, 69, 0.08);
    }

    .modal-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 14px;
    }

    .modal-note {
      margin: 12px 0 0;
      font-size: 12px;
      color: var(--color-text-muted);
      line-height: 1.45;
    }

    @media (max-width: 520px) {
      .modal-card { border-radius: 18px; }
      .modal-header { padding: 16px 16px 10px; }
      .modal-body { padding: 14px 16px 16px; }
    }

    /* PDF footer */
    .legal-footer {
      margin-top: 28px;
      padding: 18px 0;
      border-top: 1px solid var(--color-border-soft);
      background: var(--color-accent-bg);
    }
    .legal-footer-inner {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .legal-links {
      display: flex;
      flex-wrap: wrap;
      gap: 18px;
      justify-content: center;
      font-size: 13px;
      color: var(--color-text-muted);
    }
    .legal-links a {
      color: var(--color-text);
      opacity: 0.86;
    }
    .legal-links a:hover {
      opacity: 1;
      text-decoration: underline;
    }

/* === AI-MED: logo layout === */
.site-header a#logo-home {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  position: static !important;
}

.site-header a#logo-home .logo-mark {
  height: 56px !important;
  width: 56px !important;
  flex: 0 0 56px !important;
  display: block !important;
  position: static !important;
  transform: none !important;
}

.site-header a#logo-home .logo-text {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.05 !important;
  position: static !important;
}

.site-header a#logo-home .logo-main,
.site-header a#logo-home .logo-sub {
  display: block !important;
  white-space: nowrap !important;
}

.site-header .header-inner {
  overflow: visible !important;
}

.site-header .header-actions {
  margin-right: 36px !important;
}

/* AI-MED ANCHOR OFFSET */
:root { --header-offset: 96px; }
html { scroll-padding-top: var(--header-offset); }
[id] { scroll-margin-top: var(--header-offset); }

/* === SSE thinking indicator === */
.ai-thinking-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8b95a6;
  font-size: 0.875rem;
  padding: 14px 0;
}
.ai-thinking-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid #dde3ed;
  border-top-color: #4a6cf7;
  border-radius: 50%;
  animation: ai-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

/* === Markdown prose in AI response panels === */
.ai-response h1,.ai-response h2,.ai-response h3,.ai-response h4 { margin: 0.55em 0 0.25em; font-weight: 600; }
.ai-response h1 { font-size: 1.2em; }
.ai-response h2 { font-size: 1.1em; }
.ai-response h3,.ai-response h4 { font-size: 1em; }
.ai-response p { margin: 0.4em 0; }
.ai-response ul,.ai-response ol { padding-left: 1.5em; margin: 0.4em 0; }
.ai-response li { margin: 0.15em 0; }
.ai-response code { background: #f0f2f5; padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.85em; font-family: monospace; }
.ai-response pre { background: #f0f2f5; padding: 0.75em 1em; border-radius: 6px; overflow-x: auto; margin: 0.5em 0; }
.ai-response pre code { background: none; padding: 0; }
.ai-response blockquote { border-left: 3px solid #4a6cf7; margin: 0.5em 0; padding-left: 0.8em; color: #6d7484; }
.ai-response strong { font-weight: 600; }
.ai-response em { font-style: italic; }

/* === Markdown prose in history panels === */
.history-answer-text { margin-top: 3px; }
.history-answer-text p { margin: 0.3em 0; }
.history-answer-text ul,.history-answer-text ol { padding-left: 1.4em; margin: 0.25em 0; }
.history-answer-text li { margin: 0.1em 0; }
.history-answer-text code { background: #f0f2f5; padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.82em; font-family: monospace; }
.history-answer-text pre { background: #f0f2f5; padding: 0.5em 0.75em; border-radius: 4px; overflow-x: auto; margin: 0.25em 0; font-size: 0.85em; }
.history-answer-text pre code { background: none; padding: 0; }

/* === Agent selector bar === */
#agent-selector-root { padding: 8px 0 4px; }
.agent-selector { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agent-selector-label { font-size: 0.75rem; font-weight: 600; color: #8b95a6; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.agent-selector-list { display: flex; gap: 6px; flex-wrap: wrap; }
.agent-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; padding: 4px 10px; border-radius: 20px; border: 1.5px solid #dde3ed; font-size: 0.8rem; color: #6d7484; transition: border-color .15s, background .15s, color .15s; user-select: none; }
.agent-toggle input[type="checkbox"] { display: none; }
.agent-toggle:hover { border-color: #4a6cf7; color: #4a6cf7; }
.agent-toggle.is-active { border-color: #4a6cf7; background: #eef1fd; color: #2f4ac4; font-weight: 600; }
.agent-toggle-name { }
.agent-toggle-tag { font-size: 0.7rem; color: #9aa0b2; background: #f0f2f5; border-radius: 4px; padding: 1px 5px; }
.agent-toggle.is-active .agent-toggle-tag { background: #d5dcf9; color: #4a6cf7; }
.agent-selector-hint { font-size: 0.72rem; color: #aab2c4; white-space: nowrap; }

/* === Credit counter (fixed bottom-left) === */
#credit-counter {
  position: fixed; bottom: 14px; left: 14px;
  background: rgba(14,18,30,.9); color: #c8d0e0;
  border-radius: 12px; padding: 10px 14px; min-width: 150px;
  font-size: 0.75rem; z-index: 9999;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: auto;
}
#credit-counter .cc-label,
#credit-counter .cc-bar,
#credit-counter .cc-row,
#credit-counter .cc-sep { pointer-events: none; }
.cc-label { font-size: .68rem; color: #5a667a; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.cc-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 7px; }
.cc-bar-fill { height: 100%; border-radius: 3px; transition: width .5s ease, background .4s ease; }
.cc-bar-indeterminate { width: 30%; background: #4a6cf7; animation: cc-slide 1.4s ease-in-out infinite; }
@keyframes cc-slide { 0%{transform:translateX(-100%)} 100%{transform:translateX(400%)} }
.cc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cc-count { font-size: .8rem; font-weight: 600; color: #d8e0f0; }
.cc-delta { font-size: .72rem; font-weight: 700; color: #6cbf82; animation: cc-pop .35s ease; }
@keyframes cc-pop { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:none} }
.cc-flash { animation: cc-glow .7s ease; }
@keyframes cc-glow { 0%,100%{box-shadow:none} 40%{box-shadow:0 0 0 3px rgba(74,108,247,.35)} }

/* === Verbose agent thinking panel === */
.agent-thinking-panel { padding: 4px 0 2px; }

.atp-header {
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid #edf0f7;
  font-size: .85rem; font-weight: 600; color: #2d3748;
}
.atp-header-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid #dde3ed; border-top-color: #4a6cf7;
  border-radius: 50%; animation: ai-spin .7s linear infinite; flex-shrink: 0;
}

.atp-steps { display: flex; flex-direction: column; gap: 5px; }

.atp-step {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; padding: 5px 9px; border-radius: 7px;
  animation: atp-in .22s ease;
}
@keyframes atp-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.atp-step.is-active { background: #eef1fd; color: #2f4ac4; }
.atp-step.is-done   { background: #f5f7fa; color: #5a6272; }

.atp-step-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: .8rem; color: #6cbf82; }
.atp-step.is-active .atp-step-icon { color: #4a6cf7; }
.atp-step-spinner {
  display: inline-block; width: 11px; height: 11px;
  border: 2px solid #c5ccf5; border-top-color: #4a6cf7;
  border-radius: 50%; animation: ai-spin .7s linear infinite;
}
.atp-step-label { font-weight: 500; }
.atp-step-iter  { font-size: .7rem; padding: 1px 5px; border-radius: 4px; background: #e8ecf7; color: #7080b0; }
.atp-step-model { font-size: .7rem; color: #9aa0b2; margin-left: auto; white-space: nowrap; }

/* Collapsed thinking above the answer */
.atp-details { margin-bottom: 10px; border: 1px solid #e9ecf3; border-radius: 8px; overflow: hidden; }
.atp-details-summary {
  list-style: none; display: flex; align-items: center; gap: 5px;
  padding: 7px 12px; font-size: .78rem; color: #8b95a6;
  cursor: pointer; background: #f8f9fc; user-select: none;
}
.atp-details-summary::-webkit-details-marker { display: none; }
.atp-details-summary::before { content: "▶ "; font-size: .6rem; }
.atp-details[open] .atp-details-summary::before { content: "▼ "; }
.atp-steps-done { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.atp-steps-done .atp-step { background: transparent; }
.agent-answer-text p:first-child { margin-top: 0; }
.agent-error-text {
  margin-top: .5rem;
  padding: .5rem .75rem;
  background: rgba(224,82,82,.12);
  border: 1px solid rgba(224,82,82,.35);
  border-radius: 6px;
  color: #f08080;
  font-size: .85rem;
  white-space: pre-wrap;
}

.cc-sep { height: 1px; background: rgba(255,255,255,.06); margin: 7px 0; }
/* === Streaming token area === */
.agent-stream-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  font-size: inherit;
  color: inherit;
}
.agent-stream-text::after {
  content: '▋';
  color: #4a6cf7;
  animation: blink .75s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ask_user inline prompt */
.ask-user-prompt {
  margin-top: .75rem;
  padding: .75rem 1rem;
  background: #dce6ff;
  border: 1px solid #9fb5f5;
  border-radius: 8px;
}
.ask-user-question {
  font-size: .9rem;
  font-weight: 600;
  color: #0f1c4d;
  margin-bottom: .5rem;
  white-space: pre-wrap;
  line-height: 1.5;
}
.ask-user-input-row {
  display: flex;
  gap: .5rem;
}
.ask-user-input {
  flex: 1;
  font-size: .875rem;
  padding: .375rem .625rem;
  background: #1a1f3a;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  color: #e0e4f4;
  outline: none;
}
.ask-user-input:focus { border-color: #4a6cf7; }
.ask-user-btn { flex-shrink: 0; }
.ask-user-status {
  margin-top: .35rem;
  font-size: .75rem;
  color: #e05252;
  min-height: 1em;
}

/* === Profile widget (credit counter augmentation) === */
.cc-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 2px 0 6px;
}
.cc-user:hover .cc-username { color: #a0b2d0; }
.cc-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #4a6cf7;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cc-username {
  font-size: .78rem;
  font-weight: 600;
  color: #d8e0f0;
  transition: color .15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}
.cc-profile-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 5px 0;
  background: rgba(74,108,247,.15);
  border: 1px solid rgba(74,108,247,.35);
  border-radius: 6px;
  color: #7ea0ff;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s, color .15s;
}
.cc-profile-btn:hover { background: rgba(74,108,247,.3); color: #aec2ff; }

/* === Plan cards === */
.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.plan-card {
  border: 2px solid var(--color-border-soft);
  border-radius: 16px;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}
.plan-card--pro { border-color: #4a6cf7; }
.plan-card--current { border-color: #0b8043; }
.plan-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: #edf0f7;
  color: #6d7484;
  width: fit-content;
}
.plan-badge--highlight { background: #e8eeff; color: #4a6cf7; }
.plan-badge--active { background: #e3f5ec; color: #0b8043; }
.plan-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}
.plan-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: .85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.plan-features li::before { content: "✓ "; color: #4a6cf7; font-weight: 700; }
.plans-loading { color: #6d7484; font-size: .9rem; padding: 16px 0; }
.plans-modal-card { max-width: 600px; width: 100%; }

/* === Payment failed banner === */
.payment-failed-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: #b3261e;
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
}
.payment-failed-banner > span { flex: 1; }
.payment-failed-banner button {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: .82rem;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.payment-failed-banner button:hover { background: rgba(255,255,255,.32); }
.pfb-close {
  background: none !important;
  border: none !important;
  font-size: 1.2rem !important;
  opacity: .7;
  padding: 0 !important;
}
.pfb-close:hover { opacity: 1; }

/* === Profile modal === */
.profile-modal-card {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.profile-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border-soft);
}
.profile-section-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 10px;
}
.profile-section-hint {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}
.profile-past-due-banner {
  background: #fce8e6;
  border: 1px solid #f5c2bf;
  color: #b3261e;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 12px;
}
