/* ============================================================
   Majster AI — Plugin Styles
   ============================================================ */

/* Reset / Base */
.ba-wrap *,
.ba-wrap *::before,
.ba-wrap *::after {
    box-sizing: border-box;
}

.ba-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Steps ---- */
.ba-step { display: block; }
.ba-step[hidden] { display: none !important; }

/* ---- Titles ---- */
.ba-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2e4a;
    margin-bottom: 8px;
}

.ba-subtitle {
    color: #666;
    margin-bottom: 24px;
}

/* ---- Fields ---- */
.ba-field {
    margin-bottom: 20px;
}

.ba-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #1a2e4a;
}

.ba-required {
    color: #e63946;
    margin-left: 2px;
}

.ba-field select,
.ba-field textarea,
.ba-field input[type="email"],
.ba-field input[type="text"],
.ba-field input[type="number"],
.ba-field input[type="url"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d0d7de;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background: #fff;
    transition: border-color .2s;
    -webkit-appearance: none;
    appearance: none;
}

.ba-field select:focus,
.ba-field textarea:focus,
.ba-field input:focus {
    outline: none;
    border-color: #1a5fa8;
    box-shadow: 0 0 0 3px rgba(26, 95, 168, .15);
}

.ba-field textarea {
    resize: vertical;
    min-height: 120px;
}

.ba-hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* ---- Char counter ---- */
.ba-char-count {
    font-size: 0.8rem;
    color: #aaa;
    display: block;
    text-align: right;
    margin-top: 4px;
}

#ba-char-num.ba-char-ok {
    color: #2ea84f;
    font-weight: 600;
}

/* ---- Drop Zone ---- */
.ba-drop-zone {
    border: 2px dashed #b0bec5;
    border-radius: 12px;
    padding: 36px 24px;
    min-height: 120px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
}

.ba-drop-zone:hover,
.ba-drop-zone:focus,
.ba-drop-zone--over {
    border-color: #1a5fa8;
    background: #eef4ff;
    outline: none;
}

.ba-drop-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.ba-drop-text {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

.ba-drop-hint {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: #999;
}

.ba-link-btn {
    background: none;
    border: none;
    color: #1a5fa8;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

/* ---- Photo Previews ---- */
.ba-photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ba-photo-preview {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #d0d7de;
    background: #f0f0f0;
}

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

.ba-photo-preview--done {
    border-color: #2ea84f;
}

.ba-photo-preview--error {
    border-color: #e63946;
}

.ba-photo-delete {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background .15s;
}
.ba-photo-delete:hover,
.ba-photo-delete:focus-visible {
    background: rgba(0,0,0,.8);
    outline: none;
}

.ba-photo-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 11px;
}

/* ---- Progress Bar ---- */
.ba-upload-progress {
    margin-top: 10px;
}

.ba-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.ba-progress-fill {
    height: 100%;
    background: #1a5fa8;
    width: 0%;
    transition: width .3s;
}

.ba-progress-text {
    font-size: 0.78rem;
    color: #888;
    display: block;
    margin-top: 4px;
}

/* ---- Price Box (legacy, hidden) ---- */
.ba-price-box { display: none; }

/* ---- Credit Notice ---- */
.ba-credit-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #16a34a;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 20px 0;
    font-size: 14px;
    font-weight: 500;
    color: #15803d;
}

.ba-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a5fa8;
    margin-left: 8px;
}

.ba-price-note {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: #666;
}

/* ---- Input prefix ---- */
.ba-input-prefix-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ba-input-prefix-wrap input {
    padding-right: 52px;
}

.ba-input-prefix {
    position: absolute;
    right: 14px;
    font-size: 0.9rem;
    color: #888;
    pointer-events: none;
}

/* ---- Buttons ---- */
.ba-btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, opacity .2s;
}

.ba-btn--primary {
    background: #1a5fa8;
    color: #fff;
}

.ba-btn--primary:hover {
    background: #14509e;
    color: #fff;
}

.ba-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.ba-btn:focus-visible {
    outline: 3px solid rgba(26, 95, 168, 0.4);
    outline-offset: 2px;
}

.ba-btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

