html, body {
    font-family: 'Open Sans', sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* remove horizontal scrollbar */
}

body, .app-wrapper {
    background-color: var(--color-bg) !important;
}

.app-wrapper, .content-wrapper {
    min-height: auto !important; /* stop forcing full height */
}

/* Header css start */
.app-header.navbar {
    max-width: 100% !important;
    background-color: var(--color-primary) !important;
    color: var(--color-light);
}
.sidebar-wrapper {
    background-color: var(--color-white);
}
.sidebar-wrapper a {
    color: var(--color-dark);
}
.navbar-expand .navbar-nav .nav-link {
    padding-left: 0 !important;
}
@media (min-width: 768px) {
    .profile-dropdown {
        padding: 0 20px 0 10px !important;
        margin-right: 15px !important;
    }
}
@media (min-width: 768px) {
    .profile-dropdown {
        padding: 0 20px 0 10px !important;
        margin-right: 15px !important;
    }
}
/* Header css end */

/** Dropdown css start **/
.custom-dropdown {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0;
    color: var(--color-light);

    width: 151px;
    height: 27px;

    padding: 4px 8px;
    border-radius: 5px;

    background: rgba(255, 255, 255, 0.1); /* same as var(--color-white) with opacity */
    border: none;

    cursor: pointer;
}

.custom-dropdown::after {
    content: "▼";
    font-size: 10px;
    color: var(--color-light);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.custom-dropdown option {
    color: var(--color-dark);
    background: var(--color-white);
}
/** Dropdown css end **/

/* Sidebar css start */
.app-sidebar {
    font-size: 15px !important;
}
.app-sidebar .nav-link.active {
    /*background-color: var(--sidebar-hover-bg) !important;*/
    /*color: var(--color-dark) !important;*/
    background-color: #04395F1A !important; /* custom background */
    color:  var(--color-dark) !important;  /* text color */
    border-radius: 5px;                   /* optional rounded */
}
.app-sidebar .nav-link.active .nav-icon {
    color: var(--color-light) !important;
}
.app-sidebar .nav-link:hover {
    /*background-color: var(--sidebar-hover-bg) !important;*/
    /*color: var(--color-dark) !important;*/
    background-color: #04395F1A !important;
    color:  var(--color-dark) !important;
}
.sidebar-wrapper .sidebar-menu > .nav-item.menu-open > .nav-link,
.sidebar-wrapper .sidebar-menu > .nav-item:hover > .nav-link,
.sidebar-wrapper .sidebar-menu > .nav-item > .nav-link:focus {
    color: var(--lte-sidebar-hover-color);
    background-color: var(--lte-sidebar-hover-bg);
}
.sidebar-wrapper .nav-treeview > .nav-item > .nav-link {
    color: var(--color-light-gray) !important;
}
.sidebar-wrapper .nav-treeview > .nav-item > .active,
.menu-open > .nav-link {
    color: var(--color-dark) !important;
}
.bi-circle-fill::before {
    font-size: 10px !important;
}
.active .icon-bg {
    fill: var(--color-primary);
    fill-opacity: 0.9 !important;
}
.active .icon-text {
    stroke: var(--color-light);
}
/* Sidebar css end */

/* Buttons css start */
/* Base Button */
.btn {
    border-radius: 5px;
    font-size: 14px;
    font-weight: 400;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Variants */
.btn-solid {
    color: var(--color-light);
    border: 1px solid transparent;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid;
}

.btn-ghost {
    background-color: transparent;
    border: none;
}

/* Colors */
.btn-primary {
    --btn-bg: var(--color-primary);
    --btn-bg-hover: var(--color-primary-700);
    --btn-border: var(--color-primary);
    --btn-text: var(--color-light);
}

.btn-dark {
    --btn-bg: var(--color-dark-100);
    --btn-bg-hover: var(--color-gray);
    --btn-border: var(--color-dark-100);
    --btn-text: var(--color-light);
}

.btn-light {
    --btn-bg: var(--color-light);
    --btn-bg-hover: var(--color-light-gray);
    --btn-border: var(--color-light);
    --btn-text: var(--color-dark);
}

.btn-danger {
    --btn-bg: var(--color-danger);
    --btn-bg-hover: #b02a37; /* darker red */
    --btn-border: var(--color-danger);
    --btn-text: var(--color-light);
}
.btn-light-gray {
    --btn-bg: var(--color-light-gray);
    --btn-bg-hover: #6e6e6e; /* darker shade for hover */
    --btn-border: var(--color-light-gray);
    --btn-text: var(--color-dark);
}

/* Apply Colors to Variants */
.btn-solid {
    background-color: var(--btn-bg);
    border-color: var(--btn-border);
    color: var(--btn-text);
}
.btn-solid:hover {
    background-color: var(--btn-bg-hover);
    border-color: var(--btn-bg-hover);
}

.btn-outline {
    color: var(--btn-border);
    border-color: var(--btn-border);
}
.btn-outline:hover {
    background-color: var(--btn-bg);
    color: var(--btn-text);
}

.btn-ghost {
    color: var(--btn-border);
}
.btn-ghost:hover {
    background-color: var(--btn-bg-hover);
    color: var(--btn-text);
}

/* Search & Buttons layout */
.search-col { flex: 0 0 65%; }
.button-col { flex: 0 0 30%; }
@media (max-width: 768px) {
    .search-col, .button-col { flex: 0 0 100%; }
    .button-col { justify-content: space-between; }
}

/* buttons css end */

/* Cards */
.card {
    border: 1px solid white !important;
    box-shadow: none !important;
    border-radius: 5px;
}

/* Pagination css start */
.page-item .page-link {
    border: none;
    color: var(--color-light-gray);
}
/* Pagination css end */

/* Tables css start */
.table-custom {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-light-gray);
}
.table-custom thead {
    background-color: var(--color-light);
}
.table-custom thead th {
    font-weight: 600;
    color: var(--color-dark);
    border: 1px solid var(--color-light-gray);
    border-top: none;
}
.table-custom td {
    border: 1px solid var(--color-light-gray);
    vertical-align: middle;
}
.table-custom thead tr th {
    background-color: var(--color-table-bg) !important;
    font-size: 0.8125rem;
    font-weight: 400;
}
.table-custom tbody tr {
    height: 54px !important;
    font-size: 0.8125rem;
    font-weight: 400;
}
.table-custom thead th:first-child {
    border-top-left-radius: 8px;
}
.table-custom thead th:last-child {
    border-top-right-radius: 8px;
}
.table-custom tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}
.table-custom tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}
/* Tables css end */

