﻿:root {
    /* Primary */
    --tv-primary: #1a73e8;
    --tv-primary-light: #e8f0fe;
    /* Surface / Background */
    --tv-surface: #ffffff;
    --tv-surface-alt: #f5f7fa;
    --tv-surface-hover: #f8fafc;
    /* Borders */
    --tv-border: #e5e7eb;
    --tv-border-strong: #d1d5db;
    /* Text */
    --tv-text: #333;
    --tv-text-light: #666;
    --tv-text-muted: #888;
    /* Status Chips */
    --tv-approved: #16a34a;
    --tv-pending: #d97706;
    --tv-rejected: #dc2626;
}

:root {
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
}


body {
    margin: 0;
    font-family: system-ui, sans-serif;   
    color: black;
}

.layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background: #203060;
    background-image: linear-gradient( 180deg, rgba(255,255,255,0.04) 0%, rgba(35,30,88,0) 100% );
    color: rgba(255,255,255,0.87);
    border-right: 1px solid rgba(255,255,255,0.08);
}

    .sidebar a {
        display: flex;
        align-items: center;
        padding: 12px 18px;
        color: rgba(255,255,255,0.87);
        text-decoration: none;
        border-radius: 6px;
        margin: 4px 8px;
    }

        .sidebar a:hover {
            background: rgba(255,255,255,0.04);
        }

        .sidebar a.active {
            background: rgba(255,255,255,0.08);
        }


.logo {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: rgba(255,255,255,0.87);
    text-decoration: none;
    font-size: 14px;
}

    .sidebar nav a.active {
        background: rgba(255,255,255,0.08);
        font-weight: 500;
        color: rgba(255,255,255,0.87);
    }

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topnav {
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 14px;
}

.content {
    padding: 24px;
    overflow: auto;
}

h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #666;
}

