/* DocDireto Admin — Pool management UI */

.admin-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: var(--fg);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    vertical-align: middle;
}

.admin-main {
    padding: 28px 0 60px;
}

/* ========== Stats ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-card);
}
.stat-card--success { border-color: rgba(34, 197, 94, 0.4); }
.stat-card--warning { border-color: rgba(245, 158, 11, 0.4); }
.stat-card--error   { border-color: rgba(239, 68, 68, 0.4); }
.stat-card--accent  { border-color: rgba(167, 133, 255, 0.4); }
.stat-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
}

/* ========== Breakdown widgets ========== */
.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
@media (max-width: 760px) {
    .breakdown-grid { grid-template-columns: 1fr; }
}
.breakdown-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-card);
}
.breakdown-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 12px 0;
}
.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.breakdown-pill {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "label count"
        "bar bar";
    gap: 4px 12px;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    text-align: left;
    font-family: inherit;
    color: var(--fg);
    width: 100%;
}
.breakdown-pill:hover {
    background: var(--bg-2);
    border-color: var(--border);
}
.bd-label {
    grid-area: label;
    font-size: 13px;
}
.bd-count {
    grid-area: count;
    font-size: 12px;
    font-family: var(--mono, 'SFMono-Regular', monospace);
    color: var(--muted);
}
.bd-bar {
    grid-area: bar;
    height: 4px;
    background: var(--bg-2);
    border-radius: 2px;
    overflow: hidden;
}
.bd-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-2), var(--primary));
    border-radius: 2px;
    transition: width 0.4s var(--transition);
}
.breakdown-loading, .breakdown-empty {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    padding: 14px 0;
}
.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.stat-value {
    font-size: 26px;
    font-weight: 800;
    font-family: var(--mono, 'SFMono-Regular', monospace);
    color: var(--fg);
}

/* ========== Filters ========== */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 130px;
}
.filter-group--grow { flex: 1 1 220px; }
.filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.filter-group select,
.filter-group input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--fg);
    transition: border-color var(--transition);
}
.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}
.filter-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
}

/* ========== Country combobox ========== */
.filter-group--country { min-width: 240px; flex: 1 1 240px; max-width: 320px; }
.combobox {
    position: relative;
    width: 100%;
}
.combobox-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 32px 8px 10px;
    font-size: 13px;
    color: var(--fg);
    transition: border-color var(--transition);
    cursor: text;
}
.combobox-input:focus {
    outline: none;
    border-color: var(--primary);
}
.combobox-input::placeholder { color: var(--muted); opacity: 0.7; }
.combobox-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--muted);
    border: none;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.combobox-clear:hover { background: var(--bg-2); color: var(--fg); }

.combobox-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    z-index: 50;
    margin: 0;
    padding: 4px;
    list-style: none;
}
.combobox-list::-webkit-scrollbar { width: 8px; }
.combobox-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
.combobox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
    font-size: 13px;
    color: var(--fg);
    white-space: nowrap;
}
.combobox-item:hover { background: var(--bg-2); }
.combobox-item.is-highlighted { background: rgba(167, 133, 255, 0.16); }
.combobox-item.is-selected { background: rgba(167, 133, 255, 0.10); }
.combobox-item.is-selected .cb-name { color: var(--primary); }
.combobox-item--last-fixed {
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    padding-bottom: 10px;
}
.cb-flag {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}
.cb-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cb-iso {
    font-family: var(--mono, 'SFMono-Regular', monospace);
    font-size: 10px;
    color: var(--muted);
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}
.cb-count {
    font-family: var(--mono, 'SFMono-Regular', monospace);
    font-size: 11px;
    color: var(--muted);
    margin-left: 6px;
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}
.combobox-empty {
    padding: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}

