.documents-page-size-select {
    width: 110px;
    height: 34px;
    margin-top: 1px;
}

.documents-date-input {
    width: 130px;
}

.documents-select {
    width: 120px;
}

.documents-select-lg {
    width: 140px;
}

.documents-action-column {
    min-width: 150px;
}

.documents-view-link.disabled,
.documents-view-link[aria-disabled="true"] {
    pointer-events: none;
}

.documents-mobile-title,
.documents-mobile-line,
.documents-mobile-sub,
.documents-mobile-field-label {
    display: none;
}

@media (max-width: 767.98px) {
    .documents-page {
    .documents-titlebar {
        margin-bottom: 10px !important;
        padding: 14px;
        border: 1px solid #dbeafe;
        border-radius: 16px;
        background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.05);
    }

    .documents-titlebar h4 {
        color: #0f172a;
        font-size: 17px;
        font-weight: 900;
        line-height: 1.35;
    }

    .documents-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .documents-filter-card,
    .documents-list-card {
        overflow: hidden;
        margin-bottom: 0 !important;
        border: 1px solid #dbeafe;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    }

    .documents-filter-card .card-body {
        padding: 10px 12px;
    }

    .documents-list-card .card-body {
        padding: 12px;
    }

    .documents-filter-form {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 7px;
        margin: 0;
        align-items: center !important;
    }

    .documents-filter-form > .col-auto {
        width: auto;
        padding: 0;
    }

    .documents-filter-form > .col-auto:first-child {
        grid-column: 1;
    }

    .documents-filter-form > .col-auto:nth-child(2) {
        grid-column: 2;
    }

    .documents-filter-form > .col-auto:nth-child(n + 3) {
        grid-column: 1 / -1;
    }

    .documents-date-range-field {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 8px;
        align-items: center !important;
    }

    .documents-mobile-field-label {
        display: block;
        color: #475569;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
        text-align: right;
        white-space: nowrap;
    }

    .documents-filter-form .col-form-label {
        padding: 0;
        color: #475569;
        font-size: 13px;
        font-weight: 800 !important;
        line-height: 1.25;
        text-align: right;
    }

    .documents-filter-form .form-control,
    .documents-filter-form .form-select,
    .documents-filter-form .input-group-text {
        min-height: 36px;
        border-color: #d7e5f7;
        background-color: #fff;
        font-size: 13px;
    }

    .documents-filter-form .form-control,
    .documents-filter-form .form-select {
        width: 100%;
        border-radius: 9px;
    }

    .documents-filter-form .input-group .form-control:first-child {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .documents-filter-form .input-group .form-control:last-child {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .documents-filter-form .input-group-text {
        padding-right: 8px;
        padding-left: 8px;
        color: #64748b;
    }

    .documents-date-range-control {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
        align-items: center;
        width: 100%;
        padding: 3px;
        border: 1px solid #d7e5f7;
        border-radius: 10px;
        background: #fff;
    }

    .documents-date-range-control .documents-date-input {
        min-width: 0;
        min-height: 32px;
        height: 32px;
        padding: 4px 5px;
        border: 0;
        border-radius: 7px !important;
        background: #fff;
        font-size: 12px;
        line-height: 1.2;
    }

    .documents-date-range-control .input-group-text {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 900;
    }

    .documents-date-input,
    .documents-select,
    .documents-select-lg {
        width: 100%;
    }

    .documents-filter-form > .col-auto:last-child {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .documents-filter-form > .col-auto:last-child .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        width: 100%;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.2;
        white-space: nowrap;
    }

    #batchDownloadBtn {
        grid-column: 1 / -1;
        background: #f59e0b;
        border-color: #f59e0b;
        box-shadow: 0 6px 14px rgba(245, 158, 11, 0.18);
    }

    .documents-table-wrap {
        overflow: visible;
        background: #eef5ff;
    }

    .documents-table,
    .documents-table tbody,
    .documents-table tr,
    .documents-table td {
        display: block;
        width: 100%;
    }

    .documents-table {
        margin-bottom: 0;
    }

    .documents-table thead {
        display: none;
    }

    .documents-table tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .documents-table tr.documents-row {
        --bs-table-bg: transparent;
        --bs-table-accent-bg: transparent;
        position: relative;
        min-height: 170px;
        padding: 12px 10px 42px 42px;
        border: 1px solid #e0ecff;
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.05);
    }

    .documents-table tr.documents-row:nth-child(even) {
        background: #fbfdff;
    }

    .documents-table tr.documents-row > td {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .documents-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 28px;
        padding: 4px 0;
        color: #0f172a;
        font-size: 13px;
        line-height: 1.35;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .documents-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #52647a;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
        white-space: nowrap;
    }

    .documents-table td[colspan] {
        display: block;
        min-height: 148px;
        padding: 28px 12px !important;
        color: #64748b;
        text-align: center;
    }

    .documents-table td[colspan]::before {
        content: none;
    }

    .documents-check-cell {
        position: absolute;
        top: 13px;
        left: 12px;
        display: block !important;
        width: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .documents-check-cell::before {
        content: none !important;
    }

    .documents-check-cell .form-check-input {
        width: 18px;
        height: 18px;
        margin: 0;
        border-color: #9dbaf0;
    }

    .documents-member-cell,
    .documents-reg-cell,
    .documents-apply-cell,
    .documents-applicant-cell,
    .documents-name-cell {
        display: none !important;
    }

    .documents-file-cell {
        display: block !important;
        min-height: 0 !important;
        padding: 0 0 6px !important;
        color: #0f172a !important;
        text-align: left !important;
    }

    .documents-file-cell::before {
        content: none !important;
    }

    .documents-desktop-value {
        display: none;
    }

    .documents-mobile-title,
    .documents-mobile-line,
    .documents-mobile-sub {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .documents-mobile-title {
        margin-bottom: 6px;
        color: #0f172a;
        font-size: 15px;
        font-weight: 900;
        line-height: 1.35;
    }

    .documents-mobile-line {
        margin-bottom: 3px;
        color: #334155;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.35;
    }

    .documents-mobile-sub {
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
    }

    .documents-mobile-apply-no {
        color: #0d6efd;
        font-weight: 900;
    }

    .documents-business-cell,
    .documents-class-cell,
    .documents-time-cell,
    .documents-category-cell {
        color: #0f172a;
        font-weight: 700;
    }

    .documents-action-cell {
        position: absolute;
        right: 10px;
        bottom: 8px;
        left: 42px;
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        text-align: right;
    }

    .documents-action-cell::before {
        content: none !important;
    }

    .documents-action-group {
        display: flex;
        width: 100%;
        justify-content: flex-end;
        gap: 5px;
    }

    .documents-action-group.btn-group > .btn {
        border-radius: 999px !important;
    }

    .documents-action-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 54px;
        min-height: 30px;
        padding: 4px 9px;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.2;
        white-space: nowrap;
    }

    .documents-view-link {
        border-color: #f59e0b;
        background: #fff7ed;
        color: #d97706;
    }

    .documents-action-btn.btn-outline-primary {
        border-color: #0d6efd;
        background: #fff;
        color: #0d6efd;
    }

    .documents-pagination-bar {
        justify-content: center !important;
        margin-top: 10px !important;
    }

    .documents-pagination-bar .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        margin-bottom: 0;
    }

    .documents-pagination-bar .page-link {
        min-width: 32px;
        border-radius: 9px !important;
        text-align: center;
    }

    .documents-pagination-bar .page-item.disabled:first-child,
    .documents-pagination-bar .page-item:nth-child(2) {
        flex: 0 0 100%;
        margin-right: 0 !important;
        text-align: center;
    }

    .documents-pagination-bar .page-item.disabled:first-child .page-link {
        justify-content: center;
        width: 100%;
    }

    .documents-page-size-select {
        width: 126px;
        margin: 0 auto;
    }
}

@media (max-width: 374.98px) {
    .documents-filter-form {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 7px;
    }

    .documents-date-range-field {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 7px;
    }

    .documents-filter-form .col-form-label,
    .documents-mobile-field-label,
    .documents-filter-form .form-control,
    .documents-filter-form .form-select,
    .documents-filter-form .input-group-text {
        font-size: 12px;
    }

    .documents-date-range-control {
        grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
        padding: 2px;
    }

    .documents-date-range-control .documents-date-input {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 11px;
    }

    .documents-table tr.documents-row {
        min-height: 184px;
        padding-left: 38px;
    }

    .documents-action-cell {
        left: 38px;
    }
}