.description {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

table {
    width: 100%;
    background: #ffffff;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background: #f3f4f6;
    font-weight: 600;
}

.tv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

    .tv-table th {
        text-align: left;
        padding: 8px 0;
        color: black;
        font-size: 13px;
    }

    .tv-table td {
        padding: 8px 0;
        color: black;
        border-top: 1px solid rgba(255,255,255,0.08);
    }


.nav-section {
    margin-bottom: 20px;
}

.nav-parent {
    display: flex;
    align-items: center;    
    padding: 1px 18px;
    color: rgba(255,255,255,0.87);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    margin: 4px 8px;
    user-select: none;
}

    .nav-parent:hover {
        background: rgba(255,255,255,0.04);
    }

    .nav-parent.active {
        background: rgba(255,255,255,0.08);
    }



.nav-children a {
    display: block;
    padding: 6px 0 6px 15px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

    .nav-children a.active {
        font-weight: 600;
        color: #1976d2;
    }

/* Hide children by default */
.nav-children {
    display: none;
    margin-left: 5px;
}

/* When expanded */
.nav-section.open .nav-children {
    display: block;
}

/* Make parent look clickable */
.nav-parent {
    cursor: pointer;
    user-select: none;
}    

.nav-section.open .nav-parent::after {
    transform: rotate(90deg);
}

.chevron {
    font-family: "Material Symbols Rounded";
    font-size: 20px;
    transition: transform 0.2s ease;
    color: rgba(255,255,255,0.6);
}

.nav-parent.open .chevron {
    transform: rotate(180deg);
}


.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}


.metric-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.metric-value {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center; 
    width: 100%;
    text-align: center;
}

.metric-change {
    font-size: 12px;
    color: #1976d2;
}

.metric-trend {    
    font-size: 0.8rem;
    color: #666;
}


.tv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

    .tv-table th,
    .tv-table td {
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }

.btn {
    padding: 6px 12px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar a,
.nav-parent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.material-symbols-rounded {
    font-size: 20px;
}

.sidebar a.active .material-symbols-rounded {
    color: #1976d2;
}

.nav-children .material-symbols-rounded {
    font-size: 16px;
    opacity: 0.7;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #4a6cf7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.topnav-userbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hidden {
    display: none !important;
}

.topnav-userbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.caret {
    font-size: 20px;
    color: #555;
}

.profile-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 160px;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

    .profile-dropdown.show {
        display: flex;
    }

.profile-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

    .profile-item:hover {
        background: #f5f5f5;
        cursor: pointer;
    }

.global-loader {
    position: fixed;
    inset: 0;
    background: #f6f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease;
}

    .global-loader.hide {
        opacity: 0;
        pointer-events: none;
    }

.shimmer {
    width: 80%;
    max-width: 600px;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient( 90deg, #e0e0e0 0%, #f8f8f8 50%, #e0e0e0 100% );
    background-size: 200% 100%;
    animation: shimmerMove 1.2s infinite;
}

@keyframes shimmerMove {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Full-page background */
.login-body {
    background: #f5f7fb;
    margin: 0;
    font-family: system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* Center container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.tv-logo-login {
    width: 48px;
    height: 48px;
    color: #4a6cf7;
}

/* Title */
.login-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #4590B4;
}

/* Subtitle */
.login-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

    .login-form label {
        font-size: 14px;
        color: #444;
    }

    .login-form input {
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 15px;
        outline: none;
        transition: border-color 0.2s;
    }

        .login-form input:focus {
            border-color: #4a6cf7;
        }

/* Button */
.login-btn {
    margin-top: 10px;
    padding: 12px;
    background: #4590B4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .login-btn:hover {
        background: #57B6E3;
    }

/* Footer */
.login-footer {
    margin-top: 25px;
    font-size: 13px;
    color: #999;
}

.login-logo {
    width: 80px;
    margin-bottom: 15px;
}

.login-body {
    background: url("trustverse-bg.svg") no-repeat center center / cover;
}

.forgot-link {
    font-size: 13px;
    color: #4590B4;
    text-decoration: none;
    margin-top: -8px;
    margin-bottom: 10px;
}

    .forgot-link:hover {
        text-decoration: underline;
    }


/* Card */
.login-card {
    background: white;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.tv-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tv-card-row {
    padding: 6px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
}

    .tv-card-row:last-child {
        border-bottom: none;
    }

.tv-card-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
}

.tv-card-desc {
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
}

.tv-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

    .tv-card-grid label {
        font-size: 12px;
        color: rgba(255,255,255,0.5);
    }

    .tv-card-grid p {
        margin: 2px 0 0;
        color: rgba(255,255,255,0.9);
    }

.tv-row.full-width {
    width: 100%;
    display: block;
    margin-top: 20px;
}

.tv-card.full-width {
    width: 100%;
}

/* Risk Score Box */
.risk-score-box {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 16px 0;
}

.risk-score-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a73e8;
}

.risk-score-label {
    font-size: 14px;
    color: #444;
    margin-top: 4px;
}



.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-spinner {
    display: inline-block;
}

.error {
    display: none;
    color: #d9534f;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

    .error.show {
        display: block;
        opacity: 1;
    }


.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    margin-bottom: 8px;
}

.tv-logo {
    width: 24px;
    height: 24px;
    color: rgba(255,255,255,0.87); 
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.87);
    letter-spacing: 0.2px;
}

.tv-logo {
    opacity: 0.87;
}

.section-icon-red {
    color: #e53935; 
}

.section-icon-blue {
    color: blue;
}

.section-icon-yellow {
    color: sandybrown; 
}

.section-icon-orange {
    color: orange; 
}

.section-icon-green {
    color: green;
}

.page-header {
    padding: 0 24px;
    margin-bottom: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.tabs {
    display: flex;
    gap: 4px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
}

    .tab:hover {
        background: rgba(255,255,255,0.05);
    }

    .tab.active {
        color: rgba(255,255,255,0.95);
        font-weight: 600;
        background: rgba(255,255,255,0.08);
    }

.tab-content {
    padding: 24px;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }

/* Tabs */
.tv-tabs {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-4) 0;
    border-bottom: 1px solid var(--tv-border);
    padding-bottom: var(--space-1);
}

.tv-tab {
    background: none;
    border: none;
    padding: var(--space-2) var(--space-4);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    color: var(--tv-text-light);
    transition: 0.2s;
}

    .tv-tab:hover {
        background: var(--tv-surface-hover);
    }

    .tv-tab.active {
        background: var(--tv-primary-light);
        color: var(--tv-primary);
        font-weight: 600;
    }



.tv-tab-content {
    padding: 5px;
}

.tv-panel {
    display: none;
}

    .tv-panel.active {
        display: block;
    }


.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.95);
}