/* ========== Quality range slider ========== */
.filter-group--quality { min-width: 180px; }
.filter-value {
    color: var(--primary);
    font-family: var(--mono, 'SFMono-Regular', monospace);
    font-weight: 700;
}
.filter-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-2);
    border-radius: 3px;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
}
.filter-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
    cursor: grab;
    box-shadow: 0 0 0 2px rgba(167, 133, 255, 0.25);
    transition: transform var(--transition);
}
.filter-group input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}
.filter-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
    cursor: grab;
    box-shadow: 0 0 0 2px rgba(167, 133, 255, 0.25);
}
.filter-group input[type="range"]:focus { outline: none; }
.filter-group input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(167, 133, 255, 0.45);
}

/* ========== Image-presence badges (FRENTE / VERSO / SELFIE) ========== */
.col-imgs, .col-imgs-h { white-space: nowrap; }
.img-badges {
    display: inline-flex;
    gap: 3px;
}
.img-badge {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--mono, 'SFMono-Regular', monospace);
    letter-spacing: 0;
    user-select: none;
    line-height: 1;
}
.img-badge.is-present {
    background: rgba(34, 197, 94, 0.18);
    color: #22c55e;
}
.img-badge.is-absent {
    background: var(--bg-2);
    color: var(--muted);
    opacity: 0.55;
}

/* ========== Assigned cell (clickable) + active filter chips ========== */
.col-assigned { white-space: nowrap; }
.assigned-link {
    background: transparent;
    border: 1px solid transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: inherit;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    line-height: 1.4;
}
.assigned-link:hover {
    background: rgba(167, 133, 255, 0.10);
    border-color: rgba(167, 133, 255, 0.30);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(167, 133, 255, 0.12);
    border: 1px solid rgba(167, 133, 255, 0.35);
    color: var(--fg);
    border-radius: 999px;
    padding: 4px 4px 4px 12px;
    font-size: 12px;
    line-height: 1.4;
}
.filter-chip strong {
    font-family: var(--mono, 'SFMono-Regular', monospace);
    color: var(--primary);
    font-weight: 700;
}
.chip-x {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.chip-x:hover { background: var(--bg-2); color: var(--fg); }

/* ========== Bulk bar ========== */
.bulk-bar {
    background: var(--card);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-glow-sm);
}
.bulk-bar strong { color: var(--primary); font-family: var(--mono, monospace); }
.bulk-actions { display: flex; gap: 8px; }

