:root { 
    --bg:#fbfbfd; --surface:#f5f5f7; --border:#e5e5ea; --text:#1d1d1f; --muted:#86868b; --brand:#0071e3;
    --sidebar-width: 60px;
}
* { margin:0; padding:0; box-sizing:border-box }
body { font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','Segoe UI',sans-serif; background:var(--bg); color:var(--text); overflow:hidden; height:100vh }

/* Clean Layout */
.app-container { 
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: 100vh;
    gap: 0;
}

.main-content { 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-content { 
    flex: 1; 
    padding: 32px; 
    overflow-y: auto;
    background: var(--bg);
}

/* Minimal Sidebar - Light */
.sidebar { 
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 24px;
    border-right: 1px solid var(--border);
}

.sidebar-nav { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 24px;
}

.logo { 
    width: 36px;
    height: 36px;
    background: var(--brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.logo-text { display: none; }

.nav-item { 
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.nav-item:hover { 
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
}

.nav-item.current-page { 
    color: var(--brand);
    background: rgba(0, 113, 227, 0.1);
}

.nav-item span { display: none; }

.nav-icon { 
    width: 20px; 
    height: 20px; 
}

/* Custom Tooltips with Delay */
.nav-item {
    position: relative;
}

.nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.nav-item:hover::after {
    animation: showTooltip 0.2s ease 0.8s forwards;
}

@keyframes showTooltip {
    to {
        opacity: 1;
        visibility: visible;
    }
}

/* Message styling for dynamically added messages */
.message {
    display: flex;
    gap: 12px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

/* Upload */
.upload-layout { 
    display: grid; 
    grid-template-columns: 1fr 400px; 
    gap: 24px; 
    min-height: calc(100vh - 64px);
    align-items: start;
}
.upload-panel { 
    display: flex; 
    flex-direction: column; 
    gap: 24px;
}
.upload-sidebar { 
    position: sticky;
    top: 0;
}
.upload-card { background:white; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,0.08); overflow:hidden }
.card-header { padding:20px 24px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:12px }
.card-icon { width:20px; height:20px; color:var(--brand) }
.card-title { font-size:16px; font-weight:600; color:var(--text) }
.card-content { padding:24px }

/* Forms */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px }
.form-field { display:flex; flex-direction:column; gap:8px; min-width:0 }
.form-field label { font-size:14px; font-weight:500; color:var(--text) }
.form-field input, .form-field select { padding:10px 16px; background:var(--surface); border:1px solid var(--border); border-radius:8px; font-size:14px; color:var(--text); transition:all 0.2s ease }
.form-field input:focus, .form-field select:focus { outline:none; background:white; border-color:var(--brand) }
.form-field input::placeholder { color:var(--muted) }
.form-field.field-valid input { border-color:#22c55e; background:white }
.form-field.field-invalid input { border-color:#ef4444; background:#fef2f2 }

/* File Upload */
.file-selection-area { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:32px; text-align:center }
.file-selection-content { display:flex; flex-direction:column; align-items:center; gap:16px }
.file-icon { width:48px; height:48px; color:var(--muted) }
.file-selection-text { font-size:16px; font-weight:500; color:var(--text) }
.file-selection-subtext { font-size:14px; color:var(--muted); margin-bottom:8px }
.select-files-btn { padding:10px 24px; background:var(--brand); color:white; border:none; border-radius:8px; font-size:14px; font-weight:500; cursor:pointer; transition:all 0.2s ease }
.select-files-btn:hover { background:#0077ed }

/* URL Input */
.url-input-container { display:flex; gap:12px; margin-top:20px; padding:16px; background:var(--surface); border-radius:8px }
.url-icon { font-size:20px; line-height:1 }
.url-input-container input { flex:1; padding:10px 16px; background:white; border:1px solid var(--border); border-radius:6px; font-size:14px; transition:all 0.2s ease }
.url-input-container input:focus { outline:none; border-color:var(--brand) }
.add-url-btn { padding:10px 20px; background:white; border:1px solid var(--border); border-radius:6px; font-size:14px; font-weight:500; color:var(--brand); cursor:pointer; transition:all 0.2s ease }
.add-url-btn:hover { background:#f0f9ff; border-color:var(--brand) }
.add-url-btn:disabled { color:var(--muted); background:#f3f4f6; cursor:not-allowed }
.online-input-panel { margin-top:16px; padding:16px; background:var(--surface); border:1px solid var(--border); border-radius:8px }
.online-input-grid { display:grid; grid-template-columns:minmax(220px, 1fr) minmax(180px, 260px) auto; gap:12px; align-items:start }
.online-input-grid .add-url-btn { height:40px; white-space:nowrap; margin-top:24px }
.field-hint { margin-top:6px; font-size:12px; color:var(--muted); line-height:1.35 }
.platform-detection { min-height:24px; margin-top:6px; display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted) }
.platform-detection.supported { color:#047857 }
.platform-detection.unsupported { color:#b91c1c }
.platform-logo { width:22px; height:22px; object-fit:contain; flex:0 0 auto }
.platform-badge { width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; border-radius:4px; background:#111827; color:#fff; font-size:10px; font-weight:700; line-height:1; flex:0 0 auto }
.platform-badge.vimeo { background:#1ab7ea }
.platform-badge.southpark { background:#2f855a }
.platform-badge.portal { background:#374151 }
.platform-badge.unsupported { background:#9ca3af }

/* AEM package-set upload */
.aem-upload-panel { margin-top:16px; padding:18px; background:#f8fafc; border:1px solid #cbd5e1; border-radius:10px }
.aem-upload-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:14px }
.aem-upload-heading h3 { margin:2px 0 4px; color:var(--text); font-size:16px; font-weight:600 }
.aem-upload-heading p { max-width:720px; margin:0; color:var(--muted); font-size:13px; line-height:1.45 }
.aem-upload-eyebrow { color:#7c3aed; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase }
.aem-upload-badge { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:#ede9fe; color:#6d28d9; font-size:11px; font-weight:600 }
.aem-upload-rules { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:5px 24px; margin:0 0 14px; padding:10px 12px 10px 28px; border-radius:8px; background:#f1f5f9; color:#475569; font-size:12px; line-height:1.4 }
.aem-file-selection-area { overflow:hidden; border:1px dashed #a78bfa; border-radius:8px; background:white }
.aem-file-selection-area .uppy-Dashboard { margin:0 }
.aem-file-selection-area .uppy-Dashboard-inner { border:0; background:transparent }
.aem-package-list { display:grid; gap:8px; margin-top:12px }
.aem-package-list[hidden] { display:none }
.aem-package-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid #ddd6fe; border-radius:8px; background:white }
.aem-package-item.valid { border-color:#86efac }
.aem-package-item.ignored { border-color:#fbbf24; background:#fffbeb }
.aem-package-item.error { border-color:#fca5a5; background:#fef2f2 }
.aem-package-icon { width:28px; height:28px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; border-radius:6px; background:#7c3aed; color:white; font-size:11px; font-weight:700 }
.aem-package-item.valid .aem-package-icon { background:#15803d }
.aem-package-item.ignored .aem-package-icon { background:#d97706 }
.aem-package-item.error .aem-package-icon { background:#dc2626 }
.aem-package-info { min-width:0; flex:1 }
.aem-package-name { overflow:hidden; color:var(--text); font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap }
.aem-package-meta { color:var(--muted); font-size:12px }
.aem-validation-summary { margin-top:10px; padding:10px 12px; border:1px solid #bfdbfe; border-radius:8px; background:#eff6ff; color:#1e40af; font-size:12px; line-height:1.45 }
.aem-validation-summary[hidden] { display:none }
.aem-validation-summary.warning { border-color:#fbbf24; background:#fffbeb; color:#92400e }
.aem-validation-summary.error { border-color:#fca5a5; background:#fef2f2; color:#991b1b }
.aem-validation-summary ul { margin:0; padding-left:18px }
.aem-validation-summary li + li { margin-top:3px }

@media (max-width: 720px) { .aem-upload-rules { grid-template-columns:1fr } }

/* Assets */
.assets-list { margin-top:20px }
.asset-item { display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--surface); border-radius:8px; margin-bottom:8px }
.asset-icon { width:32px; height:32px; background:var(--brand); color:white; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:600 }
.asset-info { flex:1 }
.asset-name { font-size:14px; font-weight:500; color:var(--text) }
.asset-size { font-size:13px; color:var(--muted) }
.asset-remove { width:28px; height:28px; background:transparent; border:none; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:4px; transition:all 0.2s ease }
.asset-remove:hover { background:rgba(255,59,48,0.1); color:#ff3b30 }

/* Consent & Submit */
.consent-container { margin-top:20px }
.consent-label { display:flex; gap:12px; font-size:14px; color:var(--text); line-height:1.5; cursor:pointer; align-items:flex-start }
.consent-label input { margin-top:2px; cursor:pointer; width:16px; height:16px; flex-shrink:0 }
.submit-btn { max-width:200px; padding:12px 24px; background:var(--brand); color:white; border:none; border-radius:8px; font-size:14px; font-weight:500; cursor:pointer; transition:all 0.2s ease; margin-top:24px }
.submit-btn:hover:not(:disabled) { background:#0077ed }
.submit-btn:disabled { background:var(--border); color:var(--muted); cursor:not-allowed }

.blocking-modal { position:fixed; inset:0; z-index:10001; display:flex; align-items:center; justify-content:center; background:rgba(17,24,39,0.42); backdrop-filter:blur(2px) }
.blocking-modal[hidden] { display:none }
.blocking-modal-panel { width:min(360px, calc(100vw - 40px)); padding:24px; background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:0 24px 60px rgba(0,0,0,0.22); text-align:center }
.modal-spinner { width:34px; height:34px; margin:0 auto 16px; border:3px solid #dbeafe; border-top-color:var(--brand); border-radius:50%; animation:modal-spin 0.8s linear infinite }
.modal-title { font-size:16px; font-weight:600; color:var(--text); margin-bottom:6px }
.modal-message { font-size:13px; color:var(--muted); line-height:1.4 }
@keyframes modal-spin { to { transform:rotate(360deg) } }

.remove-btn { max-width:200px; padding:12px 24px; background:#dc3545; color:white; border:none; border-radius:8px; font-size:14px; font-weight:500; cursor:pointer; transition:all 0.2s ease; margin-top:24px; margin-left:12px }
.remove-btn:hover:not(:disabled) { background:#c82333 }
.remove-btn:disabled { background:var(--border); color:var(--muted); cursor:not-allowed }

/* JSON Preview */
.json-preview { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:16px; font-family:'SF Mono',Monaco,monospace; font-size:12px; line-height:1.5; color:var(--text); overflow-x:auto; white-space:pre-wrap; word-break:break-word }

/* Login */
.login-page { width:100%; max-width:400px; padding:20px }
.login-container { background:white; border-radius:12px; padding:40px 30px; box-shadow:0 20px 40px rgba(0,0,0,0.1) }
.login-header { text-align:center; margin-bottom:30px }
.login-title { font-size:28px; font-weight:700; color:#333; margin-bottom:8px }
.login-subtitle { color:#666; font-size:14px }
.form-input { width:100%; padding:12px 16px; border:2px solid #e1e5e9; border-radius:8px; font-size:16px; transition:border-color 0.2s }
.form-input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(102,126,234,0.1) }
.login-submit-btn { width:100%; padding:12px 16px; background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:white; border:none; border-radius:8px; font-size:16px; font-weight:600; cursor:pointer; transition:transform 0.2s; margin-bottom:20px; margin-top:10px }
.login-submit-btn:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(102,126,234,0.3) }

/* Responsive */
@media (max-width: 1200px) { 
    .upload-layout { 
        grid-template-columns: 1fr;
        gap: 0;
    } 
    .upload-sidebar { display: none; } 
}

@media (max-width: 768px) { 
    .form-grid { grid-template-columns:1fr }
    .online-input-grid { grid-template-columns:1fr }
    .online-input-grid .add-url-btn { margin-top:0 }
    .aem-upload-heading { flex-direction:column; gap:10px }
    .aem-upload-badge { align-self:flex-start }
}

/* Scrollbar */
::-webkit-scrollbar { width:8px }
::-webkit-scrollbar-track { background:transparent }
::-webkit-scrollbar-thumb { background:#d2d2d7; border-radius:4px }
::-webkit-scrollbar-thumb:hover { background:var(--muted) }

/* Dashboard Styles */
.card { 
    background: white; 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header { 
    padding: 20px 24px; 
    border-bottom: 1px solid var(--border); 
    background: var(--bg);
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    gap: 12px;
}

.time-filter {
    display: flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.time-filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-filter-btn:hover {
    background: var(--surface);
}

.time-filter-btn.active {
    background: var(--brand);
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* Chart Styles */
.chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Activity Chart */
.activity-chart {
    height: 200px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 8px;
}

.activity-bar {
    flex: 1;
    background: #e3f2fd;
    border-radius: 4px 4px 0 0;
    margin: 0 2px;
    transition: all 0.2s ease;
    position: relative;
    min-height: 20px;
}

.activity-bar:hover {
    background: var(--brand);
}

/* Compliance Breakdown */
.compliance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.compliance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compliance-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.compliance-bar {
    width: 120px;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
}

/* Reports table */
.jobs-table-wrapper {
    overflow-x: auto;
}

.jobs-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.jobs-table th,
.jobs-table td {
    padding: 12px 10px !important;
}

.jobs-video-column,
.jobs-video-cell {
    width: clamp(220px, 24vw, 320px);
    max-width: 320px;
}

.jobs-video-meta {
    max-width: 320px;
    min-width: 0;
}

.jobs-video-title {
    color: var(--text);
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.jobs-video-subline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.jobs-table th:nth-child(4),
.jobs-table td:nth-child(4) {
    width: 140px !important;
}

.jobs-table th:nth-child(8),
.jobs-table td:nth-child(8) {
    width: 130px !important;
}

.jobs-created-by-cell {
    max-width: 130px;
    overflow: hidden;
}

.jobs-created-by {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jobs-table th:nth-child(10),
.jobs-table td:nth-child(10) {
    width: 250px !important;
}

.jobs-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.compliance-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.compliance-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    min-width: 40px;
    text-align: right;
}

/* Unified reporting dashboard */
.reporting-dashboard { display:flex; flex-direction:column; gap:20px; min-width:0 }
.reporting-dashboard .card:hover { transform:none }
.dashboard-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px }
.dashboard-heading h1 { margin:0; font-size:28px; font-weight:650; letter-spacing:-.02em }
.dashboard-heading p { margin:6px 0 0; color:var(--muted); font-size:14px }
.dashboard-actions { align-items:center; flex-wrap:wrap; justify-content:flex-end }
.export-menu { display:flex; align-items:stretch }
.export-menu select,
.dashboard-sort-controls select { min-width:130px; padding:9px 30px 9px 11px; border:1px solid var(--border); border-radius:8px 0 0 8px; background:white; color:var(--text); font-size:13px }
.dashboard-primary-btn { padding:9px 16px; border:0; border-radius:0 8px 8px 0; background:var(--brand); color:white; font-size:13px; font-weight:600; cursor:pointer }
.dashboard-primary-btn:disabled { opacity:.55; cursor:wait }

.dashboard-filter-panel { padding:16px 18px 12px; border:1px solid var(--border); border-radius:12px; background:white }
.dashboard-filter-grid { display:grid; grid-template-columns:minmax(210px,1.6fr) repeat(7,minmax(125px,1fr)); gap:12px }
.dashboard-filter { display:flex; flex-direction:column; gap:6px; min-width:0 }
.dashboard-filter > span { color:#6e6e73; font-size:11px; font-weight:650; letter-spacing:.03em; text-transform:uppercase }
.dashboard-filter input,
.dashboard-filter select { width:100%; height:36px; min-width:0; padding:7px 10px; border:1px solid var(--border); border-radius:7px; background:#fafafa; color:var(--text); font-size:13px }
.dashboard-filter input:focus,
.dashboard-filter select:focus { outline:2px solid rgba(0,113,227,.15); border-color:var(--brand); background:white }
.dashboard-more-filters { margin-top:11px; border-top:1px solid #eeeeF2; padding-top:10px }
.dashboard-more-filters summary { width:max-content; color:var(--brand); font-size:12px; font-weight:600; cursor:pointer; user-select:none }
.dashboard-filter-grid-secondary { grid-template-columns:repeat(5,minmax(140px,1fr)) auto; margin-top:11px }
.dashboard-filter-actions { display:flex; align-items:flex-end }
.dashboard-filter-actions button,
.dashboard-empty button { height:36px; padding:0 13px; border:1px solid var(--border); border-radius:7px; background:white; color:var(--brand); font-size:13px; cursor:pointer; white-space:nowrap }
.active-filter-summary { margin-top:10px; color:var(--muted); font-size:12px }

.dashboard-loading,
.dashboard-error { padding:14px 18px; border-radius:9px; font-size:13px }
.dashboard-loading { color:var(--muted); background:white; border:1px solid var(--border) }
.dashboard-error { color:#991b1b; background:#fef2f2; border:1px solid #fecaca }
.dashboard-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px }
.dashboard-kpi-card { position:relative; display:flex; flex-direction:column; min-height:132px; padding:17px; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:white; text-align:left; box-shadow:0 1px 3px rgba(0,0,0,.05); transition:border-color .2s,box-shadow .2s }
.dashboard-kpi-card:not(:disabled) { cursor:pointer }
.dashboard-kpi-card:not(:disabled):hover { border-color:#b8cfee; box-shadow:0 4px 12px rgba(0,0,0,.08) }
.dashboard-kpi-card::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#94a3b8 }
.dashboard-kpi-blue::before { background:#3b82f6 }
.dashboard-kpi-orange::before { background:#f59e0b }
.dashboard-kpi-red::before { background:#dc2626 }
.dashboard-kpi-purple::before { background:#7c3aed }
.dashboard-kpi-teal::before { background:#0891b2 }
.dashboard-kpi-green::before { background:#16a34a }
.dashboard-kpi-label { color:var(--muted); font-size:12px; font-weight:600 }
.dashboard-kpi-card strong { margin:8px 0 7px; color:var(--text); font-size:30px; font-weight:650; line-height:1 }
.dashboard-kpi-meta { margin-top:auto; color:#6e6e73; font-size:11px; line-height:1.4 }
.dashboard-kpi-meta:has(.kpi-severity) { display:flex; gap:4px; flex-wrap:wrap }
.kpi-severity { padding:3px 5px; border-radius:5px; font-size:9px; font-weight:650; white-space:nowrap }
.kpi-severity-strong { background:#fee2e2; color:#b91c1c }
.kpi-severity-mild { background:#fef3c7; color:#b45309 }
.kpi-severity-info { background:#dbeafe; color:#1d4ed8 }

.dashboard-insight-grid { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(480px,1.2fr); gap:12px }
.dashboard-chart-card { min-height:330px; padding:18px }
.dashboard-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; min-height:43px; margin-bottom:12px }
.dashboard-card-heading h2,
.dashboard-table-heading h2 { margin:0; font-size:15px; font-weight:650 }
.dashboard-card-heading p,
.dashboard-table-heading p { margin:4px 0 0; color:var(--muted); font-size:11px }
.dashboard-no-data { display:flex; align-items:center; justify-content:center; height:220px; color:var(--muted); font-size:13px }

.top-categories { display:flex; flex-direction:column; gap:7px }
.category-row { display:grid; grid-template-columns:minmax(90px,1.25fr) minmax(60px,1fr) 48px; align-items:center; gap:8px; width:100%; padding:4px 0; border:0; background:transparent; color:var(--text); text-align:left; cursor:pointer }
.category-row:hover .category-label strong { color:var(--brand) }
.category-label { display:flex; flex-direction:column; min-width:0 }
.category-label strong { font-size:11px }
.category-label span { overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap }
.category-bar { height:7px; overflow:hidden; border-radius:4px; background:var(--surface) }
.category-bar i { display:block; height:100%; border-radius:4px; background:#f59e0b }
.category-count { display:flex; flex-direction:column; text-align:right }
.category-count strong { font-size:12px }
.category-count small { color:var(--muted); font-size:9px; white-space:nowrap }

.review-by-type { width:100%; overflow-x:auto }
.review-matrix { width:100%; border-collapse:collapse; font-size:11px }
.review-matrix th,
.review-matrix td { padding:9px 6px; border-bottom:1px solid #eeeeF2; text-align:center; white-space:nowrap }
.review-matrix thead th { color:var(--muted); font-size:9px; font-weight:650; text-transform:uppercase }
.review-matrix th:first-child { text-align:left }
.review-matrix tbody tr { cursor:pointer }
.review-matrix tbody tr:hover { background:#fafafa }
.review-matrix tbody th { display:flex; align-items:center; gap:6px; font-weight:600 }
.review-cell-unassigned { color:#7c3aed; font-weight:650 }
.review-cell-comments { color:#b45309; font-weight:650 }
.review-cell-approved { color:#15803d; font-weight:650 }
.asset-type-icon { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:5px; background:#e8f1fc; color:#1d4ed8; font-size:10px; font-weight:700 }
.asset-type-image { background:#ecfdf5; color:#047857 }
.asset-type-document { background:#f5f3ff; color:#6d28d9 }
.asset-type-transcript { background:#fff7ed; color:#c2410c }

.dashboard-table-card { overflow:hidden }
.dashboard-table-filters { border:0; border-bottom:1px solid var(--border); border-radius:0; background:#fcfcfd }
.dashboard-table-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 20px; border-bottom:1px solid var(--border) }
.dashboard-sort-controls { display:flex; align-items:center; gap:8px }
.dashboard-sort-controls label { display:flex; align-items:center; color:var(--muted); font-size:11px }
.dashboard-sort-controls select { margin-left:7px; border-radius:7px }
.dashboard-sort-controls button { height:34px; padding:0 11px; border:1px solid var(--border); border-radius:7px; background:white; color:var(--text); font-size:11px; cursor:pointer }
.dashboard-jobs-table { min-width:1320px; table-layout:auto }
.dashboard-jobs-table th,
.dashboard-jobs-table td { width:auto!important; max-width:none!important; padding:12px 14px!important; vertical-align:middle; font-size:12px }
.dashboard-jobs-table thead th { background:#fafafa; color:var(--muted); font-size:10px; font-weight:650; letter-spacing:.025em; text-align:left; text-transform:uppercase; white-space:nowrap }
.dashboard-jobs-table tbody tr { border-top:1px solid #eeeeF2 }
.dashboard-jobs-table tbody tr:hover { background:#fcfcfd }
.dashboard-jobs-table td:first-child { min-width:190px; max-width:260px!important }
.dashboard-asset-name { overflow-wrap:anywhere; font-weight:600; line-height:1.35 }
.dashboard-cell-meta,
.dashboard-muted { margin-top:3px; color:var(--muted); font-size:10px }
.asset-type-badge { display:inline-flex; align-items:center; gap:6px; white-space:nowrap }
.status-badge,
.review-badge { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:999px; font-size:10px; font-weight:650; white-space:nowrap }
.status-badge i { width:5px; height:5px; border-radius:50%; background:currentColor }
.status-completed { background:#ecfdf3; color:#15803d }
.status-processing { background:#eff6ff; color:#1d4ed8 }
.status-created,.status-queued { background:#fff7ed; color:#c2410c }
.status-failed { background:#fef2f2; color:#b91c1c }
.status-cancelled { background:#f3f4f6; color:#4b5563 }
.review-unassigned { background:#f5f3ff; color:#6d28d9 }
.review-assigned { background:#eff6ff; color:#1d4ed8 }
.review-in_review { background:#ecfeff; color:#0e7490 }
.review-comments { background:#fffbeb; color:#b45309 }
.review-approved { background:#ecfdf3; color:#15803d }
.finding-total { font-size:13px; font-weight:650 }
.severity-pills { display:flex; gap:3px; margin-top:3px; flex-wrap:wrap }
.severity-pills span { padding:2px 4px; border-radius:4px; font-size:8px; font-weight:650 }
.severity-strong { background:#fee2e2; color:#b91c1c }
.severity-mild { background:#fef3c7; color:#b45309 }
.severity-info { background:#dbeafe; color:#1d4ed8 }
.dashboard-jobs-table .jobs-actions { gap:5px }
.dashboard-jobs-table .jobs-actions button { padding:5px 8px; border:1px solid var(--border); border-radius:6px; background:white; color:#4b5563; font-size:10px; cursor:pointer }
.dashboard-jobs-table .jobs-actions .table-primary-action { border-color:var(--brand); background:var(--brand); color:white }
.dashboard-pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:58px; padding:12px 20px; border-top:1px solid var(--border); color:var(--muted); font-size:12px }
.dashboard-pagination > div { display:flex; align-items:center; gap:10px }
.dashboard-pagination button { padding:6px 10px; border:1px solid var(--border); border-radius:6px; background:white; color:var(--text); cursor:pointer }
.dashboard-pagination button:disabled { opacity:.4; cursor:default }
.dashboard-empty { padding:52px 24px; text-align:center }
.dashboard-empty[hidden] { display:none }
.dashboard-empty-icon { margin-bottom:10px; color:var(--muted); font-size:38px }
.dashboard-empty h3 { margin:0; font-size:17px }
.dashboard-empty p { margin:7px 0 16px; color:var(--muted); font-size:13px }

@media (max-width:1500px) {
    .dashboard-filter-grid { grid-template-columns:repeat(4,minmax(150px,1fr)) }
    .dashboard-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)) }
    .dashboard-insight-grid { grid-template-columns:minmax(280px,.8fr) minmax(480px,1.2fr) }
}
@media (max-width:900px) {
    .dashboard-heading { flex-direction:column }
    .dashboard-actions { justify-content:flex-start }
    .dashboard-filter-grid { grid-template-columns:repeat(2,minmax(140px,1fr)) }
    .dashboard-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
    .dashboard-insight-grid { grid-template-columns:1fr }
}
@media (max-width:600px) {
    .dashboard-filter-grid,.dashboard-kpi-grid { grid-template-columns:1fr }
    .dashboard-heading .time-filter { max-width:100%; overflow-x:auto }
    .dashboard-table-heading { align-items:flex-start; flex-direction:column }
}

/* Report Page Styles */
.report-layout {
    display: grid;
    grid-template-columns: 1fr 5px var(--video-panel-width, 400px);
    height: calc(100vh - 64px);
    gap: 0;
    position: relative;
}

.report-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.report-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.back-button:hover {
    color: var(--brand);
}

.report-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
}

.report-title > div > div:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-status {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.report-export-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.failed {
    background: #ff3b30;
}

.status-dot.passed {
    background: #22c55e;
}

.export-btn {
    padding: 7px 10px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 32px;
}

.export-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.export-btn.disabled,
.export-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--muted);
}

.export-btn.disabled:hover,
.export-btn:disabled:hover {
    border-color: var(--border);
    color: var(--muted);
}

/* Tab Navigation */
.tab-navigation {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tab-buttons {
    display: flex;
    gap: 0;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: var(--text);
    background: rgba(0, 113, 227, 0.05);
}

.tab-button.disabled,
.tab-button:disabled {
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.tab-button.disabled:hover,
.tab-button:disabled:hover {
    background: none;
    color: var(--muted);
}

.tab-button.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.tab-button svg {
    opacity: 0.7;
}

.tab-button.active svg {
    opacity: 1;
}

.tab-count {
    background: var(--muted);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.tab-button.active .tab-count {
    background: var(--brand);
}

/* Filter Bar */
.filter-bar {
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.report-filter-controls,
.report-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background: var(--surface);
    border-color: #d2d2d7;
}

.filter-pill.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.category-dropdown {
    padding: 6px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    min-width: 180px;
    transition: all 0.2s ease;
}

.category-dropdown:hover {
    border-color: var(--brand);
    background-color: var(--surface);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

/* Issues Container */
.issues-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

.issues-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Log Review */
.review-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 920px;
    margin: 0 auto;
}

.review-view[hidden] {
    display: none;
}

.review-overview-card,
.review-comments-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.review-overview-card {
    padding: 16px 18px;
}

.review-comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.review-comments-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.review-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.review-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-comment-composer {
    display: flex;
    align-items: flex-end;
    flex-direction: row;
    gap: 8px;
}

.review-control-group label {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}

.review-status-control .review-select {
    width: 130px;
}

.review-assignee-control {
    flex: 1;
}

.review-assignee-control .review-select {
    min-width: 150px;
}

.review-resolve-btn {
    margin-left: auto;
}

.review-select {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 34px 0 12px;
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}

.review-select:focus,
.review-comment-input-wrap textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.review-primary-btn,
.review-secondary-btn {
    min-height: 38px;
    padding: 0 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.review-primary-btn {
    color: white;
    background: var(--brand);
    border: 1px solid var(--brand);
}

.review-primary-btn:hover {
    filter: brightness(0.94);
}

.review-secondary-btn {
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
}

.review-secondary-btn:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.review-primary-btn:disabled,
.review-secondary-btn:disabled,
.review-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.review-comments-heading {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.review-comments-heading h2 span {
    color: var(--muted);
    font-weight: 500;
}

.review-comments-list {
    display: flex;
    flex-direction: column;
}

.review-comment-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.review-comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #175cd3;
    background: #eff8ff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.review-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.review-comment-author {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.review-comment-time {
    color: var(--muted);
    font-size: 12px;
}

.review-comment-text {
    color: #344054;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.review-comment-composer {
    padding: 20px 24px 22px;
}

.review-comment-input-wrap {
    flex: 1;
    position: relative;
}

.review-comment-input-wrap textarea {
    display: block;
    width: 100%;
    min-height: 40px;
    max-height: 160px;
    padding: 9px 12px;
    resize: vertical;
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.review-mention-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    z-index: 20;
    width: min(360px, 100%);
    max-height: 210px;
    overflow-y: auto;
    padding: 6px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 9px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.14);
}

.review-mention-menu[hidden] {
    display: none;
}

.review-mention-option {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 9px 10px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
}

.review-mention-option:hover {
    background: var(--surface);
}

.review-mention-option strong {
    font-size: 13px;
}

.review-mention-option span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.issue-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 120px;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.issue-row:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.issue-row.active {
    background: #f0f9ff;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.time-link {
    color: var(--brand);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.play-icon {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

.issue-description {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
}

.static-copy-detail {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
}

.static-copy-detail-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

.static-copy-suggestion {
    color: #166534;
}

.static-copy-explanation {
    color: var(--muted);
}

.severity-tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.severity-tag.strong {
    background: #ffebe9;
    color: #ff3b30;
}

.severity-tag.mild {
    background: #fef3c7;
    color: #f59e0b;
}

.severity-tag.info {
    background: #e0f2fe;
    color: #0284c7;
}

.category-tag {
    font-size: 12px;
    color: var(--muted);
}

/* Video Panel */
.video-panel {
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.04);
    min-width: 300px;
    max-width: 800px;
}

/* Resize Handle */
.resize-handle {
    position: relative;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    z-index: 10;
}

.resize-handle:hover {
    background: rgba(59, 130, 246, 0.08);
}

.resize-handle:active {
    background: rgba(59, 130, 246, 0.12);
}

.resize-handle-line {
    width: 1px;
    height: 100%;
    background: var(--border);
    transition: all 0.15s ease;
}

.resize-handle:hover .resize-handle-line {
    background: var(--brand);
    width: 2px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.resize-handle:active .resize-handle-line {
    background: var(--brand);
    width: 3px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* Resizing state */
body.resizing {
    cursor: col-resize;
    user-select: none;
}

body.resizing .resize-handle {
    background: rgba(59, 130, 246, 0.12);
}

body.resizing .resize-handle-line {
    background: var(--brand);
    width: 3px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.video-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

.panel-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.asset-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #111;
}

.asset-preview-image[hidden] {
    display: none;
}

.asset-preview-placeholder {
    width: 100%;
    height: 100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#9ca3af;
    background:#111;
    font-size:14px;
    font-weight:600;
}

.asset-preview-placeholder[hidden] {
    display:none;
}

.aem-structure-viewer[hidden],
.aem-page-preview[hidden] {
    display: none;
}

.video-panel.aem-mode .video-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
    aspect-ratio: auto;
    background: #f7f8fa;
}

.video-panel.aem-mode .video-info {
    display: none;
}

.report-layout.aem-report-mode .issues-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.aem-structure-viewer {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: var(--text);
    background: #f7f8fa;
}

.aem-page-preview {
    width: 100%;
    height: 100%;
    min-height: 0;
    color: var(--text);
    background: #eef1f5;
}

.aem-viewer-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.aem-viewer-header > div {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 2px;
}

.aem-viewer-header strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aem-viewer-path {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aem-viewer-eyebrow,
.aem-layer-label,
.aem-graph-depth {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.aem-language-toggle {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.aem-graph-section {
    min-height: 0;
    padding: 12px;
    overflow: hidden;
    background: #f0f3f7;
}

.aem-graph-columns {
    display: flex;
    height: 100%;
    gap: 10px;
    overflow: auto;
    scroll-behavior: smooth;
}

.aem-graph-column {
    display: flex;
    flex: 1 0 128px;
    flex-direction: column;
    gap: 7px;
    min-width: 128px;
    max-width: 180px;
}

.aem-graph-depth {
    position: sticky;
    top: 0;
    padding: 2px 3px;
    background: #f0f3f7;
    z-index: 1;
}

.aem-node-card {
    position: relative;
    display: grid;
    width: 100%;
    gap: 4px;
    padding: 10px;
    border: 1px solid #dce2ea;
    border-radius: 8px;
    color: var(--text);
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.aem-node-card.structural {
    cursor: default;
}

.aem-node-variant-list {
    display: grid;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dce2ea;
}

.aem-node-card.language-variant {
    gap: 6px;
}

.aem-node-card:not(.structural):hover,
.aem-node-card.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .1);
}

.aem-node-card.has-issues {
    border-color: #f4b4b4;
}

.aem-node-title {
    overflow: hidden;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aem-node-meta {
    color: var(--muted);
    font-size: 10px;
}

.aem-node-language-code,
.aem-page-language-code {
    width: fit-content;
    padding: 2px 6px;
    border-radius: 4px;
    color: #334155;
    background: #eef2f7;
    font-size: 10px;
    font-weight: 700;
}

.aem-node-card.selected .aem-node-language-code {
    color: #fff;
    background: var(--brand);
}

.aem-node-issue-count {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 18px;
    padding: 2px 5px;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.aem-node-issue-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.aem-node-issue-alert {
    display: inline-flex;
    width: 17px;
    height: 17px;
    align-items: center;
    justify-content: center;
    flex: 0 0 17px;
    border-radius: 50%;
    color: #fff;
    background: #dc2626;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.aem-node-issue-kind {
    display: inline-flex;
    width: fit-content;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.aem-issue-kind-grammar {
    color: #7c2d12;
    background: #ffedd5;
}

.aem-issue-kind-language {
    color: #5b21b6;
    background: #ede9fe;
}

.aem-issue-kind-compliance {
    color: #991b1b;
    background: #fee2e2;
}

.aem-graph-empty,
.aem-page-empty {
    display: grid;
    height: 100%;
    place-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.aem-page-section {
    height: 100%;
    min-height: 0;
    overflow: auto;
    background: #eef1f5;
}

.aem-page-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
}

.aem-page-language-controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.aem-page-header h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
}

.aem-page-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.aem-locale-select {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: 11px;
}

.aem-rendered-page {
    width: calc(100% - 32px);
    max-width: 760px;
    min-height: calc(100% - 86px);
    margin: 16px auto;
    border: 1px solid #dce2ea;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.aem-page-issues {
    width: calc(100% - 32px);
    max-width: 760px;
    margin: 0 auto 32px;
    border: 1px solid #dce2ea;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.aem-page-issues-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.aem-page-issues-header h3 {
    margin: 0;
    font-size: 13px;
}

.aem-page-issues-header > span {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.aem-page-issue-list {
    display: grid;
}

.aem-page-issue {
    display: grid;
    gap: 9px;
    padding: 14px;
    border-left: 3px solid #94a3b8;
}

.aem-page-issue + .aem-page-issue {
    border-top: 1px solid #e5e7eb;
}

.aem-page-issue-strong {
    border-left-color: #dc2626;
}

.aem-page-issue-mild {
    border-left-color: #d97706;
}

.aem-page-issue-info {
    border-left-color: #0284c7;
}

.aem-page-issue-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.aem-page-issue-category {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aem-page-issue-severity {
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
}

.aem-page-issue-severity.strong { color: #dc2626; }
.aem-page-issue-severity.mild { color: #b45309; }
.aem-page-issue-severity.info { color: #0369a1; }

.aem-page-issue-description {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.aem-page-issue-evidence {
    display: grid;
    grid-template-columns: minmax(90px, 130px) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    line-height: 1.4;
}

.aem-page-issue-evidence strong {
    color: #334155;
    font-size: 10px;
}

@media (max-width: 760px) {
    .aem-page-issue-evidence {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

.aem-page-layers {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(24px, 5vw, 52px);
}

.aem-rendered-layer {
    min-width: 0;
    overflow-wrap: anywhere;
}

.aem-image-layer img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    border-radius: 4px;
    object-fit: contain;
    background: #f1f5f9;
}

.aem-rendered-copy,
.aem-rendered-layer h1,
.aem-rendered-layer h2 {
    margin: 0;
    line-height: 1.55;
    white-space: pre-wrap;
}

.aem-rendered-layer h1 {
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.2;
}

.aem-rendered-layer h2 {
    font-size: clamp(18px, 2.5vw, 26px);
    line-height: 1.3;
}

.aem-rendered-copy {
    font-size: 15px;
}

.aem-rendered-cta {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff;
    background: var(--brand);
    font-size: 14px;
    font-weight: 650;
}

.aem-role-accessibility {
    padding: 12px 14px;
    border-left: 3px solid #cbd5e1;
    color: #64748b;
    background: #f8fafc;
}

.aem-role-dictionary_message {
    display: grid;
    grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.aem-dictionary-key {
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.aem-missing-image {
    display: grid;
    min-height: 130px;
    padding: 14px;
    place-items: center;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    color: var(--muted);
    background: #f8fafc;
    font-size: 11px;
    text-align: center;
    overflow-wrap: anywhere;
}

.aem-page-empty-copy {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.asset-unit-nav {
    position:absolute;
    left:12px;
    right:12px;
    bottom:12px;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    pointer-events:none;
}

.asset-unit-nav[hidden] {
    display:none;
}

.asset-unit-btn {
    width:34px;
    height:34px;
    border:1px solid rgba(255,255,255,0.28);
    border-radius:6px;
    background:rgba(17,24,39,0.82);
    color:#fff;
    font-size:24px;
    line-height:1;
    cursor:pointer;
    pointer-events:auto;
}

.asset-unit-btn:disabled {
    opacity:0.35;
    cursor:not-allowed;
}

.asset-unit-label {
    padding:7px 10px;
    border-radius:6px;
    background:rgba(17,24,39,0.82);
    color:#fff;
    font-size:12px;
    font-weight:600;
    pointer-events:none;
}

/* Video Timeline */
.video-timeline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 0 20px 20px;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
    z-index: 2;
}

.timeline-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    pointer-events: auto;
}



.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--brand);
    width: 0%;
    border-radius: 2px;
}

.timeline-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 12px;
    background: #ff3b30;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.timeline-marker:hover {
    height: 16px;
    top: -6px;
}

/* Subtitles Display */
.subtitle-display {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtitle-text {
    font-size: 14px;
    color: #ffeb3b;
    text-align: center;
    font-style: normal;
    line-height: 1.4;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-family: Arial, sans-serif;
}

/* Video Info */
.video-info {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background: var(--bg);
}

.info-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.info-section:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-value {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

/* Loading State */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--muted);
}

/* Hide category options based on active tab */
.content-only,
.technical-only {
    display: block;
}

[data-active-tab="content"] .technical-only {
    display: none;
}

[data-active-tab="technical"] .content-only {
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .report-layout {
        grid-template-columns: 1fr;
    }

    .report-header {
        align-items: flex-start;
    }

    .report-status {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .resize-handle {
        display: none;
    }
    
    .video-panel {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 320px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        z-index: 50;
    }
}

@media (max-width: 768px) {
    .report-header,
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .header-left,
    .report-status,
    .report-export-actions,
    .report-filter-controls,
    .report-filter-group {
        justify-content: flex-start;
    }

    .category-filter #categoryFilterButton {
        width: 100%;
    }

    .review-toolbar {
        align-items: stretch;
        flex-direction: column;
        white-space: normal;
    }

    .review-control-group {
        align-items: stretch;
        flex-direction: column;
    }

    .review-status-control .review-select,
    .review-assignee-control .review-select {
        width: 100%;
    }

    .review-resolve-btn {
        margin-left: 0;
    }
}

/* Profiles Page Styles */
.profiles-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.profiles-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.group-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.group-badge.visual {
    background: #0071e3;
}

.group-badge.audio {
    background: #22c55e;
}

.group-badge.static {
  background: #f3e8ff;
  color: #7e22ce;
}

/* Add Profile Form Styles */
.add-profile-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.profile-form-header {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-form-header .form-field {
    max-width: none;
}

@media (max-width: 768px) {
    .profile-form-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.profile-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.filter-group h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.filter-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.filter-checkboxes label:hover {
    background: var(--surface);
}

.filter-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.filter-checkboxes .group-badge {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.profile-form-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .profile-filters {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filter-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* Config Review */
.config-review-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
}

.config-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.config-review-kicker {
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.config-review-header h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.config-review-header p {
    color: var(--muted);
    font-size: 14px;
}

.config-review-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-secondary {
    padding: 10px 18px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.config-review-error {
    padding: 14px 16px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 14px;
}

.demo-mode-warning {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.demo-mode-warning[hidden] {
    display: none;
}

.demo-mode-warning strong {
    font-size: 14px;
    font-weight: 700;
}

.demo-mode-warning span {
    color: #7f1d1d;
}

.config-review-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.config-review-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 54px;
}

.config-review-stat strong {
    display: block;
    font-size: 17px;
    line-height: 1;
    margin-bottom: 5px;
}

.config-review-stat span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.config-review-section {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.config-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

.config-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.config-section-heading h2 {
    font-size: 18px;
    font-weight: 650;
    margin-bottom: 4px;
}

.config-section-heading p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.config-source-list,
.config-market-list,
.config-guardrail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-category-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.config-source-item,
.config-category-item,
.config-market-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.config-source-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

#config-review-versions-section .config-section-heading {
    align-items: center;
    margin-bottom: 10px;
}

#config-review-versions-section .config-section-heading h2 {
    font-size: 16px;
    margin-bottom: 2px;
}

#config-review-versions-section .config-section-heading p {
    font-size: 12px;
}

#config-review-versions-section .config-source-list {
    gap: 6px;
}

#config-review-versions-section .config-source-item {
    padding: 10px 12px;
    align-items: center;
}

#config-review-versions-section .config-source-meta {
    min-width: 150px;
}

.config-version-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.config-version-title-row .config-chip-row {
    margin-top: 0;
}

.config-version-audit {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 2px 0 4px;
}

.config-version-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.config-source-item.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
}

.config-source-item strong,
.config-market-item strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 6px;
}

.config-source-item span,
.config-source-meta span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.config-source-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 220px;
}

.config-source-meta code {
    color: #475569;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    word-break: break-word;
    text-align: right;
}

.config-version-load-btn,
.config-version-activate-btn,
.config-version-remove-btn {
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.config-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.config-tabs {
    display: inline-flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.config-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.config-tab:last-child {
    border-right: 0;
}

.config-tab.active {
    color: white;
    background: var(--brand);
}

.config-tab span {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
}

.config-tab.active span {
    background: rgba(255, 255, 255, 0.22);
}

.config-filter-controls {
    display: flex;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.config-filter-controls input,
.config-filter-controls select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-size: 14px;
}

.config-filter-controls input {
    width: min(420px, 100%);
}

.config-filter-controls input:focus,
.config-filter-controls select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.config-category-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.config-category-toolbar {
    align-items: center;
}

.config-category-toolbar .config-filter-controls {
    min-width: min(560px, 100%);
}

.config-category-columns .filter-group {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.config-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.config-category-columns .filter-group h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 15px;
    font-weight: 650;
}

.config-category-columns .filter-group h3 span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px;
}

.config-category-item.compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 16px;
}

.config-category-item.changed {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
}

.config-category-item.editing {
    background: var(--surface);
}

.config-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.config-category-header h3,
.config-category-heading-copy {
    flex: 1;
    min-width: 0;
}

.config-category-header h3 {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-category-heading-copy span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.config-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.config-category-title h3 {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.config-category-description {
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.config-category-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.config-category-meta.secondary:empty {
    display: none;
}

.config-category-actions .config-category-edit-btn {
    box-sizing: border-box;
    min-width: 72px;
    height: 32px;
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 6px;
    line-height: 1;
    align-self: start;
    flex: 0 0 auto;
}

.config-add-category-btn {
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.config-category-actions {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
}

.config-card-title-input,
.config-card-edl-input,
.config-card-regulations-input,
.config-card-description-input,
.config-card-rule-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: white;
    color: var(--text);
    font-size: 13px;
}

.config-card-title-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-weight: 650;
}

.config-card-edl-input,
.config-card-regulations-input {
    width: auto;
    min-width: 120px;
    padding: 6px 8px;
}

.config-card-description-input,
.config-card-rule-input {
    padding: 9px 10px;
    line-height: 1.45;
    resize: vertical;
}

.config-card-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
}

.config-card-title-input:focus,
.config-card-edl-input:focus,
.config-card-regulations-input:focus,
.config-card-description-input:focus,
.config-card-rule-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.config-card-field {
    display: grid;
    gap: 6px;
}

.config-card-field > span {
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

.config-severity-editor-note {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.config-severity-editor-note strong {
    color: #1d4ed8;
    font-size: 12px;
}

.config-severity-editor-note span {
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.config-publish-bar {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(260px, 2fr) auto auto;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.config-publish-bar[hidden] {
    display: none;
}

.config-publish-bar strong,
.config-publish-bar span {
    display: block;
}

.config-publish-bar strong {
    font-size: 14px;
}

.config-publish-bar span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.config-publish-bar input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 9px 10px;
    font-size: 13px;
}

.config-publish-bar .config-validation-result {
    grid-column: 1 / -1;
    margin-top: 0;
}

.config-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.config-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.config-chip {
    background: var(--surface);
    color: #475569;
    border: 1px solid var(--border);
}

.config-chip.warning {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.config-severity-guidance {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.config-severity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.config-severity-heading strong {
    font-size: 12px;
}

.config-severity-heading span {
    color: var(--muted);
    font-size: 11px;
}

.config-severity-levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.config-severity-level {
    min-width: 0;
    padding: 10px 11px;
    border-right: 1px solid var(--border);
}

.config-severity-level:last-child {
    border-right: 0;
}

.config-severity-level > span {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.config-severity-level.info > span {
    color: #1d4ed8;
    background: #dbeafe;
}

.config-severity-level.mild > span {
    color: #92400e;
    background: #fef3c7;
}

.config-severity-level.strong > span {
    color: #b91c1c;
    background: #fee2e2;
}

.config-severity-level p {
    color: #475569;
    font-size: 11px;
    line-height: 1.45;
}

.config-category-details,
.config-advanced {
    margin-top: auto;
}

.config-category-details summary,
.config-advanced summary {
    color: var(--brand);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.config-delivery-settings {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.config-delivery-settings > summary {
    color: #475569;
    font-size: 12px;
}

.config-delivery-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.config-delivery-fields .config-card-edl-input,
.config-delivery-fields .config-card-regulations-input {
    width: 100%;
}

.config-delivery-fields .config-card-checkbox {
    grid-column: 1 / -1;
    justify-self: start;
}

.config-detail-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.config-detail-row strong {
    display: block;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.config-detail-row pre {
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
    max-height: 180px;
    overflow: auto;
}

.config-market-item .config-chip-row {
    margin-top: 0;
}

.config-guardrail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
}

.config-guardrail-item span {
    color: #475569;
    font-size: 14px;
}

.config-guardrail-item strong {
    font-size: 18px;
}

.config-admin-section {
    padding-bottom: 24px;
}

.config-admin-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    padding: 14px 16px;
}

.config-admin-panel > summary {
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
}

.config-admin-intro {
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 12px;
}

.config-admin-subsection {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.config-admin-subsection h2 {
    margin-bottom: 10px;
    font-size: 15px;
}

.config-admin-panel .config-advanced {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.config-empty-state {
    color: var(--muted);
    background: white;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 18px;
    font-size: 14px;
}

.config-validation-result {
    margin-top: 14px;
    font-size: 13px;
}

.config-validation-result .valid {
    color: #047857;
}

.config-validation-result .invalid {
    color: #b91c1c;
}

.config-validation-result ul {
    margin: 8px 0 0 18px;
    color: #475569;
}

@media (max-width: 980px) {
    .config-review-grid {
        grid-template-columns: 1fr;
    }

    .config-toolbar,
    .config-source-item,
    .config-review-header {
        flex-direction: column;
        align-items: stretch;
    }

    .config-filter-controls {
        justify-content: stretch;
    }

    .config-category-toolbar {
        align-items: stretch;
    }

    .config-filter-controls input,
    .config-filter-controls select {
        width: 100%;
    }

    .config-source-meta {
        align-items: flex-start;
        min-width: 0;
    }

    .config-version-actions {
        justify-content: flex-start;
    }

    .config-publish-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .config-filter-controls {
        flex-direction: column;
    }

    .config-review-stats,
    .config-severity-levels,
    .config-delivery-fields {
        grid-template-columns: 1fr;
    }

    .config-severity-level {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .config-severity-level:last-child {
        border-bottom: 0;
    }

    .config-category-list {
        grid-template-columns: 1fr;
    }

    .config-category-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .config-card-title-input,
    .config-category-header h3 {
        order: 2;
        flex-basis: 100%;
    }

    .config-category-actions {
        margin-left: auto;
    }

    .config-tabs {
        width: 100%;
    }

    .config-tab {
        flex: 1;
        justify-content: center;
    }
}

/* Profile Switcher Bar */
.profile-switcher-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace-separator {
    color: var(--border);
    font-size: 18px;
    font-weight: 300;
}

.workspace-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.2px;
}

.profile-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-switcher label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.profile-switcher select {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    min-width: 150px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-switcher select:hover {
    border-color: var(--brand);
}

.profile-switcher select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.profile-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    animation: pulse-glow 2s infinite;
    margin-left: 12px;
}

.profile-status-badge .badge-icon {
    font-size: 14px;
    filter: brightness(1.2);
}

.profile-status-badge .badge-text {
    white-space: nowrap;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    }
    50% {
        box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4), 0 0 0 2px rgba(5, 150, 105, 0.1);
    }
}

@media (max-width: 768px) {
    .profile-switcher-bar {
        padding: 10px 16px;
        justify-content: center;
    }
    
    .profile-switcher select {
        min-width: 120px;
    }
}

/* Legacy compatibility */
.container { padding: 20px }
.btn { padding:8px 12px; border:0; border-radius:8px; background:#374151; color:var(--text); cursor:pointer; transition: all 0.2s ease }
.btn.primary { background: var(--brand) }
.btn-primary { padding:12px 24px; border:0; border-radius:8px; background:var(--brand); color:white; cursor:pointer; font-size:14px; font-weight:500; transition: all 0.2s ease }
.btn-primary:hover:not(:disabled) { background:#0077ed; transform:translateY(-1px) }
.btn-primary:disabled,
.btn-secondary:disabled {
    background: var(--border);
    color: var(--muted);
    border-color: var(--border);
    cursor: not-allowed;
    transform: none;
}
.btn-danger { padding:12px 24px; border:0; border-radius:8px; background:#ef4444; color:white; cursor:pointer; font-size:14px; font-weight:500; transition: all 0.2s ease }
.btn-danger:hover { background:#dc2626; transform:translateY(-1px) }
.form-group { display:flex; flex-direction:column; gap:8px; margin-bottom:16px }
.form-group label { font-size:14px; font-weight:500; color:var(--text); margin:0 }
.form-group input { padding:12px 16px; background:var(--surface); border:1px solid var(--border); border-radius:8px; font-size:14px; color:var(--text); transition:all 0.2s ease }
.form-group input:focus { outline:none; background:white; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,113,227,0.1) }
.mt-2 { margin-top:8px }
.mt-3 { margin-top:16px }
.card.light { background:#fff; color:#111827 }
label { display:block; margin-top:10px; margin-bottom:6px }
input { width:100%; padding:10px 12px; border:1px solid #d1d5db; border-radius:8px }
.error { color:#ef4444; margin:8px 0; background:#fee; padding:12px; border-radius:6px; border:1px solid #fcc; text-align:center; font-size:14px }
.success { color:#22c55e; margin:8px 0; background:#f0fdf4; padding:12px; border-radius:6px; border:1px solid #bbf7d0; text-align:center; font-size:14px }
.hint { color:#6b7280; font-size:12px; margin-top:8px; text-align:center; background:#f8f9fa; padding:8px 12px; border-radius:6px }

/* Platform Safety Styles */

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.platform-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-name {
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
    margin-bottom: 4px;
}

.platform-monetization {
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.platform-status-line {
    font-size: 14px;
    font-weight: 500;
}

.platform-ad-serving {
    color: var(--muted);
    font-size: 13px;
}

.platform-age-restricted {
    color: var(--muted);
    font-size: 13px;
}

.platform-categories {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.platform-guide {
    color: var(--brand);
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
}

.platform-guide:hover {
    text-decoration: underline;
}

.reg-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-header {
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
}

.reg-status {
    font-size: 14px;
    font-weight: 500;
}

.violation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.violation-detail {
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
    padding: 4px 0;
    border-left: 3px solid var(--border);
    padding-left: 12px;
}

.no-violations {
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--brand);
}

input:checked + .slider:before {
    transform: translateX(20px);
}