.tv-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.tv-section-sub {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.tv-card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}



.tv-page-header {
    padding: 0 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tv-page-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin: 0;
}

.tv-status-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

    .status-chip.valid {
        background: rgba(76,175,80,0.15);
        color: #4caf50;
    }

    .status-chip.pending {
        background: rgba(255,193,7,0.15);
        color: #ffc107;
    }

    .status-chip.rejected {
        background: rgba(244,67,54,0.15);
        color: #f44336;
    }

    .status-chip.review {
        background: rgba(33,150,243,0.15);
        color: #2196f3;
    }

.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

    .upload-box:hover {
        background: #f8fafc;
    }

    .upload-box.dragging {
        background: #e8f0fe;
        border-color: #1a73e8;
    }

.upload-icon {
    font-family: "Material Symbols Rounded";
    font-size: 32px;
    color: #1a73e8;
    display: block;
    margin-bottom: 8px;
}
/* Upload Progress */

.upload-progress {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-top: 12px;
    display: none;
}

.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: #1a73e8;
    border-radius: 4px;
    transition: width 0.2s;
}

.uploaded-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uploaded-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--tv-surface);
    border: 1px solid var(--tv-border);
    border-radius: 8px;
    margin-bottom: var(--space-2);
    font-size: 14px;
    transition: background 0.2s;
}

.uploaded-item:hover {
    background: var(--tv-surface-hover);
}

/* Section container */
.upload-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
}

/* Section header */
.upload-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
}

    .upload-section-header:hover {
        background: #f9fafb;
    }

.upload-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.upload-folder-icon {
    font-size: 18px;
    color: #6b7280;
}

/* Chevron */
.upload-chevron {
    transition: transform 0.2s ease;
}

.upload-section.collapsed .upload-chevron {
    transform: rotate(-90deg);
}

/* Table header */
.upload-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

/* File rows */
.upload-file-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 12px 18px;
    border-bottom: 1px solid #f3f4f6;
}

    .upload-file-row:last-child {
        border-bottom: none;
    }

.upload-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

/* Notes */
.upload-notes {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

/* Hide real file input */
.file-input {
    display: none;
}

/* Choose File button */
.file-button {
    background: #1a73e8;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Filename text */
.file-name {
    font-size: 14px;
    color: #5f6368;
    min-width: 160px;
}

/* Upload button */
.upload-btn {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

    .upload-btn:hover {
        background: #d2e3fc;
    }



/* Status chips */
.status-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
}

.status-valid {
    background: #e6f7e6;
    color: #1a7f37;
}

.status-rejected {
    background: #fde7e7;
    color: #b42318;
}

.status-expired {
    background: #fff4e5;
    color: #b76e00;
}

.status-deleted {
    background: #e5e7eb;
    color: #374151;
}

.status-underreview {
    background: #e0e7ff;
    color: #3730a3;
}


.tv-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal */
.tv-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.tv-modal-content {
    background: #fff;
    width: 80%;
    height: 80%;
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.tv-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    cursor: pointer;
    font-family: "Material Symbols Rounded";
    font-size: 24px;
}

.tv-check-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
}

    .tv-check-header:hover {
        background: rgba(255,255,255,0.08);
    }

.tv-check-body {
    display: none;
    padding: 16px;
}

.tv-check-section.open .tv-check-body {
    display: block;
}

.tv-check-for {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
}

.tv-check-item {
    margin-bottom: 20px;
}

.tv-check-label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.tv-notes {
    width: 100%;
    height: 80px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px;    
}

.tv-search-string {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    white-space: pre-wrap;
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
}

.tv-progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.tv-progress-bar {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.4s ease;
}


.tv-btn-secondary,
.tv-btn-danger,
.tv-btn-primary {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.tv-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.tv-btn-danger {
    background: #d32f2f;
    color: #fff;
}

.tv-btn-primary {
    background: #4a6cf7;
    color: #fff;
}

.tv-final-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 24px;
}

#previewFrame {
    width: 100%;
    height: 100%;
    border: none;
}


