/* Stream — comunicação institucional */

.stream-inst-wrap .stream-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.stream-inst-wrap .stream-page-header h1 {
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stream-inst-wrap .stream-page-header h1 i {
    color: #1e40af;
}

.stream-inst-wrap .stream-page-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.stream-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .stream-grid {
        grid-template-columns: 1fr;
    }
}

.stream-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.stream-panel-title {
    margin: 0 0 18px 0;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stream-field {
    margin-bottom: 16px;
}

.stream-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}

.stream-req {
    color: #dc2626;
}

.stream-hint {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #6b7280;
}

.stream-textarea {
    min-height: 100px;
    resize: vertical;
}

.stream-linhas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.stream-linha-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stream-linha-row .stream-linha-input {
    flex: 1;
}

.stream-inst-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stream-inst-count {
    font-size: 13px;
    color: #4b5563;
    margin-left: auto;
}

.stream-inst-list {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #f9fafb;
}

.stream-inst-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    align-items: start;
    border-bottom: 1px solid #e5e7eb;
}

.stream-inst-row:last-child {
    border-bottom: none;
}

.stream-inst-row:hover {
    background: #eef2ff;
}

.stream-inst-row input {
    margin-top: 4px;
}

.stream-inst-nome {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.stream-inst-meta {
    grid-column: 2 / -1;
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
}

.stream-actions {
    margin-top: 20px;
}

.stream-feedback {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.stream-feedback--ok {
    color: #047857;
}

.stream-feedback--warn {
    color: #b45309;
}

.stream-feedback--err {
    color: #b91c1c;
}

.stream-feedback--info {
    color: #1d4ed8;
}

.stream-fb-list {
    margin: 8px 0 0 18px;
    padding: 0;
}

.stream-loading,
.stream-muted {
    color: #6b7280;
    font-size: 14px;
    margin: 8px 0;
}

.stream-err {
    color: #b91c1c;
    font-size: 14px;
}

.stream-hist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow: auto;
}

.stream-hist-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.stream-hist-item:last-child {
    border-bottom: none;
}

.stream-hist-head {
    font-size: 13px;
    color: #111827;
}

.stream-hist-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.stream-hist-tit {
    font-size: 13px;
    margin-top: 6px;
    color: #374151;
}

.stream-hist-err {
    margin-top: 6px;
    font-size: 12px;
    color: #b91c1c;
}

.stream-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 6px;
}

.stream-badge--ok {
    background: #d1fae5;
    color: #047857;
}

.stream-badge--fail {
    background: #fee2e2;
    color: #b91c1c;
}

body[data-theme='dark'] .stream-panel {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.25);
}

body[data-theme='dark'] .stream-page-header h1,
body[data-theme='dark'] .stream-panel-title {
    color: #f1f5f9;
}

body[data-theme='dark'] .stream-page-header p,
body[data-theme='dark'] .stream-hint,
body[data-theme='dark'] .stream-inst-meta,
body[data-theme='dark'] .stream-muted,
body[data-theme='dark'] .stream-loading {
    color: #94a3b8;
}

body[data-theme='dark'] .stream-inst-list {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme='dark'] .stream-inst-nome {
    color: #e2e8f0;
}
