:root {
    --primary: #0284c7;
    --success: #16a34a;
    --warning: #eab308;
    --danger: #dc2626;
    --bg: #f8fafc;
    --text: #0f172a;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
}


/* Header */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

h1 {
    margin: 0;
    color: #0369a1;
    font-size: 22px;
}


/* Main Work Area */
.workspace-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}


.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


/* Form Title */
.panel-title {
    font-size: 14px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    color: #0369a1;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}



/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}


input,
select,
textarea {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
}


textarea {
    resize: vertical;
    height: 36px;
}



/* Buttons */
button,
.btn-label {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-block;
}


.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-secondary {
    background-color: #64748b;
    color: white;
}



/* Upload */
.upload-box {
    border: 2px dashed #cbd5e1;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    background: #fafafa;
}


.file-input {
    display: none;
}



/* ================================
      TABLE SCROLL FIX
================================ */


/* table outer box */
#compliancePDf {
    padding: 0 !important;
}


/* only table scroll */
.table-container {

    height: calc(190vh - 620px);

    min-height: 250px;

    overflow-y: auto;
    overflow-x: auto;

    background: white;

    border-radius: 8px;

    border: 1px solid var(--border);
}



/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12px;
}


th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    vertical-align: top;
}


th {

    position: sticky;
    top: 0;
    z-index: 10;

    background: #0284c7;
    color: white;

    font-weight: 600;
    white-space: nowrap;
}


tr:hover {
    background: #f8fafc;
}



/* Status */
.status-badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    display: inline-block;
}


.status-Active {
    background: #dcfce7;
    color: #16a34a;
}


.status-Amended {
    background: #fef3c7;
    color: #d97706;
}


.status-Omitted {
    background: #fee2e2;
    color: #b91c1c;
}



/* Risk */
.risk-badge {
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 10px;
}


.risk-High {
    background: #fee2e2;
    color: #b91c1c;
}


.risk-Medium {
    background: #fef3c7;
    color: #d97706;
}


.risk-Low {
    background: #dcfce7;
    color: #16a34a;
}



/* Omitted */
.row-omitted td:not(:last-child) {
    text-decoration: line-through;
    color: #94a3b8;
}

/* ==========================modal popup====================  */
.audit-modal {

    display: none;

    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, .45);

    z-index: 99999;

    align-items: center;
    justify-content: center;

}



.audit-popup {

    width: 90%;
    max-width: 1200px;

    background: white;

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);

}



.audit-header {

    background: #0284c7;

    color: white;

    padding: 15px 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.audit-header h3 {

    margin: 0;

    font-size: 18px;

}



.audit-close {

    background: none;

    border: none;

    color: white;

    font-size: 28px;

    cursor: pointer;

}



.audit-content {

    padding: 15px;

    background: #f8fafc;

}



.audit-table-box {

    max-height: 65vh;

    overflow: auto;

}



.audit-table {

    width: 100%;

    border-collapse: collapse;

    background: white;

    font-size: 12px;

}



.audit-table th {

    background: #0369a1;

    color: white;

    padding: 10px;

    position: sticky;

    top: 0;

}



.audit-table td {

    padding: 10px;

    border-bottom: 1px solid #e2e8f0;

}



.audit-table tr:hover {

    background: #f1f5f9;

}



.old-value {

    background: #fee2e2;

    color: #991b1b;

    padding: 6px;

    border-radius: 5px;

}



.new-value {

    background: #dcfce7;

    color: #166534;

    padding: 6px;

    border-radius: 5px;

}

/* =====================loader-------------------  */
.spinner {
    width: 30px;
    height: 30px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #0284c7;
    border-radius: 50%;
    margin: auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {

    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }

}


#complianceGrid {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#complianceGrid th
{
    border: 1px solid #000;
    color: #fff;
    padding: 5px;
}


#complianceGrid td {
    border: 1px solid #000;
    color: #000;
    padding: 5px;
}

/* ================= MOBILE RESPONSIVE ================= */

@media (max-width: 768px) {

    body {
        padding: 10px;
    }


    /* Header */
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    h1 {
        font-size: 18px;
    }


    /* Main layout */
    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }


    .panel {
        padding: 12px;
    }


    /* Form */
    .form-grid {
        grid-template-columns: 1fr;
    }


    input,
    select,
    textarea {
        width: 100%;
        box-sizing: border-box;
    }


    /* Buttons */
    button,
    .btn-label {
        width: 100%;
        text-align: center;
    }


    /* Table */
    .table-container {

        height: 60vh;

        overflow-x: auto;
        overflow-y: auto;

        width: 100%;
    }


    table {

        min-width: 900px;

        font-size: 11px;
    }


    th,
    td {
        padding: 8px;
        white-space: nowrap;
    }



    /* Modal */
    .audit-popup {

        width: 95%;

        max-height: 90vh;

    }


    .audit-header {

        padding: 12px;

    }


    .audit-header h3 {

        font-size: 15px;

    }


    .audit-content {

        padding: 10px;

    }


    .audit-table-box {

        max-height: 55vh;

        overflow-x: auto;

    }


    .audit-table {

        min-width: 700px;

    }



}


/* Small Mobile */
@media (max-width:480px){

    body{
        padding:8px;
    }


    .panel-title{
        font-size:13px;
    }


    label{
        font-size:10px;
    }


    input,
    select,
    textarea{
        font-size:12px;
    }


    .upload-box{
        padding:10px;
    }


}