.low-risk {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.tv-subheader {
    padding: 0 24px;
    margin-bottom: 16px;
}

/* Folder */
.tv-folder {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.tv-folder-header {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tv-folder.open .tv-folder-header {
    background: #f5f7fa;
}

.tv-folder-content {
    padding: 12px 16px;
    display: none;
}

.tv-folder.open .tv-folder-content {
    display: block;
}

    .tv-folder-header:hover {
        background: rgba(255,255,255,0.08);
    }

    .tv-folder-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

.tv-folder-body {
    display: none;
    padding: 16px;
}

.tv-folder.open .tv-folder-body {
    display: block;
}

.chevron {
    font-family: "Material Symbols Rounded";
    font-size: 20px;
    transition: transform 0.2s ease;
    color: rgba(255,255,255,0.7);
}

.tv-folder.open .chevron {
    transform: rotate(180deg);
}

.tv-folder.empty p {
    color: rgba(255,255,255,0.5);
    margin: 4px 0 0;
}

/* Folder Container */
.tv-folder {
    border: 1px solid var(--tv-border);
    border-radius: 10px;
    margin-bottom: var(--space-4);
    background: var(--tv-surface);
    overflow: hidden;
    transition: 0.2s ease;
}

/* Folder Header */
.tv-folder-header {
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    background: var(--tv-surface);
    transition: background 0.2s;
}

    .tv-folder-header:hover {
        background: var(--tv-surface-hover);
    }

    /* Chevron */
    .tv-folder-header .chevron {
        font-family: "Material Symbols Rounded";
        transition: transform 0.2s;
    }

.tv-folder.open .chevron {
    transform: rotate(180deg);
}

/* Folder Content */
.tv-folder-content {
    padding: var(--space-4);
    border-top: 1px solid var(--tv-border);
    display: none;
    background: var(--tv-surface-alt);
}

.tv-folder.open .tv-folder-content {
    display: block;
}

.status-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

    .status-chip.approved {
        background: var(--tv-approved);
    }

    .status-chip.pending {
        background: var(--tv-pending);
    }

    .status-chip.rejected {
        background: var(--tv-rejected);
    }

.uploaded-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--tv-surface);
    border: 1px solid var(--tv-border);
    border-radius: 8px;
    margin-bottom: var(--space-2);
    font-size: 14px;
    transition: background 0.2s;
}

    .uploaded-item:hover {
        background: var(--tv-surface-hover);
    }

.upload-box {
    border: 2px dashed var(--tv-border-strong);
    border-radius: 12px;
    padding: var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: var(--tv-surface);
}

    .upload-box:hover {
        background: var(--tv-surface-hover);
    }

    .upload-box.dragging {
        background: var(--tv-primary-light);
        border-color: var(--tv-primary);
    }

.upload-icon {
    font-family: "Material Symbols Rounded";
    font-size: 32px;
    color: var(--tv-primary);
    display: block;
    margin-bottom: var(--space-2);
}


.risk-score-box {
    background: var(--tv-surface-alt);
    border-radius: 12px;
    padding: var(--space-5);
    text-align: center;
    margin: var(--space-4) 0;
}

.risk-score-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--tv-primary);
}

.risk-score-label {
    font-size: 14px;
    color: var(--tv-text-light);
    margin-top: var(--space-2);
}

/* ================================
   CGA SECTION HEADER (Firebase-style)
   ================================ */
.cga-section {
    border-left: 4px solid var(--tv-primary);
    padding-left: var(--space-4);
    margin: var(--space-5) 0 var(--space-3);
}

.cga-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--tv-text);
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    /* Status chip inside CGA header */
    .cga-section-title .status-chip {
        margin-left: var(--space-3);
    }

/* ================================
   CGA FOLDER (Firebase-style)
   ================================ */
