* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}
.navbar {
    background: #1e293b;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}
.nav-brand { font-size: 1.25rem; font-weight: 700; color: #60a5fa; }
.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
}
.nav-links a:hover { color: #60a5fa; }
.container { max-width: 1400px; margin: 2rem auto; padding: 0 1rem; }
.footer { text-align: center; padding: 2rem; color: #64748b; font-size: 0.875rem; }

h1 { font-size: 1.75rem; margin-bottom: 1.5rem; color: #f8fafc; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; color: #cbd5e1; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    border-left: 4px solid;
}
.stat-card.pending { border-color: #f59e0b; }
.stat-card.downloading { border-color: #3b82f6; }
.stat-card.uploading { border-color: #8b5cf6; }
.stat-card.completed { border-color: #10b981; }
.stat-card.failed { border-color: #ef4444; }
.stat-card.paused { border-color: #a78bfa; }
.stat-card h3 { font-size: 0.8rem; color: #94a3b8; margin-bottom: 0.25rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card.pending .stat-value { color: #f59e0b; }
.stat-card.downloading .stat-value { color: #3b82f6; }
.stat-card.uploading .stat-value { color: #8b5cf6; }
.stat-card.completed .stat-value { color: #10b981; }
.stat-card.failed .stat-value { color: #ef4444; }
.stat-card.paused .stat-value { color: #a78bfa; }

.speed-bar {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e293b;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}
.data-table th {
    background: #0f172a;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}
.data-table tr:hover { background: #334155; }
.data-table a { color: #60a5fa; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }
.truncate {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.error-text { color: #f87171; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-pending { background: #78350f; color: #fbbf24; }
.badge-searching { background: #1e3a8a; color: #93c5fd; }
.badge-downloading { background: #1e3a8a; color: #60a5fa; }
.badge-completed { background: #064e3b; color: #34d399; }
.badge-uploading { background: #4c1d95; color: #c4b5fd; }
.badge-uploaded { background: #064e3b; color: #34d399; }
.badge-failed { background: #7f1d1d; color: #fca5a5; }
.badge-paused { background: #4c1d95; color: #c4b5fd; }

.btn-primary, .btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.btn-primary {
    background: #2563eb;
    color: white;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary {
    background: #475569;
    color: white;
}
.btn-secondary:hover { background: #64748b; }
.btn-small {
    background: #475569;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}
.btn-small:hover { background: #64748b; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }

.form-card {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 500px;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #cbd5e1;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #334155;
    border-radius: 0.375rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.875rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.empty { color: #64748b; font-style: italic; padding: 1rem 0; }

.detail-card {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.detail-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid #334155;
}
.detail-row:last-child { border-bottom: none; }
.detail-row strong { color: #94a3b8; display: inline-block; width: 120px; }
.detail-row code {
    background: #0f172a;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
}
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.file-name { font-weight: 500; }
.file-meta { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; }
.file-meta code { background: #0f172a; padding: 0.125rem 0.375rem; border-radius: 0.25rem; }
h4 { font-size: 0.875rem; color: #94a3b8; margin: 1rem 0 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }

.filter-form { margin-bottom: 1.5rem; max-width: 100%; }
.filter-form .form-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.results-count { color: #94a3b8; margin-bottom: 0.75rem; font-size: 0.875rem; }
.lang-badge {
    display: inline-block;
    background: #1e3a8a;
    color: #93c5fd;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    margin-right: 0.25rem;
    font-weight: 600;
}
.votes-up { color: #34d399; font-size: 0.8rem; }
.votes-down { color: #f87171; font-size: 0.8rem; }
.badge-1080p { background: #064e3b; color: #34d399; }
.badge-720p { background: #1e3a8a; color: #60a5fa; }
.badge-480p { background: #78350f; color: #fbbf24; }
.results-table td { font-size: 0.875rem; vertical-align: top; }
.results-table .file-name { max-width: 400px; word-break: break-word; }

.sort-header {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.sort-header:hover {
    color: #60a5fa;
}
.sort-header.active {
    color: #60a5fa;
}
.results-table th {
    white-space: nowrap;
}

.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.progress-bar {
    background: #1e293b;
    border-radius: 0.375rem;
    height: 1.5rem;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}
.progress-fill {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 0.375rem;
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
}

html { scroll-behavior: auto; }

.queue-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}
.queue-table th:nth-child(1), .queue-table td:nth-child(1) { width: 55%; }
.queue-table th:nth-child(2), .queue-table td:nth-child(2) { width: 7%; }
.queue-table th:nth-child(3), .queue-table td:nth-child(3) { width: 8%; }
.queue-table th:nth-child(4), .queue-table td:nth-child(4) { width: 8%; }
.queue-table th:nth-child(5), .queue-table td:nth-child(5) { width: 8%; }
.queue-table th:nth-child(6), .queue-table td:nth-child(6) { width: 12%; }
.queue-table th, .queue-table td {
    vertical-align: middle !important;
    padding: 0.4rem 0.5rem;
    line-height: 1.3;
    border-bottom: 1px solid #334155;
}
.queue-table td {
    font-size: 0.85rem;
    overflow: hidden;
}
.queue-table td:not(:first-child):not(:last-child) {
    white-space: nowrap;
}
.queue-table td:first-child .file-name {
    font-weight: 500;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
    display: block;
    line-height: 1.4;
}
.queue-table td:first-child .file-meta {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    margin: 0.15rem 0.4rem 0 0;
    max-width: 100%;
    vertical-align: middle;
}
.queue-table td:nth-child(2) .badge {
    vertical-align: middle;
}
.queue-table td:nth-child(2) .progress-bar.mini {
    display: block;
    margin: 0.25rem 0 0 0;
}
.queue-table td:nth-child(2) .file-meta {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin: 0.15rem 0 0 0;
    max-width: 140px;
}
.queue-table td:nth-child(4) .file-meta {
    display: block;
    margin: 0.15rem 0 0 0;
}
.queue-table td.actions {
    display: table-cell !important;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle !important;
}
.queue-table td.actions form {
    display: inline-flex !important;
    margin: 0 0.1rem;
    vertical-align: middle;
}
.queue-table td.actions .btn-small {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    height: 1.5rem;
    min-width: 1.8rem;
}
.queue-table th {
    white-space: nowrap;
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
}

.actions form { display: inline-block; }
.actions .btn-small { min-width: 2rem; }

.file-meta.direct { color: #34d399; font-weight: 600; }

/* Disk usage bar */
.disk-bar {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #334155;
}
.disk-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
.disk-free {
    color: #34d399;
    font-weight: 600;
}
.disk-track {
    background: #0f172a;
    border-radius: 0.375rem;
    height: 1.25rem;
    overflow: hidden;
}
.disk-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
    height: 100%;
    border-radius: 0.375rem;
    transition: width 0.5s ease;
}
.disk-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.disk-fill.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.disk-pct {
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Target folder badge */
.target-badge {
    display: inline-block;
    background: #1e3a8a;
    color: #93c5fd;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Disk breakdown */
.disk-breakdown {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.breakdown-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #334155;
}
.breakdown-row:last-child {
    border-bottom: none;
}
.breakdown-row.breakdown-total {
    border-top: 2px solid #475569;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}
.breakdown-label {
    min-width: 180px;
    font-size: 0.8rem;
    color: #94a3b8;
}
.breakdown-size {
    min-width: 70px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: right;
}
.breakdown-bar-track {
    flex: 1;
    background: #0f172a;
    border-radius: 0.25rem;
    height: 0.75rem;
    overflow: hidden;
}
.breakdown-bar-fill {
    height: 100%;
    border-radius: 0.25rem;
    min-width: 2px;
}
.breakdown-bar-fill.webshare_downloading { background: #3b82f6; }
.breakdown-bar-fill.webshare_uploading { background: #8b5cf6; }
.breakdown-bar-fill.torrents_downloading { background: #f59e0b; }
.breakdown-bar-fill.torrents_complete { background: #f97316; }
.breakdown-bar-fill.rclone_cache { background: #06b6d4; }
.breakdown-bar-fill.system { background: #64748b; }
.breakdown-bar-fill.free { background: #10b981; }

/* Disk section */
.disk-section {
    background: #1e293b;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.disk-header {
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
}
.disk-header:hover {
    background: #283548;
}
.disk-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.disk-summary-label {
    font-weight: 700;
    color: #e2e8f0;
    font-size: 0.9rem;
}
.disk-summary-value {
    color: #94a3b8;
    font-size: 0.85rem;
}
.disk-summary-free {
    color: #34d399;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
}
.disk-bar-stacked {
    display: flex;
    height: 1.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #0f172a;
    gap: 1px;
}
.disk-segment {
    height: 100%;
    min-width: 2px;
    transition: opacity 0.2s;
}
.disk-segment:hover {
    opacity: 0.8;
}
.disk-segment.webshare_downloading { background: #3b82f6; }
.disk-segment.webshare_uploading { background: #8b5cf6; }
.disk-segment.torrents_downloading { background: #f59e0b; }
.disk-segment.torrents_complete { background: #f97316; }
.disk-segment.rclone_cache { background: #06b6d4; }
.disk-segment.system { background: #64748b; }
.disk-segment.free { background: #10b981; }
.disk-details {
    display: none;
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid #334155;
}
.disk-detail-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8rem;
}
.disk-detail-free .disk-detail-label,
.disk-detail-free .disk-detail-size {
    font-weight: 600;
}
.disk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.disk-dot.webshare_downloading { background: #3b82f6; }
.disk-dot.webshare_uploading { background: #8b5cf6; }
.disk-dot.torrents_downloading { background: #f59e0b; }
.disk-dot.torrents_complete { background: #f97316; }
.disk-dot.rclone_cache { background: #06b6d4; }
.disk-dot.system { background: #64748b; }
.disk-dot.free { background: #10b981; }
.disk-detail-label {
    flex: 1;
    color: #94a3b8;
}
.disk-detail-size {
    color: #e2e8f0;
    font-weight: 500;
    min-width: 70px;
    text-align: right;
}

/* Activity log */
.log-section {
    background: #1e293b;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    overflow: hidden;
}
.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
}
.log-header:hover {
    background: #283548;
}
.log-header h2 {
    margin: 0;
}
.log-toggle {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: transform 0.2s;
}
.log-content {
    background: #0f172a;
    color: #94a3b8;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Active processes */
.active-processes {
    margin-bottom: 1.5rem;
}
.active-processes h2 {
    margin-bottom: 0.75rem;
}
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.process-card {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    border-left: 4px solid;
}
.process-card.downloading { border-color: #3b82f6; }
.process-card.uploading { border-color: #8b5cf6; }
.process-card.torrent { border-color: #f97316; }
.process-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.process-info {
    flex: 1;
    min-width: 0;
}
.process-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.process-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0.125rem 0;
}
.process-meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.quick-actions .btn-primary {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}

/* Queue section */
.queue-section {
    background: #1e293b;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.queue-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #334155;
}
.queue-header h2 {
    margin: 0;
}
.queue-filters {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.filter-btn {
    background: #0f172a;
    color: #94a3b8;
    border: 1px solid #334155;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover {
    background: #283548;
    color: #e2e8f0;
}
.filter-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Mini progress bar */
.progress-bar.mini {
    height: 0.5rem;
    min-width: 80px;
    max-width: 120px;
    margin-top: 0.375rem;
    background: #0f172a;
}
.progress-bar.mini .progress-fill {
    border-radius: 0.25rem;
}

/* Empty state */
.empty-state {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.empty-state p {
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* Search results table */
.results-table {
    table-layout: fixed;
    width: 100%;
}
.results-table th,
.results-table td {
    vertical-align: middle !important;
    padding: 0.5rem 0.625rem;
}
.results-table td {
    white-space: nowrap;
}
.results-table .file-cell {
    white-space: normal;
    min-width: 0;
}
.results-table .file-cell .file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.results-table .file-cell .file-meta {
    margin-top: 0.125rem;
}
.results-table .type-cell {
    text-align: center;
}
.results-table .type-cell .media-type-select {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    width: 100%;
    max-width: 100px;
}
.results-table .action-cell {
    text-align: center;
}
.results-table .action-cell .btn-small {
    padding: 0.25rem 0.75rem;
}
.results-table td .lang-badge {
    white-space: nowrap;
    display: inline-block;
    margin-bottom: 0.125rem;
}

/* Mobile results cards */
.results-mobile { display: none; }
.results-desktop { display: block; }

/* Mobile queue cards */
.queue-mobile { display: none; }
.queue-desktop { display: block; }

.queue-card {
    background: #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #334155;
}
.queue-card-header {
    margin-bottom: 0.625rem;
}
.queue-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f8fafc;
    line-height: 1.4;
    word-break: break-word;
}
.queue-card-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.queue-card-meta .direct {
    color: #34d399;
    font-weight: 500;
}
.queue-card-body {
    margin-bottom: 0.75rem;
}
.queue-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}
.queue-card-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.queue-card-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.queue-card-footer form {
    display: inline;
}
.queue-card-footer .btn-small {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
}

.result-card {
    background: #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #334155;
}
.result-card-header {
    margin-bottom: 0.75rem;
}
.result-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f8fafc;
    line-height: 1.4;
    word-break: break-word;
}
.result-card-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.result-card-meta code {
    background: #0f172a;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}
.result-card-body {
    margin-bottom: 0.875rem;
}
.result-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.625rem;
}
.badge-format {
    background: #334155;
    color: #cbd5e1;
}
.result-card-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.info-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.info-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
}
.result-card-footer {
    display: flex;
    gap: 0.625rem;
    align-items: center;
}
.result-card-footer .media-type-select {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    flex: 1;
}
.result-card-footer .btn-primary {
    flex: 1;
    text-align: center;
    padding: 0.5rem 1rem;
}

/* Responsive */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .queue-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .process-grid {
        grid-template-columns: 1fr;
    }
    .results-desktop {
        display: none;
    }
    .results-mobile {
        display: block;
    }
    .queue-desktop {
        display: none;
    }
    .queue-mobile {
        display: block;
    }
    .container {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }
    h1 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    .filter-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .filter-form {
        padding: 1rem;
    }
    .navbar {
        padding: 0.75rem 1rem;
    }
    .nav-brand {
        font-size: 1rem;
    }
    .nav-links a {
        margin-left: 0.875rem;
        font-size: 0.8rem;
    }
    .result-card-info {
        grid-template-columns: repeat(3, 1fr);
    }
    .quick-actions {
        gap: 0.5rem;
    }
    .quick-actions .btn-primary {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }
}
.actions { 
    display: flex; 
    gap: 0.35rem; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: center;
}
.queue-table td.actions {
    display: table-cell !important;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle !important;
}
.actions .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.75rem;
    min-width: 2rem;
    padding: 0 0.5rem;
    line-height: 1;
}
