/* PosTube — Styles (extracted from postube.php) */

/* === Main === */
    /* Step badges */
    .pt-step-badge {
        display: inline-flex; align-items: center; justify-content: center;
        width: 22px; height: 22px; border-radius: 50%; background: #ef4444; color: white;
        font-size: 0.72rem; font-weight: 700; margin-right: 0.4rem; flex-shrink: 0;
    }
    .pt-step-label {
        display: flex; align-items: center; font-size: 0.78rem; font-weight: 600;
        color: #6b7280; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.3px;
    }

    /* Status bar */
    .pt-status { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
    .pt-stat {
        flex: 1; min-width: 100px; background: white; border-radius: var(--radius-md);
        padding: 0.6rem 0.75rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); text-align: center;
    }
    .pt-stat-val { font-size: 1.2rem; font-weight: 700; color: #1a1a2e; }
    .pt-stat-val.green { color: #10b981; }
    .pt-stat-val.orange { color: #f59e0b; }
    .pt-stat-val.red { color: #ef4444; }
    .pt-stat-label { font-size: 0.68rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }

    /* Tabs */
    .pt-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.25rem; }
    .pt-tab {
        flex: 1; padding: 0.65rem; border: 2px solid #e5e7eb; border-radius: var(--radius-md);
        background: white; cursor: pointer; text-align: center; font-size: 0.85rem;
        font-weight: 600; transition: all 0.2s; color: #6b7280;
    }
    .pt-tab.active { border-color: #ef4444; background: #fef2f2; color: #ef4444; }
    .pt-tab:hover:not(.active) { border-color: #d1d5db; }
    .pt-tab-content { display: none; }
    .pt-tab-content.active { display: block; }

    /* Upload zone */
    .pt-upload-zone {
        border: 3px dashed #d1d5db; border-radius: var(--radius-lg); padding: 2rem;
        text-align: center; cursor: pointer; transition: all 0.3s; background: #fafafa;
        margin-bottom: 1rem;
    }
    .pt-upload-zone:hover, .pt-upload-zone.dragover { border-color: #ef4444; background: #fef2f2; }
    .pt-upload-zone i.icon { font-size: 2rem; color: #d1d5db; margin-bottom: 0.5rem; display: block; }
    .pt-upload-zone:hover i.icon { color: #ef4444; }
    .pt-upload-zone p { color: #6b7280; font-size: 0.85rem; margin: 0.15rem 0; }
    .pt-upload-zone .hint { font-size: 0.72rem; color: #9ca3af; }

    /* File list */
    .pt-file-item {
        display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem;
        border: 1px solid #e5e7eb; border-radius: var(--radius-md); margin-bottom: 0.35rem;
        background: white; font-size: 0.82rem;
    }
    .pt-file-item i { color: #ef4444; }
    .pt-file-name { flex: 1; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pt-file-size { font-size: 0.72rem; color: #9ca3af; flex-shrink: 0; }
    .pt-file-del { background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 0.9rem; }
    .pt-file-del:hover { color: #ef4444; }

    /* Section cards */
    .pt-section {
        background: white; border-radius: var(--radius-md); border: 1px solid #e5e7eb;
        margin-bottom: 1rem; overflow: hidden;
    }
    .pt-section-header {
        padding: 0.6rem 1rem; background: #f9fafb; border-bottom: 1px solid #e5e7eb;
        font-weight: 700; font-size: 0.82rem; color: #374151;
        display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
    }
    .pt-section-header:hover { background: #f3f4f6; }
    .pt-section-body { padding: 1rem; }
    .pt-section-chevron { margin-left: auto; font-size: 0.65rem; transition: transform 0.2s; }
    .pt-section.collapsed .pt-section-body { display: none; }
    .pt-section.collapsed .pt-section-chevron { transform: rotate(-90deg); }

    /* Form grid */
    .pt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .pt-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
    @media (max-width: 768px) { .pt-grid, .pt-grid-3 { grid-template-columns: 1fr; } }
    .pt-field label { font-size: 0.78rem; font-weight: 600; color: #374151; display: block; margin-bottom: 0.25rem; }
    .pt-field input, .pt-field select, .pt-field textarea {
        width: 100%; padding: 0.5rem 0.65rem; border: 1px solid #d1d5db; border-radius: 4px;
        font-size: 0.85rem; box-sizing: border-box;
    }
    .pt-field input:focus, .pt-field select:focus, .pt-field textarea:focus { outline: none; border-color: #ef4444; }
    .pt-field textarea { resize: vertical; min-height: 60px; }

    /* Schedule */
    .pt-schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; text-align: center; }
    .pt-day-header { font-size: 0.7rem; font-weight: 700; color: #9ca3af; padding: 0.3rem; }
    .pt-day-btn {
        padding: 0.4rem; border: 1px solid #e5e7eb; border-radius: 4px; background: white;
        cursor: pointer; font-size: 0.75rem; transition: all 0.15s; color: #6b7280;
    }
    .pt-day-btn.active { background: #ef4444; color: white; border-color: #ef4444; }
    .pt-day-btn:hover:not(.active) { border-color: #ef4444; }
    .pt-time-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; padding: 0.4rem 0.5rem; border: 1px solid #f0f0f0; border-radius: 4px; }
    .pt-time-del { background: none; border: none; color: #d1d5db; cursor: pointer; }
    .pt-time-del:hover { color: #ef4444; }

    /* Thumbnail */
    .pt-thumb-preview { width: 160px; height: 90px; border-radius: 4px; object-fit: cover; border: 1px solid #e5e7eb; }
    .pt-thumb-zone {
        display: flex; align-items: center; gap: 1rem; padding: 0.75rem;
        border: 2px dashed #e5e7eb; border-radius: var(--radius-md); cursor: pointer;
    }
    .pt-thumb-zone:hover { border-color: #ef4444; }

    /* Comments */
    .pt-comment-item {
        display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.3rem;
    }
    .pt-comment-text {
        flex: 1; padding: 0.35rem 0.5rem; border: 1px solid #e5e7eb; border-radius: 4px;
        font-size: 0.82rem;
    }

    /* Progress */
    .pt-progress { margin-top: 0.75rem; margin-bottom: 1rem; display: none; }
    .pt-progress.active { display: block; }
    .pt-progress-bg { background: #e5e7eb; border-radius: 10px; height: 8px; overflow: hidden; margin-bottom: 0.35rem; }
    .pt-progress-fill { background: #ef4444; height: 100%; border-radius: 10px; transition: width 0.3s; width: 0%; }
    .pt-progress-text { font-size: 0.78rem; color: #6b7280; text-align: center; }

    /* Queue */
    .pt-queue-item {
        display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.65rem;
        border: 1px solid #e5e7eb; border-radius: var(--radius-md); margin-bottom: 0.35rem;
        background: white; font-size: 0.82rem;
    }
    .pt-badge {
        padding: 0.15rem 0.45rem; border-radius: 20px; font-size: 0.68rem; font-weight: 700; flex-shrink: 0;
    }
    .badge-pending { background: #fef3c7; color: #92400e; }
    .badge-uploading { background: #dbeafe; color: #1e40af; }
    .badge-done { background: #d1fae5; color: #065f46; }
    .badge-failed { background: #fee2e2; color: #991b1b; }
    .pt-queue-name { flex: 1; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pt-queue-meta { font-size: 0.7rem; color: #9ca3af; flex-shrink: 0; }
    .pt-queue-channel { border: 1px solid #e5e7eb; border-radius: var(--radius-md); margin-bottom: 0.5rem; overflow: hidden; }
    .pt-queue-channel-header {
        display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem;
        background: #f9fafb; cursor: pointer; font-size: 0.85rem; color: #374151;
    }
    .pt-queue-channel-header:hover { background: #f3f4f6; }
    .pt-queue-channel-body { padding: 0.35rem 0.5rem; }
    .pt-queue-channel.collapsed .pt-queue-channel-body { display: none; }
    .pt-queue-channel.collapsed .pt-queue-chevron { transform: rotate(-90deg); }

/* === Pipelines === */
    .pt-pipeline-card {
        border: 1px solid #e5e7eb; border-radius: var(--radius-md); padding: 0.75rem;
        margin-bottom: 0.5rem; background: white;
    }
    .pt-pipeline-header {
        display: flex; align-items: center; gap: 0.75rem; cursor: pointer;
    }
    .pt-pipeline-name { font-weight: 600; font-size: 0.9rem; color: #1a1a2e; flex: 1; }
    .pt-pipeline-badge {
        font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 10px;
    }
    .pt-pipeline-badge.active { background: #d1fae5; color: #065f46; }
    .pt-pipeline-badge.paused { background: #fef3c7; color: #92400e; }
    .pt-pipeline-badge.empty { background: #fee2e2; color: #991b1b; }
    .pt-pipeline-card.empty { border-color: #fca5a5; background: #fef2f2; }
    .pt-pipeline-sources {
        display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem;
    }
    .pt-pipeline-source {
        font-size: 0.72rem; padding: 0.15rem 0.5rem; background: #f3f4f6;
        border-radius: 10px; color: #6b7280;
    }
    .pt-pipeline-stats {
        display: flex; gap: 0.75rem; margin-top: 0.5rem; font-size: 0.72rem; color: #9ca3af;
    }
    .pt-pipeline-stats span { display: flex; align-items: center; gap: 0.25rem; }
    .pt-pipeline-actions {
        display: flex; gap: 0.4rem; margin-top: 0.5rem;
    }
    .pt-pipeline-actions button {
        background: none; border: 1px solid #e5e7eb; border-radius: var(--radius-md);
        padding: 0.3rem 0.6rem; font-size: 0.72rem; cursor: pointer; color: #6b7280;
        transition: all 0.2s;
    }
    .pt-pipeline-actions button:hover { border-color: #8b5cf6; color: #8b5cf6; }
    .pt-pipeline-actions button.danger:hover { border-color: #ef4444; color: #ef4444; }

    /* Wizard videos */
    .pw-video-item {
        display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem;
        border-bottom: 1px solid #f5f5f5; font-size: 0.8rem; cursor: pointer;
        transition: background 0.15s;
    }
    .pw-video-item:hover { background: #faf5ff; }
    .pw-video-item.selected { background: #f5f3ff; }
    .pw-video-item input[type="checkbox"] { flex-shrink: 0; }
    .pw-video-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
    .pw-video-views { font-size: 0.72rem; color: #9ca3af; flex-shrink: 0; min-width: 60px; text-align: right; }
    .pw-video-loading { text-align: center; padding: 1rem; color: #9ca3af; font-size: 0.85rem; }
    .pw-mode-btn {
        flex: 1; padding: 0.45rem 0.5rem; border: 2px solid #e5e7eb; border-radius: var(--radius-md);
        background: white; font-size: 0.72rem; font-weight: 600; cursor: pointer;
        color: #6b7280; transition: all 0.2s; text-align: center;
    }
    .pw-mode-btn.active { border-color: #8b5cf6; background: #faf5ff; color: #8b5cf6; }
    .pw-mode-btn:hover:not(.active) { border-color: #d1d5db; }
    .pw-preset-btn {
        padding: 0.2rem 0.5rem; border: 1px solid #e5e7eb; border-radius: 4px;
        background: white; font-size: 0.7rem; cursor: pointer; color: #6b7280;
    }
    .pw-preset-btn.active { background: #8b5cf6; color: white; border-color: #8b5cf6; }

    /* Filter cards */
    .pw-filters-list { display: flex; flex-direction: column; gap: 0.4rem; }
    .pw-filter-card {
        border: 1px solid #e5e7eb; border-radius: var(--radius-md); overflow: hidden;
    }
    .pw-filter-header {
        display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem;
        cursor: pointer; background: #f9fafb; transition: background 0.15s;
    }
    .pw-filter-header:hover { background: #f3f4f6; }
    .pw-filter-title { font-size: 0.85rem; font-weight: 600; color: #1a1a2e; }
    .pw-filter-desc { font-size: 0.72rem; color: #9ca3af; flex: 1; }
    .pw-filter-chevron { font-size: 0.65rem; color: #9ca3af; transition: transform 0.2s; }
    .pw-filter-card.open .pw-filter-chevron { transform: rotate(180deg); }
    .pw-filter-body {
        display: none; padding: 0.75rem; border-top: 1px solid #f0f0f0; background: white;
    }
    .pw-filter-card.open .pw-filter-body { display: block; }

    /* Filter categories */
    .pw-filter-category { border: 1px solid #e5e7eb; border-radius: var(--radius-md); margin-bottom: 0.5rem; overflow: hidden; }
    .pw-filter-category-header {
        display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem;
        cursor: pointer; background: #f9fafb; font-size: 0.85rem; font-weight: 600; color: #1a1a2e;
        transition: background 0.15s;
    }
    .pw-filter-category-header:hover { background: #f3f4f6; }
    .pw-filter-category-body { display: none; padding: 0.5rem; }
    .pw-filter-category.open .pw-filter-category-body { display: block; }
    .pw-filter-category.open .pw-filter-category-header .pw-filter-chevron { transform: rotate(180deg); }

    /* Wizard sections (dépliables) */
    .pw-section {
        border: 1px solid #e5e7eb; border-radius: var(--radius-md);
        margin-bottom: 0.75rem; overflow: hidden;
    }
    .pw-section-toggle {
        display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem;
        cursor: pointer; background: #fafafa; font-size: 0.75rem; font-weight: 700;
        color: #374151; text-transform: uppercase; letter-spacing: 0.5px;
        transition: background 0.15s; user-select: none;
    }
    .pw-section-toggle:hover { background: #f3f4f6; }
    .pw-section-toggle .pw-chevron { font-size: 0.65rem; color: #9ca3af; transition: transform 0.2s; margin-left: auto; }
    .pw-section.open .pw-section-toggle .pw-chevron { transform: rotate(180deg); }
    .pw-section-content { display: none; padding: 0.75rem; background: #fafafa; }
    .pw-section.open .pw-section-content { display: block; }
    .pw-section-label {
        font-size: 0.75rem; font-weight: 700; color: #374151; text-transform: uppercase;
        letter-spacing: 0.5px; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem;
    }
    .pw-day-btn {
        display: flex; align-items: center; gap: 0.25rem; padding: 0.3rem 0.5rem;
        border: 1px solid #e5e7eb; border-radius: 4px; font-size: 0.75rem;
        cursor: pointer; user-select: none;
    }
    .pw-day-btn:has(input:checked) { background: #8b5cf6; color: white; border-color: #8b5cf6; }
    .pw-day-btn input { display: none; }
    .pw-time-chip {
        display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.5rem;
        background: #f3f4f6; border-radius: 4px; font-size: 0.78rem; color: #374151;
    }
    .pw-time-chip button {
        background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 0.7rem;
    }
    .pw-time-chip button:hover { color: #ef4444; }

/* === Status dashboard === */
    .pt-channel-item {
        display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem;
        border: 2px solid #e5e7eb; border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s;
    }
    .pt-channel-item:hover { border-color: #d1d5db; }
    .pt-channel-item.selected { border-color: #10b981; background: #f0fdf4; }
    .pt-channel-item.channel-paused { opacity: 0.5; border-color: #f59e0b; border-style: dashed; }
    .pt-channel-check { display: none; }
    .pt-channel-item.selected .pt-channel-check { display: block; }
    .pt-ch-stats {
        display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0;
        font-size: 0.7rem; font-weight: 600;
    }
    .pt-ch-stat {
        display: flex; align-items: center; gap: 0.2rem;
        padding: 0.15rem 0.4rem; border-radius: 10px;
    }
    .pt-ch-stat-pending { background: #fef3c7; color: #92400e; }
    .pt-ch-stat-done { background: #d1fae5; color: #065f46; }
    .pt-ch-stat-failed { background: #fee2e2; color: #991b1b; }
    .pt-ch-stat-last { color: #9ca3af; font-weight: 400; }
    .pt-ch-pause-btn, .pt-ch-disconnect-btn {
        background: none; border: none; cursor: pointer; font-size: 1.1rem;
        padding: 0.3rem; opacity: 0.5; transition: opacity 0.2s;
    }
    .pt-ch-pause-btn:hover, .pt-ch-disconnect-btn:hover { opacity: 1; }
    .pt-ch-pause-btn { color: #f59e0b; }
    .pt-ch-pause-btn.paused { color: #10b981; }
    .pt-ch-disconnect-btn { color: #ef4444; }

/* === Supervision === */
    .pt-sv-user {
        border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 0.75rem; overflow: hidden;
        background: white;
    }
    .pt-sv-user-header {
        display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
        cursor: pointer; user-select: none; transition: background 0.15s;
    }
    .pt-sv-user-header:hover { background: #f9fafb; }
    .pt-sv-user-header .pt-sv-chevron { transition: transform 0.2s; color: #9ca3af; }
    .pt-sv-user.open .pt-sv-chevron { transform: rotate(180deg); }
    .pt-sv-user-body { display: none; padding: 0 1rem 0.75rem; }
    .pt-sv-user.open .pt-sv-user-body { display: block; }
    .pt-sv-ch {
        display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem;
        border: 1px solid #f3f4f6; border-radius: 6px; margin-bottom: 0.4rem;
        background: #fafafa;
    }
    .pt-sv-ch img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #e5e7eb; }
    .pt-sv-ch-info { flex: 1; min-width: 0; }
    .pt-sv-ch-name { font-weight: 600; font-size: 0.82rem; color: #1a1a2e; }
    .pt-sv-ch-stats { font-size: 0.7rem; color: #9ca3af; }
    .pt-sv-badge {
        display: inline-flex; align-items: center; gap: 0.25rem;
        padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.68rem; font-weight: 600;
    }
    .pt-sv-badge.active { background: #d1fae5; color: #065f46; }
    .pt-sv-badge.paused { background: #fef3c7; color: #92400e; }
    .pt-sv-schedule {
        margin-top: 0.4rem; padding: 0.5rem 0.75rem; background: #f8fafc;
        border-radius: 6px; border-left: 3px solid #8b5cf6;
    }
    .pt-sv-schedule-title { font-size: 0.72rem; font-weight: 600; color: #6b7280; margin-bottom: 0.25rem; }
    .pt-sv-schedule-detail { font-size: 0.7rem; color: #374151; }
    .pt-sv-no-schedule { font-size: 0.7rem; color: #d1d5db; font-style: italic; }
    .pt-sv-user-count {
        background: #ede9fe; color: #6d28d9; font-size: 0.7rem; font-weight: 700;
        padding: 0.15rem 0.5rem; border-radius: 10px;
    }

/* === Console === */
    .pt-console {
        background: #1a1a2e; color: #d1d5db; padding: 0.75rem; border-radius: 8px;
        font-family: 'Consolas', 'Monaco', monospace; font-size: 0.72rem;
        max-height: 300px; overflow-y: auto; line-height: 1.6;
    }
    .pt-log-line { white-space: pre-wrap; word-break: break-all; }
    .pt-log-error { color: #ef4444; }
    .pt-log-warning { color: #f59e0b; }
    .pt-log-info { color: #10b981; }