/* Tab css start */
/* Container */
.btn-tabs {
    border-bottom: 1px solid lightgray;
    gap: 4px; /* small spacing between tabs */
}

/* Default (inactive tab) */
.btn-tabs .nav-link {
    color: var(--color-light-gray);
    border: 1px solid lightgray;
    font-size: 14px !important;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    padding: 5px 15px !important;
    margin-right: 10px;
    transition: all 0.2s ease-in-out;
}

/* Hover */
.btn-tabs .nav-link:not(:disabled):hover {
    background-color: var(--color-primary-100);
    color: var(--color-dark);
    border-color: var(--color-primary);
}

/* Active tab */
.btn-tabs .nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-light);
    border-color: var(--color-primary);
    border-bottom: 1px solid var(--color-light); /* blend with container */
}

/* Disabled */
.btn-tabs .nav-link:disabled {
    background-color: var(--color-light-gray);
    color: #999;
    cursor: not-allowed;
}

/* Tab css end */

/* Login screen css start */
.login-box, .register-box {
    width: 650px;
}
.login-box .card, .register-box .card {
    border-radius: 20px !important;
}
.login-box .input-group, .register-box .input-group {
    height: 50px;
}
.login-box-msg {
    color: var(--color-dark);
    font-size: 2rem;
}
.bg-body-secondary {
    background-color: var(--color-primary) !important;
}
.bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 75%;
}
@media (max-width: 576px) {
    .login-box, .register-box {
        width: 90%;
        margin-top: 0.5rem;
    }
    .login-box-msg {
        color: var(--color-dark);
    }
    .bg-img {
        width: 100% !important;
    }
}
/* Login screen css end */

/*form css start */
.form-label, .form-check-label{
    font-size: 0.8125rem !important;
}
/*form css end */


