/* Zgłoszenia – formularz klienta i skrzynka administratora */
.feedback-screen .feedback-hero {
    min-height: 0;
    padding: 21.5px 26px;
    gap: 29px;
}

.feedback-screen .feedback-hero h1 {
    font-size: clamp(20px, 1.8vw, 26px);
}

/* Wspólne: znaczniki statusu */
.fb-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 849px;
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.fb-status::before {
    width: 5px;
    height: 5px;
    border-radius: 849px;
    content: "";
    background: currentColor;
}

.fb-status.is-new { color: #b45309; background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; }
.fb-status.is-in_progress { color: #1d4ed8; background: #eff6ff; box-shadow: inset 0 0 0 1px #bfdbfe; }
.fb-status.is-resolved { color: #047857; background: #ecfdf5; box-shadow: inset 0 0 0 1px #a7f3d0; }
.fb-status.is-rejected { color: #64748b; background: #f1f5f9; box-shadow: inset 0 0 0 1px #e2e8f0; }

.fb-empty {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 29px 14.5px;
    color: #64748b;
    text-align: center;
}

.fb-empty > span {
    display: grid;
    place-items: center;
    width: 42.5px;
    height: 42.5px;
    margin-bottom: 4.5px;
    border-radius: 13.5px;
    color: #2563eb;
    background: #eff6ff;
}

.fb-empty strong { color: #0f172a; font-size: 11px; }
.fb-empty p { max-width: 320px; margin: 0; font-size: 9.5px; }

/* ===== KLIENT ===== */
.fb-client {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 19px;
    align-items: start;
}

.feedback-screen .fb-composer {
    padding: 0;
    overflow: clip;
    border-radius: 18.5px;
}

.fb-composer-head {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 18.5px 21.5px 16px;
    border-bottom: 1px solid #edf1f7;
    background: linear-gradient(145deg, #fff, #f7faff);
}

.fb-composer-icon {
    display: grid;
    flex: 0 0 37.5px;
    place-items: center;
    width: 37.5px;
    height: 37.5px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #4f46e5);
    box-shadow: 0 10px 22px rgba(79, 70, 229, .25);
}

.fb-composer-icon .icon { width: 16.5px; height: 16.5px; }

.fb-composer-head h2 {
    margin: 4px 0 4px;
    color: #0f172a;
    font-size: 15.5px;
    letter-spacing: -.02em;
}

.fb-composer-head p {
    margin: 0;
    color: #64748b;
    font-size: 10.5px;
}

.fb-form {
    display: grid;
}

.fb-step {
    display: grid;
    gap: 11px;
    padding: 16px 21.5px;
    border-bottom: 1px solid #f0f3f8;
}

.fb-step-label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fb-step-label > span {
    display: grid;
    flex: 0 0 19.5px;
    place-items: center;
    width: 19.5px;
    height: 19.5px;
    border-radius: 7px;
    color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #dbeafe;
    font-size: 9px;
    font-weight: 800;
}

.fb-step-label strong {
    color: #0f172a;
    font-size: 11px;
}

.fb-step-label small {
    margin-left: auto;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
}

/* Rodzaj */
.fb-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.fb-type {
    --accent: #2563eb;
    --accent-soft: #eff6ff;
    position: relative;
    display: flex;
    gap: 9.5px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 13.5px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.fb-type.is-bug { --accent: #dc2626; --accent-soft: #fef2f2; }
.fb-type.is-suggestion { --accent: #d97706; --accent-soft: #fffbeb; }
.fb-type.is-other { --accent: #7c3aed; --accent-soft: #f5f3ff; }

.fb-type input,
.fb-priority input,
.fb-segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fb-type:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.fb-type:has(input:checked) {
    border-color: var(--accent);
    background: linear-gradient(145deg, #fff, var(--accent-soft));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.fb-type:has(input:focus-visible) {
    outline: 3px solid rgba(37, 99, 235, .3);
    outline-offset: 2px;
}

.fb-type-icon {
    display: grid;
    flex: 0 0 33px;
    place-items: center;
    width: 33px;
    height: 33px;
    border-radius: 10px;
    color: var(--accent);
    background: var(--accent-soft);
}

.fb-type-icon .icon { width: 15px; height: 15px; }

.fb-type-copy { min-width: 0; }

.fb-type-copy strong {
    display: block;
    color: #0f172a;
    font-size: 10.5px;
}

.fb-type-copy small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 9px;
    line-height: 1.35;
}

.fb-type-check {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 16.5px;
    height: 16.5px;
    border-radius: 849px;
    color: #fff;
    background: var(--accent);
    opacity: 0;
    transform: scale(.6);
    transition: .18s ease;
}

.fb-type-check .icon { width: 10px; height: 10px; }

.fb-type:has(input:checked) .fb-type-check {
    opacity: 1;
    transform: scale(1);
}

/* Priorytet */
.fb-priority {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.fb-priority label {
    position: relative;
    cursor: pointer;
}

.fb-priority span {
    display: flex;
    gap: 6.5px;
    align-items: center;
    justify-content: center;
    min-height: 33.5px;
    padding: 0 7px;
    border-radius: 9.5px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
    transition: .15s ease;
}

.fb-priority i {
    width: 6.5px;
    height: 6.5px;
    border-radius: 849px;
}

.fb-priority .is-low i { background: #22c55e; }
.fb-priority .is-normal i { background: #f59e0b; }
.fb-priority .is-high i { background: #ef4444; }

.fb-priority label:hover span { color: #0f172a; }

.fb-priority input:checked + span {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .1);
}

.fb-priority .is-high input:checked + span {
    color: #b91c1c;
    background: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, .18), inset 0 0 0 1px #fecaca;
}

.fb-priority input:focus-visible + span {
    outline: 3px solid rgba(37, 99, 235, .3);
}

/* Pola */
.fb-field { display: grid; gap: 6.5px; }

.fb-field-head {
    display: flex;
    gap: 8px;
    align-items: baseline;
    justify-content: space-between;
}

.fb-field-head label {
    color: #334155;
    font-size: 10.5px;
    font-weight: 700;
}

.fb-field-head em {
    margin-left: 4px;
    color: #94a3b8;
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
}

.fb-counter {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.fb-counter.is-short { color: #d97706; }
.fb-counter.is-ok { color: #059669; }

.fb-input {
    position: relative;
}

.fb-input > .icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 14px;
    height: 14px;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.feedback-screen .fb-input input,
.feedback-screen .fb-textarea textarea {
    width: 100%;
    border: 1px solid #d8e3f0;
    border-radius: 11px;
    color: #0f172a;
    background: #fff;
    font: inherit;
    font-size: 11px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.feedback-screen .fb-input input {
    min-height: 40px;
    padding: 0 11.5px 0 31.5px;
}

.feedback-screen .fb-input input:focus,
.feedback-screen .fb-textarea:focus-within {
    border-color: #60a5fa;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.fb-textarea {
    overflow: hidden;
    border: 1px solid #d8e3f0;
    border-radius: 11px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.feedback-screen .fb-textarea textarea {
    display: block;
    min-height: 84px;
    padding: 10px 11.5px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    resize: vertical;
}

.feedback-screen .fb-textarea textarea:focus {
    outline: 0;
    box-shadow: none;
}








.fb-safe,
.fb-hint {
    display: flex;
    gap: 5px;
    align-items: center;
    color: #64748b;
    font-size: 9.5px;
}

.fb-safe .icon {
    width: 12.5px;
    height: 12.5px;
    color: #2563eb;
}

.fb-submit {
    position: sticky;
    z-index: 4;
    bottom: 0;
    display: flex;
    gap: 13px;
    align-items: center;
    justify-content: space-between;
    padding: 11.5px 21.5px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .05);
    backdrop-filter: blur(12px);
}

.fb-submit > span {
    display: flex;
    gap: 6.5px;
    align-items: center;
    color: #64748b;
    font-size: 9.5px;
}

.fb-submit > span .icon {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
}

.feedback-screen .fb-submit .button {
    flex: 0 0 auto;
    gap: 6.5px;
    min-height: 40px;
    padding: 0 18.5px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8 60%, #4338ca);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .3);
    font-size: 11px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.feedback-screen .fb-submit .button:hover {
    box-shadow: 0 16px 32px rgba(37, 99, 235, .38);
    transform: translateY(-1px);
}

/* Historia klienta */
.fb-history {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 120px);
    overflow: hidden;
    border: 1px solid #e3eaf3;
    border-radius: 18.5px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 58, 108, .07);
}

.fb-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14.5px 14.5px 10px;
    border-bottom: 1px solid #edf1f7;
}

.fb-history-head h2 {
    margin: 3px 0 0;
    color: #0f172a;
    font-size: 13.5px;
}

.fb-count {
    display: grid;
    place-items: center;
    min-width: 27px;
    height: 26px;
    padding: 0 6px;
    border-radius: 8.5px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10.5px;
    font-weight: 800;
}

.fb-history-list {
    display: grid;
    gap: 6.5px;
    padding: 8.5px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.fb-mini {
    border: 1px solid #e8eef6;
    border-radius: 13px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fb-mini:hover { border-color: #c9d8ec; }

.fb-mini[open] {
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}

.fb-mini > summary {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8.5px;
    list-style: none;
    cursor: pointer;
}

.fb-mini > summary::-webkit-details-marker { display: none; }

.fb-mini-icon {
    display: grid;
    flex: 0 0 28px;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8.5px;
}

.fb-mini-icon .icon { width: 13px; height: 13px; }
.fb-mini-icon.is-bug { color: #dc2626; background: #fef2f2; }
.fb-mini-icon.is-suggestion { color: #d97706; background: #fffbeb; }
.fb-mini-icon.is-other { color: #7c3aed; background: #f5f3ff; }

.fb-mini-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.fb-mini-copy strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-mini-copy small {
    color: #94a3b8;
    font-size: 9px;
}

.fb-mini .fb-status {
    padding: 3px 6px;
    font-size: 8px;
}

.fb-mini-reply {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 19.5px;
    height: 19.5px;
    border-radius: 849px;
    color: #fff;
    background: #2563eb;
}

.fb-mini-reply .icon { width: 10px; height: 10px; }

.fb-mini-body {
    display: grid;
    gap: 9.5px;
    padding: 4px 10px 10px;
}

.fb-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.fb-progress li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
}

.fb-progress li::before {
    position: absolute;
    z-index: 0;
    top: 6px;
    right: 50%;
    left: -50%;
    height: 2px;
    content: "";
    background: #e2e8f0;
}

.fb-progress li:first-child::before { display: none; }

.fb-progress i {
    position: relative;
    z-index: 1;
    width: 11.5px;
    height: 11.5px;
    border: 2px solid #e2e8f0;
    border-radius: 849px;
    background: #fff;
}

.fb-progress li.is-done,
.fb-progress li.is-current { color: #1d4ed8; }
.fb-progress li.is-done::before,
.fb-progress li.is-current::before { background: #60a5fa; }
.fb-progress li.is-done i { border-color: #2563eb; background: #2563eb; }
.fb-progress li.is-current i { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.fb-mini.is-resolved .fb-progress li.is-current { color: #047857; }
.fb-mini.is-resolved .fb-progress li.is-current i { border-color: #10b981; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }

.fb-mini-closed {
    margin: 0;
    padding: 6px 7px;
    border-radius: 8.5px;
    color: #64748b;
    background: #f8fafc;
    font-size: 9.5px;
}

.fb-mini-description {
    margin: 0;
    color: #475569;
    font-size: 10px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.fb-mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fb-mini-meta > * {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 3px 6.5px;
    border-radius: 849px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 8.5px;
    font-weight: 650;
}

.fb-mini-meta a { color: #1d4ed8; background: #eff6ff; text-decoration: none; }
.fb-mini-meta .icon { width: 10px; height: 10px; }

.fb-reply {
    display: flex;
    gap: 8px;
    padding: 8.5px;
    border-radius: 12px 12px 12px 4px;
    background: linear-gradient(145deg, #eff6ff, #f5f3ff);
    box-shadow: inset 0 0 0 1px #dbeafe;
}

.fb-reply-avatar {
    display: grid;
    flex: 0 0 24.5px;
    place-items: center;
    width: 24.5px;
    height: 24.5px;
    border-radius: 849px;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #4f46e5);
}

.fb-reply-avatar .icon { width: 11.5px; height: 11.5px; }
.fb-reply strong { color: #1e3a8a; font-size: 9.5px; }
.fb-reply p { margin: 3px 0 4px; color: #1e293b; font-size: 10px; line-height: 1.5; white-space: pre-line; }
.fb-reply small { color: #64748b; font-size: 8px; }

/* ===== ADMIN ===== */
.feedback-screen .fb-inbox {
    padding: 0;
    overflow: clip;
    border-radius: 18.5px;
}

.fb-inbox-toolbar {
    position: sticky;
    z-index: 5;
    top: 0;
    display: grid;
    gap: 11px;
    padding: 11.5px 14.5px;
    border-bottom: 1px solid #e8eef6;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
}

.fb-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    border-radius: 12px;
    background: #f1f5f9;
    scrollbar-width: none;
}

.fb-tabs a {
    display: inline-flex;
    flex: 1 0 auto;
    gap: 6.5px;
    align-items: center;
    justify-content: center;
    min-height: 30.5px;
    padding: 0 10px;
    border-radius: 8.5px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: .15s ease;
}

.fb-tabs a span {
    min-width: 18.5px;
    padding: 1px 5px;
    border-radius: 849px;
    color: #64748b;
    background: #e2e8f0;
    font-size: 9px;
    text-align: center;
}

.fb-tabs a:hover { color: #0f172a; }

.fb-tabs a.is-active {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.fb-tabs a.is-active span { color: #fff; background: #2563eb; }
.fb-tabs a.has-new span { color: #fff; background: #f59e0b; }

.fb-search {
    display: flex;
    flex-wrap: wrap;
    gap: 6.5px;
    align-items: center;
}

.fb-search-input {
    position: relative;
    flex: 1 1 262.5px;
}

.fb-search-input .icon {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 13px;
    height: 13px;
    color: #94a3b8;
    transform: translateY(-50%);
}

.feedback-screen .fb-search input,
.feedback-screen .fb-search select {
    width: 100%;
    min-height: 33.5px;
    border: 1px solid #d8e3f0;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 10.5px;
}

.feedback-screen .fb-search input { padding: 0 10px 0 27.5px; }
.feedback-screen .fb-search select { width: auto; min-width: 136px; padding: 0 8.5px; }

.feedback-screen .fb-search input:focus,
.feedback-screen .fb-search select:focus {
    border-color: #60a5fa;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.feedback-screen .fb-search .button { min-height: 33.5px; border-radius: 10px; }

.fb-clear {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 0 6px;
    color: #64748b;
    font-size: 9.5px;
    font-weight: 650;
    text-decoration: none;
}

.fb-clear:hover { color: #dc2626; }
.fb-clear .icon { width: 11.5px; height: 11.5px; }

.fb-inbox-list {
    display: grid;
}

.feedback-screen .fb-ticket {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 19px;
    margin: 0;
    padding: 14.5px 17.5px 14.5px 20px;
    border: 0;
    border-bottom: 1px solid #edf1f7;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    transition: background .15s ease;
}

.feedback-screen .fb-ticket:hover {
    background: #fcfdff;
    box-shadow: none;
    transform: none;
}

.feedback-screen .fb-ticket::before {
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 10px;
    width: 4px;
    border-radius: 849px;
    content: "";
    background: #e2e8f0;
}

.feedback-screen .fb-ticket.priority-normal::before { background: #fbbf24; }
.feedback-screen .fb-ticket.priority-high::before { background: #ef4444; }

.feedback-screen .fb-ticket.is-new { background: linear-gradient(90deg, #fffdf5, #fff 40%); }

.fb-ticket-main { min-width: 0; }

.fb-ticket-top {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.fb-ticket-type,
.fb-priority-tag {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px 6.5px;
    border-radius: 849px;
    font-size: 9px;
    font-weight: 700;
}

.fb-ticket-type .icon { width: 10.5px; height: 10.5px; }
.fb-ticket-type.is-bug { color: #b91c1c; background: #fef2f2; }
.fb-ticket-type.is-suggestion { color: #b45309; background: #fffbeb; }
.fb-ticket-type.is-other { color: #6d28d9; background: #f5f3ff; }

.fb-priority-tag { color: #475569; background: #f1f5f9; }
.fb-priority-tag i { width: 5.5px; height: 5.5px; border-radius: 849px; }
.fb-priority-tag.is-low i { background: #22c55e; }
.fb-priority-tag.is-normal i { background: #f59e0b; }
.fb-priority-tag.is-high { color: #b91c1c; background: #fef2f2; }
.fb-priority-tag.is-high i { background: #ef4444; }

.fb-ticket-id {
    margin-left: auto;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fb-ticket-main h3 {
    margin: 7.5px 0 4.5px;
    color: #0f172a;
    font-size: 12.5px;
    letter-spacing: -.01em;
}

.fb-ticket-text,
.fb-ticket-clamp {
    margin: 0;
    color: #475569;
    font-size: 10.5px;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.fb-ticket-description > summary {
    display: grid;
    gap: 5px;
    list-style: none;
    cursor: pointer;
}

.fb-ticket-description > summary::-webkit-details-marker { display: none; }

.fb-ticket-description:not([open]) .fb-ticket-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.fb-ticket-more {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    color: #2563eb;
    font-size: 9.5px;
    font-weight: 700;
}

.fb-ticket-more .icon { width: 11.5px; height: 11.5px; transition: transform .2s ease; }
.fb-ticket-description[open] .fb-ticket-more { font-size: 0; }
.fb-ticket-description[open] .fb-ticket-more::before { content: "Zwiń opis"; font-size: 9.5px; }
.fb-ticket-description[open] .fb-ticket-more .icon { transform: rotate(180deg); }

.fb-ticket-author {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10.5px;
}

.fb-avatar {
    display: grid;
    flex: 0 0 28px;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9.5px;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #6366f1);
    font-size: 9px;
    font-weight: 800;
}

.fb-ticket-author strong { display: block; color: #1e293b; font-size: 10px; }
.fb-ticket-author small { color: #94a3b8; font-size: 9px; }

.fb-ticket-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-left: 6px;
}

.fb-ticket-context > * {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px 6.5px;
    border-radius: 849px;
    color: #475569;
    background: #f1f5f9;
    font-size: 9px;
    font-weight: 650;
    text-decoration: none;
}

.fb-ticket-context a { color: #1d4ed8; background: #eff6ff; }
.fb-ticket-context a:hover { background: #dbeafe; }
.fb-ticket-context .icon { width: 10.5px; height: 10.5px; }

/* Panel obsługi zgłoszenia */
.fb-manage {
    display: grid;
    gap: 9.5px;
    align-content: start;
    padding: 10px;
    border: 1px solid #e8eef6;
    border-radius: 13.5px;
    background: #f8fafc;
}

.fb-segment {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.fb-segment legend,
.fb-manage-reply label {
    margin-bottom: 4.5px;
    padding: 0;
    color: #64748b;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fb-segment > div {
    display: flex;
    gap: 3px;
    padding: 3px;
    border-radius: 9.5px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.fb-segment label {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    cursor: pointer;
}

.fb-segment span {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-height: 25.5px;
    padding: 0 4.5px;
    overflow: hidden;
    border-radius: 7px;
    color: #64748b;
    font-size: 9.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: .15s ease;
}

.fb-segment label:hover span { color: #0f172a; background: #f8fafc; }
.fb-segment input:focus-visible + span { outline: 2px solid #60a5fa; }

.fb-segment i { width: 5.5px; height: 5.5px; border-radius: 849px; }
.fb-segment .is-low i { background: #22c55e; }
.fb-segment .is-normal i { background: #f59e0b; }
.fb-segment .is-high i { background: #ef4444; }

.fb-segment input:checked + span { color: #fff; background: #2563eb; }
.fb-segment .is-new input:checked + span { background: #f59e0b; }
.fb-segment .is-in_progress input:checked + span { background: #2563eb; }
.fb-segment .is-resolved input:checked + span { background: #10b981; }
.fb-segment .is-rejected input:checked + span { background: #64748b; }
.fb-segment .is-low input:checked + span,
.fb-segment .is-normal input:checked + span,
.fb-segment .is-high input:checked + span { color: #0f172a; background: #f1f5f9; box-shadow: inset 0 0 0 1px #cbd5e1; }

.fb-manage-reply { display: grid; }

.feedback-screen .fb-manage-reply textarea {
    min-height: 53px;
    padding: 7px 8.5px;
    border: 1px solid #d8e3f0;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 10.5px;
    resize: vertical;
}

.feedback-screen .fb-manage-reply textarea:focus {
    border-color: #60a5fa;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.fb-manage-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.fb-manage-actions small {
    color: #94a3b8;
    font-size: 9px;
}

.feedback-screen .fb-manage-actions .button { min-height: 30.5px; border-radius: 9.5px; }

.fb-inbox-foot {
    padding: 10px 17.5px;
    color: #94a3b8;
    font-size: 9.5px;
    text-align: center;
}

@media (max-width: 1180px) {
    .fb-client { grid-template-columns: 1fr; }
    .fb-history { position: static; max-height: none; }
    .feedback-screen .fb-ticket { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .feedback-screen .feedback-hero { padding: 16px; }
    .fb-type-grid { grid-template-columns: 1fr; }
    .fb-priority { grid-template-columns: 1fr; }
    .fb-step, .fb-composer-head { padding-right: 13px; padding-left: 13px; }
    .fb-step-label { flex-wrap: wrap; }
    .fb-step-label small { width: 100%; margin-left: 34px; }
    .fb-submit { flex-direction: column; align-items: stretch; padding: 10px 13px; }
    .feedback-screen .fb-submit .button { width: 100%; justify-content: center; }
    .fb-ticket-id { width: 100%; margin-left: 0; }
    .fb-ticket-context { margin-left: 0; }
    .fb-search select { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .fb-type, .fb-type-check, .fb-priority span, .fb-segment span, .feedback-screen .fb-submit .button { transition: none; }
}