.cga-folder {
    border: 1px solid var(--tv-border);
    border-radius: 10px;
    background: var(--tv-surface);
    margin-bottom: var(--space-4);
    overflow: hidden;
    transition: 0.2s ease;
}

/* Header */
.cga-folder-header {
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    background: var(--tv-surface);
    transition: background 0.2s;
}

    .cga-folder-header:hover {
        background: var(--tv-surface-hover);
    }

    /* Chevron */
    .cga-folder-header .chevron {
        font-family: "Material Symbols Rounded";
        transition: transform 0.2s;
    }

.cga-folder.open .chevron {
    transform: rotate(180deg);
}

/* Content */
.cga-folder-content {
    padding: var(--space-4);
    border-top: 1px solid var(--tv-border);
    background: var(--tv-surface-alt);
    display: none;
}

.cga-folder.open .cga-folder-content {
    display: block;
}

/* ================================
   CGA CHECKLIST ROWS
   ================================ */
.cga-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    font-size: 14px;
    border-bottom: 1px solid var(--tv-border);
}

    .cga-row:last-child {
        border-bottom: none;
    }

    .cga-row strong {
        color: var(--tv-text);
    }

/* Notes */
.cga-notes {
    margin-top: var(--space-3);
    font-size: 13px;
    color: var(--tv-text-light);
    line-height: 1.5;
}

.cga-notes-label {
    margin-top: 8px;
    font-size: 14px;
    color: #374151;
}

.cga-notes-thread {
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px solid #e5e7eb;
}

    .cga-notes-thread.empty {
        color: #9ca3af;
        font-style: italic;
    }

.cga-note {
    margin-bottom: 10px;
}

.cga-note-meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.cga-note-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.35;
}


.cga-meta {
    margin-top: 2px;
    margin-bottom: 5px;
    font-size: 10px;
    color: #4b5563;
    
}

    .cga-meta strong {
        color: #374151;
    }


.tv-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .tv-review-btn span.material-symbols-rounded {
        font-size: 18px;
        vertical-align: middle;
    }

    .tv-review-btn:hover {
        background: green; /* Firebase greenish hover */
        border-color: #C8DCD3; /* Firebase hover border */
        box-shadow: 0 1px 2px rgba(0,0,0,0.12);
        color: white;
    }

    .tv-review-btn:active {
        background: #eaeaea;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
    }

.tv-review-btn {
    position: relative;
    overflow: hidden;
}

    .tv-review-btn::after {
        content: "";
        position: absolute;
        background: rgba(0,0,0,0.1);
        border-radius: 50%;
        transform: scale(0);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s, opacity 0.8s;
    }

    .tv-review-btn:active::after {
        transform: scale(3);
        opacity: 1;
        left: var(--x);
        top: var(--y);
    }

.tv-searchbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

    .tv-searchbar input {
        flex: 1;
        padding: 10px 12px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 14px;
    }

    .tv-searchbar button {
        padding: 8px 14px;
        border-radius: 6px;
        background: #4a6cf7;
        color: #fff;
        border: none;
        cursor: pointer;
    }

.status-chip,
.risk-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    color: #fff;
}

/* STATUS COLORS */
.status-active {
    background: #4caf50;
}
/* green */
.status-pending {
    background: #ff9800;
}
/* orange */
.status-rejected {
    background: #f44336;
}
/* red */
.status-review {
    background: #2196f3;
}
/* blue */

/* RISK COLORS */
.risk-low {
    background: #4caf50;
}
/* green */
.risk-medium {
    background: #ff9800;
}
/* orange */
.risk-high {
    background: #f44336;
}
/* red */
.risk-critical {
    background: #9c27b0;
}
/* purple */

.status-chip-unknown,
.risk-chip-unknown {
    background: #9e9e9e;
    color: #fff;
}

/* Page container */
.tv-transactions-page {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /*background: radial-gradient(circle at top left, #0b1120 0, #020617 45%);*/
    min-height: 100vh;
    color: black;
    font-family: system-ui, sans-serif;
}

/* Header */
.tv-transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tv-transactions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
}

