:root {
    --dm-site-red: #d00f2f;
    --dm-site-red-dark: #ad0c27;

    --dm-site-blue: #002f67;
    --dm-site-blue-dark: #001f46;

    --dm-site-bg: #f7f8fa;
    --dm-site-border: #dfe4ea;
    --dm-site-text: #0a2142;
    --dm-site-muted: #7c8794;
}


/* =========================================================
   DOCUMENT MANAGER
   ========================================================= */

.dm-front {
    width: 100%;
    min-height: max(260px, calc(100vh - 620px));
    margin: 0 0 20px;
    color: #263238;
}

.dm-front *,
.dm-front *::before,
.dm-front *::after {
    box-sizing: border-box;
}

.dm-front [hidden],
.dm-front-ui-hidden {
    display: none !important;
}


/* =========================================================
   HEADER / SEARCH
   ========================================================= */

.dm-front-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.dm-front-heading {
    min-width: 0;
}

.dm-front-title {
    margin: 0 0 5px;
    color: var(--dm-site-blue);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

.dm-front-subtitle {
    margin: 0;
    color: var(--dm-site-muted);
    font-size: 14px;
}

.dm-front-search-wrap {
    position: relative;
    width: 300px;
    max-width: 100%;
    flex: 0 0 auto;
    border: 1px solid var(--dm-site-border);
    background: #fff;
}

.dm-front-search-wrap:focus-within {
    border-color: var(--dm-site-red);
    box-shadow: 0 0 0 3px rgba(208, 15, 47, .08);
}

.dm-front-search-wrap > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dm-site-red);
    pointer-events: none;
}

.dm-front-search {
    width: 100%;
    height: 42px;
    padding: 8px 13px 8px 38px;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
    background: #fff;
    color: #263238;
    font: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.dm-front-search:focus {
    border-color: #0b2f63;
    box-shadow: 0 0 0 3px rgba(11, 47, 99, .08);
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.dm-front-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 44px;
    margin-bottom: 25px;
    padding: 9px 14px;
    border: 1px solid var(--dm-site-border);
    border-radius: 5px;
    background: var(--dm-site-bg);
}

.dm-front-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--dm-site-blue);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.dm-front-breadcrumb-item:hover,
.dm-front-breadcrumb-item:focus {
    color: var(--dm-site-red);
    outline: none;
}

.dm-front-breadcrumb-item.is-root i {
    color: var(--dm-site-red);
}

.dm-front-breadcrumb-separator {
    color: #a9afb5;
    font-size: 12px;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.dm-front-section {
    margin-bottom: 28px;
}

.dm-front-section-title {
    margin: 0 0 12px;
    color: var(--dm-site-blue);
    font-size: 16px;
    font-weight: 600;
}


/* =========================================================
   FOLDERS
   ========================================================= */

.dm-front-folders {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.dm-front-folder {
    width: 100%;
    min-width: 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--dm-site-border);
    border-radius: 6px;
    background: #fff;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.dm-front-folder:hover,
.dm-front-folder:focus {
    border-color: var(--dm-site-red);
    box-shadow: 0 5px 16px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
    outline: none;
}

.dm-front-folder-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    border-radius: 5px;
    background: rgba(0, 47, 103, .07);
    color: var(--dm-site-blue);
    font-size: 23px;
}

.dm-front-folder:hover .dm-front-folder-icon {
    background: rgba(208, 15, 47, .08);
    color: var(--dm-site-red);
}

.dm-front-folder-content {
    min-width: 0;
    flex: 1;
    display: block;
}

.dm-front-folder-name {
    display: block;
    overflow: hidden;
    color: var(--dm-site-blue);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-front-folder-description {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    color: var(--dm-site-muted);
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dm-front-folder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 7px;
    color: #9399a0;
    font-size: 11px;
}

.dm-front-folder-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dm-front-folder-arrow {
    flex: 0 0 auto;
    margin-left: 10px;
    color: #abb4bd;
    font-size: 20px;
}

.dm-front-folder:hover .dm-front-folder-arrow {
    color: var(--dm-site-red);
}


/* =========================================================
   DOCUMENTS
   ========================================================= */

.dm-front-documents {
    overflow: hidden;
    border: 1px solid var(--dm-site-border);
    border-radius: 6px;
    background: #fff;
}

.dm-front-document {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f3;
    transition: background .15s ease;
}

.dm-front-document:last-child {
    border-bottom: 0;
}

.dm-front-document:hover {
    background: #fafbfc;
}

.dm-front-document-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    border-radius: 5px;
    background: #f2f4f7;
    color: #0b2f63;
    font-size: 20px;
}

.dm-front-document-content {
    min-width: 0;
    flex: 1;
}

.dm-front-document-title {
    overflow: hidden;
    color: var(--dm-site-blue);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-front-document-description {
    display: -webkit-box;
    margin-top: 3px;
    overflow: hidden;
    color: var(--dm-site-muted);
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dm-front-document-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 6px;
    color: var(--dm-site-muted);
    font-size: 10px;
    text-transform: uppercase;
}

.dm-front-document-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 7px;
    padding-right: 7px;
    border-right: 1px solid #dfe2e5;
}

.dm-front-document-meta > span:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
}