/* ========== Table ========== */
.table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}
.docs-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}
.docs-table thead th {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

/* Mobile column hiding */
@media (max-width: 900px) {
    .docs-table thead th:nth-child(2),
    .docs-table tbody td:nth-child(2) {
        display: none; /* Thumb */
    }
}
@media (max-width: 640px) {
    .docs-table thead th:nth-child(11),
    .docs-table tbody td:nth-child(11),
    .docs-table thead th:nth-child(12),
    .docs-table tbody td:nth-child(12) {
        display: none; /* Doc nº + Q */
    }
}

/* Active filter hint (when state differs from default) */
.filter-group select.is-active-filter,
.filter-group input.is-active-filter,
.combobox-input.is-active-filter {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(167, 133, 255, 0.25);
}
.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1100px;
}
.docs-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1;
}
.docs-table tbody tr {
    border-bottom: 1px solid rgba(47, 33, 80, 0.5);
    transition: background var(--transition);
}
.docs-table tbody tr:hover {
    background: rgba(167, 133, 255, 0.04);
}
.docs-table tbody td {
    padding: 8px 12px;
    color: var(--fg);
    vertical-align: middle;
}
.docs-table tbody td.mono { font-family: var(--mono, monospace); font-size: 12px; }
.col-check { width: 36px; }
.col-thumb { width: 64px; }
.col-actions { width: 130px; text-align: right; }
.thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
}
.thumb-empty {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px dashed var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.loading-cell, .empty-cell {
    text-align: center;
    padding: 40px 16px;
    color: var(--muted);
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-available { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-used      { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-analyzed  { background: rgba(167, 133, 255, 0.15); color: var(--primary); border: 1px solid rgba(167, 133, 255, 0.3); }
.badge-failed    { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-pending   { background: rgba(199, 190, 228, 0.1); color: var(--muted); border: 1px solid var(--border); }
.badge-vertex    { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}
.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}
.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.icon-btn svg { width: 14px; height: 14px; }

/* ========== Pager ========== */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}
.pager-info {
    color: var(--muted);
    font-size: 13px;
    font-family: var(--mono, monospace);
}

/* ========== Modal ========== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}
.modal-panel {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 28px;
    box-shadow: var(--shadow-card), var(--shadow-glow-sm);
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 22px;
    line-height: 1;
    z-index: 2;
}
.modal-close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.modal-meta {
    color: var(--muted);
    font-size: 12px;
    font-family: var(--mono, monospace);
}

.modal-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
    margin-bottom: 18px;
}
.modal-img-card--hero {
    grid-row: 1 / 3;
    grid-column: 1;
}
.modal-img-card--hero img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    max-height: none;
}
@media (max-width: 640px) {
    .modal-images {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .modal-img-card--hero { grid-row: auto; grid-column: auto; }
}
.modal-img-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.modal-img-card .img-label {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-img-card img {
    width: 100%;
    display: block;
    background: #000;
    max-height: 500px;
    object-fit: contain;
}
.modal-img-card .img-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.dl-link {
    font-size: 11px;
    color: var(--muted);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}
.dl-link:hover { color: var(--primary); }

.modal-section {
    margin-bottom: 18px;
}
.modal-section h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}
.modal-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 16px;
}
.modal-data .row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(47, 33, 80, 0.5);
}
.modal-data .row .l {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.modal-data .row .v {
    font-size: 13px;
    font-family: var(--mono, monospace);
    word-break: break-word;
}
.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.raw-json {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-family: var(--mono, monospace);
    font-size: 11px;
    color: var(--muted);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow: auto;
}

/* ========== Modal collapsibles + action variants + assign row ========== */
.modal-collapse {
    margin-top: 8px;
}
.modal-collapse summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 0;
    list-style: none;
    user-select: none;
}
.modal-collapse summary:hover { color: var(--fg); }
.modal-collapse summary::-webkit-details-marker { display: none; }
.modal-collapse summary::before {
    content: "▸ ";
    display: inline-block;
    margin-right: 4px;
}
.modal-collapse[open] summary::before { content: "▾ "; }

.btn-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-warning:hover { background: rgba(245, 158, 11, 0.25); }
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.assign-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}
.assign-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.assign-row input {
    flex: 1 1 200px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--fg);
    font-family: var(--mono, 'SFMono-Regular', monospace);
    font-size: 13px;
}
.assign-row input:focus { outline: none; border-color: var(--primary); }

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
}
.toast {
    background: var(--card);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--fg);
    font-size: 13px;
    box-shadow: var(--shadow-card);
    animation: slideIn 0.25s ease-out;
    max-width: 360px;
}
.toast-error { border-color: var(--error); }
.toast-success { border-color: var(--success); }
.toast-fade-out { opacity: 0; transition: opacity 0.3s; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 768px) {
    .filters-bar { flex-direction: column; align-items: stretch; }
    .filter-group { min-width: 0; }
    .filter-actions { justify-content: stretch; }
    .filter-actions .btn { flex: 1; }
}

/* Video status badges (Task 6) */
.badge-video-none      { background: rgba(199, 190, 228, 0.1);  color: var(--muted); border: 1px solid var(--border); }
.badge-video-queued    { background: rgba(245, 158, 11, 0.15);  color: #fbbf24;      border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-video-rendering { background: rgba(59, 130, 246, 0.15);  color: #60a5fa;      border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-video-ready     { background: rgba(34, 197, 94, 0.15);   color: #4ade80;      border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-video-failed    { background: rgba(239, 68, 68, 0.15);   color: #fca5a5;      border: 1px solid rgba(239, 68, 68, 0.3); }

/* Video card in detail modal */
.modal-video-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
}
.modal-video-card video {
    width: 100%;
    max-height: 480px;
    border-radius: 6px;
    display: block;
    background: #000;
}
.modal-video-card .video-empty {
    color: var(--muted);
    text-align: center;
    padding: 32px 12px;
    font-style: italic;
}
.modal-video-card .video-error-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
}