/* file upload css start */
.file-upload {
    border: 2px dashed #04395F;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px auto;
    background: #f9f9f9;
}
.file-upload input[type="file"] {
    display: none;
}
.file-upload label {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #04395F;
    border-radius: 4px;
    background: #04395F;
    color: #fff;
    cursor: pointer;
}
.file-upload p {
    margin: 12px 0 0;
    font-size: 14px;
    color: #555;
}
/* file upload css end */

/* modal css start */
/* Header background */
.custom-header {
    background-color: #04395F; /* --color-primary */
    border-bottom: none;
}

/* Close button (circle with white background & black ×) */
.btn-close-custom {
    background: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 33px;
    color: black;
    line-height: 0px;
    text-align: center;
    opacity: 1;
}
.btn-close-custom:hover {
    background: #e6e6e6;
}

/* Remove top border on footer */
.custom-footer {
    border-top: none !important;
}
.form-select{
    overflow: auto;
}
/* modal css end */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.app-content {
    flex: 1;
}

/* pdf detail page css start */
/* side bar css start */
.doc-info {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

/* when active */
.doc-info.active {
    background-color: var(--primary-5); /* slightly darker gray */
    border-color: #ccc;
}
/* CSS */
.doc-details { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

/* remove bottom border for last item in each column */
.col-md-6 .field-row:last-child { border-bottom: none; }

.field-label {
    font-weight: 400;
    margin-right: 12px;
    font-size: 14px;
    flex: 0 0 auto;
    color: var(--color-light-gray);
    white-space: nowrap;  /* keep label on single line if desired */
}

.field-value {
    flex: 1 1 auto;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-dark);
    word-break: break-word; /* allow long values to wrap */
}
.field-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.field-value { text-align: left; }

/* Mobile: stack label above value for better readability */
@media (max-width: 576px) {
    .field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* pdf detail page css end */
/* side bar css end */


/*Mail Listing Page css start*/
th input.form-control {
    min-width: 120px;
    font-size: 14px;
    padding-right: 32px; /* space for icon */
}

/* Center checkbox */
table .form-check {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

/* Icon inside search fields */
.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper i {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #888;
}

/* Attach column: center icon + input */
.attach-col {
    display: flex;
    align-items: center;
    gap: 8px; /* space between svg and input */
}

/* Subject column wider */
.subject-col {
    width: 625px;
}
/* add once to your stylesheet */
.min-w-0 { min-width: 0; }
.truncate-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.caret-toggle {
    transition: transform 0.2s ease-in-out;
}
.caret-toggle.open {
    transform: rotate(90deg); /* rotate ▶ to ▼ */
}

.ck-editor__editable_inline {
    min-height: 500px;
}
/*Mail Listing Page css end*/

/*Multi Select css start*/
/* wrapper */
.custom-multiselect {
    position: relative;
    display: block;
    width: 100%;          /* full width */
    max-width: 100%;      /* don’t overflow parent */
    box-sizing: border-box;
}

/* visible select box */
.custom-multiselect .select-box {
    width: 100%;          /* full width */
    max-width: 100%;      /* responsive */
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--bs-box-shadow-inset);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    padding: 6px 10px;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    min-height: 38px;
    display: flex;
    align-items: center;
    line-height: 1.4;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* dropdown list */
/* dropdown list */
.custom-multiselect .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 100%;       /* at least as wide as .select-box */
    width: max-content;    /* expand to fit longest option text */
    max-width: 100vw;      /* prevent going outside viewport */

    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-sizing: border-box;
}

.custom-multiselect .dropdown label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

.custom-multiselect .dropdown label:hover {
    background: #f1f1f1;
}

/* ✅ checkbox styling */
.custom-multiselect .dropdown input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0d6efd; /* Bootstrap primary blue */
    cursor: pointer;
}
/* ✅ force checkbox size + keep aligned */
.custom-multiselect .dropdown input[type="checkbox"] {
    flex-shrink: 0;         /* don't let it shrink */
    width: 18px;
    height: 18px;
    accent-color: #0d6efd;  /* primary blue */
    cursor: pointer;
}

/* ✅ let long option text wrap nicely */
.custom-multiselect .dropdown label {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1.4;         /* better readability */
    word-break: break-word;   /* allow long words to break */
}
/*Multi Select css end*/


/* Make table layout fixed so widths stay consistent */
.table-fixed {
    table-layout: fixed;
}

/* Allow wrapping only for title column */
[data-col="document_title"] {
    white-space: normal !important;
    word-wrap: break-word;
    word-break: break-word;
}
.tag-pill {
    background-color: var(--color-table-bg);
    border: 1px solid black;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
}
.tag-pill .remove-tag {
    margin-left: 8px;
    cursor: pointer;
}


.timeline-table {
    position: relative;
    padding: 20px 0;
}

.timeline-row {
    display: flex;
    align-items: center;
    position: relative;
}

.timeline-cell {
    flex: 1;
    text-align: center;
    position: relative;
}

.cell-content {
    padding: 10px;
    border-radius: 6px;
    min-width: 120px;
}

.bg-info {
    background-color: #d0ebff !important; /* light blue */
}
/* Timeline row container */
.timeline-row {
    position: relative;
}

/* Each step container */
.timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Horizontal connector line */
.connector {
    position: absolute;
    top: 50%;
    left: -32%;
    width: 125%;
    height: 2px;
    background: #ccc;
    z-index: 0;
}

/* Icons */
.timeline-icon {
    font-size: 22px;
    color: #555;
    background: #fff;
    position: relative;
    z-index: 1;
    margin-top: 54px;
}

.inner-timeline-icon {
    font-size: 22px;
    color: #555;
    background: #fff;
    position: relative;
    z-index: 1;
    margin-top: 55px;
    margin-left: 14px;
}

.timeline-dot {
    font-size: 10px;
    color: #555;
    background: #fff;
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
}

/* Label boxes (Review, Consolidation) */
.label-box {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 8px;
    border-radius: 4px;
    margin-top: 50px;
    font-size: 14px;
    z-index: 0;
    color: #d97706; /* orange-ish text */
    display: inline-block;
}

/* Ensure connectors don’t leak on first & last cell */
.timeline-cell:first-child .connector {
    display: none;
}
.timeline-cell:last-child .connector {
    width: 80%;
}

.custom-multiselect { position: relative; width: 100%; }
.custom-multiselect .select-box {
    border: 1px solid #ced4da;
    padding: 8px;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    min-height: 38px;
    display:flex;
    align-items:center;
}
.custom-multiselect .dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    z-index: 9999;
}
.custom-multiselect .option-item { cursor: pointer; padding: 6px 4px; }
.custom-multiselect .option-item:hover { background: #f6f6f6; }
.custom-multiselect .search-wrapper { padding: 0 4px; }


/** submit review page start **/
/* Layout */
.viewer-layout {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}
.viewer-header {
    height: 64px;
    display:flex;
    align-items:center;
    gap:.75rem;
    padding: .5rem 1rem;
    border-bottom:1px solid #e9ecef; }
.viewer-body {
    flex:1;
    display:flex;
    overflow:hidden;
}

/* Left PDF area */
.pdf-area {
    flex:1;
    display:flex;
    flex-direction:column;
    background:#fff;
}
.pdf-toolbar { height:48px;
    display:flex;
    align-items:center;
    gap:.5rem;
    padding:.5rem;
    border-bottom:1px solid #e9ecef;
    background:#f8f9fa;
}
.pdf-canvas-wrap {
    flex:1;
    overflow:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f3f5f7;
}
canvas#pdfCanvas {
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

/* Right sidebar */
.sidebar {
    width: 360px;
    max-width: 45%;
    min-width: 260px;
    border-left:1px solid #e9ecef;
    background:#fff; display:flex;
    flex-direction:column;
    transition:all .25s ease;
}
.sidebar.collapsed {
    width: 0;
    min-width:0;
    overflow:hidden;
}
.sidebar .sidebar-content {
    padding:1rem;
    overflow:auto;
}
.sidebar .sidebar-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:.75rem 1rem;
    border-bottom:1px solid #eee;
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .sidebar {
        position:absolute;
        right:0;
        top:64px;
        height: calc(100vh - 64px);
        z-index:1050;
        box-shadow: -12px 0 30px rgba(0,0,0,.06);
    }
}

/* Compact toolbar icons */
.icon-btn {
    border:1px solid transparent;
    background:transparent;
    padding:.35rem .5rem;
    border-radius:.375rem;
}
.icon-btn:hover {
    background:#e9ecef;
}

/* simple badge for status in sidebar */
.status-badge {
    font-size:.85rem;
    padding:.25rem .5rem;
    border-radius:.375rem;
}