.dm-front-document-meta .dm-front-protected,
.dm-front-protected {
    color: var(--dm-site-red);
    font-weight: 500;
    text-transform: none;
}

.dm-front-document-action {
    flex: 0 0 auto;
    margin-left: 14px;
}


/* =========================================================
   FILE TYPE COLORS
   ========================================================= */

.dm-front-document-icon.dm-file-pdf {
    background: #fff1f1;
    color: #ec1c24;
}

.dm-front-document-icon.dm-file-word {
    background: #eef4fb;
    color: #2b579a;
}

.dm-front-document-icon.dm-file-excel {
    background: #edf7f1;
    color: #217346;
}

.dm-front-document-icon.dm-file-powerpoint {
    background: #fff4e8;
    color: #f28c00;
}

.dm-front-document-icon.dm-file-image {
    background: #f4effb;
    color: #7b4ab3;
}

.dm-front-document-icon.dm-file-text {
    background: #f2f4f6;
    color: #5f6368;
}

.dm-front-document-icon.dm-file-zip {
    background: #fff6df;
    color: #d89b00;
}

.dm-front-document-icon.dm-file-rar {
    background: #f4ecfa;
    color: #7b3fa1;
}

.dm-front-document-icon.dm-file-7z {
    background: #edf5f7;
    color: #315f68;
}

.dm-front-document-icon.dm-file-default {
    background: #f1f5fa;
    color: #0c356a;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.dm-front-empty {
    padding: 42px 20px;
    border: 1px dashed #d9dde1;
    border-radius: 6px;
    background: #fafbfc;
    color: var(--dm-site-muted);
    text-align: center;
}

.dm-front-empty > i {
    margin-bottom: 10px;
    color: var(--dm-site-red);
    font-size: 34px;
}

.dm-front-empty-title {
    margin-bottom: 3px;
    color: var(--dm-site-blue);
    font-size: 15px;
    font-weight: 600;
}

.dm-front-empty-text {
    font-size: 12px;
}


/* =========================================================
   SITE ACTION BUTTONS
   Back / Download / Protected Download
   ========================================================= */

.dm-front-back,
.dm-front-download,
.dm-password-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid var(--dm-site-red);
    border-radius: 4px;
    background: #fff;
    color: var(--dm-site-red);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

.dm-front-back i,
.dm-front-download i,
.dm-password-submit i {
    color: inherit;
    font-size: 13px;
}

.dm-front-back:hover,
.dm-front-back:focus,
.dm-front-download:hover,
.dm-front-download:focus,
.dm-password-submit:hover,
.dm-password-submit:focus {
    background: var(--dm-site-red);
    border-color: var(--dm-site-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(208, 15, 47, .15);
}

.dm-front-download:disabled {
    border-color: #c9ced4;
    background: #f0f2f4;
    color: #8b9299;
    opacity: .6;
    cursor: wait;
}

.dm-password-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
}

.dm-password-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.dm-front-download.loading {
    opacity: .65;
    cursor: wait;
    pointer-events: none;
}


/* =========================================================
   PASSWORD MODAL
   ========================================================= */

.dm-password-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dm-password-modal.dm-password-open {
    display: flex;
}

.dm-password-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 45, .55);
}

.dm-password-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    padding: 35px;
    border-top: 4px solid var(--dm-site-red);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    text-align: center;
}

.dm-password-close {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9aa3ad;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.dm-password-close:hover {
    color: var(--dm-site-red);
}

.dm-password-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(208, 15, 47, .08);
    color: var(--dm-site-red);
    font-size: 28px;
}

.dm-password-dialog h4 {
    margin: 0 0 10px;
    color: var(--dm-site-blue);
    font-size: 22px;
    font-weight: 700;
}

.dm-password-dialog p {
    margin: 0 0 22px;
    color: #6f7782;
    font-size: 14px;
    line-height: 1.55;
}

.dm-password-field input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #d7dde5;
    border-radius: 4px;
    background: #fff;
    color: #102b5c;
    font-size: 14px;
    outline: 0;
    transition: .2s ease;
}

.dm-password-field input:focus {
    border-color: var(--dm-site-red);
    box-shadow: 0 0 0 3px rgba(208, 15, 47, .08);
}

.dm-password-field input::placeholder {
    color: #9aa3ad;
}

.dm-password-error {
    min-height: 22px;
    margin-top: 8px;
    color: #b42318;
    font-size: 12px;
    text-align: left;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {
    .dm-front-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .dm-front-search-wrap {
        width: 100%;
    }

    .dm-front-folders {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .dm-front-title {
        font-size: 23px;
    }

    .dm-front-folder {
        padding: 13px;
    }

    .dm-front-folder-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        margin-right: 11px;
        font-size: 20px;
    }

    .dm-front-document {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 13px;
    }

    .dm-front-document-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .dm-front-document-content {
        width: calc(100% - 50px);
    }

    .dm-front-document-action {
        width: 100%;
        margin: 10px 0 0 50px;
    }
}