.tv-transactions-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

.tv-transactions-header-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.tv-transactions-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
}

.tv-transactions-btn-ghost {
    background: #1976d2;
    border-color: rgba(148, 163, 184, 0.4);
}

.tv-transactions-btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
}

/* Toolbar */
.tv-transactions-toolbar {
    display: grid;
    grid-template-columns: 2fr 3fr auto;
    gap: 12px;
    align-items: center;
}

.tv-transactions-search {
    display: flex;
    align-items: center;
    gap: 8px;
    /*background: rgba(15, 23, 42, 0.9);*/
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

    .tv-transactions-search input {
        background: transparent;
        border: none;
        outline: none;
        color: #e5e7eb;
        width: 100%;
    }

/* Filters */
.tv-transactions-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tv-transactions-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    /*background: rgba(15, 23, 42, 0.9);*/
    font-size: 11px;
    cursor: pointer;
}

.tv-transactions-chip-active {
    background: var(--tv-primary-100);
    border-color: var(--tv-primary-300);
    color: var(--tv-primary-900);
}

/* Dots */
.tv-transactions-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.tv-transactions-dot-high {
    background: #f97373;
}

.tv-transactions-dot-medium {
    background: #fbbf24;
}

.tv-transactions-dot-low {
    background: #22c55e;
}

/* Summary cards */
.tv-transactions-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tv-transactions-summary-card {
    /*background: rgba(15, 23, 42, 0.8);*/
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.tv-transactions-summary-label {
    font-size: 11px;
    color: #9ca3af;
}

.tv-transactions-summary-value {
    font-size: 18px;
    font-weight: 600;
}

.tv-transactions-summary-meta {
    font-size: 11px;
    color: #6b7280;
}

/* Table card */
.tv-transactions-card {
    /*background: rgba(15, 23, 42, 0.8);*/
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    overflow: hidden;
}

.tv-transactions-table-header,
.tv-transactions-table-footer {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tv-transactions-table-title {
    font-size: 13px;
    font-weight: 500;
}

.tv-transactions-table-meta {
    font-size: 11px;
    color: #6b7280;
}

.tv-transactions-table-wrapper {
    overflow-x: auto;
}

.tv-transactions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

    .tv-transactions-table th,
    .tv-transactions-table td {
        padding: 8px 10px;
        border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    }

    .tv-transactions-table th {
        font-size: 11px;
        color: #9ca3af;
    }

/* Footer */
.tv-transactions-table-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9ca3af;
}

.tv-transactions-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    /*background: rgba(15, 23, 42, 0.9);*/
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.risk-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.risk-high {
    background: #d9534f;
}

.risk-medium {
    background: #f0ad4e;
}

.risk-low {
    background: #5cb85c;
}

.risk-unknown {
    background: #999;
}

.drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 999;
}

    .drawer.open {
        right: 0;
    }

.drawer-content {
    padding: 20px;
}



/* Hide hamburger on desktop */
.sidebar-toggle {
    display: none;
}

/* ---------------------------------------------
   CGA COMPLIANCE SECTION
--------------------------------------------- */

#cgaComplianceSection {
    margin-top: 24px;
    background: #fff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

    /* Header */
    #cgaComplianceSection .tv-card-header {
        padding: 20px 24px;
        border-bottom: 1px solid #e5e7eb;
    }

        #cgaComplianceSection .tv-card-header h2 {
            font-size: 20px;
            font-weight: 600;
            margin: 0;
        }

        #cgaComplianceSection .tv-card-header p {
            margin: 4px 0 0;
            color: #6b7280;
            font-size: 14px;
        }

    /* ---------------------------------------------
   TABLE
--------------------------------------------- */

    #cgaComplianceSection .tv-table-wrapper {
        overflow-x: auto;
    }

    #cgaComplianceSection table.tv-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }

        #cgaComplianceSection table.tv-table thead th {
            text-align: left;
            padding: 14px 16px;
            background: #f9fafb;
            font-weight: 600;
            color: #374151;
            border-bottom: 1px solid #e5e7eb;
            white-space: nowrap;
        }

        #cgaComplianceSection table.tv-table tbody td {
            padding: 14px 16px;
            border-bottom: 1px solid #f1f1f1;
            vertical-align: middle;
        }

        #cgaComplianceSection table.tv-table tbody tr:hover {
            background: #f9fafb;
        }

