.tp-header {
    margin: 1rem 0 1.5rem;
}

.tp-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.tp-subtitle {
    color: #6c757d;
    margin: 0.25rem 0 0;
}

.tp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 860px) {
    .tp-grid {
        grid-template-columns: 1fr;
    }
}

.tp-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tp-connect-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tp-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
}

.tp-status-off {
    background: #f1f3f5;
    color: #868e96;
}

.tp-status-on {
    background: #d3f9d8;
    color: #2b8a3e;
}

.tp-device {
    font-size: 0.8125rem;
    color: #495057;
    margin-top: 0.5rem;
    word-break: break-all;
}

.tp-items {
    margin-top: 1.25rem;
}

.tp-items-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tp-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px 100px 38px;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tp-item-row .btn-remove {
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.tp-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.tp-log {
    margin-top: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    color: #495057;
    min-height: 1.25rem;
    white-space: pre-wrap;
}

.tp-log .err {
    color: #e03131;
}

.tp-log .ok {
    color: #2b8a3e;
}

.tp-preview-wrap {
    position: sticky;
    top: 1rem;
}

.tp-preview-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-align: center;
}

.tp-paper {
    width: 280px;
    margin: 0 auto;
    background: #fff;
    color: #212529;
    border-radius: 4px;
    padding: 16px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre;
    overflow-x: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    background-image: linear-gradient(180deg, #fff 0, #fff calc(100% - 14px), transparent 100%);
    min-height: 200px;
}

.tp-help {
    margin-top: 1rem;
    font-size: 0.78125rem;
    color: #868e96;
    line-height: 1.5;
}

.tp-help p {
    margin-bottom: 0.5rem;
}