.ba-btn--large {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* ---- Error ---- */
.ba-error {
    background: #fff0f0;
    border: 1px solid #ffc4c4;
    border-left: 4px solid #e63946;
    color: #c0392b;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 0.9rem;
}

/* ---- Notices ---- */
.ba-notice {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.ba-notice--info {
    background: #e8f4fd;
    border-left: 4px solid #1a5fa8;
    color: #0c3d6e;
}

.ba-notice--warning {
    background: #fff8e1;
    border-left: 4px solid #f39c12;
    color: #7d5a00;
}

.ba-notice--error {
    background: #fff0f0;
    border-left: 4px solid #e63946;
    color: #c0392b;
}

/* ---- Spinner ---- */
.ba-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a5fa8;
    border-radius: 50%;
    animation: ba-spin .8s linear infinite;
    margin: 24px auto;
}

.ba-spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ba-spin .6s linear infinite;
}

@keyframes ba-spin {
    to { transform: rotate(360deg); }
}

/* ---- Waiting Step ---- */
.ba-report-pending {
    text-align: center;
    padding: 40px 0;
}

/* ---- Success Icon ---- */
.ba-success-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 16px;
}

/* ---- Report View ---- */
.ba-report {
    max-width: 720px;
    margin: 0 auto;
}

.ba-report__header {
    border-bottom: 2px solid #e8f0fb;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.ba-report__title {
    font-size: 1.6rem;
    color: #1a2e4a;
    margin: 0 0 6px;
}

.ba-report__meta {
    color: #888;
    font-size: 0.85rem;
    margin: 0;
}

.ba-report__section {
    margin-bottom: 28px;
}

.ba-report__section h2 {
    font-size: 1.05rem;
    color: #1a5fa8;
    border-bottom: 1px solid #d9e8fb;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.ba-report__section--flags h2 {
    color: #b35900;
    border-color: #ffe0b2;
}

.ba-price-range {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ba-price-range__min,
.ba-price-range__max {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a5fa8;
}

.ba-price-range__dash {
    color: #999;
    font-size: 1.4rem;
}

.ba-confidence {
    font-size: 0.82rem;
    color: #888;
}

.ba-checklist {
    padding-left: 20px;
}

.ba-checklist li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.ba-checklist--warning li {
    color: #7d4800;
}

.ba-checklist--warning li::marker {
    content: "⚠️ ";
}

.ba-report__disclaimer {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.6;
    margin-top: 32px;
}

/* ---- Report header-top (back + PDF buttons) ---- */
.ba-report__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ba-btn-back {
    font-size: 0.9rem;
    color: #1a5fa8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity .2s;
}

.ba-btn-back:hover { opacity: .7; }

/* ---- Secondary button ---- */
.ba-btn--secondary {
    background: #fff;
    color: #1a5fa8;
    border: 2px solid #1a5fa8;
}

.ba-btn--secondary:hover {
    background: #eef4ff;
    color: #1a5fa8;
}

.ba-btn--sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ---- Photo gallery (report view) ---- */
.ba-photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.ba-photo-thumb {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #d0d7de;
    transition: border-color .2s, transform .2s;
    flex-shrink: 0;
}

.ba-photo-thumb:hover {
    border-color: #1a5fa8;
    transform: scale(1.04);
}

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

/* ---- Questions list with checkboxes ---- */
.ba-questions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ba-questions-list__item {
    margin-bottom: 10px;
}

.ba-question-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}

.ba-question-check {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #1a5fa8;
    cursor: pointer;
}

.ba-question-label span {
    flex: 1;
}

/* ---- Red flags list ---- */
.ba-red-flags {
    padding-left: 20px;
    margin: 0;
}

.ba-red-flags li {
    margin-bottom: 8px;
    color: #7d4800;
    line-height: 1.5;
}

.ba-red-flags li::marker {
    content: "⚠ ";
}

/* ---- My estimates page ---- */
.ba-estimates-page .ba-title {
    margin-bottom: 24px;
}

.ba-estimates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

/* ---- Estimate card ---- */
.ba-estimate-card {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, border-color .2s;
}

.ba-estimate-card:hover {
    box-shadow: 0 4px 16px rgba(26, 47, 74, .1);
    border-color: #b0bec5;
}

.ba-estimate-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 16px 0;
}

.ba-estimate-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ba-estimate-card__city {
    font-weight: 700;
    font-size: 1rem;
    color: #1a2e4a;
}

.ba-estimate-card__service {
    font-size: 0.82rem;
    color: #666;
}

.ba-estimate-card__body {
    padding: 12px 16px;
    flex: 1;
}

.ba-estimate-card__price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a5fa8;
    margin-bottom: 6px;
}