/* ---------------------------------------------
   STATUS CHIPS
--------------------------------------------- */

.status-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: capitalize;
}

.status-active {
    background: #10b981; /* green */
}

.status-pending {
    background: #f59e0b; /* amber */
}

.status-review {
    background: #3b82f6; /* blue */
}

.status-rejected {
    background: #ef4444; /* red */
}

/* ---------------------------------------------
   BUTTONS
--------------------------------------------- */

#cgaComplianceSection .tv-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#cgaComplianceSection .tv-btn-ghost {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

    #cgaComplianceSection .tv-btn-ghost:hover {
        background: #e5e7eb;
    }

#cgaComplianceSection .tv-btn-primary {
    background: #2563eb;
    border: 1px solid #1d4ed8;
    color: #fff;
}

    #cgaComplianceSection .tv-btn-primary:hover {
        background: #1d4ed8;
    }

/* Disabled / muted */
#cgaComplianceSection .muted {
    color: #9ca3af;
    font-size: 13px;
}

#documentUploadSection {
    margin-top: 5px;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid #e5e7eb;
}

.upload-toolbar {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.upload-category {
    padding: 16px;
}

    .upload-category h3 {
        margin-bottom: 12px;
        font-size: 16px;
        font-weight: 600;
    }

.upload-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fafafa;
}

/* Container becomes a vertical list */
#cgaRequirementsBody {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Each requirement row */
.cga-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.cga-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Left side */
.cga-left {
    max-width: 65%;
}

.cga-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cga-authority {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 4px;
}

.cga-notes {
    color: #4b5563;
    font-size: 13px;
}

/* Right side */
.cga-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Status chips */
.cga-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

    .cga-status.status-outstanding {
        background: #fde7e7;
        color: #b42318;
    }

    .cga-status.status-cleared {
        background: #e6f7e6;
        color: #1a7f37;
    }

    .cga-status.status-pending {
        background: #fff4e5;
        color: #b76e00;
    }

    .cga-status.status-notchecked {
        background: #e5e7eb;
        color: #374151;
    }

.cga-item.needs-check {
    background: #fde7e7; /* light red */
    border-color: #f5c2c2; /* subtle red border */
}

.file-name {
    min-width: 180px;
    display: inline-block;
    color: #5f6368;
}

.file-button {
    background: #1a73e8;
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upload-btn {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.upload-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* Wrap the entire upload input area */
#documentUploadSection .upload-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

/* Top row: category, type, notes */
#documentUploadSection .upload-select,
#documentUploadSection .upload-notes {
    height: 42px;
    padding: 0 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    flex: 1;
    min-width: 180px;
    max-width: 360px;
    margin: 10px;
}

/* Bottom row: choose file + filename + upload button */
#documentUploadSection .upload-input-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    margin: 10px;
}

/* Hide native file input */
#documentUploadSection .file-input {
    display: none;
}

/* Choose File button */
#documentUploadSection .file-button {
    background: #1a73e8;
    color: white;
    padding: 0 18px;
    height: 42px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}

/* Filename text */
#documentUploadSection .file-name {
    font-size: 14px;
    color: #5f6368;
    min-width: 180px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Upload button */
#documentUploadSection .upload-btn {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    padding: 0 18px;
    height: 42px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}

    #documentUploadSection .upload-btn:hover {
        background: #d2e3fc;
    }

.tv-pill-field {
    display: flex;
    align-items: center;
    gap: 10px;    
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    border-radius: 8px;
}

