: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;
}

.dm-front {
    width: 100%;
    margin: 0 0 20px;
    color: #263238;
}

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

.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: #0b2f63;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

.dm-front-subtitle {
    margin: 0;
    color: #7a7f86;
    font-size: 14px;
}

.dm-front-search-wrap {
    position: relative;
    width: 300px;
    max-width: 100%;
    flex: 0 0 auto;
}

.dm-front-search-wrap > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #8d949c;
    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);
}

.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 #e6e8eb;
    border-radius: 5px;
    background: #f7f8fa;
}

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

.dm-front-breadcrumb-item:hover,
.dm-front-breadcrumb-item:focus {
    color: #d82333;
    outline: none;
}

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

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

.dm-front-section-title {
    margin: 0 0 12px;
    color: #0b2f63;
    font-size: 16px;
    font-weight: 600;
}

.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 #e2e5e9;
    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: #0b2f63;
    box-shadow: 0 5px 16px rgba(11, 47, 99, .08);
    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: #eef3f9;
    color: #0b2f63;
    font-size: 23px;
}

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

.dm-front-folder-name {
    display: block;
    overflow: hidden;
    color: #17263d;
    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: #7b8188;
    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: #b0b5ba;
    font-size: 20px;
}

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

.dm-front-document {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #eceef0;
    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: #17263d;
    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: #7b8188;
    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: #949aa0;
    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 {
    color: #c32636;
    text-transform: none;
}

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

.dm-front-download {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid #0b2f63;
    border-radius: 4px;
    background: #0b2f63;
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.dm-front-download:disabled {
    border-color: #c9ced4;
    background: #f0f2f4;
    color: #8b9299;
    cursor: not-allowed;
}

.dm-front-empty {
    padding: 42px 20px;
    border: 1px dashed #d9dde1;
    border-radius: 6px;
    background: #fafbfc;
    color: #838a91;
    text-align: center;
}

.dm-front-empty > i {
    margin-bottom: 10px;
    color: #b3b9bf;
    font-size: 34px;
}

.dm-front-empty-title {
    margin-bottom: 3px;
    color: #44515f;
    font-size: 15px;
    font-weight: 600;
}

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

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

@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;
    }
}

/* PDF / Adobe Acrobat */
.dm-front-document-icon.dm-file-pdf {
    background: #fff1f1;
    color: #ec1c24;
}

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

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

/* Microsoft PowerPoint */
.dm-front-document-icon.dm-file-powerpoint {
    background: #fff1ec;
    color: #d24726;
}

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

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

/* Unknown / other files */
.dm-front-document-icon.dm-file-default {
    background: #f1f5fa;
    color: #0c356a;
}

/* =========================================================
   DM 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(5, 20, 45, 0.62);
}

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

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

.dm-password-close:hover {
    color: #071b3d;
}

.dm-password-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #eef4fb;
    color: #0c356a;
    font-size: 27px;
}

.dm-password-dialog h4 {
    margin: 0 0 10px;
    color: #071b3d;
    font-size: 22px;
    font-weight: 600;
}

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

.dm-password-field input {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    border: 1px solid #dce1e7;
    border-radius: 4px;
    outline: 0;
    font-size: 14px;
}

.dm-password-field input:focus {
    border-color: #0c356a;
    box-shadow: 0 0 0 3px rgba(12,53,106,.08);
}

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

.dm-password-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    border: 0;
    border-radius: 4px;
    background: #0c356a;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: .2s ease;
}

.dm-password-submit:hover {
    background: #071b3d;
}

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


/* Download button loading */

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

/* =========================================================
   DM PASSWORD MODAL - colors aligned with site
   ========================================================= */

.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, 0.55);
}

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

.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: #8d0b1a;
}

.dm-password-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #f4e8ea;
    color: #8d0b1a;
    font-size: 28px;
}

.dm-password-dialog h4 {
    margin: 0 0 10px;
    color: #102b5c; /* tamno plava */
    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;
    outline: 0;
    font-size: 14px;
    color: #102b5c;
    background: #fff;
    transition: .2s ease;
}

.dm-password-field input:focus {
    border-color: #8d0b1a;
    box-shadow: 0 0 0 3px rgba(141, 11, 26, 0.10);
}

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

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

.dm-password-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    border: 0;
    border-radius: 4px;
    background: #102b5c; /* glavna boja sajta */
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.dm-password-submit:hover {
    background: #8d0b1a; /* hover u bordo */
}

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

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

.dm-front-title,
.dm-front-section-title,
.dm-front-folder-name,
.dm-front-document-title {
    color: var(--dm-site-blue);
}

.dm-front-subtitle,
.dm-front-folder-description,
.dm-front-document-description {
    color: var(--dm-site-muted);
}


/* SEARCH */

.dm-front-search-wrap {
    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 {
    color: var(--dm-site-red);
}


/* BREADCRUMB */

.dm-front-breadcrumb {
    background: var(--dm-site-bg);
    border: 1px solid var(--dm-site-border);
}

.dm-front-breadcrumb-item {
    color: var(--dm-site-blue);
}

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

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


/* FOLDERS */

.dm-front-folder {
    background: #fff;
    border: 1px solid var(--dm-site-border);
}

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

.dm-front-folder-icon {
    background: rgba(0, 47, 103, .07);
    color: var(--dm-site-blue);
}

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

.dm-front-folder-arrow {
    color: #abb4bd;
}

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


/* DOCUMENT ROW */

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

.dm-front-document {
    border-bottom: 1px solid #edf0f3;
}

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

.dm-front-document-meta {
    color: var(--dm-site-muted);
}


/* PROTECTED */

.dm-front-protected {
    color: var(--dm-site-red);
    font-weight: 500;
}


/* DOWNLOAD BUTTON */

.dm-front-download {
    background: var(--dm-site-blue);
    border: 1px solid var(--dm-site-blue);
    color: #fff;
}

.dm-front-download:hover,
.dm-front-download:focus {
    background: var(--dm-site-red);
    border-color: var(--dm-site-red);
    color: #fff;
}


/* EMPTY STATE */

.dm-front-empty {
    color: var(--dm-site-muted);
}

.dm-front-empty > i {
    color: var(--dm-site-red);
}

.dm-front-empty-title {
    color: var(--dm-site-blue);
}

.dm-password-dialog {
    border-top: 4px solid var(--dm-site-red);
}

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

.dm-password-dialog h4 {
    color: var(--dm-site-blue);
}

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

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

.dm-password-submit {
    background: var(--dm-site-blue);
}

.dm-password-submit:hover {
    background: var(--dm-site-red);
}

.dm-front-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 42px;
    padding: 0 18px;

    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;

    cursor: pointer;
    transition: all .2s ease;
}

.dm-front-back:hover,
.dm-front-back:focus {
    background: var(--dm-site-red);
    border-color: var(--dm-site-red);
    color: #fff;
}

.dm-front-back i {
    font-size: 14px;
}


/*
 * Obavezno zbog hidden atributa.
 */
.dm-front-back[hidden],
.dm-front-root-heading[hidden] {
    display: none !important;
}

/* =========================================================
   ARCHIVE FILE TYPES
   ========================================================= */

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

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

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

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

/* =========================================================
   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: #ffffff;
    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;
}


/* ICONS */

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


/* HOVER */

.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: #ffffff;

    box-shadow: 0 4px 12px rgba(208, 15, 47, .15);
}


/* DISABLED / LOADING */

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

.dm-front-download.loading {
    pointer-events: none;
}

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

.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-field input:focus {
    border-color: var(--dm-site-red);
    box-shadow: 0 0 0 3px rgba(208, 15, 47, .08);
}

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