.ba-estimate-card__pending-text {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ba-estimate-card__date {
    font-size: 0.78rem;
    color: #aaa;
    margin: 4px 0 0;
}

.ba-estimate-card__footer {
    padding: 0 16px 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ba-estimate-card__footer .ba-btn {
    flex: 0 0 auto;
}

/* ---- Status badges ---- */
.ba-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ba-badge--pending {
    background: #fff3e0;
    color: #e65100;
}

.ba-badge--processing {
    background: #e3f2fd;
    color: #0d47a1;
}

.ba-badge--done {
    background: #e8f5e9;
    color: #1b5e20;
}

.ba-badge--error {
    background: #ffebee;
    color: #b71c1c;
}

/* ---- Dark spinner variant ---- */
.ba-spinner-sm--dark {
    border-color: rgba(0, 0, 0, .15);
    border-top-color: #1a5fa8;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .ba-wrap { padding: 0 8px; }
    .ba-price-range { flex-direction: column; align-items: flex-start; gap: 4px; }
    .ba-price-range__min, .ba-price-range__max { font-size: 1.4rem; }
    .ba-photo-preview { width: 72px; height: 72px; }
    .ba-estimates-grid { grid-template-columns: 1fr; }
    .ba-photo-thumb { width: 80px; height: 80px; }
}

/* ── Kredyty weryfikacji — widget na /moje-wyceny/ ─────────────── */
.ba-credits-widget {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
}
.ba-credits-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ba-credits-number {
    font-size: 28px;
    font-weight: 700;
    color: #2563EB;
    line-height: 1;
}
.ba-credits-label {
    font-size: 13px;
    color: #6b7280;
}
.ba-credits-action {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: auto;
}
.ba-credits-action-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* ============================================================
   Report — nowe sekcje
   ============================================================ */

/* Uzasadnienie ceny */
.ba-price-note {
    font-size: 13px;
    color: #555;
    margin: 8px 0 0;
}

/* Pewność szacunku */
.ba-confidence {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 8px;
}
.ba-confidence--high   { background: #d1fae5; color: #065f46; }
.ba-confidence--medium { background: #fef3c7; color: #92400e; }
.ba-confidence--low    { background: #fee2e2; color: #991b1b; }

/* Rozkład kosztów */
.ba-cost-breakdown { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ba-cost-item { display: flex; flex-direction: column; gap: 4px; }
.ba-cost-bar {
    height: 8px;
    border-radius: 4px;
    background: #1a5fa8;
    min-width: 10px;
    max-width: 100%;
}
.ba-cost-bar--materials { background: #2ea84f; }
.ba-cost-bar--other     { background: #9ca3af; }
.ba-cost-label { font-size: 13px; }
.ba-cost-label strong { display: block; }
.ba-cost-label span { color: #555; }

/* Etapy prac */
.ba-stages { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ba-stage {
    display: flex;
    gap: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
}
.ba-stage__number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1a5fa8;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ba-stage__content { flex: 1; }
.ba-stage__content h4 { margin: 0 0 4px; font-size: 14px; }
.ba-stage__content p  { margin: 0 0 6px; font-size: 13px; color: #555; }
.ba-stage__meta { display: flex; gap: 12px; font-size: 12px; color: #666; flex-wrap: wrap; }

/* Tabela materiałów */
.ba-materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}
.ba-materials-table th {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 7px 10px;
    text-align: left;
    font-size: 12px;
}
.ba-materials-table td {
    border: 1px solid #e5e7eb;
    padding: 7px 10px;
    vertical-align: top;
}
.ba-materials-table tr:nth-child(even) td { background: #f9fafb; }
.ba-mat-note { color: #888; font-size: 11px; }
@media (max-width: 640px) {
    .ba-materials-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 12px;
    }
    .ba-materials-table th,
    .ba-materials-table td { padding: 6px 8px; }
    .ba-standards-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Listy */
.ba-list          { padding-left: 20px; margin: 8px 0; }
.ba-list li       { margin-bottom: 6px; line-height: 1.5; font-size: 14px; }
.ba-list--warning li { color: #92400e; }
.ba-list--warning li::marker { content: "⚠ "; }
.ba-list--danger  li { color: #991b1b; }
.ba-list--danger  li::marker { content: "🚩 "; }
.ba-list--tips    li { color: #1e40af; }
.ba-list--tips    li::marker { content: "💡 "; }

/* Kolorowe sekcje */
.ba-report__section--warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
}
.ba-report__section--danger {
    background: #fff1f2;
    border-left: 4px solid #ef4444;
    border-radius: 0 8px 8px 0;
}
.ba-report__section--tips {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
}

/* Grid szczegółów */
.ba-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.ba-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
}
.ba-detail-item--full { grid-column: 1 / -1; }
.ba-detail-label { font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.ba-detail-value { font-size: 13px; color: #111; line-height: 1.5; }

/* Meta note */
.ba-meta-note { font-size: 12px; color: #888; border-top: 1px solid #eee; padding-top: 12px; margin-top: 20px; }

/* ============================================================
   Print / PDF
   ============================================================ */
@media print {
    body { font-size: 11pt; color: #000; background: #fff; }
    .site-header, .site-footer,
    .ba-report__header-top, #wpadminbar,
    .ba-verify-banner, .widget-area,
    .ba-photo-gallery { display: none !important; }
    .ba-wrap.ba-report { max-width: 100%; padding: 0; }
    .ba-report__section { break-inside: avoid; margin-bottom: 16pt; }
    .ba-price-range { font-size: 20pt; }
    a { color: #000; text-decoration: none; }
    .ba-report__header::before {
        content: "UczciwyRemont.pl — Raport wyceny AI";
        display: block;
        font-size: 9pt;
        color: #666;
        border-bottom: 1px solid #ccc;
        padding-bottom: 6pt;
        margin-bottom: 14pt;
    }
    .ba-cost-bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .ba-report__section--warning,
    .ba-report__section--danger,
    .ba-report__section--tips { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ============================================================
   Price cards — z/bez materiałów
   ============================================================ */
.ba-metraz-info {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 16px;
    color: #374151;
}
.ba-price-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}
@media (max-width: 600px) {
    .ba-price-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .ba-price-card { padding: 14px 16px; }
    .ba-price-range { font-size: 22px; }
}
.ba-price-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
}
.ba-price-card--main {
    background: #eff6ff;
    border-color: #1a5fa8;
}
.ba-price-card__label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ba-tooltip {
    cursor: help;
    color: #9ca3af;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ba-price-range {
    font-size: 26px;
    font-weight: 700;
    color: #1a5fa8;
    margin: 6px 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.ba-price-range--secondary {
    font-size: 20px;
    color: #374151;
}
.ba-price-sep { color: #9ca3af; margin: 0 4px; }
.ba-price-card__note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}
.ba-price-justify {
    font-size: 13px;
    color: #555;
    margin: 10px 0 0;
    line-height: 1.6;
}

/* Standard materiałów */
.ba-standard-info {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}
.ba-standard-info p { margin: 6px 0 0; font-size: 13px; color: #555; }
.ba-standard-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}
.ba-standard-ekonomiczny { background: #d1fae5; color: #065f46; }
.ba-standard-sredni       { background: #fef3c7; color: #92400e; }
.ba-standard-premium      { background: #ede9fe; color: #5b21b6; }

/* Tabela porównania standardów */
.ba-standards-compare { margin-top: 16px; }
.ba-standards-compare h4 { font-size: 13px; color: #6b7280; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.ba-standards-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ba-standards-table th,
.ba-standards-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.ba-standards-table th { background: #f3f4f6; font-size: 12px; }
.ba-standard-active { background: #eff6ff; }
.ba-standard-active td { font-weight: 600; }

/* Elektryka */
.ba-report-electric {
    background: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
}
.ba-electric-cost {
    font-size: 15px;
    margin: 10px 0;
}
.ba-electric-cost strong { color: #92400e; }
.ba-electric-note {
    font-size: 13px;
    color: #92400e;
    margin: 6px 0 0;
}

/* Brakujące info */
.ba-report-info {
    background: #f0f9ff !important;
    border-left: 4px solid #0ea5e9 !important;
}
.ba-ocena-opisu {
    margin-top: 10px;
    font-size: 14px;
    color: #374151;
}

/* ============================================================
   Responsywność — mobile fixes
   ============================================================ */

/* Credits widget mobile */
@media (max-width: 768px) {
    .ba-credits-widget {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
    .ba-credits-action {
        margin-left: 0;
        width: 100%;
    }
    .ba-btn--sm { min-height: 40px; }
}

/* Stages mobile */
@media (max-width: 480px) {
    .ba-stage { gap: 10px; padding: 10px 12px; }
    .ba-stage__number { width: 24px; height: 24px; font-size: 12px; }
}

/* Estimates grid mobile */
@media (max-width: 480px) {
    .ba-estimates-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .ba-estimate-card__header {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Photo gallery mobile — horizontal scroll */
@media (max-width: 480px) {
    .ba-photo-gallery {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .ba-photo-thumb {
        flex-shrink: 0;
        width: 80px;
        height: 80px;
    }
}

/* Drop zone mobile */
@media (max-width: 480px) {
    .ba-drop-zone { padding: 24px 16px; min-height: 100px; }
}

/* Form wrapper mobile */
@media (max-width: 600px) {
    .ba-form-wrap { padding: 20px 16px; }
    .ba-report-wrap { padding: 16px; }
}

/* ============================================================
   Dashboard użytkownika — [ba_dashboard]
   ============================================================ */

.ba-dashboard {
    max-width: 940px;
}

/* ── Banner kredytów ── */
.ba-dashboard-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--color-primary-light, #eff6ff);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
}
.ba-dashboard-banner__credits {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.ba-dashboard-banner__count {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary, #2563eb);
    line-height: 1;
}
.ba-dashboard-banner__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Zakładki ── */
.ba-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--color-border, #e5e7eb);
    margin-bottom: 24px;
}
.ba-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray, #6b7280);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.ba-tab:hover {
    color: var(--color-primary, #2563eb);
}
.ba-tab--active {
    color: var(--color-primary, #2563eb);
    border-bottom-color: var(--color-primary, #2563eb);
}
.ba-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    background: var(--color-primary-light, #eff6ff);
    color: var(--color-primary, #2563eb);
    border-radius: 20px;
}
.ba-tab--active .ba-tab__count {
    background: var(--color-primary, #2563eb);
    color: #fff;
}

/* ── Tabela ── */
.ba-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1.5px solid var(--color-border, #e5e7eb);
}
.ba-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.ba-dashboard-table thead th {
    background: var(--color-light-gray, #f9fafb);
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray, #6b7280);
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--color-border, #e5e7eb);
}
.ba-dashboard-table tbody tr {
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    transition: background .12s;
}
.ba-dashboard-table tbody tr:last-child {
    border-bottom: none;
}
.ba-dashboard-table tbody tr:hover {
    background: var(--color-light-gray, #f9fafb);
}
.ba-dashboard-table td {
    padding: 12px 16px;
    color: var(--color-dark, #111827);
    vertical-align: middle;
}
.ba-col-date     { white-space: nowrap; color: var(--color-gray, #6b7280); font-size: 0.8rem; }
.ba-col-service  { font-weight: 500; }
.ba-col-city     { color: var(--color-gray, #6b7280); }
.ba-col-price    { font-weight: 600; white-space: nowrap; }
.ba-col-price__empty { color: var(--color-gray, #6b7280); font-weight: 400; }
.ba-col-actions  { white-space: nowrap; }

/* ── Puste panele ── */
.ba-dashboard-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--color-gray, #6b7280);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ── Nowe statusy badges ── */
.ba-badge--timeout {
    background: #fffbeb;
    color: #92400e;
}
.ba-badge--failed {
    background: #fef2f2;
    color: #991b1b;
}
.ba-badge--unpaid {
    background: #fff7ed;
    color: #c2410c;
}

/* ── Ocena AI ── */
.ba-ai-score {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}
.ba-ai-score--high   { background: #d1fae5; color: #065f46; }
.ba-ai-score--medium { background: #fef3c7; color: #92400e; }
.ba-ai-score--low    { background: #fee2e2; color: #991b1b; }

/* ── Spinner inline (przy "W trakcie analizy") ── */
.ba-spinner-inline {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ba-spin .6s linear infinite;
    vertical-align: middle;
    opacity: .7;
}

/* ── Button xs ── */
.ba-btn--xs {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ── Responsive: mobile cards ── */
@media (max-width: 640px) {
    .ba-dashboard-table thead { display: none; }
    .ba-dashboard-table tbody tr {
        display: block;
        padding: 12px 16px;
        border-bottom: 1px solid var(--color-border, #e5e7eb);
    }
    .ba-dashboard-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        font-size: 0.875rem;
    }
    .ba-dashboard-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-gray, #6b7280);
        font-size: 0.75rem;
        min-width: 90px;
    }
    .ba-col-date, .ba-col-city { font-size: 0.875rem; color: inherit; }
    .ba-table-wrap {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* ---- No-credits panel (form-verification.php) ---- */
.ba-no-credits-panel {
    text-align: center;
}

.ba-no-credits-panel .ba-title {
    margin-top: 8px;
}

.ba-no-credits-notice {
    display: inline-block;
    font-size: 0.85rem;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 6px 14px;
    margin-bottom: 20px;
}

.ba-credits-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #555;
}

.ba-credits-note a {
    color: #1a56db;
    text-decoration: underline;
}