.pill-label {
    background: #e5e7eb;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}

.tv-pill-field select {
    flex: 1;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 14px;
}

/* -----------------------------------------------------------
   PAGE LAYOUT
----------------------------------------------------------- */

.tv-page-content {
    padding: 24px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.tv-page-header {
    margin-bottom: 24px;
}

.tv-page-title {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
}

/* -----------------------------------------------------------
   PROGRESS BAR
----------------------------------------------------------- */

.tv-progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.tv-progress-bar {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.4s ease;
}

/* -----------------------------------------------------------
   CHECKLIST WRAPPER
----------------------------------------------------------- */

.tv-checklist {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* -----------------------------------------------------------
   CHECK SECTION (CARD)
----------------------------------------------------------- */

.tv-check-section {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

    .tv-check-section.open {
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .tv-check-section .chevron{
        color: black;
    }
/* -----------------------------------------------------------
   HEADER WITH ANIMATED CHEVRON
----------------------------------------------------------- */
    .tv-check-header {
        display: flex;
        align-items: center;
        padding: 14px 18px;
        cursor: pointer;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
        user-select: none;
    }

    .tv-check-header h3 {
        flex: 1;
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #111827;
    }

.tv-check-section.open .chevron {
    transform: rotate(180deg);
}

/* Completed checkmark */
.check-complete {
    color: #10b981;
    font-size: 28px;
    margin-left: 8px;
    font-weight: bold;
}

/* -----------------------------------------------------------
   CHECK BODY
----------------------------------------------------------- */

.tv-check-body {
    display: none;
    padding: 18px;
}

.tv-check-section.open .tv-check-body {
    display: block;
}

.tv-check-item {
    margin-bottom: 16px;
}

.tv-check-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.tv-notes {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

    .tv-notes:focus {
        border-color: #3b82f6;
        outline: none;
        box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
    }

/* -----------------------------------------------------------
   ACTIONS
----------------------------------------------------------- */

.tv-check-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.tv-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.tv-btn {
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    border: none;
}

.tv-btn-ghost {
    background: #f3f4f6;
    color: #374151;
}

    .tv-btn-ghost:hover {
        background: #e5e7eb;
    }

.tv-btn-primary {
    background: #3b82f6;
    color: white;
}

    .tv-btn-primary:hover {
        background: #2563eb;
    }

.tv-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

    .tv-btn-secondary:hover {
        background: #d1d5db;
    }

/* -----------------------------------------------------------
   SUMMARY SECTION
----------------------------------------------------------- */

.tv-summary-section {
    margin-top: 32px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.tv-final-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.tv-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.tv-back-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}

.tv-page-title {
    font-size: 24px;
    font-weight: 600;
    margin: 4px 0;
    color: #111827;
}

.tv-page-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
}

.tv-status-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

    .tv-status-chip.notstarted {
        background: #fee2e2;
        color: #991b1b;
    }

    .tv-status-chip.inprogress {
        background: #fef3c7;
        color: #92400e;
    }

    .tv-status-chip.failed {
        background: #fee2e2;
        color: #991b1b;
    }

    .tv-status-chip.paused {
        background: #fee2e2;
        color: #991b1b;
    }

    .tv-status-chip.completed {
        background: #d1fae5;
        color: #065f46;
    }

  


/* ---------------------------------------------
   RESPONSIVE
--------------------------------------------- */

@media (max-width: 768px) {
    #cgaComplianceSection table.tv-table thead {
        display: none;
    }

    #cgaComplianceSection table.tv-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
    }

    #cgaComplianceSection table.tv-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: none;
    }

        #cgaComplianceSection table.tv-table tbody td::before {
            content: attr(data-label);
            font-weight: 600;
            color: #6b7280;
        }

    #cgaComplianceSection .tv-btn, .cga-status, .cga-title, .cga-authority, .cga-notes {
        font-size: 10px;
    }

    #documentUploadSection .upload-input-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    #documentUploadSection .file-name {
        min-width: 100%;
        max-width: 100%;
    }

    #documentUploadSection .upload-btn,
    #documentUploadSection .file-button {
        width: 100%;
        justify-content: center;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        margin-right: 12px;
    }

    .topnav {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .content {
        margin-left: 0 !important;
    }

    .metric-value {
        font-size: 1.25rem;
        text-align: center;
    }

    .tv-page-content {
        padding: 16px;
    }

    .tv-check-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tv-final-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .tv-btn {
        width: 100%;
        text-align: center;
    }

}








