: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) }

/* 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 }

.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 }
}

/* 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;
}

.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;
}

/* 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;
    border-bottom: 1px solid var(--border);
    background: white;
}

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

.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);
}

.report-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.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: 8px 16px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
}

.export-btn:hover {
    background: #0077ed;
    transform: translateY(-1px);
}

/* 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.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;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.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;
}

.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;
}

.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;
}

/* 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;
    }
    
    .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;
    }
}

/* 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;
}

/* 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;
    }
}

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

.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 { background:#0077ed; transform:translateY(-1px) }
.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);
}