/* =========================================================
   AK Upload Portal CSS - cleaned / Firefox-friendly version
   Notes:
   - Keeps your existing class names.
   - Fixes invalid CSS blocks, SCSS-only syntax, extra braces, and missing spaces.
   - Scopes mobile table behavior so it does not accidentally break every table.
   - Adds safer box sizing and responsive rules for Home / Upload pages.
   ========================================================= */



/* =========================================================
   Global base / reset
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
}

main {
    flex: 1;
    min-width: 0;
}

h1,
h2,
h3,
h4,
span,
p,
label,
li,
th,
td,
button,
input,
select,
textarea {
    font-family: Arial, Helvetica, sans-serif;
}

p {
    font-size: 1.5rem;
}

label {
    font-size: 1.875rem;
}

li a strong {
    font-size: 1rem;
}

a {
    text-decoration: none;
}

div div a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.875rem;
    text-decoration: none;
    font-weight: 300;
}

.header-title {
    font-size: 2rem;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.bg-white {
    background: #ffffff;
}


/* =========================================================
   Buttons
   ========================================================= */

.btn {
    border-radius: 8px;
}

.btn-primary {
    font-size: 1.25rem;
    font-family: Arial, Helvetica, sans-serif;
}

.ak-button {
    background-color: #1a237e;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

    .ak-button:hover {
        background-color: #283593;
    }


/* =========================================================
   Tables - base
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    min-width: 800px;
    margin-bottom: 0;
    border-collapse: collapse;
}

th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

tr th,
tr td {
    padding-right: 20px;
    font-family: Arial, Helvetica, sans-serif;
}

tr:nth-child(odd) {
    background-color: white;
}

tr:hover {
    background-color: #ddd;
}

.pagination-controls {
    margin: 20px 0;
}


/* =========================================================
   Admin table mobile layout
   Original issue fixed:
   - Removed broken ".admin-table { thead }" block.
   - Replaced SCSS "&:before" with valid CSS "::before".
   - Scoped mobile row/card behavior to ".admin-table" only.
   ========================================================= */

@media screen and (max-width: 1024px) {
    .admin-table {
        min-width: 0;
    }

        .admin-table thead {
            display: none;
        }

        .admin-table tbody,
        .admin-table tr,
        .admin-table td {
            display: block;
            width: 100%;
        }

        .admin-table tr {
            margin-bottom: 1rem;
            border: 1px solid #ddd;
            padding: 0.5rem;
            background: #fff;
        }

        .admin-table td {
            text-align: left;
            padding: 0.5rem;
            border: none;
        }

            .admin-table td::before {
                content: attr(data-label);
                font-weight: bold;
                display: inline-block;
                width: 120px;
                max-width: 45%;
                padding-right: 0.5rem;
            }

    .pagination .page-link {
        padding: 0.5rem 0.75rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

        .pagination .page-item:not(:first-child):not(:last-child) {
            display: none;
        }

    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
}


/* =========================================================
   File list styles
   ========================================================= */

.file-list-container {
    margin: 20px 0;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.desktop-file-list {
    width: 100%;
    border-collapse: collapse;
    display: table;
}

    .desktop-file-list th {
        background-color: #1a237e;
        color: white;
        padding: 12px;
        text-align: left;
    }

    .desktop-file-list td {
        padding: 8px;
        border-bottom: 1px solid #ddd;
    }

.mobile-file-list {
    display: none;
    width: 100%;
}

.file-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.file-name {
    font-weight: bold;
    font-size: 0.875rem;
    margin-bottom: 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.file-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
}

.file-type {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 12px;
    white-space: nowrap;
}

.file-date {
    color: #888;
}

.no-files {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

@media screen and (max-width: 1024px) {
    .desktop-file-list {
        display: none !important;
    }

    .mobile-file-list {
        display: block !important;
    }

    .file-card {
        margin: 8px auto;
        max-width: 100%;
    }

    .file-details {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media screen and (max-width: 320px) {
    .file-list-container {
        padding: 0 5px;
    }

    .file-card {
        padding: 10px;
    }

    .file-details {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   Footer
   ========================================================= */

.copyright {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    margin-top: auto;
}

.footer {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #f8f9fa;
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Prevent fixed footer from covering page content. */
body {
    padding-bottom: 55px;
}


/* =========================================================
   Upload page layout / document sections
   ========================================================= */

.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    margin-top: 1rem;
    align-items: stretch;
}

.documents-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.documents-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
    min-width: 0;
}

.documents-section {
    flex: 1;
    min-height: 0;
    background-color: rgb(255, 225, 232);
}

    .documents-section.pending,
    .documents-section.uploaded,
    .documents-section.accepted,
    .documents-section.denied {
        padding: 0.25rem 0 0.25rem 0.75rem;
        border-left: 4px solid transparent;
        background: none;
        border-radius: 0;
        border-top: none;
        border-right: none;
        border-bottom: none;
        box-shadow: none;
    }

    .documents-section.pending {
        border-left-color: #2d8a50;
    }

    .documents-section.uploaded {
        border-left-color: #2878b8;
    }

    .documents-section.accepted {
        border-left-color: #5b4db8;
    }

    .documents-section.denied {
        border-left-color: #c0394b;
        margin-bottom: 3rem;
    }

    .documents-section.accepted .document-type-container {
        font-size: 1.5rem;
    }

        .documents-section.denied .document-type-header p {
        margin: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        padding: 0.5rem;
        background-color: #ffe4eb;
    }

    .documents-section.accepted .uploaded-doc-card,
    .documents-section.denied .uploaded-doc-card {
        height: auto;
        background-color: #ffffff;
    }

    /* Light tinted backgrounds for individual doc-type rows, matched to section color */
    .documents-section.pending .document-type-container {
        background-color: #fef9c3 !important;
    }

    .documents-section.pending .document-type-container:hover {
        background-color: #fefce8 !important;
    }

    .documents-section.uploaded .document-type-container {
        background-color: #a8cce8 !important;
    }

    .documents-section.uploaded .document-type-container:hover {
        background-color: #cfe3f6 !important;
    }

    .documents-section.accepted .document-type-container {
        background-color: #cce8d4 !important;
    }

    .documents-section.accepted .document-type-container:hover {
        background-color: #eaf5ee !important;
    }

    .documents-section.denied .document-type-container {
        background-color: #f9d5d8 !important;
    }

    .documents-section.denied .document-type-container:hover {
        background-color: #fdeaec !important;
    }

@media screen and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Task containers
   ========================================================= */

.task-container-accept {
    background-color: #E1ECFF;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

    .task-container-accept label {
        font-weight: bold;
        margin-bottom: 1rem;
        display: block;
        font-size: 2rem;
    }

    .task-container-accept .list-group-item {
        background-color: #C3D9FF;
        display: flex;
        align-items: center;
        padding: 0.75rem;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }

        .task-container-accept .list-group-item label {
            font-size: 1.5rem;
        }

.task-container-deny {
    background-color: rgb(255, 225, 235);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgb(230, 222, 225);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .task-container-deny label {
        font-weight: bold;
        margin-bottom: 1rem;
        display: block;
        font-size: 2rem;
    }

    .task-container-deny .list-group-item {
        background-color: rgb(255, 195, 209);
        display: flex;
        align-items: center;
        padding: 0.75rem;
        border-bottom: 1px solid rgb(230, 222, 225);
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }

        .task-container-deny .list-group-item label {
            font-size: 1.5rem;
        }

#taskItems {
    background-color: rgb(255, 225, 232);
}


/* =========================================================
   Document type cards / upload info
   ========================================================= */

/* Outer wrapper — no box, just a plain list container */
.document-type-list {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.document-type-container {
    background-color: #f8fafc !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    margin-bottom: 2px !important;
    padding: 0.4rem 0.25rem !important;
    border-bottom: 1px solid #e8ecf0;
    transition: background-color 0.15s ease;
    font-size: 1.5rem;
}

    .document-type-container h4 {
        font-size: 1.5rem;
    }

    .document-type-container:hover {
        background-color: #f4f8fd !important;
    }


.document-type-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #666;
    margin-left: 10px;
    transition: transform 0.3s ease;
    transform-origin: center;
    transform: rotate(0deg);
}

.document-type-header.active .arrow-down {
    transform: rotate(180deg);
}

.upload-info {
    background-color: #E5F8FF;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

    .upload-info p {
        margin: 0.5rem 0;
        font-size: 1.5rem;
    }

    .upload-info input[type="checkbox"] {
        margin-right: 8px;
        vertical-align: middle;
        width: 16px;
        height: 16px;
        cursor: not-allowed;
    }

.upload-form label {
    font-size: 1.3rem;
}

.collection-details {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

    .collection-details h3 {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.75rem;
        color: #1a237e;
    }

    .collection-details p {
        margin: 0.5rem 0;
        font-size: 1.5rem;
    }


/* =========================================================
   Header / navigation
   ========================================================= */

.ak-link-underline {
    text-decoration: underline;
}

.ak-header {
    background-color: #464779;
    color: #ffffff;
    padding: 10px 40px;
}

.ak-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ak-logo-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ak-logo-square {
    width: 40px;
    height: 40px;
    background-color: #6aa8d8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    flex: 0 0 auto;
}

.ak-logo-image {
    width: 54px;
    height: 54px;
    object-fit: contain;
    margin-right: 12px;
    flex: 0 0 auto;
}

.ak-logo-text {
    font-size: 31px;
    font-weight: bold;
    overflow-wrap: anywhere;
}

.ak-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1rem;
}

    .ak-nav a {
        color: #ffffff;
        margin-left: 0;
        text-decoration: underline;
        font-size: 23px;
        font-weight: normal;
    }

@media screen and (max-width: 768px) {
    .ak-header {
        padding: 10px 16px;
    }

    .ak-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .ak-logo-text {
        font-size: 24px;
    }

    .ak-nav {
        justify-content: flex-start;
    }

        .ak-nav a {
            font-size: 18px;
        }
}


/* =========================================================
   Outstanding uploads / Home page layout
   ========================================================= */

.ou-wrapper {
    display: flex;
    justify-content: center;
    padding: 30px 0 40px 0;
    background-color: #f5f5f5;
}

.ou-card {
    background-color: #ffffff;
    width: 80%;
    max-width: 1400px;
    min-width: 900px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    padding: 25px 40px 40px 40px;
    box-sizing: border-box;
}

.ou-welcome {
    font-style: italic;
    font-size: 17px;
    margin-bottom: 5px;
}

.ou-main-title {
    text-align: center;
    background-color: #ddf5ff;
    padding: 12px 0;
    font-size: 31px;
    font-weight: bold;
    margin: 10px -40px 20px -40px;
}

.ou-description {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 25px;
}

.ou-section-header {
    padding: 10px 15px;
    margin: 0 -40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: bold;
    font-size: 24px;
}

.ou-section-header-incomplete {
    background-color: #bae2bf;
}

.ou-section-header-complete {
    background-color: #afc6e8;
}

.ou-section-title {
    font-size: 24px;
}

.ou-chevron {
    font-size: 26px;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}

.ou-grid-wrapper {
    padding: 0 0 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ou-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 20px;
    table-layout: fixed;
}

    .ou-table thead th {
        padding: 8px 10px;
        text-align: left;
        font-weight: bold;
        font-size: 29px;
    }

    .ou-table tbody td {
        padding: 8px 10px;
        vertical-align: top;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .ou-table tbody tr:nth-child(even) {
        background-color: #f9f9f9;
    }

.ou-table-incomplete thead {
    background-color: #d7f4df;
}

.ou-table-complete thead {
    background-color: #e3ecfd;
}

.ou-table-home thead th {
    background-color: #ddf5ff;
    color: #222;
    font-weight: bold;
    padding: 10px 12px;
    border-bottom: 2px solid #c7e8f5;
    vertical-align: middle;
}

.ou-progress-cell {
    width: 220px;
}

.ou-progress-outer {
    width: 180px;
    max-width: 100%;
    height: 24px;
    border-radius: 12px;
    border: 1px solid #bfbfbf;
    overflow: hidden;
    background-color: #ffffff;
    position: relative;
}

.ou-progress-inner {
    height: 100%;
    background-color: #464779;
    line-height: 24px;
    white-space: nowrap;
}

    .ou-progress-inner.zero {
        background-color: transparent;
    }

.ou-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #000000;
    font-size: 17px;
    font-weight: bold;
    line-height: 24px;
    text-align: center;
    pointer-events: none;
    text-shadow: -0.75px -0.75px 0 #ffffff, 0.75px -0.75px 0 #ffffff, -0.75px 0.75px 0 #ffffff, 0.75px 0.75px 0 #ffffff;
}

.ou-btn-go {
    background-color: #464779;
    border: none;
    color: #ffffff;
    padding: 6px 18px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 17px;
    font-weight: bold;
    white-space: nowrap;
}

    .ou-btn-go:hover {
        opacity: 0.9;
    }

.ou-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 11px;
    color: #666666;
}

/* Force consistent column widths across both Home tables */
.ou-table th:nth-child(1),
.ou-table td:nth-child(1) {
    width: 140px;
}

.ou-table th:nth-child(2),
.ou-table td:nth-child(2) {
    width: 230px;
}

.ou-table th:nth-child(3),
.ou-table td:nth-child(3) {
    width: 260px;
}

.ou-table th:nth-child(4),
.ou-table td:nth-child(4) {
    width: 200px;
}

.ou-table th:nth-child(5),
.ou-table td:nth-child(5) {
    width: 200px;
}

.ou-table td:nth-child(2),
.ou-table td:nth-child(3) {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 1024px) {
    .ou-wrapper {
        padding: 16px 0 30px 0;
    }

    .ou-card {
        width: 95%;
        min-width: 0;
        padding: 20px;
    }

    .ou-main-title,
    .ou-section-header {
        margin-left: -20px;
        margin-right: -20px;
    }

    .ou-table {
        table-layout: auto;
        min-width: 800px;
    }
}

@media screen and (max-width: 600px) {
    .ou-main-title {
        font-size: 24px;
    }

    .ou-description {
        font-size: 16px;
    }

    .ou-section-header,
    .ou-section-title {
        font-size: 20px;
    }
}


/* =========================================================
   Modal
   ========================================================= */

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

#note {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    resize: vertical;
}

.modal-meta {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555;
}

.modal-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* =========================================================
   Shared desktop table header style for Upload + Upload History
   ========================================================= */

.collection-buttons .ou-table thead th,
.desktop-file-list thead th {
    background-color: #ddf5ff;
    color: #222;
    font-weight: bold;
    padding: 10px 12px;
    border-bottom: 2px solid #c7e8f5;
    vertical-align: middle;
}

    .collection-buttons .ou-table thead th a.sort-header,
    .desktop-file-list thead th a.sort-header {
        color: #222;
        text-decoration: none;
        font-weight: bold;
        font-size: inherit;
    }

        .collection-buttons .ou-table thead th a.sort-header:hover,
        .desktop-file-list thead th a.sort-header:hover {
            text-decoration: underline;
        }


/* =========================================================
   Submitted/uploaded document cards
   ========================================================= */

.uploaded-doc-card,
.documents-section.uploaded .uploaded-doc-card {
    border-left: 5px solid #464779;
    background-color: #ffffff;
}

.document-type-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 0.75rem;
}

.submitted-heading {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333333;
}

.submitted-document-list {
    display: block;
    margin-bottom: 1rem;
}

.upload-toggle-header {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background-color: #eef3ff;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
}

.submitted-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.submitted-file-main {
    flex: 1;
    min-width: 0;
}

.submitted-file-name {
    display: inline-block;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.submitted-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #333333;
}

    .submitted-file-meta span {
        background-color: #ffffff;
        border: 1px solid #d9e2ef;
        border-radius: 999px;
        padding: 0.25rem 0.6rem;
    }

.submitted-file-actions {
    flex-shrink: 0;
}

.submitted-delete-button {
    margin-left: 0;
    white-space: nowrap;
}

.submitted-hidden {
    display: none !important;
}

.submitted-show-more {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .submitted-file-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .submitted-file-actions {
        width: 100%;
    }

    .submitted-delete-button {
        width: 100%;
    }
}


/* =========================================================
   Upload panel
   ========================================================= */

.upload-panel {
    background-color: #ffffff;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.upload-panel-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 0.85rem;
}

.upload-field-group {
    margin-bottom: 0.85rem;
}

.upload-label {
    display: block;
    font-size: 0.95rem !important;
    font-weight: bold;
    color: #333333;
    margin-bottom: 0.35rem;
}

.upload-file-input {
    display: block;
    width: 100%;
    font-size: 0.95rem;
    padding: 0.45rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.upload-note {
    font-size: 0.95rem;
    min-height: 95px;
    border-radius: 6px;
}

.upload-submit-button {
    margin-top: 0.25rem;
    width: auto;
    font-size: 0.95rem;
    padding: 0.45rem 0.9rem;
}
