#sauk-document-explorer {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fff;
    border-radius: 10px;
    padding: 10px 0 40px 0;
    margin: 0 auto 40px auto;
    max-width: 96vw;
}
.sde-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    margin: 14px 0 7px 0;
    padding-left: 10px;
}
#sde-search {
    min-width: 230px;
    max-width: 350px;
    padding: 7px 10px;
    border-radius: 5px;
    border: 1px solid #bbb;
    font-size: 1em;
    flex: 1 1 auto;
}
#sde-search-btn, #sde-clear-btn {
    border: none;
    background: #f5f6fa;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 5px;
    transition: background .2s;
    vertical-align: middle;
    min-width: 34px;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
}
#sde-search-btn:hover, #sde-clear-btn:hover {
    background: #e2edfd;
}
.sde-breadcrumb {
    font-size: 1em;
    margin: 7px 0 10px 10px;
}
.sde-breadcrumb-link {
    color: #2989dd;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}
.sde-breadcrumb-link:hover { color: #0056c6; }
.sde-btn-back {
    background: #f6f6f6;
    border: 1px solid #cce;
    border-radius: 5px;
    color: #444;
    font-size: .96em;
    cursor: pointer;
    margin-left: 8px;
    padding: 3px 10px;
}
.sde-multiaction-bar {
    margin: 10px 10px 7px 10px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f1f6fa;
    border: 1px solid #e5e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    font-size: 1em;
}
.sde-multiaction-bar span svg { vertical-align: middle; margin-right: 4px; }
.sde-multiaction-download, .sde-multiaction-clear {
    background: #2977e6;
    border: none;
    color: #fff;
    border-radius: 5px;
    padding: 5px 15px;
    font-weight: bold;
    margin-left: 10px;
    cursor: pointer;
    transition: background .2s;
}
.sde-multiaction-clear {
    background: #fff;
    color: #333;
    border: 1px solid #d8d8dd;
}
.sde-multiaction-download:hover { background: #165fbe; }
.sde-multiaction-clear:hover { background: #f6f6f6; }

.sde-table {
    width: 98%;
    margin: 0 auto;
    border-collapse: collapse;
    background: #fff;
}
.sde-table th, .sde-table td {
    border-bottom: 1px solid #e2e7ef;
    padding: 8px 12px;
    text-align: left;
}
.sde-table th {
    background: #f5f8fd;
    font-weight: bold;
    cursor: default;
    font-size: 1.04em;
    user-select: none;
}
.sde-sortable { cursor: pointer; }
.sde-sortable svg { vertical-align: middle; }
.sde-table tr:hover td { background: #f5f8fc; }
.sde-table td a, .sde-table td .sde-folder {
    color: #1251b8;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
}
.sde-table td .sde-folder { font-weight: 700; }
.sde-table td a:hover, .sde-table td .sde-folder:hover { color: #1e5ae8; }
.sde-table td img { vertical-align: middle; margin-right: 7px; }

.sde-loading, .sde-error {
    font-size: 1.13em;
    text-align: center;
    margin: 40px 0 20px 0;
    color: #394985;
}

.sde-modal-bg {
    position: fixed !important;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,30,0.38);
    z-index: 30000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sde-modal {
    background: #fff;
    max-width: 340px;
    width: 96vw;
    border-radius: 13px;
    box-shadow: 0 5px 32px 0 rgba(0,0,0,0.15);
    padding: 24px 22px 18px 22px;
    text-align: left;
    z-index: 30200;
    position: relative;
    font-size: 1.1em;
    animation: sdepop .2s;
}
@keyframes sdepop { 0%{ transform: scale(.92); opacity:.7;} 100%{transform:scale(1);opacity:1;} }
.sde-modal h3 { margin-top: 0; font-size: 1.18em; }
.sde-modal input[type="text"] { width: 70%; font-size: 1em; margin: 0 0 0 2px; }
.sde-modal button {
    background: #1977f2;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 7px 18px;
    margin: 0 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: background .17s;
}
.sde-modal button:hover { background: #0650c1; }
.sde-modal .sde-modal-error { color: #c00000; }
.sde-zip-dl-btn {
    background: #3ec449;
    border-radius: 8px;
    color: #fff !important;
    padding: 10px 24px;
    display: inline-block;
    font-weight: bold;
    margin-top: 6px;
    text-decoration: none !important;
    font-size: 1.15em;
}
.sde-modal-info { font-size: 0.95em; color: #3c4c65; background: #e6eefa; padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; }

/* --------- MOBILE (max-width: 800px) ---------- */
@media (max-width: 800px) {
    #sauk-document-explorer { max-width: 99vw; font-size: 0.98em; }
    .sde-modal { width: 99vw; min-width: 0; max-width: 98vw;}
    .sde-table th:nth-child(3), .sde-table th:nth-child(4),
    .sde-table td:nth-child(3), .sde-table td:nth-child(4),
    .sde-table th:nth-child(6), .sde-table td:nth-child(6) {
        display: none !important;
    }
    /* Responsive search bar and buttons: row style */
    .sde-toolbar {
        flex-direction: row;
        align-items: stretch;
        gap: 0;
        padding-left: 5px;
        padding-right: 5px;
    }
    #sde-search {
        min-width: 0;
        font-size: 0.98em;
        flex: 1 1 0;
        margin-bottom: 0;
    }
    #sde-search-btn, #sde-clear-btn {
        min-width: 40px;
        min-height: 40px;
        margin-left: 5px;
        margin-bottom: 0;
    }
}
@media (max-width: 550px) {
    #sauk-document-explorer { padding: 2px 0 18px 0;}
    .sde-table { font-size: 0.94em; }
    .sde-toolbar { flex-direction: row; align-items: stretch; gap:0; padding-left:2px; padding-right:2px;}
    .sde-modal { padding: 17px 7px 14px 7px;}
    #sde-search {
        min-width: 0;
        font-size: 0.97em;
        flex: 1 1 0;
    }
    #sde-search-btn, #sde-clear-btn {
        min-width: 38px;
        min-height: 38px;
        margin-left: 5px;
    }
}
